/* Administrator dashboard — layered on top of style.css */
.admin-body { background: #f2f6f4; }
.admin-top {
  background: #06382a; color: #dcefe5; padding: 0;
  position: sticky; top: 0; z-index: 40;
}
.admin-top .bar { display: flex; align-items: center; gap: 14px; min-height: 62px; padding-block: 8px; }
.admin-top img { width: 38px; height: 38px; border-radius: 50%; }
.admin-top .t { line-height: 1.2; }
.admin-top .t b { color: #fff; font-size: .98rem; }
.admin-top .t span { font-size: .74rem; color: #9fc4b4; }
.admin-top .who { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: .84rem; }
.admin-top .who .role { background: rgba(255,255,255,.14); padding: 3px 10px; border-radius: 999px; font-size: .74rem; }
.admin-top .who button { background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .8rem; cursor: pointer; }
.admin-top .who button:hover { background: rgba(255,255,255,.12); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0; }
.tabs button {
  font: inherit; font-size: .9rem; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
}
.tabs button.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }

.stat-cards { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .stat-cards { grid-template-columns: repeat(4, 1fr); } }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow-sm); }
.stat-card .k { font-size: .8rem; color: var(--muted); }
.stat-card .v { font-size: 1.5rem; font-weight: 700; color: var(--green-800); line-height: 1.2; margin-top: 4px; }
.stat-card.gold .v { color: #8a6412; }
.stat-card.red .v { color: var(--red); }

.filters { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .filters { grid-template-columns: 2fr 1fr 1fr 1fr auto; } }
.filters input, .filters select {
  min-height: 42px; padding: 8px 12px; border: 1px solid #cfdad5; border-radius: 10px;
  font: inherit; font-size: .9rem; background: #fff; width: 100%;
}

.app-head { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.app-head .photo { width: 96px; height: 118px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #f2f5f3; }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eff4f1; }
.doc-row:last-child { border-bottom: 0; }
.doc-row .nm { flex: 1; font-size: .9rem; }
.doc-row .nm small { display: block; color: var(--muted); }
.action-panel { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; background: #fff; }
.action-panel h4 { margin: 0 0 10px; color: var(--green-800); font-size: .98rem; }
.action-panel .row { display: grid; gap: 10px; grid-template-columns: 1fr; margin-bottom: 10px; }
@media (min-width: 640px) { .action-panel .row.two { grid-template-columns: 1fr 1fr; } }
.action-panel input, .action-panel select, .action-panel textarea {
  width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid #cfdad5;
  border-radius: 10px; font: inherit; font-size: .9rem;
}
.action-panel textarea { min-height: 76px; resize: vertical; }
.badge-role { font-size: .72rem; background: var(--green-50); color: var(--green-600); border: 1px solid var(--green-100); padding: 2px 8px; border-radius: 999px; }
.audit-line { font-size: .8rem; padding: 6px 0; border-bottom: 1px dashed #e6eeea; color: var(--ink-2); }
.audit-line b { color: var(--green-800); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background:
  radial-gradient(900px 400px at 80% 0%, rgba(200,162,74,.16), transparent 60%),
  linear-gradient(160deg, #064530, #0b7a4b); padding: 24px; }
.login-card { width: 100%; max-width: 420px; background: #fff; border-radius: 18px; padding: 30px; box-shadow: var(--shadow-lg); }
.login-card .brandline { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.login-card .brandline img { width: 48px; }

/* MFA enrolment panel */
#mfaCard input[type="text"], #mfaCard input[type="password"] { width: 100%; }
#mfaSetup .row { margin-bottom: 10px; }
#mfaCode { letter-spacing: 4px; font-size: 1.05rem; text-align: center; }
#mfaSecret { font-size: .82rem; }

/* ---------------- small screens (phones) ---------------- */
@media (max-width: 640px) {
  .admin-top .bar { flex-wrap: wrap; gap: 8px 10px; padding-block: 8px; }
  .admin-top img { width: 32px; height: 32px; }
  .admin-top .t { flex: 1; min-width: 0; }
  .admin-top .t b { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .admin-top .t span { font-size: .7rem; }
  .admin-top .who { width: 100%; margin-left: 0; justify-content: space-between; gap: 8px; font-size: .78rem; }
  .admin-top .who .role { font-size: .68rem; padding: 2px 8px; }
  .admin-top .who button { padding: 4px 10px; font-size: .76rem; }
  .tabs { gap: 5px; margin: 14px 0; }
  .tabs button { font-size: .82rem; padding: 7px 12px; }
  .stat-card .v { font-size: 1.25rem; }
  .app-head .photo { width: 76px; height: 94px; }
}
