/* VRS interface.
   Cool steel greys on plain paper, with the logo's red kept for the few things
   that need attention. The one decorative idea is the drafting line from the
   logo: construction lines behind the sign-in page and crop marks around
   project scans. No inline styles anywhere, so the page security policy can
   forbid them. */

:root {
    --ink: #1d2733;
    --ink-2: #2b3746;
    --text: #3f4a58;
    --muted: #6b7686;
    --faint: #98a1ad;
    --line: #dce1e7;
    --line-soft: #edf0f3;
    --canvas: #f4f6f8;
    --surface: #ffffff;
    --signal: #d9262f;
    --drafting: #c9d0d9;
    --dot: #dfe3e9;
    --danger: #b42318;
    --danger-bg: #fef3f2;
    --danger-line: #fecdca;
    --warning: #9a4a07;
    --warning-bg: #fff8eb;
    --warning-line: #f7d9a4;
    --success: #0f6b45;
    --success-bg: #ecf8f1;
    --info: #1d4f91;
    --info-bg: #eef4fb;
    --radius: 6px;
    --radius-lg: 10px;
    --shadow: 0 1px 2px rgba(29, 39, 51, .05), 0 8px 24px rgba(29, 39, 51, .06);
    --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink);
    background-color: var(--canvas);
    background-image: radial-gradient(var(--dot) 1px, transparent 1px);
    background-size: 18px 18px;
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: tabular-nums;
}
h1, h2, h3 { margin: 0; color: var(--ink); letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: 26px; font-weight: 600; line-height: 1.2; }
h2 { font-size: 16px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
p { margin: 0 0 12px; }
a { color: var(--ink); }
img { max-width: 100%; }
.icon { flex-shrink: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.mono-cell { color: var(--text); }
.nowrap { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Headings get focus after navigation so screen readers announce the new page; no box needed. */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }

/* ---------- App shell ---------- */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 256px; flex-shrink: 0; background: #ffffff; border-right: 1px solid #e5e7eb;
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-logo { display: block; padding: 14px 12px 8px; }
.sidebar-logo img { width: 100%; max-width: 200px; height: auto; display: block; margin: 0 auto; }
.sidebar-nav {
    display: flex; flex-direction: column; gap: 4px; padding: 0 12px 16px; flex: 1; overflow-y: auto;
    border-top: 1px solid #f1f5f9; margin: 0 4px;
}
.nav-section { font-size: 10px; font-weight: 700; color: #b6bcc6; text-transform: uppercase; letter-spacing: 1.1px; padding: 16px 10px 4px; }
.nav-item {
    position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px;
    color: #64748b; text-decoration: none; font-size: 14px; font-weight: 500;
    transition: background .15s ease, color .15s ease;
}
/* The page you're on gets a short red marker, the one place the logo red is used in the menu. */
.nav-item.active::before {
    content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 2px 2px 0; background: var(--signal);
}
.nav-item .icon { color: #9ca3af; flex-shrink: 0; }
.nav-item:hover { background: #f1f5f9; color: #0f172a; }
.nav-item.active { background: #f1f5f9; color: #0f172a; font-weight: 600; }
.nav-item.active .icon, .nav-item:hover .icon { color: #64748b; }
.sidebar-user { border-top: 1px solid #f3f4f6; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 2px 10px 8px; border-radius: 8px; text-decoration: none; min-width: 0; }
.user-chip:hover .user-name { color: #0f172a; }
.avatar {
    width: 28px; height: 28px; border-radius: 50%; background: #111827; color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; text-transform: uppercase;
}
.user-text { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 12px; font-weight: 600; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-sub { font-size: 10px; font-weight: 600; color: #b6bcc6; text-transform: uppercase; letter-spacing: .4px; }
.signout-form { margin: 0; }
.signout {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none;
    color: #94a3b8; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; border-radius: 8px;
    transition: background .15s ease, color .15s ease;
}
.signout:hover { background: #f1f5f9; color: #0f172a; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* Only needed on small screens, for the menu button. */
.topbar {
    display: none; height: 52px; align-items: center; gap: 12px; padding: 0 16px;
    border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5;
}
.topbar-logo img { height: 26px; width: auto; display: block; }
.nav-burger { display: none; cursor: pointer; color: var(--muted); padding: 6px; border-radius: 6px; }
.nav-burger:hover { background: #eef0f3; color: var(--ink); }
.content { flex: 1; padding: 40px 48px 56px; width: 100%; max-width: 1440px; }
.footer {
    display: flex; justify-content: space-between; gap: 12px; padding: 14px 48px; border-top: 1px solid var(--line-soft);
    color: var(--faint); font-size: 12px;
}
.nav-scrim { display: none; }

@media (max-width: 860px) {
    .sidebar { position: fixed; left: 0; top: 0; z-index: 30; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow); }
    .nav-toggle:checked ~ .shell .sidebar { transform: none; }
    .nav-toggle:checked ~ .nav-scrim { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(15, 23, 42, .3); }
    .nav-burger { display: inline-flex; }
    .topbar { display: flex; }
    .content { padding: 24px 16px 40px; }
    .footer { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head .muted { margin: 6px 0 0; font-size: 14px; color: var(--muted); max-width: 64ch; }
.title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.count { font-size: 15px; font-weight: 500; color: var(--faint); }
.head-actions, .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.actions { margin-top: 6px; }
.back-link { display: inline-block; font-size: 12.5px; color: var(--muted); text-decoration: none; margin-bottom: 8px; }
.back-link:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 16px; border-radius: var(--radius); font: inherit; font-size: 13px; font-weight: 600;
    text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-dark, .btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover, .btn-primary:hover { background: var(--ink-2); }
.btn-light { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-light:hover { border-color: var(--faint); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #912018; }
.btn-danger-light { background: var(--surface); border-color: var(--danger-line); color: var(--danger); }
.btn-danger-light:hover { background: var(--danger-bg); }
.btn-small { padding: 4px 10px; font-size: 12px; font-weight: 600; background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-small:hover { border-color: var(--faint); }
.btn-block, .w-100 { width: 100%; }
.btn-lg { padding: 11px 16px; font-size: 14px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-size: 12.5px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.link-button:hover { color: var(--ink); }
.icon-btn { background: none; border: 0; padding: 4px; border-radius: 6px; color: var(--muted); cursor: pointer; display: inline-flex; }
.icon-btn:hover { background: #f3f4f6; color: var(--ink); }

/* ---------- Cards, forms ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.card-warning { border-color: var(--warning-line); background: var(--warning-bg); }
.form-card { max-width: 640px; margin-bottom: 20px; }
.two-col { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (max-width: 980px) { .two-col { grid-template-columns: 1fr; } }

.field, .mb-3 { margin-bottom: 16px; }
.field.grow { flex: 1; margin-bottom: 0; }
.label, .form-label { display: block; font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.input, .form-control {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius);
    font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder, .form-control::placeholder { color: #b6bcc6; }
.input:focus, .form-control:focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.input.mono { font-family: var(--mono); font-size: 13px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.field-error, .validation-message, .text-danger { color: var(--danger); font-size: 12.5px; margin-top: 6px; display: block; }
.inline-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.file-input { font: inherit; font-size: 13px; max-width: 100%; }
.check-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--ink); width: 15px; height: 15px; }

/* Template account pages (two-step sign-in) use these names. */
.form-floating { display: flex; flex-direction: column-reverse; margin-bottom: 16px; }
.form-floating > label { display: block; font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.row { display: block; }
.checkbox { margin-bottom: 14px; }
.form-check-input { accent-color: var(--ink); }
.recovery-code { font-family: var(--mono); font-size: 14px; }

/* ---------- Alerts, chips ---------- */
.alert { border: 1px solid; border-radius: var(--radius); padding: 11px 14px; margin-bottom: 16px; font-size: 13.5px; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-title { font-weight: 700; margin-bottom: 2px; }
.alert-danger { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }
.alert-warning { background: var(--warning-bg); border-color: var(--warning-line); color: var(--warning); }
.alert-success { background: var(--success-bg); border-color: #abefc6; color: var(--success); }
.alert-info { background: var(--info-bg); border-color: #b2ddff; color: var(--info); }

.chip {
    display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
    background: #f3f4f6; color: var(--text); margin: 1px 4px 1px 0; white-space: nowrap;
}
.chip-dark { background: var(--ink); color: #fff; }
.chip-success, .chip-warning, .chip-danger, .chip-info {
    background: none; padding: 0; border-radius: 0; font-weight: 500; color: var(--text);
    display: inline-flex; align-items: center; gap: 7px;
}
.chip-success::before, .chip-warning::before, .chip-danger::before, .chip-info::before {
    content: ""; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.chip-success::before { background: #1f9d63; }
.chip-warning::before { background: #e08a12; }
.chip-danger::before { background: var(--signal); }
.chip-info::before { background: #3b74c4; }

/* ---------- Tables, lists ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
    text-align: left; font-size: 12.5px; font-weight: 500; color: var(--muted);
    padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:hover td { background: #f8f9fb; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.row-link { font-weight: 600; text-decoration: none; }
.row-link:hover { text-decoration: underline; }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 12px; font-size: 13.5px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-tabs { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.filter-tabs { gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.filter-tab { padding: 8px 0; margin-bottom: -1px; font-size: 13.5px; font-weight: 500; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.filter-tab:hover { color: var(--ink); }
.filter-tab.active { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- Temporary password ---------- */
.issued { border-color: #abefc6; margin-bottom: 18px; max-width: 640px; }
.issued-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; color: var(--success); }
.issued-head strong { color: var(--ink); font-size: 15px; }
.temp-password { font-size: 16px; font-weight: 600; letter-spacing: .5px; background: #f3f4f6; padding: 4px 10px; border-radius: 6px; user-select: all; }
.rules { background: #f9fafb; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; font-size: 13px; }
.rules-title { font-weight: 700; margin-bottom: 4px; }
.rules ul { margin: 0 0 6px; padding-left: 18px; color: var(--text); }
.rules-hint { color: var(--muted); font-size: 12.5px; }

/* ---------- Project grid ----------
   Each scan sits inside four crop marks, like a plate on a drawing sheet.
   Pointing at a tile pulls the marks out a little and turns them red. */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 40px 32px; }
.project-card { display: block; text-decoration: none; color: inherit; }
.project-card:focus-visible { outline: none; }
.project-card:focus-visible .project-title { text-decoration: underline; }
.project-frame { position: relative; padding: 9px; }
.crop { position: absolute; width: 14px; height: 14px; border-color: var(--drafting); border-style: solid; border-width: 0;
    transition: transform .2s ease, border-color .2s ease; }
.crop-tl { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.crop-tr { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.crop-bl { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.crop-br { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.project-card:hover .crop, .project-card:focus-visible .crop { border-color: var(--signal); }
.project-card:hover .crop-tl, .project-card:focus-visible .crop-tl { transform: translate(-3px, -3px); }
.project-card:hover .crop-tr, .project-card:focus-visible .crop-tr { transform: translate(3px, -3px); }
.project-card:hover .crop-bl, .project-card:focus-visible .crop-bl { transform: translate(-3px, 3px); }
.project-card:hover .crop-br, .project-card:focus-visible .crop-br { transform: translate(3px, 3px); }
.project-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 2px; background: var(--ink); }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* No picture yet: a drawing-sheet grid with the project's initials. */
.thumb-blank {
    display: flex; align-items: flex-end; height: 100%; padding: 14px 16px;
    background-color: #eef1f4;
    background-image: linear-gradient(#dde2e8 1px, transparent 1px), linear-gradient(90deg, #dde2e8 1px, transparent 1px);
    background-size: 32px 32px; background-position: -1px -1px;
}
.thumb-initial { font-size: 40px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; line-height: 1; }
.project-body { padding: 12px 9px 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.project-title { font-size: 16px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-meta { font-size: 13px; color: var(--faint); white-space: nowrap; }
.thumb-preview { display: block; width: 100%; max-height: 180px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 10px; }

/* Empty project list: an empty plate in its crop marks, with the next step inside. */
.empty-plate { max-width: 420px; }
.empty-plate .project-thumb { background: transparent; border: 1.5px dashed var(--drafting); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px; padding: 24px; }
.empty-title { font-size: 16px; font-weight: 600; color: var(--ink); margin: 0; }
.empty-plate .muted { font-size: 14px; margin: 0 0 10px; }

/* ---------- Account pages ---------- */
.auth-page { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; overflow: hidden; }
.drafting { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.drafting-lines { fill: none; stroke: var(--drafting); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .7; }
.drafting-mark { fill: none; stroke: var(--signal); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.auth-column { position: relative; width: 400px; max-width: 100%; }
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo img { width: 260px; max-width: 80%; height: auto; }
.auth-card { padding: 32px 30px 26px; box-shadow: var(--shadow); }
.auth-card .card-head { margin-bottom: 22px; }
.auth-card h1 { font-size: 22px; margin-bottom: 6px; }
.auth-card .card-head .muted { font-size: 14px; color: var(--muted); margin: 0; }
.auth-help { font-size: 13px; color: var(--muted); text-align: center; margin: 18px 0 0; }
.auth-alt { text-align: center; margin-top: 14px; }
.auth-foot { text-align: center; font-size: 12px; color: var(--faint); margin: 20px 0 0; }

.manage-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; align-items: start; max-width: 960px; }
.manage-nav { display: flex; flex-direction: column; gap: 2px; }
.manage-body { min-width: 0; }
.manage-body h3 { font-size: 15px; margin-bottom: 12px; }
@media (max-width: 760px) { .manage-grid { grid-template-columns: 1fr; } .manage-nav { flex-direction: row; flex-wrap: wrap; } }

/* ---------- 3D viewer ---------- */
.viewer-shell, .viewer { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: #0b0f17; }
.viewer-bar {
    height: 50px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 0 12px; background: var(--ink); border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.viewer-left, .viewer-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.viewer-back {
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 7px;
    color: #6b7280; text-decoration: none; flex-shrink: 0;
}
.viewer-back:hover { background: rgba(255, 255, 255, .06); color: #e5e7eb; }
.viewer-divider { width: 1px; height: 18px; background: rgba(255, 255, 255, .07); flex-shrink: 0; }
.viewer-title { color: #f9fafb; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-link {
    display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 8px; font-size: 12.5px;
    font-weight: 500; color: #e5e7eb; text-decoration: none; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .13);
}
.viewer-link:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.viewer-stage { flex: 1; position: relative; min-height: 0; }
.viewer-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

.net-chip {
    display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; border-radius: 7px;
    font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
    background: transparent; border: 0; color: #9ca3af;
}
.net-chip:hover { background: rgba(255, 255, 255, .06); color: #e5e7eb; }
.net-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.net-bars i { display: block; width: 3px; border-radius: 1px; background: rgba(255, 255, 255, .18); }
.net-bars i:nth-child(1) { height: 4px; }
.net-bars i:nth-child(2) { height: 7px; }
.net-bars i:nth-child(3) { height: 11px; }
.net-chip[data-state="checking"] .net-bars { animation: pulse 1.2s ease-in-out infinite; }
.net-chip[data-state="good"] .net-bars i { background: #d1d5db; }
.net-chip[data-state="reduced"] { color: #fbbf24; }
.net-chip[data-state="reduced"] .net-bars i:nth-child(-n+2) { background: #fbbf24; }
.net-chip[data-state="blocked"] { color: #f87171; }
.net-chip[data-state="blocked"] .net-bars i:nth-child(1) { background: #f87171; }
@keyframes pulse { 50% { opacity: .3; } }

.net-panel {
    position: absolute; top: 12px; right: 12px; width: 380px; max-width: calc(100% - 24px); z-index: 10;
    background: var(--surface); border-radius: var(--radius-lg); box-shadow: 0 20px 48px rgba(0, 0, 0, .35);
    padding: 16px 18px; font-size: 13.5px; color: var(--text); max-height: calc(100% - 24px); overflow-y: auto;
}
.net-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: var(--ink); font-size: 14px; }
.copy-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 600; color: var(--ink); margin: 6px 0 8px; }
.copy-box {
    white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 11.5px; line-height: 1.55;
    background: #f9fafb; border: 1px dashed var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 0; color: var(--text);
}

#blazor-error-ui {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; padding: 10px 16px;
    background: var(--warning-bg); border-top: 1px solid var(--warning-line); color: var(--warning); font-size: 13px;
}
#blazor-error-ui .dismiss { float: right; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Two-step sign-in setup ---------- */
.steps { margin: 0 0 18px; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.steps .qr { display: block; margin: 10px 0 6px; border: 1px solid var(--line); border-radius: var(--radius); }
.steps kbd { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; }
.recovery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 16px; }
.recovery-grid .recovery-code { background: #f3f4f6; padding: 8px 10px; border-radius: 6px; text-align: center; }

/* ---------- Sign in with Microsoft ---------- */
.btn-microsoft {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: #fff; border: 1px solid #d1d5db; color: #111827; font-weight: 600;
}
.btn-microsoft:hover { background: #f9fafb; border-color: #9ca3af; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--faint); font-size: 11.5px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.microsoft-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- Access requests ---------- */
.requests { margin-bottom: 28px; }
.section-head { margin-bottom: 12px; }
.section-head h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 0 4px; }
.section-head .muted { margin: 0; font-size: 13px; }
.cell-actions { text-align: right; white-space: nowrap; }
.request-card { max-width: 720px; }
.nav-badge {
    margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
    background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}

/* Plain message pages (not found, errors, empty admin lists). */
.empty { max-width: 560px; padding: 8px 0 24px; }
.empty .muted { font-size: 14px; margin: 6px 0 16px; }
