@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --bg: #f5f7f9; --surface: #fff; --ink: #183044; --muted: #647585;
  --line: #e3e9ed; --brand: #0e766e; --brand-dark: #095d57;
  --soft: #edf8f5; --danger: #b83240; --radius: 18px;
  font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.7; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
button, .button { min-height: 46px; border-radius: 10px; border: 1px solid transparent; padding: 10px 19px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: background .18s, box-shadow .18s; }
.button:hover { text-decoration: none; }
.primary { background: var(--brand); color: white; box-shadow: 0 3px 8px #0e766e15; }
.primary:hover:not(:disabled) { background: var(--brand-dark); }
.secondary { background: white; border-color: var(--line); color: var(--ink); }
.secondary:hover:not(:disabled), .quiet:hover:not(:disabled) { background: #edf2f5; }
.quiet { background: transparent; color: var(--muted); }
.danger { background: #fff2f3; color: var(--danger); border-color: #f1d4d8; }
.danger:hover:not(:disabled) { background: #fce5e8; }
:focus-visible { outline: 3px solid #35a79e; outline-offset: 3px; }
[hidden] { display: none !important; }
svg.icon { width: 21px; height: 21px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; inset-block-start: 10px; inset-inline-start: 20px; z-index: 20; background: white; padding: 12px; clip-path: inset(100%); }
.skip-link:focus { clip-path: none; }
.topbar { background: #ffffffed; border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1360px; margin: auto; padding: 17px 40px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; background: var(--brand); color: white; box-shadow: 0 4px 10px #0e766e20; }
.brand-mark svg { width: 28px; height: 28px; }
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: -.6px; line-height: 1.35; }
.brand-sub { font-size: 11px; color: var(--muted); display: block; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-button { border-color: var(--line); background: white; color: var(--ink); padding: 8px 13px; font-size: 13px; }
.container { max-width: 1180px; margin: auto; padding: 38px 32px 22px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; color: var(--brand); font-size: 12px; font-weight: 600; margin-bottom: 9px; }
.eyebrow::before { content: ''; width: 7px; height: 7px; background: #20a18e; border-radius: 50%; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(25px, 3vw, 34px); line-height: 1.45; letter-spacing: -.6px; margin-bottom: 9px; }
h2 { font-size: 19px; margin-bottom: 5px; }
h3 { font-size: 15px; margin-bottom: 4px; }
.muted, .subtitle { color: var(--muted); }
.subtitle { margin-bottom: 0; font-size: 14px; }
.page-heading { margin-bottom: 27px; }
.intake-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 5px 20px #18304403; min-width: 0; }
.panel-heading { padding: 23px 28px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 13px; }
.panel-heading p { font-size: 12px; color: var(--muted); margin: 0; }
.heading-icon { background: var(--soft); color: var(--brand); padding: 10px; border-radius: 12px; display: flex; }
.panel-body { padding: 26px 28px; }
.required-note { margin-inline-start: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.req { color: var(--danger); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; font-size: 13px; font-weight: 600; width: 100%; margin-bottom: 19px; display: flex; align-items: center; gap: 9px; }
.step-number { display: inline-grid; place-items: center; width: 25px; height: 25px; background: #f0f4f6; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; color: var(--muted); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { min-width: 0; }
.field.full { grid-column: 1/-1; }
label { font-size: 13px; font-weight: 500; display: block; margin-bottom: 7px; }
input:not([type=checkbox]), select { width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid #d7e0e6; border-radius: 9px; background: white; color: var(--ink); font-size: 16px; transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: #8b99a5; font-size: 13px; }
input:hover, select:hover { border-color: #aebfc8; }
input:focus, select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px #0e766e16; }
input[aria-invalid=true], select[aria-invalid=true] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 12px; margin-top: 5px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 6px; }
.hint-row { display: flex; gap: 12px; align-items: start; justify-content: space-between; }
.digit-count { font-size: 12px; color: var(--muted); white-space: nowrap; direction: ltr; }
.form-divider { border: 0; border-top: 1px solid var(--line); margin: 25px 0; }
.preview { display: flex; align-items: center; gap: 12px; background: #f7f9fa; border: 1px dashed #d7e0e6; padding: 14px 16px; border-radius: 10px; margin: 23px 0; }
.preview .icon { color: var(--muted); }
.preview small { display: block; color: var(--muted); font-size: 11px; }
.preview strong { font-size: 14px; overflow-wrap: anywhere; }
.form-actions { display: flex; gap: 10px; }
.form-actions .primary { flex: 1; }
.form-footnote { display: flex; justify-content: center; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); margin: 14px 0 0; }
.form-footnote svg { width: 15px; height: 15px; }
.footer { max-width: 1180px; margin: 10px auto 0; padding: 21px 32px; color: var(--muted); font-size: 11px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer span:last-child { display: flex; gap: 6px; align-items: center; }
.footer svg { width: 14px; height: 14px; }
.alert { border: 1px solid #efd8a1; background: #fff9eb; color: #825a13; border-radius: 11px; padding: 13px 16px; font-size: 13px; margin-bottom: 18px; overflow-wrap: anywhere; }
.alert.error { background: #fff2f3; border-color: #f1d4d8; color: #a32836; }
.alert.success { background: var(--soft); border-color: #c5e7dd; color: var(--brand-dark); }
.alert ul { margin: 6px 0 0; padding-inline-start: 20px; }
.success-screen { text-align: center; padding: 35px 10px; }
.success-mark { width: 70px; height: 70px; background: var(--soft); color: var(--brand); display: grid; place-items: center; border-radius: 50%; margin: 0 auto 20px; }
.success-mark svg { width: 34px; height: 34px; }
.success-screen p { color: var(--muted); max-width: 400px; margin: 10px auto 22px; }
.success-name { display: block; font-size: 18px; margin-bottom: 14px; overflow-wrap: anywhere; }
.login-layout { min-height: calc(100vh - 180px); display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 70px; max-width: 1050px; margin: auto; padding: 50px 32px; }
.login-story h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 20px; }
.login-story h1 em { color: var(--brand); font-style: normal; }
.login-story > p { color: var(--muted); max-width: 400px; margin-bottom: 30px; }
.feature { display: flex; gap: 14px; align-items: center; margin: 22px 0; }
.feature .heading-icon { background: #e5f2ee; }
.feature small { display: block; color: var(--muted); }
.login-card { padding: 34px; }
.login-card > .heading-icon { display: inline-flex; margin-bottom: 18px; }
.login-card h2 { font-size: 25px; }
.login-card .subtitle { margin-bottom: 25px; }
.login-card .field + .field { margin-top: 19px; }
.password-wrap { position: relative; }
.password-wrap input { padding-inline-end: 53px; }
.password-toggle { position: absolute; inset-inline-end: 3px; top: 3px; min-height: 42px; padding: 8px 11px; }
.login-card .primary { width: 100%; margin-top: 25px; }
.login-back { display: block; text-align: center; font-size: 13px; margin-top: 20px; }
.dashboard { max-width: 1420px; }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.connection { border: 1px solid var(--line); padding: 7px 12px; border-radius: 30px; background: white; color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 7px; }
.connection::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #d79729; }
.connection.online::before { background: #18a47c; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 17px; margin-bottom: 26px; }
.stat-card { padding: 19px 22px; display: flex; align-items: center; gap: 16px; }
.stat-card .heading-icon { margin-inline-start: auto; }
.stat-card small { color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; font-size: 28px; line-height: 1.4; }
.stat-card.waiting .heading-icon { background: #fff5df; color: #a87312; }
.stat-card.queued .heading-icon { background: #edf3fd; color: #4777ba; }
.admin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 23px; }
.queue-panel .panel-heading { justify-content: space-between; }
.count-badge { font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 7px; background: #f0f4f6; margin-inline-start: 7px; }
.queue-tools { padding: 20px 24px; display: flex; gap: 12px; }
.search-wrap { position: relative; flex: 1; min-width: 0; }
.search-wrap .icon { position: absolute; inset-inline-start: 13px; top: 13px; color: var(--muted); pointer-events: none; }
.search-wrap input { padding-inline-start: 43px; }
.queue-tools select { width: 160px; font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12px; }
th { background: #f8fafb; color: var(--muted); font-size: 11px; font-weight: 500; white-space: nowrap; }
th, td { padding: 14px 15px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfdfd; }
.person { display: flex; align-items: center; gap: 10px; min-width: 140px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; flex-shrink: 0; background: #edf4f4; color: var(--brand); font-weight: 600; }
.person strong { font-size: 12px; display: block; overflow-wrap: anywhere; }
.person small { color: var(--muted); display: block; }
.record-note { max-width: 270px; font-size: 11px; color: var(--danger); overflow-wrap: anywhere; margin-top: 5px; }
.pill { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; border-radius: 6px; padding: 4px 8px; font-size: 11px; font-weight: 500; }
.pill::before { content: ''; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.s-submitted, .s-running { background: #fff5df; color: #92620b; }
.s-queued { background: #edf3fd; color: #3766a8; }
.s-done { background: #eaf7f0; color: #23734e; }
.s-failed { background: #fff0f1; color: #b83240; }
.s-skipped { background: #eef1f4; color: #657381; }
.record-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.record-actions button { font-size: 11px; padding: 5px 10px; min-height: 38px; }
.empty-state { text-align: center; padding: 50px 20px; }
.empty-state .heading-icon { width: fit-content; margin: 0 auto 15px; padding: 16px; }
.empty-state p { color: var(--muted); font-size: 12px; margin-bottom: 0; }
.queue-footer { padding: 13px 24px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.queue-footer button { font-size: 12px; padding: 6px 9px; }
.run-card .panel-body { padding: 22px; }
.run-card .primary { width: 100%; }
.run-status { background: #f7f9fa; border-radius: 10px; padding: 14px; margin-bottom: 20px; }
.run-status strong { display: block; font-size: 14px; }
.run-status small { color: var(--muted); font-size: 12px; }
.toggle { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--brand); margin: 3px 0 0; flex-shrink: 0; }
.toggle small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
.run-card .quiet { width: 100%; margin-top: 8px; font-size: 12px; }
.logs-panel { margin-top: 24px; }
.logs-panel summary { padding: 19px 24px; cursor: pointer; font-size: 14px; font-weight: 600; }
.logs-panel summary span { color: var(--muted); font-size: 11px; font-weight: 400; margin-inline-start: 10px; }
#logs { direction: ltr; text-align: left; background: #122b38; color: #d4e2e9; padding: 20px; margin: 0 20px 20px; border-radius: 12px; font: 12px/1.9 Consolas, monospace; height: 260px; overflow: auto; overflow-wrap: anywhere; white-space: pre-wrap; }
#logs .t { color: #94adba; }
#logs .l-ok { color: #9cdec0; } #logs .l-error { color: #ffadb6; } #logs .l-warn, #logs .l-action { color: #f6d18b; }
.modal { border: 1px solid var(--line); border-radius: 20px; padding: 0; color: var(--ink); width: min(620px, calc(100% - 28px)); max-height: calc(100dvh - 40px); overflow: auto; box-shadow: 0 20px 100px #0d253a30; }
.modal::backdrop { background: #102a3e80; backdrop-filter: blur(3px); }
.modal .panel-heading { justify-content: space-between; }
.close-button { padding: 8px; min-width: 44px; }
.confirm-dialog { max-width: 440px; padding: 28px; }
.confirm-dialog h2 { margin-bottom: 12px; }
.confirm-dialog p { white-space: pre-line; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; max-height: 45vh; overflow-y: auto; }
.toast { position: fixed; bottom: 25px; inset-inline-start: 50%; transform: translateX(50%); z-index: 30; background: #123f3a; color: white; padding: 13px 23px; border-radius: 12px; box-shadow: 0 8px 30px #102a3e25; max-width: calc(100% - 32px); font-size: 13px; }
[dir=ltr] .toast { transform: translateX(-50%); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.loading { padding: 24px; text-align: center; color: var(--muted); }
@media (min-width: 1450px) { .dashboard .admin-layout { grid-template-columns: minmax(0, 1fr) 350px; } }
@media (max-width: 1100px) {
  .admin-layout { grid-template-columns: minmax(0, 1fr); }
  .run-card { order: -1; }
  .run-card .panel-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .run-card .run-status { grid-row: span 2; }
  .run-card .alert, .run-card #runSummary { grid-column: 1/-1; }
  .login-layout { gap: 35px; }
}
@media (max-width: 800px) {
  .intake-layout { grid-template-columns: minmax(0, 1fr); }
  .topbar-inner { padding: 15px 24px; }
  .stats { gap: 12px; }
  .stat-card { padding: 15px; gap: 5px; }
  .stat-card .heading-icon { padding: 7px; }
  .login-layout { grid-template-columns: 1fr; max-width: 530px; padding-top: 28px; }
  .login-story { text-align: center; }
  .login-story h1 { font-size: 29px; margin-bottom: 8px; }
  .login-story > p { margin: 0 auto; font-size: 13px; }
  .login-story .feature { display: none; }
  .login-card { padding: 28px; }
}
@media (max-width: 600px) {
  .topbar-inner { padding: 12px 16px; gap: 8px; }
  .brand { gap: 8px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
  .brand-name { font-size: 18px; }
  .brand-sub { font-size: 9px; }
  .nav-actions { gap: 6px; }
  .nav-actions .button, .nav-actions > .quiet { padding: 8px; min-width: 38px; }
  .nav-label { display: none; }
  .lang-button { padding: 8px 10px; }
  .lang-button .icon { display: none; }
  .container { padding: 25px 16px 12px; }
  h1 { font-size: 26px; }
  .subtitle { font-size: 13px; }
  .page-heading { margin-bottom: 23px; }
  .panel-heading { padding: 18px; gap: 10px; }
  .panel-heading h2 { font-size: 17px; }
  .required-note { font-size: 10px; }
  .panel-heading > .heading-icon { display: none; }
  .panel-body { padding: 21px 18px; }
  .field-grid { gap: 16px 12px; }
  fieldset:nth-of-type(2) .field-grid { grid-template-columns: 1fr; }
  .form-footnote { font-size: 10px; }

  .footer { padding: 22px 16px; flex-direction: column; gap: 5px; text-align: center; }
  .dashboard-heading { align-items: flex-start; }
  .dashboard-heading h1 { font-size: 25px; }
  .connection { font-size: 10px; padding: 6px 9px; white-space: nowrap; margin-top: 5px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px 15px; }
  .stat-card strong { font-size: 26px; }
  .stat-card small { font-size: 11px; }
  .run-card .panel-body { display: block; }
  .run-card .panel-heading { padding: 16px 20px; }
  .queue-panel .panel-heading { padding: 18px 16px; }
  .queue-panel .panel-heading .primary { font-size: 12px; padding: 8px 11px; }
  .queue-tools { padding: 16px; flex-direction: column; gap: 9px; }
  .queue-tools select { width: 100%; }
  .table-wrap { overflow: visible; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tr { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 0 16px 12px; gap: 12px; }
  td { display: block; padding: 0; border: 0; min-width: 0; }
  td::before { content: attr(data-label); display: block; font-size: 10px; color: var(--muted); margin-bottom: 3px; }
  td:first-child { grid-column: 1/-1; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  td:first-child::before, td:last-child::before { display: none; }
  td:last-child { grid-column: 1/-1; }
  .person strong { font-size: 14px; }
  .record-actions button { min-height: 44px; flex: 1; font-size: 12px; }
  .queue-footer { padding: 12px 16px; }
  .logs-panel summary span { display: block; margin: 4px 0 0; }
  #logs { margin: 0 12px 12px; padding: 14px; }
  .login-layout { padding: 28px 16px; gap: 24px; }
  .login-card { padding: 25px 22px; }
  .modal .panel-body { padding: 20px 18px; }
}
@media (max-width: 360px) {
  .field-grid { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .required-note { white-space: normal; max-width: 70px; }
  .stat-card .heading-icon { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* A focused registration surface, with no supplemental sidebar. */
body[data-page=intake] { background: radial-gradient(ellipse at 50% 0, #e6f3ef 0, transparent 55%), #f5f7f9; }
.intake-page { max-width: 900px; padding-top: 40px; }
.intake-page .page-heading { text-align: center; margin: 0 auto 28px; max-width: 660px; }
.intake-page .page-heading .subtitle { line-height: 1.9; }
.intake-page .panel { box-shadow: 0 12px 40px #18304407; border-color: #dfe9e7; border-radius: 22px; overflow: hidden; }
.intake-page .panel-heading { padding: 22px 32px; background: #fbfdfc; }
.intake-page .panel-body { padding: 28px 32px; }
.intake-page legend { font-size: 14px; margin-bottom: 18px; }
.intake-page .step-number { background: var(--soft); border-color: #d5e9e3; color: var(--brand); width: 28px; height: 28px; }
.intake-page .field-grid { gap: 20px 24px; }
.intake-page label { font-size: 14px; }
.intake-page input, .intake-page select { min-height: 50px; border-radius: 11px; background: #fdfefe; }
.intake-page .preview { border-style: solid; border-color: #e2ece8; background: #f4f9f7; margin: 24px 0 20px; }
.intake-page .preview .icon { color: var(--brand); }
.intake-page .form-actions button { min-height: 50px; border-radius: 11px; }
.intake-page .form-footnote { text-align: center; align-items: flex-start; }
.intake-page .form-footnote .icon { margin-top: 3px; flex-shrink: 0; }
body[data-page=intake] .footer { max-width: 900px; }
@media (max-width: 600px) {
  .intake-page { padding: 24px 16px 10px; }
  .intake-page .page-heading { margin-bottom: 22px; }
  .intake-page h1 { font-size: 26px; }
  .intake-page .page-heading .subtitle { font-size: 13px; }
  .intake-page .panel { border-radius: 17px; }
  .intake-page .panel-heading { padding: 18px; gap: 10px; flex-wrap: wrap; }
  .intake-page .panel-heading > .heading-icon { display: flex; }
  .intake-page .panel-heading h2 { font-size: 17px; }
  .intake-page .required-note { flex-basis: 100%; max-width: none; padding-inline-start: 51px; }
  .intake-page .panel-body { padding: 22px 18px; }
  .intake-page .field-grid { gap: 17px 14px; }
  .intake-page label { font-size: 13px; }
  .intake-page .form-divider { margin: 23px 0; }
  .intake-page .preview { padding: 12px; }
}
/* Shared visual hierarchy and comfortable touch controls. */
:root { --muted: #536879; --line: #dfe8ec; }
body { background-color: #f3f6f8; }
.topbar { background: #fff; }
.topbar-inner { min-height: 78px; }
.brand-mark { background: #106b65; box-shadow: 0 4px 12px #106b651a; }
.panel { box-shadow: 0 6px 24px #18304405; }
.heading-icon { background: #edf6f3; }
input::placeholder { color: #738493; }
input[aria-invalid=true]:focus { box-shadow: 0 0 0 3px #b8324014; }
.field-error { font-weight: 500; }
button:active:not(:disabled) { transform: translateY(1px); }
.form-progress { margin-bottom: 28px; }
.form-progress > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.form-progress strong { color: var(--brand); font-weight: 500; }
.form-progress progress { appearance: none; display: block; width: 100%; height: 5px; border: 0; border-radius: 10px; overflow: hidden; background: #e9eff0; color: var(--brand); }
.form-progress progress::-webkit-progress-bar { background: #e9eff0; }
.form-progress progress::-webkit-progress-value { background: var(--brand); border-radius: 10px; transition: width .2s ease; }
.form-progress progress::-moz-progress-bar { background: var(--brand); border-radius: 10px; }
.digit-count.complete { color: var(--brand); font-weight: 600; }
.intake-page .eyebrow { background: #e7f3ee; border: 1px solid #d4e7de; border-radius: 30px; padding: 4px 12px; }
.intake-page .page-heading h1 { margin: 7px 0 12px; }
.intake-page .form-actions .primary { box-shadow: 0 5px 14px #0e766e20; }

/* Dashboard cards also serve as keyboard-accessible status filters. */
.dashboard { padding-top: 32px; }
.dashboard-heading { margin-bottom: 24px; }
.dashboard-heading h1 { font-size: clamp(25px, 3vw, 32px); }
.connection { font-size: 11px; background: #fff; padding: 8px 13px; }
.connection.online { background: #edf8f2; border-color: #cce6d8; color: #256546; }
.stats { gap: 14px; }
.stat-card { text-align: start; justify-content: flex-start; border: 1px solid var(--line); position: relative; padding: 20px 22px; border-radius: 16px; }
.stat-card:hover { border-color: #92bbb2; background: #fafdfe; }
.stat-card[aria-pressed=true] { border-color: var(--brand); background: #f1f9f5; box-shadow: 0 0 0 1px var(--brand); }
.stat-card small { font-weight: 500; }
.stat-card strong { font-size: 32px; font-variant-numeric: tabular-nums; margin-top: 4px; color: var(--ink); }
.stat-card .heading-icon { padding: 12px; border-radius: 14px; }
.stat-card.done .heading-icon { background: #e7f4ec; color: #2e7855; }
.queue-panel { overflow: hidden; }
.queue-panel .panel-heading { padding: 22px 24px; }
.queue-tools { background: #fafcfc; border-bottom: 1px solid var(--line); padding: 17px 24px; }
.queue-tools input, .queue-tools select { min-height: 46px; background: #fff; }
th { background: #f1f5f7; padding-block: 12px; font-size: 12px; }
td { padding-block: 18px; font-size: 13px; }
.person .avatar { width: 38px; height: 38px; border-radius: 12px; }
.person strong { font-size: 13px; }
.person small { margin-top: 2px; }
.pill { padding: 5px 9px; border: 1px solid #00000006; }
.record-actions button { min-height: 40px; border-radius: 8px; }
.queue-footer { background: #fcfdfd; min-height: 63px; }
.run-card { border-top: 3px solid var(--brand); }
.run-card .panel-heading { background: #f4faf7; border-radius: 15px 15px 0 0; }
.run-status { background: #f5f8fa; border: 1px solid #e2e9ed; padding: 16px; }
.run-status strong { margin-bottom: 4px; }
.run-card .toggle { padding-bottom: 14px; border-bottom: 1px solid #edf1f3; }
.run-card .primary { min-height: 48px; }
.logs-panel { box-shadow: none; }
.logs-panel summary { min-height: 60px; }
.empty-state { padding: 60px 24px; }
.empty-state h3 { font-size: 17px; }
.empty-state p { max-width: 380px; margin-inline: auto; }
.modal .panel-heading { background: #f7faf9; }
.modal .panel-heading .close-button { background: white; border-color: var(--line); }
.modal .form-actions { position: sticky; bottom: 0; background: white; padding-block: 8px; z-index: 1; }

/* A consistent, quieter sign-in surface. */
.login-layout { max-width: 1120px; gap: 50px; }
.login-story { background: #123f43; color: #fff; padding: 42px 36px; border-radius: 24px; }
.login-story .eyebrow { color: #a6dfd1; }
.login-story h1 { font-size: clamp(29px, 3.5vw, 40px); }
.login-story h1 em { color: #a6dfd1; }
.login-story > p, .login-story .feature small { color: #c0d8d6; }
.login-story .feature .heading-icon { background: #ffffff12; color: #a6dfd1; border: 1px solid #ffffff14; }
.login-story .feature { margin-bottom: 0; }
.login-card { border-radius: 22px; padding: 36px; box-shadow: 0 14px 45px #18304408; }
.login-card input { min-height: 52px; }
.login-card .primary { min-height: 50px; }
.login-card .password-toggle { top: 5px; }
@media (min-width: 1101px) {
  .run-card { position: sticky; top: 24px; }
}
@media (max-width: 800px) {
  .login-layout { gap: 22px; }
  .login-story { padding: 28px 24px; border-radius: 20px; }
  .login-story h1 { font-size: 28px; }
  .login-story > p { color: #c0d8d6; }
}
@media (max-width: 600px) {
  .topbar-inner { min-height: 68px; }
  .nav-actions .button, .lang-button { min-height: 44px; }
  .intake-page .page-heading { text-align: start; }
  .intake-page .page-heading h1 { font-size: 25px; line-height: 1.55; }
  .intake-page .required-note { padding-inline-start: 0; flex-basis: auto; }
  .form-progress { margin-bottom: 24px; }
  .form-progress > div { font-size: 11px; }
  .dashboard { padding: 24px 14px 12px; }
  .dashboard-heading { flex-wrap: wrap; gap: 12px; }
  .dashboard-heading .subtitle { font-size: 12px; }
  .connection { margin-top: 0; }
  .stats { gap: 11px; margin-bottom: 22px; }
  .stat-card { padding: 15px; gap: 8px; border-radius: 13px; align-items: flex-start; }
  .stat-card strong { font-size: 29px; }
  .stat-card small { font-size: 11px; }
  .stat-card .heading-icon { padding: 7px; border-radius: 9px; }
  .stat-card .heading-icon .icon { width: 18px; height: 18px; }
  .admin-layout { gap: 20px; }
  .run-card { order: 0; }
  .queue-panel .panel-heading { padding: 18px 15px; gap: 10px; flex-wrap: wrap; }
  .queue-panel .panel-heading .primary { min-height: 44px; }
  .queue-tools { padding: 14px; }
  .queue-tools input, .queue-tools select { min-height: 48px; font-size: 16px; }
  .table-wrap { padding-top: 14px; background: #f5f8f9; }
  tr { margin: 0 14px 14px; padding: 17px 15px; gap: 16px 10px; background: white; box-shadow: 0 3px 10px #18304404; border-inline-start: 3px solid #d8e4e8; }
  tr[data-status=submitted] { border-inline-start-color: #cd9d3a; }
  tr[data-status=done] { border-inline-start-color: #4b9974; }
  tr[data-status=failed] { border-inline-start-color: #cc6874; }
  tr[data-status=running] { border-inline-start-color: #498ab7; }
  td { padding-block: 0; }
  td::before { font-size: 11px; margin-bottom: 5px; }
  .person { gap: 12px; }
  .person strong { font-size: 14px; line-height: 1.7; }
  .person small { font-size: 12px; }
  .record-actions { gap: 9px; }
  .record-actions button { min-height: 46px; font-size: 12px; }
  .queue-footer { padding: 12px 14px; flex-wrap: wrap; gap: 5px; }
  .queue-footer .quiet { min-height: 44px; }
  .run-card .panel-heading { padding: 18px; }
  .run-card .panel-body { padding: 20px; }
  .run-card .toggle { min-height: 48px; }
  .logs-panel { margin-top: 20px; }
  .login-layout { padding: 24px 16px; }
  .login-story { padding: 24px 20px; }
  .login-story h1 { font-size: 26px; }
  .login-card { padding: 26px 22px; }
  .toast { bottom: max(18px, env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
  .stat-card { padding: 13px; }
  .form-progress > div { flex-wrap: wrap; gap: 3px 12px; }
  .intake-page .form-footnote { font-size: 11px; }
}
/* Reports and activity share the dashboard's responsive card language. */
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
.dashboard-nav { display: flex; flex-wrap: wrap; gap: 10px; margin: -6px 0 23px; }
.dashboard-nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 15px; border: 1px solid var(--line); background: white; border-radius: 30px; font-size: 13px; font-weight: 500; }
.dashboard-nav a:hover { text-decoration: none; background: var(--soft); border-color: #b4d4ca; }
.activity-panel { margin-top: 26px; overflow: hidden; border-top: 3px solid var(--brand); }
.activity-panel > .panel-heading { background: #f4faf7; }
.activity-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 22px 26px 16px; }
.activity-toolbar p { flex-basis: 100%; font-size: 12px; color: var(--muted); margin: 3px 0 0; }
.activity-filters { display: grid; grid-template-columns: minmax(210px, 2fr) minmax(130px, 1fr) minmax(145px, 1fr) minmax(145px, 1fr) auto; gap: 12px; align-items: end; padding: 0 26px 22px; }
.activity-filters > div { min-width: 0; }
.activity-filters input, .activity-filters select { font-size: 14px; }
.activity-filters label { font-size: 12px; }
.activity-filters input[type=date] { min-width: 0; }
.activity-panel > .alert { margin: 0 26px 18px; }
.activity-table { border-top: 1px solid var(--line); }
.activity-table td:first-child { min-width: 220px; }
.activity-table .record-note { max-width: 360px; }
.activity-table .hint { max-width: 300px; }
.activity-table time { font-size: 12px; }
.activity-table .pill { white-space: normal; }
.activity-table[aria-busy=true] { opacity: .55; }
.pagination { display: flex; gap: 8px; }
.pagination button { min-height: 42px; padding: 7px 16px; font-size: 12px; }
.receipt-reference { background: #f5f9f8; border: 1px solid #dce9e4; border-radius: 12px; margin: 0 auto 24px; max-width: 440px; padding: 14px; }
.receipt-reference small { display: block; color: var(--muted); margin-bottom: 7px; }
.receipt-reference code { display: block; font: 12px/1.8 Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
.offline-notice { padding: 13px 24px; text-align: center; background: #fff5df; border-bottom: 1px solid #efddb1; color: #76551b; font-size: 13px; }
.caps-lock { color: #8b6015; background: #fff7e6; padding: 8px 12px; border-radius: 8px; margin-top: 12px; }
.login-card .field:focus-within label, .intake-page .field:focus-within label { color: var(--brand); }
.success-screen h2 { font-size: 25px; }
@media (max-width: 1100px) {
  .activity-filters { grid-template-columns: 1fr 1fr; }
  .activity-filters .activity-search { grid-column: 1/-1; }
  .activity-filters > .quiet { justify-self: start; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 12px; }
  .dashboard-nav { gap: 8px; }
  .dashboard-nav a { flex: 1; justify-content: center; padding: 8px 10px; font-size: 12px; }
  .activity-panel { margin-top: 20px; }
  .activity-panel .panel-heading { padding: 18px; }
  .activity-toolbar { padding: 18px 15px 15px; }
  .activity-toolbar button { width: 100%; font-size: 13px; min-height: 48px; }
  .activity-toolbar p { font-size: 11px; line-height: 1.8; }
  .activity-filters { padding: 0 15px 18px; gap: 14px 10px; }
  .activity-filters input, .activity-filters select { font-size: 16px; width: 100%; }
  .activity-filters .activity-search, .activity-filters > div:nth-child(2) { grid-column: 1/-1; }
  .activity-filters label { font-size: 11px; }
  .activity-table td:first-child { min-width: 0; }
  .activity-table td:last-child { grid-column: auto; }
  .activity-table td:last-child::before { display: block; }
  .activity-table time { display: block; overflow-wrap: anywhere; }
  .activity-table .hint { font-size: 11px; }
  .activity-panel .queue-footer { gap: 12px; }
  .activity-panel > .alert { margin-inline: 15px; }
  .pagination { margin-inline-start: auto; }
  .pagination button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }