/* Manager console — layered on top of styles.css */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(135deg, var(--sea-500), var(--sea-700));
  color: #fff; box-shadow: var(--shadow-md);
}
.topbar .inner {
  width: min(1040px, 94vw); margin-inline: auto;
  display: flex; align-items: center; gap: 1rem; padding: 0.9rem 0; flex-wrap: wrap;
}
.topbar .brand { font-weight: 800; font-size: 1.25rem; display: flex; align-items: center; gap: 0.5rem; margin-right: auto; }
.topbar .tools { display: flex; align-items: center; gap: 0.5rem; }

.sizer { display: flex; align-items: center; gap: 0.35rem; background: rgba(255,255,255,0.16); border-radius: 999px; padding: 4px; }
.sizer button {
  width: 46px; height: 46px; border-radius: 999px; border: none; cursor: pointer;
  background: rgba(255,255,255,0.9); color: var(--sea-700); font-weight: 800; font-size: 1.1rem;
}
.sizer button:active { transform: scale(0.94); }
.sizer .lbl { font-size: 0.8rem; padding: 0 0.4rem; opacity: 0.9; }

.top-btn {
  border: 1.5px solid rgba(255,255,255,0.6); background: rgba(255,255,255,0.12); color: #fff;
  border-radius: 999px; padding: 0.6rem 1.1rem; font-weight: 700; cursor: pointer; font-size: 0.95rem; min-height: 46px;
}
.top-btn:hover { background: rgba(255,255,255,0.22); }

.voice-pick {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(255,255,255,0.16); border-radius: 999px; padding: 4px 8px 4px 12px;
  color: #fff; min-height: 46px; font-size: 1.1rem;
}
.voice-pick select {
  border: none; background: #fff; color: var(--sea-700);
  font-family: inherit; font-weight: 700; font-size: 0.9rem;
  border-radius: 999px; padding: 0.5rem 0.7rem; min-height: 38px; max-width: 160px; cursor: pointer;
}

/* Gate */
.gate { width: min(460px, 92vw); margin: 12vh auto 0; text-align: center; padding: 2.4rem; }
.gate .lock { font-size: 3rem; }
.gate h1 { font-size: 1.7rem; margin: 0.6rem 0 0.3rem; }
.gate p { color: var(--ink-soft); margin-bottom: 1.4rem; }
.gate input { text-align: center; font-size: 1.3rem; letter-spacing: 0.08em; margin-bottom: 1rem; }
.gate .btn { width: 100%; }
.gate .err { color: var(--err); font-weight: 600; margin-top: 0.8rem; min-height: 1.2em; }

/* Console body */
.console { width: min(1040px, 94vw); margin: 1.8rem auto 4rem; }
.console .head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.console .head h1 { font-size: 1.8rem; }
.console .head .count { color: var(--ink-soft); font-weight: 600; }
.console .head .btn-ghost { margin-left: auto; }

.speaking-note {
  background: var(--sand-200); border-radius: 14px; padding: 0.8rem 1.1rem; margin-bottom: 1.2rem;
  color: var(--ink-soft); font-size: 0.92rem; display: flex; gap: 0.6rem; align-items: center;
}

.appcard { padding: clamp(1.2rem, 3vw, 1.8rem); margin-bottom: 1.4rem; }
.appcard.reading { outline: 4px solid var(--sea-400); outline-offset: 2px; }
.appcard .ac-head { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.appcard .ac-name { font-size: 1.5rem; font-weight: 800; }
.appcard .ac-when { color: var(--ink-soft); font-size: 0.9rem; font-weight: 600; }
.appcard .ac-tag {
  margin-left: auto; background: var(--sea-500); color: #fff; font-weight: 700; font-size: 0.8rem;
  padding: 0.3rem 0.8rem; border-radius: 999px; align-self: flex-start;
}

.keyfacts { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1rem 0 1.2rem; }
.keyfacts span {
  background: var(--sand-200); border-radius: 10px; padding: 0.5rem 0.85rem; font-weight: 600; font-size: 0.95rem;
}
.keyfacts span b { color: var(--sea-700); font-weight: 800; }

/* The big audio button — the star of the page for low-vision use */
.audio-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.btn-audio {
  flex: 1 1 260px;
  font-size: 1.35rem; padding: 1.3rem 1.6rem; min-height: 74px;
  background: linear-gradient(135deg, var(--sea-400), var(--sea-700));
  box-shadow: 0 14px 30px rgba(11,85,102,0.4);
}
.btn-audio .ico { font-size: 1.7rem; }
.btn-stop { flex: 0 0 auto; background: linear-gradient(135deg,#8b98a0,#5c6a72); box-shadow:none; font-size: 1.2rem; padding: 1.3rem 1.5rem; }

.details {
  margin-top: 1.2rem; border-top: 1px dashed rgba(15,42,51,0.16); padding-top: 1rem;
}
.details summary {
  cursor: pointer; font-weight: 700; color: var(--sea-700); font-size: 1.05rem; list-style: none;
  padding: 0.4rem 0; display: flex; align-items: center; gap: 0.5rem;
}
.details summary::-webkit-details-marker { display: none; }
.details summary::before { content: "▸"; transition: transform 0.15s; }
.details[open] summary::before { transform: rotate(90deg); }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 0.7rem 1.4rem; margin-top: 0.8rem; }
.detail-grid .row { display: flex; flex-direction: column; padding: 0.55rem 0; border-bottom: 1px solid rgba(15,42,51,0.07); }
.detail-grid .row .k { font-size: 0.8rem; color: var(--ink-soft); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.detail-grid .row .v { font-size: 1.05rem; }
.detail-grid .row.flag .v { color: var(--coral-dark); font-weight: 700; }

/* Driver's license thumbnails */
.lic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 0.9rem; margin-top: 0.6rem; }
.lic { display: block; text-decoration: none; border: 2px solid rgba(14,165,183,0.35); border-radius: 14px; overflow: hidden; background: #0c1a1f; }
.lic img { width: 100%; max-height: 260px; object-fit: contain; display: block; background: #0c1a1f; }
.lic span { display: block; text-align: center; padding: 0.55rem; font-weight: 700; color: var(--sea-700); background: var(--white); font-size: 0.95rem; }
.lic:hover { border-color: var(--sea-500); }

.card-actions { margin-top: 1.2rem; display: flex; gap: 0.8rem; flex-wrap: wrap; }
.btn-danger { background: transparent; color: var(--err); border: 2px solid rgba(229,72,77,0.35); box-shadow: none; font-size: 0.95rem; padding: 0.7rem 1.2rem; min-height: 46px; }
.btn-danger:hover { background: rgba(229,72,77,0.08); box-shadow: none; }

/* Private owner notes — sticky-note feel so it reads as "not the applicant's" */
.owner-notes {
  margin-top: 1.3rem; background: #fff8e6; border: 1.5px solid #f0d688;
  border-radius: 16px; padding: 1rem 1.1rem;
}
.owner-notes label { display: block; font-weight: 800; color: #8a6d1a; margin-bottom: 0.55rem; font-size: 1.05rem; }
.owner-notes label span { font-weight: 500; color: #a98b3f; font-size: 0.85rem; }
.owner-notes-input {
  width: 100%; min-height: 92px; resize: vertical;
  border: 1.5px solid #e6cf86; border-radius: 12px; background: #fffdf6;
}
.owner-notes-input:focus { border-color: #d4af3a; box-shadow: 0 0 0 4px rgba(212, 175, 58, 0.18); }
.owner-notes-actions { display: flex; align-items: center; gap: 0.9rem; margin-top: 0.7rem; }
.owner-notes-actions .btn { font-size: 1rem; padding: 0.7rem 1.5rem; min-height: 48px; }
.saved-badge { color: var(--ok); font-weight: 800; }

/* Edit modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60; overflow: auto;
  background: rgba(6, 50, 63, 0.55); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center; padding: 4vh 3vw;
}
.modal { width: min(760px, 96vw); max-height: 92vh; display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.4rem; border-bottom: 1px solid rgba(15, 42, 51, 0.1); }
.modal-head h2 { font-size: 1.4rem; margin-right: auto; }
.modal-x { width: 46px; height: 46px; border-radius: 999px; border: none; background: var(--sand-200); color: var(--ink); cursor: pointer; font-size: 1.1rem; font-weight: 700; }
.modal-x:hover { background: var(--sand-300); }
.modal-body { padding: 1.2rem 1.4rem; overflow: auto; }
.modal-foot { display: flex; gap: 0.8rem; justify-content: flex-end; padding: 1rem 1.4rem; border-top: 1px solid rgba(15, 42, 51, 0.1); flex-wrap: wrap; }
.modal-foot .btn { font-size: 1.05rem; }
.edit-sec { font-size: 1rem; color: var(--sea-700); margin: 1.3rem 0 0.5rem; }
.edit-sec:first-child { margin-top: 0; }
.edit-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem 1rem; }
@media (max-width: 620px) { .edit-grid { grid-template-columns: 1fr; } }
.edit-field { display: flex; flex-direction: column; gap: 0.3rem; }
.edit-field label { font-size: 0.78rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }
.edit-field textarea { min-height: 80px; }

.empty { text-align: center; padding: 4rem 1rem; color: var(--ink-soft); }
.empty .big { font-size: 3rem; }

.loading { text-align: center; padding: 3rem; color: var(--ink-soft); font-weight: 600; }
