:root {
    --canvas: #f5f2ec;
    --surface: #fffdfa;
    --surface-2: #f9f6f0;
    --ink: #202735;
    --muted: #6d7481;
    --faint: #9197a1;
    --line: #ddd8cf;
    --line-strong: #cfc8bd;
    --navy: #334867;
    --navy-dark: #263851;
    --bronze: #a67d46;
    --mauve: #795f79;
    --red: #c65359;
    --red-soft: #fff1f0;
    --yellow: #b78528;
    --yellow-soft: #fff8e7;
    --green: #4f8069;
    --green-soft: #edf7f1;
    --shadow: 0 14px 38px rgba(38, 43, 54, .08);
    --radius: 14px;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.software-shell { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.side-rail { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 230px; display: flex; flex-direction: column; padding: 22px 16px; color: #f8f5ef; background: linear-gradient(180deg, #293b57, #223148); box-shadow: 8px 0 28px rgba(27, 39, 58, .12); }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px; color: #fff; background: linear-gradient(145deg, #b39162, #8d693d); font-size: 13px; font-weight: 850; letter-spacing: .04em; box-shadow: 0 8px 18px rgba(17, 25, 38, .2); }
.brand > span:last-child { display: grid; gap: 1px; }
.brand strong { font-size: 15px; letter-spacing: .01em; }
.brand small { color: #b9c3d0; font-size: 11px; }
.rail-nav { display: grid; gap: 6px; margin-top: 42px; }
.rail-link { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 12px; border: 0; border-radius: 10px; color: #c7d0dc; background: transparent; cursor: pointer; text-align: left; font-size: 13px; font-weight: 680; transition: .18s ease; }
.rail-link span { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; color: #aeb9c8; font-size: 10px; }
.rail-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.rail-link.active { color: #fff; background: rgba(255,255,255,.11); box-shadow: inset 3px 0 #c09a66; }
.rail-link.active span { border-color: transparent; color: #fff; background: #9d7848; }
.rail-footer { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.11); }
.user-line { display: flex; align-items: center; gap: 10px; }
.avatar { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 50%; color: #293b57; background: #ede5d9; font-weight: 800; }
.user-line div { display: grid; min-width: 0; }
.user-line strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.user-line small { color: #aeb9c8; font-size: 11px; }
.rail-footer .text-button { margin: 13px 0 0 43px; color: #c3ccd8; }

.software-main { grid-column: 2; min-width: 0; }
.app-bar { position: sticky; top: 0; z-index: 20; height: 66px; display: flex; align-items: center; gap: 16px; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(255,253,250,.94); backdrop-filter: blur(12px); }
.breadcrumb { display: grid; gap: 1px; }
.breadcrumb strong { font-size: 14px; }
.breadcrumb span { color: var(--muted); font-size: 11px; }
.bar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.privacy-button, .mobile-menu { padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface); cursor: pointer; font-size: 12px; font-weight: 700; }
.mobile-menu { display: none; }
.alert-button { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.alert-button svg { width: 18px; height: 18px; fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.alert-button > span { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border: 2px solid var(--surface); border-radius: 10px; color: #fff; background: var(--red); font-size: 10px; font-weight: 800; }

.workspace { width: 100%; max-width: 1580px; margin: 0 auto; padding: 30px 28px 55px; }
.app-view { display: none; }
.app-view.active { display: block; animation: view-in .2s ease; }
@keyframes view-in { from { opacity: .35; transform: translateY(3px); } }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.view-head h1 { margin: 2px 0 4px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(27px, 3vw, 36px); font-weight: 600; letter-spacing: -.025em; }
.view-head p { max-width: 680px; margin: 0; color: var(--muted); }
.kicker { margin: 0 !important; color: var(--bronze) !important; font-size: 10px !important; font-weight: 850; letter-spacing: .13em; }
.legend { display: flex; align-items: center; gap: 18px; margin: -5px 0 14px; color: var(--muted); font-size: 12px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot.red { background: var(--red); }.dot.yellow { background: var(--yellow); }.dot.green { background: var(--green); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--navy); background: var(--surface); cursor: pointer; font-size: 12px; font-weight: 760; white-space: nowrap; transition: .16s ease; }
.button:hover { transform: translateY(-1px); border-color: #bfc4cc; box-shadow: 0 6px 14px rgba(38, 43, 54, .07); }
.button.primary { color: #fff; border-color: var(--navy); background: linear-gradient(145deg, #3e5577, #2f4260); box-shadow: 0 7px 16px rgba(47,66,96,.17); }
.button.danger { color: #fff; border-color: var(--red); background: var(--red); }
.button:disabled { opacity: .48; cursor: not-allowed; transform: none; box-shadow: none; }
.text-button, .back-button { padding: 0; border: 0; color: var(--navy); background: transparent; cursor: pointer; font-size: 12px; font-weight: 750; }
.text-button:hover, .back-button:hover { text-decoration: underline; }
.danger-text { color: #ae4449 !important; }
.action-row, .row-buttons { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }

.table-frame { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 26px rgba(40,44,54,.045); }
.table-frame.flush { border-right: 0; border-bottom: 0; border-left: 0; border-radius: 0; box-shadow: none; }
.wide-frame { max-height: calc(100vh - 260px); }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 980px; }
.data-table th { position: sticky; top: 0; z-index: 2; padding: 11px 13px; border-bottom: 1px solid var(--line); color: var(--faint); background: #faf8f4; font-size: 10px; font-weight: 850; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px; border-bottom: 1px solid #ebe7e0; color: #3a414e; font-size: 12px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .14s ease; }
.data-table tbody tr:hover { background: #faf8f4; }
.data-table tbody tr[data-action="open-list"] { cursor: pointer; }
.overview-table { min-width: 1050px; }
.overview-table td:first-child strong, .overview-table td.check-col + td strong { display: block; color: var(--ink); font-size: 13px; }
.overview-table td:first-child span, .overview-table td.check-col + td span { display: block; max-width: 260px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.metric-number { color: var(--ink); font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.status-col { text-align: center !important; }.status-col + td { text-align: left; }
.red-text { color: var(--red) !important; }.yellow-text { color: var(--yellow) !important; }.green-text { color: var(--green) !important; }
.number-pill { display: inline-grid; place-items: center; min-width: 29px; height: 24px; padding: 0 8px; border-radius: 8px; font-weight: 800; font-variant-numeric: tabular-nums; }
.number-pill.red { color: #9d3d42; background: var(--red-soft); }.number-pill.yellow { color: #8b651c; background: var(--yellow-soft); }.number-pill.green { color: #3b6b56; background: var(--green-soft); }
.empty-table { display: grid; place-items: center; gap: 5px; min-height: 230px; padding: 30px; color: var(--muted); text-align: center; }
.empty-table strong { color: var(--ink); font-size: 15px; }.empty-table.compact { min-height: 120px; }

.list-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; color: var(--muted); font-size: 11px; }
.list-view-head { align-items: flex-start; }
.list-tools { display: grid; grid-template-columns: minmax(220px, 1fr) 150px 190px auto auto auto; align-items: end; gap: 10px; margin-bottom: 12px; }
.search-field, .compact-field, .inline-form label, .dialog form > label, .form-row { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 780; text-transform: uppercase; letter-spacing: .04em; }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); background: #fffefa; outline: none; }
input, select { min-height: 37px; padding: 8px 10px; }
textarea { padding: 10px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #8f9bb0; box-shadow: 0 0 0 3px rgba(79,98,133,.09); }
.passport-table { min-width: 1420px; }
.passport-table th:last-child { position: sticky; right: 0; z-index: 4; background: #faf8f4; box-shadow: -9px 0 15px rgba(40,44,54,.045); }
.passport-table td:last-child { position: sticky; right: 0; z-index: 1; background: var(--surface); box-shadow: -9px 0 15px rgba(40,44,54,.045); }
.passport-table tbody tr:hover td:last-child { background: #faf8f4; }
.passport-table tr.row-red td:first-child { box-shadow: inset 4px 0 var(--red); }.passport-table tr.row-yellow td:first-child { box-shadow: inset 4px 0 var(--yellow); }.passport-table tr.row-green td:first-child { box-shadow: inset 4px 0 var(--green); }
.person-cell { display: grid; gap: 2px; }.person-cell strong { color: var(--ink); font-size: 13px; }.person-cell span { color: var(--muted); }
.passport-cell { display: grid; gap: 3px; }.passport-cell code { color: var(--navy); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; font-weight: 760; }.passport-cell span { max-width: 230px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.status-box { display: grid; gap: 4px; min-width: 190px; padding: 9px 10px; border: 1px solid; border-radius: 9px; }.status-box strong { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }.status-box span { display: -webkit-box; overflow: hidden; font-size: 11px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.status-box.red { color: #923a3f; border-color: #e9b2b3; background: var(--red-soft); }.status-box.yellow { color: #81601f; border-color: #ead49f; background: var(--yellow-soft); }.status-box.green { color: #37654f; border-color: #b8d8c5; background: var(--green-soft); }
.reference-cell { display: grid; gap: 2px; }.reference-cell code { color: var(--navy); font-weight: 800; }.reference-cell .remaining { color: var(--yellow); font-weight: 760; }
.time-cell { display: grid; gap: 2px; min-width: 110px; }.time-cell strong { color: var(--ink); font-size: 11px; }.time-cell span { color: var(--muted); font-size: 10px; }
.notification-cell { display: grid; gap: 4px; min-width: 170px; }.notification-cell strong { color: var(--ink); font-size: 11px; }.notification-cell span { color: var(--muted); font-size: 10px; }.notification-cell em { color: var(--red); font-size: 10px; font-style: normal; }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; }.row-action { min-width: 31px; height: 31px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); background: #fffefa; cursor: pointer; font-size: 11px; font-weight: 760; }.row-action:hover { border-color: #aeb6c3; background: #f4f5f8; }
.table-footer { display: flex; justify-content: space-between; padding: 10px 3px; color: var(--muted); font-size: 11px; }

.status-strip { display: flex; align-items: center; gap: 0; overflow: auto; margin-bottom: 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.status-strip > span { display: flex; align-items: center; gap: 7px; min-width: max-content; padding: 10px 14px; border-right: 1px solid var(--line); color: var(--muted); font-size: 11px; }.status-strip > span:last-child { border-right: 0; }.status-strip i { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }.status-strip.ready i { background: var(--green); }.status-strip.error i { background: var(--red); }
.software-panel { margin-bottom: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 24px rgba(40,44,54,.04); }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 18px; border-bottom: 1px solid var(--line); }.panel-title h2 { margin: 0; font-size: 15px; }.panel-title p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }.panel-title > span { color: var(--navy); font-size: 12px; font-weight: 800; }
.settings-table, .settings-form { padding: 5px 18px 18px; }
.settings-row, .switch-row, .schedule-line { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 14px 0; border-bottom: 1px solid #ebe7e0; }.settings-row > div:first-child, .switch-row > span, .schedule-line > div:first-child { display: grid; gap: 2px; }.settings-row strong, .switch-row strong, .schedule-line strong { font-size: 12px; }.settings-row span, .switch-row small, .schedule-line span { color: var(--muted); font-size: 10px; }
.switch-row input { width: 38px; min-height: 20px; height: 20px; accent-color: var(--navy); }
.pair-code-row { padding: 14px; border-bottom: 1px solid var(--line); background: #f8f4ec; }.pair-code-row div { display: flex; align-items: baseline; gap: 12px; }.pair-code-row span, .pair-code-row small { color: var(--muted); font-size: 10px; }.pair-code-row strong { color: var(--navy); font-family: ui-monospace, monospace; font-size: 22px; letter-spacing: .08em; }
.qr-row { display: flex; align-items: center; gap: 18px; padding: 16px; border-bottom: 1px solid var(--line); }.qr-row img { width: 164px; height: 164px; border: 8px solid #fff; border-radius: 8px; box-shadow: var(--shadow); }.qr-row div { display: grid; gap: 5px; }.qr-row span { color: var(--muted); font-size: 11px; }
.inline-form { display: grid; grid-template-columns: 150px minmax(210px, 1fr) minmax(180px, .8fr) auto; align-items: end; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.settings-form .form-row { grid-template-columns: minmax(170px, 260px) minmax(250px, 1fr); align-items: center; padding: 12px 0; border-bottom: 1px solid #ebe7e0; text-transform: none; letter-spacing: 0; }.form-row > span { color: var(--ink); font-size: 11px; }
.schedule-line { align-items: end; }.schedule-line label { display: grid; gap: 4px; min-width: 120px; color: var(--muted); font-size: 10px; }.time-inputs { display: flex; align-items: center; gap: 7px; }.time-inputs input { width: 115px; }.form-actions { display: flex; justify-content: flex-end; padding-top: 15px; }
.health-table { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; }.health-table div { display: grid; gap: 3px; padding: 13px; border-right: 1px solid var(--line); }.health-table div:last-child { border-right: 0; }.health-table span { color: var(--muted); font-size: 10px; }.health-table strong { font-size: 12px; }

.alert-drawer { position: fixed; top: 65px; right: 18px; z-index: 50; width: min(410px, calc(100vw - 36px)); max-height: calc(100vh - 84px); overflow: auto; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--surface); box-shadow: 0 22px 55px rgba(29,35,46,.18); opacity: 0; pointer-events: none; transform: translateY(-8px); transition: .17s ease; }.alert-drawer.open { opacity: 1; pointer-events: auto; transform: none; }
.drawer-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px 15px; border-bottom: 1px solid var(--line); background: var(--surface); }.drawer-head div { display: grid; }.drawer-head span { color: var(--muted); font-size: 10px; }.drawer-head button { border: 0; color: var(--navy); background: none; cursor: pointer; font-size: 11px; font-weight: 750; }
.alert-list { display: grid; }.system-alert { display: grid; gap: 4px; padding: 13px 15px; border-bottom: 1px solid var(--line); border-left: 4px solid var(--yellow); }.system-alert.critical { border-left-color: var(--red); background: #fffafa; }.system-alert.ok { border-left-color: var(--green); background: var(--green-soft); }.system-alert strong { font-size: 12px; }.system-alert span { color: var(--muted); font-size: 11px; }.system-alert time { color: var(--faint); font-size: 9px; }

.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 20px; }.modal.open { display: grid; }.modal-backdrop { position: absolute; inset: 0; background: rgba(27,34,46,.46); backdrop-filter: blur(3px); }
.dialog { position: relative; z-index: 1; width: min(520px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 24px; border: 1px solid rgba(255,255,255,.7); border-radius: 16px; background: var(--surface); box-shadow: 0 26px 70px rgba(25,31,41,.25); }.wide-dialog { width: min(720px, 100%); }.small-dialog { width: min(430px, 100%); }.dialog h2 { margin: 3px 0 18px; font-family: Georgia, serif; font-size: 25px; }.dialog-close { position: absolute; top: 15px; right: 16px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 760; }
.dialog form { display: grid; gap: 13px; }.dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; }.dialog-actions > span { flex: 1; }
.drop-field { padding: 20px; border: 1px dashed #bdb5a8; border-radius: 10px; background: var(--surface-2); }.form-note { margin: 0; color: var(--muted); font-size: 11px; }
.history-list { display: grid; gap: 8px; }.history-item { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: start; padding: 11px; border: 1px solid var(--line); border-radius: 9px; }.history-item i { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--yellow); }.history-item.red i { background: var(--red); }.history-item.green i { background: var(--green); }.history-item div { display: grid; gap: 2px; }.history-item strong { font-size: 11px; }.history-item span, .history-item time { color: var(--muted); font-size: 10px; }
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 150; display: grid; gap: 7px; }.toast { max-width: 370px; padding: 11px 14px; border: 1px solid #bec8d6; border-radius: 10px; color: #fff; background: var(--navy); box-shadow: var(--shadow); font-size: 11px; font-weight: 650; }.toast.error { border-color: #d58b8f; background: #9e3e43; }
.mobile-backdrop { display: none; }

/* Sign-in remains deliberately simple and software-like. */
.login-page { min-height: 100vh; background: var(--canvas); }.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, .8fr) minmax(430px, 1.2fr); }.login-story { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 45px; color: #fff; background: linear-gradient(145deg, #293d5b, #1f2f46); }.brand-light { color: #fff; }.brand-large { font-size: 17px; }.story-copy { margin-top: 20vh; }.eyebrow { color: var(--bronze); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }.eyebrow.light { color: #d4b48a; }.story-copy h1 { margin: 10px 0; font-family: Georgia, serif; font-size: clamp(37px, 5vw, 60px); font-weight: 500; line-height: 1.02; }.story-copy p:last-child { max-width: 430px; color: #c5cfdb; }.story-status { display: flex; align-items: center; gap: 10px; }.story-status div { display: grid; }.story-status small { color: #aab7c7; }.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #d2b07f; }.login-panel { display: grid; place-items: center; padding: 35px; }.login-card { width: min(430px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }.login-card h2 { margin: 4px 0; font-family: Georgia, serif; font-size: 28px; }.card-lead, .login-footer { color: var(--muted); }.login-form { display: grid; gap: 14px; margin-top: 22px; }.field { display: grid; gap: 5px; }.field > span { color: var(--muted); font-size: 11px; font-weight: 750; }.wide { width: 100%; }.privacy-note { display: flex; gap: 8px; margin-top: 18px; color: var(--muted); font-size: 10px; }.privacy-note p { margin: 0; }.alert.error { padding: 10px; border: 1px solid #e8b5b7; border-radius: 8px; color: #9a3d42; background: var(--red-soft); }.login-footer { position: absolute; bottom: 18px; font-size: 10px; }

@media (max-width: 1100px) {
    .software-shell { grid-template-columns: 200px minmax(0, 1fr); }.side-rail { width: 200px; }.health-table { grid-template-columns: repeat(2, 1fr); }.health-table div:nth-child(2) { border-right: 0; }.health-table div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }.inline-form { grid-template-columns: 140px 1fr 1fr; }.inline-form .button { grid-column: 3; }
}
@media (max-width: 820px) {
    .software-shell { display: block; }.side-rail { width: 230px; transform: translateX(-110%); transition: .2s ease; }.side-rail.open { transform: none; }.software-main { width: 100%; }.mobile-menu { display: block; }.mobile-backdrop { position: fixed; inset: 0; z-index: 25; background: rgba(25,31,41,.35); }.mobile-backdrop.open { display: block; }.workspace { padding: 22px 15px 45px; }.app-bar { padding: 0 15px; }.view-head { align-items: flex-start; flex-direction: column; }.list-view-head .action-row { justify-content: flex-start; }.list-tools { grid-template-columns: 1fr 150px; }.list-tools .text-button { justify-self: start; }.inline-form { grid-template-columns: 1fr 1fr; }.inline-form .button { grid-column: 2; }.schedule-line { align-items: stretch; flex-direction: column; }.settings-form .form-row { grid-template-columns: 1fr; }.login-shell { grid-template-columns: 1fr; }.login-story { display: none; }.login-panel { min-height: 100vh; }.login-footer { position: static; }
}
@media (max-width: 560px) {
    .breadcrumb span, .privacy-button { display: none; }.view-head h1 { font-size: 28px; }.action-row { justify-content: flex-start; }.list-tools { grid-template-columns: 1fr; }.legend { align-items: flex-start; flex-direction: column; gap: 5px; }.inline-form { grid-template-columns: 1fr; }.inline-form .button { grid-column: 1; }.settings-row, .switch-row { align-items: flex-start; }.pair-code-row div, .qr-row { align-items: flex-start; flex-direction: column; }.qr-row img { width: 145px; height: 145px; }.health-table { grid-template-columns: 1fr; }.health-table div { border-right: 0; border-bottom: 1px solid var(--line); }.time-inputs { flex-wrap: wrap; }.dialog { padding: 20px 16px; }.login-panel { padding: 18px; }.login-card { padding: 25px 20px; }
}
@media print { .side-rail, .app-bar, .view-head .action-row, .list-tools, .row-actions, .table-footer, .alert-drawer { display: none !important; }.software-main { grid-column: 1; }.workspace { max-width: none; padding: 0; }.table-frame { overflow: visible; box-shadow: none; }.data-table { min-width: 0; } }
/* Overview list selection */
.check-col { width: 34px; text-align: center; }
.check-col input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--navy); }
.overview-table tbody tr td.check-col { cursor: default; }

/* Per-list workflow controls */
.overview-filter { display: grid; min-width: 165px; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 780; text-transform: uppercase; letter-spacing: .04em; }
.overview-filter select { min-height: 35px; }
.list-title-line, .list-name-cell { display: flex; align-items: center; gap: 9px; }
.list-title-line h1 { margin: 0; }
.list-state-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 8px; border: 1px solid #d8c6aa; border-radius: 999px; color: #775f3c; background: #fbf5eb; font-family: Inter, system-ui, sans-serif; font-size: 9px; font-weight: 820; letter-spacing: .04em; text-transform: uppercase; }
.list-state-badge.completed { border-color: #c8d0dc; color: #4d5e76; background: #f0f3f7; }
.completed-list-row { background: #f7f7f8; }
.completed-list-row > td { opacity: .78; }
.completed-list-row .row-action, .completed-list-row .list-state-badge { opacity: 1; }
/* Professional interface type scale */
body { font-size: 15px; line-height: 1.5; }
.brand strong { font-size: 16px; }
.brand small, .user-line small, .breadcrumb span { font-size: 12px; }
.rail-link { font-size: 14px; }
.rail-link span { font-size: 11px; }
.user-line strong, .breadcrumb strong { font-size: 14px; }
.privacy-button, .mobile-menu { font-size: 13px; }
.view-head p { font-size: 15px; }
.kicker { font-size: 11px !important; }
.legend { font-size: 13px; }
.button, .text-button, .back-button { font-size: 13px; }
.overview-filter,
.search-field,
.compact-field,
.inline-form label,
.dialog form > label,
.form-row { font-size: 11px; }
input, select, textarea { font-size: 13px; line-height: 1.4; }
.overview-filter select { min-height: 37px; }
.data-table th { font-size: 11px; }
.data-table td { font-size: 13px; }
.overview-table td:first-child strong,
.overview-table td.check-col + td strong,
.person-cell strong { font-size: 14px; }
.overview-table td:first-child span,
.overview-table td.check-col + td span,
.person-cell span,
.passport-cell span { font-size: 12px; }
.metric-number { font-size: 15px; }
.list-topline { font-size: 12px; }
.passport-cell code { font-size: 14px; }
.status-box strong, .status-box span { font-size: 12px; }
.time-cell strong, .notification-cell strong { font-size: 12px; }
.time-cell span, .notification-cell span, .notification-cell em { font-size: 11px; }
.row-action { font-size: 12px; }
.table-footer, .status-strip > span { font-size: 12px; }
.panel-title h2 { font-size: 16px; }
.panel-title p, .panel-title > span { font-size: 12px; }
.settings-row strong, .switch-row strong, .schedule-line strong { font-size: 13px; }
.settings-row span, .switch-row small, .schedule-line span,
.pair-code-row span, .pair-code-row small,
.qr-row span, .form-row > span, .schedule-line label { font-size: 11px; }
.health-table span { font-size: 11px; }
.health-table strong { font-size: 13px; }
.drawer-head span { font-size: 11px; }
.drawer-head button { font-size: 12px; }
.system-alert strong { font-size: 13px; }
.system-alert span { font-size: 12px; }
.system-alert time { font-size: 10px; }
.dialog-close, .form-note { font-size: 12px; }
.history-item strong { font-size: 12px; }
.history-item span, .history-item time { font-size: 11px; }
.toast { font-size: 12px; }
.field > span { font-size: 12px; }
.privacy-note, .login-footer { font-size: 11px; }
.list-state-badge { font-size: 10px; }
.completed-list-row > td { opacity: 1; }
.restore-list { min-width: 92px; color: #fff; border-color: var(--navy); background: var(--navy); }
.restore-list:hover { color: #fff; border-color: var(--navy-dark); background: var(--navy-dark); }
/* Align the overview filter with its neighbouring actions. */
.app-view[data-app-view="overview"] .view-head .action-row { align-items: flex-end; }
.app-view[data-app-view="overview"] .overview-filter select,
.app-view[data-app-view="overview"] .view-head .action-row > .button { min-height: 38px; }
/* Per-list WhatsApp routing */
.destination-default-badge { display: inline-flex; margin-left: 6px; padding: 2px 6px; border: 1px solid #c8d0dc; border-radius: 999px; color: var(--navy); background: #eef2f7; font-size: 10px; font-weight: 820; line-height: 1.2; text-transform: uppercase; vertical-align: middle; }
.route-default-text { color: var(--navy); font-weight: 780; }
.destination-routing { display: grid; min-width: 260px; gap: 7px; }
.destination-list-picker { min-height: 34px; padding: 6px 9px; font-size: 12px; }
.route-empty { color: var(--muted); font-size: 11px; }
.destination-list-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.destination-list-tags > span { display: inline-flex; align-items: center; max-width: 240px; gap: 5px; padding: 4px 6px 4px 8px; border: 1px solid #d2d8e1; border-radius: 999px; color: var(--navy); background: #f1f4f8; font-size: 11px; font-weight: 720; }
.destination-list-tags > span button { display: grid; place-items: center; flex: 0 0 18px; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; color: #6f7785; background: #e0e5ec; cursor: pointer; font-size: 15px; line-height: 1; }
.destination-list-tags > span button:hover { color: #fff; background: var(--red); }
@media (min-width: 821px) and (max-width: 1100px) {
    .list-tools { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(160px, 190px)); }
}