/* Vlncy CRM — design tokens and components (design canvas "Vlncy CRM V3 design", approved 12 Nov 2026; decisions §10, §16).
   Brand from the app's Figma design system: Rubik / Sora, neutrals, violet primary, the app's status colours. */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600&family=Sora:wght@600;700&display=swap');

:root {
    --ink: #171717;
    --text-2: #404040;
    --text-3: #5a5a5a;
    --muted: #737373;
    --border: #d4d4d4;
    --line: #e5e5e5;
    --line-soft: #f0f0f0;
    --ground: #f5f5f5;
    --surface: #ffffff;
    --surface-2: #fafafa;
    --violet: #5035f2;
    --violet-ink: #2f1aa8;
    --violet-link: #4329d6;
    --violet-tint: #ede9fe;
    --violet-wash: #f4f2ff;
    --violet-border: #c4b5fd;
    --amber: #b45309;
    --amber-ink: #92400e;
    --amber-tint: #fef3c7;
    --red: #dc2626;
    --red-ink: #991b1b;
    --red-text: #b91c1c;
    --red-tint: #fee2e2;
    --red-wash: #fef2f2;
    --red-border: #fecaca;
    --green: #166534;
    --green-tint: #dcfce7;
    --green-wash: #f0fdf4;
    --blue-ink: #075985;
    --blue-tint: #e0f2fe;
    --brand-black: #0c0c0c;
    --radius: 8px;
    --radius-lg: 12px;
    --font: Rubik, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-display: Sora, Rubik, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; color: var(--ink); background: var(--ground); -webkit-font-smoothing: antialiased; }
a { color: var(--violet-link); }
a:hover { color: var(--violet-ink); }
h1, h2, h3 { margin: 0; }
h1 { font-family: var(--font-display); font-size: 26px; font-weight: 600; }
h2 { font-size: 16px; font-weight: 600; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
/* FocusOnNavigate (Routes.razor) moves focus to the page's h1 so screen readers announce the new page; that heading is
   not a control, so no ring. Elements focusable only by script (tabindex -1) are never Tab stops either. Buttons, links
   and inputs keep the ring above. */
h1:focus, h1:focus-visible, [tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shell */
/* The shell fills the window and never scrolls: the sidebar and the top bar stay put, only .content-scroll scrolls
   (Lenin, 13 Nov 2026). Dialogs and the bell panel are position: fixed / absolute above it. */
.shell { height: 100vh; height: 100dvh; display: flex; overflow: hidden; }
.sidebar { flex: 0 0 248px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 20px; text-decoration: none; color: var(--ink); }
/* The logo from Figma (docs/design/logo), sized by height as on the CRM canvas v23: sidebar mark 28 + wordmark 20,
   sign-in panel mark 40 + wordmark 28. */
.brand-mark { height: 28px; width: auto; display: block; }
.brand-wordmark { height: 20px; width: auto; display: block; }
.brand-crm { font-weight: 600; font-size: 13px; color: var(--text-3); }
.nav-section { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding: 16px 12px 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--radius); color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav-link:hover { background: #ececec; color: var(--ink); }
.nav-link.active { background: var(--violet-tint); color: var(--violet-ink); }
/* Icons, board C2.05: grey at rest, ink on hover, violet ink when current; keyboard focus is a 2 px violet ring. */
.nav-icon { flex-shrink: 0; display: block; color: var(--text-3); }
.nav-link:hover .nav-icon { color: var(--ink); }
.nav-link.active .nav-icon { color: var(--violet-ink); }
.nav-link:focus-visible { outline: 2px solid var(--violet); outline-offset: 1px; }
.nav-label { flex-grow: 1; min-width: 0; }
.main { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.topbar { flex: none; position: relative; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 12px 32px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-spacer { flex-grow: 1; }
.avatar { width: 36px; height: 36px; border-radius: 999px; background: var(--violet-tint); color: var(--violet-link); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0; }
.avatar.lg { width: 64px; height: 64px; font-family: var(--font-display); font-size: 22px; }
.user-chip { display: flex; align-items: center; gap: 10px; line-height: 1.2; }
.user-chip .who { font-size: 14px; font-weight: 500; }
.user-chip .role { font-size: 12px; color: var(--text-3); }
.content-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.nav-toggle { display: none; width: 40px; height: 40px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); align-items: center; justify-content: center; cursor: pointer; }
.nav-backdrop { display: none; }
.content { container: content / inline-size; padding: 24px 32px 48px; display: flex; flex-direction: column; gap: 18px; width: 100%; max-width: 1280px; }
.crumbs { font-size: 13px; color: var(--text-3); }
.crumbs a { color: var(--text-3); }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.page-head h1 { flex-grow: 1; }
.page-head .sub, h2 .sub { font-family: var(--font); font-size: 16px; font-weight: 500; color: var(--text-3); }
.lede { margin: 0; font-size: 14px; color: var(--text-2); max-width: 680px; line-height: 1.5; }

/* ---------- cards, grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.card-pad { padding: 20px 24px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { flex-grow: 1; }
.grid-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.kpi .label { font-size: 13px; color: var(--text-3); }
.kpi .value { font-family: var(--font-display); font-size: 30px; font-weight: 600; }
.kpi .note { font-size: 12px; color: var(--text-3); }
.split { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.split > .wide { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.split > .side { flex: 1 1 300px; min-width: 260px; display: flex; flex-direction: column; gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
dl.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 24px; }
dl.facts dt { font-size: 12px; color: var(--text-3); }
dl.facts dd { margin: 2px 0 0; font-size: 14px; }

/* ---------- tables */
/* A sideways-scrolling wrap holds sticky headers inside itself. So when the content area is wide enough for the
   widest list (Waitlist, about 880 px), the wrap does not scroll and headers stick to the top of the content area;
   when it is narrower, the table scrolls sideways and the headers scroll with it. Table cards clip their corners with
   overflow: clip, not hidden, which would also stop the headers sticking. */
.table-wrap { overflow-x: auto; }
@container content (min-width: 900px) { .table-wrap { overflow-x: visible; } }
table.data { width: 100%; border-collapse: collapse; }
table.data th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-size: 12px; font-weight: 500; color: var(--text-3); padding: 10px 16px; border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
table.data td { font-size: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.data tr:hover td { background: #faf9ff; }
table.data .primary { color: var(--ink); font-weight: 500; text-decoration: none; }
table.data .secondary { font-size: 12px; color: var(--text-3); }
.empty { padding: 32px 24px; text-align: center; color: var(--text-3); }
.empty strong { display: block; color: var(--ink); font-weight: 500; margin-bottom: 4px; }

/* ---------- pills */
.pill { display: inline-block; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--ground); color: var(--text-2); white-space: nowrap; }
.pill.violet { background: var(--violet-tint); color: var(--violet-ink); }
.pill.amber { background: var(--amber-tint); color: var(--amber-ink); }
.pill.green { background: var(--green-tint); color: var(--green); }
.pill.red { background: var(--red-tint); color: var(--red-ink); }
.pill.blue { background: var(--blue-tint); color: var(--blue-ink); }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn.primary { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn.primary:hover { background: var(--violet-link); color: #fff; }
.btn.strong { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.danger { color: var(--red-ink); border-color: var(--red-border); }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.link { border: 0; background: transparent; color: var(--violet-link); padding: 0 4px; height: auto; }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; height: 46px; font-size: 15px; }
.btn[disabled] { background: var(--line); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.spinner { width: 14px; height: 14px; border-radius: 999px; border: 2px solid currentColor; border-top-color: transparent; animation: spin .8s linear infinite; }
/* Busy buttons and the page loader (Lenin, 15 Nov 2026; Bizomate's pattern in the CRM's tokens). A busy button keeps its
   colours (not the grey disabled look) and shows the spinner and its busy label. */
.spinner { display: inline-block; flex-shrink: 0; }
.spinner-lg { width: 34px; height: 34px; border-width: 3px; }
.btn.is-busy, .btn.is-busy[disabled] { cursor: progress; opacity: .92; }
.btn.primary.is-busy[disabled] { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn.strong.is-busy[disabled] { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.danger.solid.is-busy[disabled] { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger.is-busy[disabled]:not(.solid) { background: var(--surface); border-color: var(--red-border); color: var(--red-ink); }
.btn.is-busy[disabled]:not(.primary):not(.strong):not(.danger) { background: var(--surface); border-color: var(--border); color: var(--ink); }
.busy-overlay { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(255, 255, 255, .72); color: var(--violet); }
.busy-label { font-size: 14px; font-weight: 500; color: var(--text-2); }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 1.6s; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 13px; font-weight: 500; color: #212121; }
.label-row { display: flex; align-items: baseline; }
.label-row label { flex-grow: 1; }
.input, .field select, .field textarea { width: 100%; height: 42px; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 12px; font: inherit; font-size: 14px; color: var(--ink); background: #fff; }
.field textarea { height: auto; padding: 10px 12px; resize: vertical; }
.input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--violet); outline-offset: 1px; border-color: var(--violet); }
.input.invalid, .invalid { border-color: var(--red); }
.hint { font-size: 12px; color: var(--text-3); }
.validation-message, .error-text { font-size: 12px; color: var(--red-text); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 18px; }
.code-input { letter-spacing: .3em; font-variant-numeric: tabular-nums; }

/* The authenticator code as six boxes (board C16.06, Lenin 16 Nov 2026; wwwroot/js/pin.js). Without JavaScript the single
   .code-input field above is used. */
.pin { border: 0; margin: 0; padding: 0; min-width: 0; }
.pin-legend { display: block; padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 500; color: var(--ink); }
.pin-row { display: flex; gap: 8px; align-items: center; }
.pin-box { box-sizing: border-box; width: 48px; height: 56px; padding: 0; border: 1px solid #8a8a8a; border-radius: 10px; background: var(--surface);
    color: var(--ink); text-align: center; font-family: var(--font-display); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; caret-color: var(--violet); }
.pin-box:focus { outline: none; border: 2px solid var(--violet); box-shadow: 0 0 0 3px rgba(80, 53, 242, .25); }
.pin-box::selection { background: transparent; }
.pin-box.is-invalid { border: 2px solid #b91c1c; }
.pin-box.is-invalid:focus { box-shadow: 0 0 0 3px rgba(185, 28, 28, .2); }
.pin-box.is-selected { background: var(--violet-tint); }
.pin.is-busy .pin-box, .pin-box:read-only, .pin-box:disabled { background: #f0f0f0; color: var(--text-3); }
.pin-dash { width: 14px; display: inline-flex; justify-content: center; color: var(--text-3); font-size: 20px; }
@media (max-width: 430px) {
    .pin-row { gap: 7px; }
    .pin-box { width: 44px; height: 54px; }
    .pin-dash { width: 10px; }
}
/* Very narrow screens (under 360 px): keep the row inside the 24 px gutters. */
@media (max-width: 359px) {
    .pin-row { gap: 5px; }
    .pin-box { width: 40px; height: 52px; font-size: 22px; }
    .pin-dash { width: 8px; }
}
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--violet); background: var(--violet-wash); }
.choice .t { font-weight: 500; }
.choice .d { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ---------- feedback */
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.alert.error { background: var(--red-wash); border: 1px solid var(--red-border); color: var(--red-ink); }
.alert.warn { background: #fffbeb; border: 1px solid #fde68a; color: var(--amber-ink); }
.alert.success { background: var(--green-wash); border: 1px solid #bbf7d0; color: var(--green); }
.alert.info { background: var(--violet-wash); border: 1px solid #ddd6fe; color: var(--violet-ink); }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-family: ui-monospace, Consolas, monospace; font-size: 15px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.qr { width: 200px; height: 200px; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; background: #fff; }
.qr svg { width: 100%; height: 100%; }
.key { font-family: ui-monospace, Consolas, monospace; font-size: 14px; letter-spacing: .08em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; word-break: break-all; }

/* ---------- section tabs (Settings, member page) */
.tabs { display: flex; flex-wrap: wrap; gap: 24px; border-bottom: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; height: 44px; padding: 0 4px; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 14px; font-weight: 500; color: var(--text-3); text-decoration: none; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--violet-ink); border-bottom-color: var(--violet); }

/* ---------- list pages: Table / Cards switch and card view (one full-width card per row, decisions §10) */
.view-switch { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.view-switch button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 6px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; background: transparent; color: var(--text-2); }
.view-switch button[aria-pressed="true"] { background: var(--violet-tint); color: var(--violet-ink); }
.row-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.row-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 16px 20px; }
.row-card-main { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.row-card-facts { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.row-card-facts dt { font-size: 12px; color: var(--text-3); }
.row-card-facts dd { margin: 2px 0 0; font-size: 14px; }
.number { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty-state { padding: 40px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.empty-state h3 { font-size: 16px; font-weight: 600; }
.empty-state p { margin: 0; font-size: 14px; color: var(--text-2); max-width: 460px; line-height: 1.5; }
.req { color: var(--red-text); }

/* ---------- notification bell (top bar) */
.bell { position: relative; }
.bell-button { position: relative; width: 40px; height: 40px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text-2); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.bell-button.open { border-color: var(--violet); }
.bell-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #c81e1e; color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; }
.bell-panel { position: absolute; right: 0; top: 48px; z-index: 40; width: 360px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 12px 32px rgba(0,0,0,.14); }
.bell-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.bell-head h2 { flex-grow: 1; font-size: 15px; }
.bell-empty { padding: 28px 18px; text-align: center; font-size: 13px; color: var(--text-3); }
.bell-empty strong { display: block; font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.bell-list { list-style: none; margin: 0; padding: 4px 0; max-height: 420px; overflow-y: auto; }
.bell-item { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 10px 14px; border: 0; background: transparent; text-align: left; font: inherit; cursor: pointer; color: var(--ink); }
.bell-item:hover { background: var(--surface-2); }
.bell-item.unread { background: var(--violet-wash); }
.bell-item .t { font-size: 14px; font-weight: 500; }
.bell-item .b { font-size: 13px; color: var(--text-2); }
.bell-item .w { font-size: 12px; color: var(--text-3); }

/* ---------- filters, chips, banners, row selection */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer; text-decoration: none; }
.chip.on { background: var(--violet-tint); border-color: var(--violet-border); color: var(--violet-ink); }
.chip .n { font-size: 12px; color: var(--text-3); }
.chip.on .n { color: var(--violet-ink); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.filters select, .filters input[type=date], .filters input[type=search] { height: 36px; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 10px; font: inherit; font-size: 13px; background: #fff; color: var(--ink); }
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 18px; border-radius: var(--radius-lg); background: var(--violet-wash); border: 1px solid #ddd6fe; color: var(--violet-ink); font-size: 14px; }
.banner .grow { flex: 1 1 300px; }
.selection { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--violet-wash); border-bottom: 1px solid var(--line); font-size: 13px; }
.group-head { padding: 12px 16px; font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--surface); border-bottom: 1px solid var(--line); }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; font-size: 13px; color: var(--text-3); }
.pager .grow { flex-grow: 1; }
.late { color: var(--red-text); }
.progress { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.progress li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.progress li.done { background: var(--green-wash); }
.progress li.now { background: #fffbeb; }
.progress .dot { width: 22px; height: 22px; border-radius: 999px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; background: var(--line); color: var(--text-2); }
.progress li.done .dot { background: var(--green); color: #fff; }
.progress li.now .dot { background: var(--amber); color: #fff; }
.progress .l { display: block; font-size: 13px; font-weight: 500; }
.progress .n { display: block; font-size: 12px; color: var(--text-3); }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.timeline li { display: flex; gap: 12px; }
.timeline .d { margin-top: 6px; width: 8px; height: 8px; border-radius: 999px; background: var(--muted); flex-shrink: 0; }
.timeline .x { display: block; font-size: 14px; }
.timeline .m { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: 44px; z-index: 30; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.14); padding: 4px; display: flex; flex-direction: column; }
.menu-list button { text-align: left; border: 0; background: transparent; padding: 9px 12px; font: inherit; font-size: 14px; border-radius: 6px; cursor: pointer; color: var(--ink); }
.menu-list button:hover { background: var(--surface-2); }
.menu-list .note { padding: 6px 12px; font-size: 12px; color: var(--text-3); }

/* ---------- dialog */
.dialog-backdrop { position: fixed; inset: 0; background: rgba(23, 23, 23, .45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.dialog { width: 100%; max-width: 460px; background: #fff; border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .2); }
.dialog p { margin: 0; color: var(--text-2); line-height: 1.5; }

/* ---------- account (sign-in) pages */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; background: #fff; }
.auth-brand { flex: 1 1 420px; background: var(--brand-black); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-height: 320px; }
.auth-brand .mark { display: flex; align-items: center; gap: 14px; }
.auth-brand .mark-icon { height: 40px; width: auto; display: block; }
.auth-brand .mark-wordmark { height: 28px; width: auto; display: block; }
.auth-brand .tag { font-family: var(--font-display); font-size: 34px; font-weight: 700; line-height: 1.2; max-width: 460px; }
.auth-brand p { margin: 16px 0 0; font-size: 15px; line-height: 1.6; color: #d4d4d4; max-width: 460px; }
.auth-brand .foot { font-size: 12px; color: #999; }
.auth-main { flex: 1 1 480px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-box { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 20px; }
.auth-box .intro { margin: 6px 0 0; font-size: 14px; color: var(--text-3); line-height: 1.5; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex-grow: 1; height: 1px; background: var(--line); }

/* ---------- tickets (design boards 15 Nov 2026: EOI ticket, My tickets, ticket page, dashboard) */
.nav-sub { padding-left: 42px; font-size: 13px; } /* lines up with the labels after the 18 px icon */
.nav-count { margin-left: auto; font-size: 12px; font-weight: 500; background: var(--violet-tint); color: var(--violet-link); border-radius: 999px; padding: 1px 8px; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.ticket-head { display: flex; flex-direction: column; gap: 14px; }
.ticket-head .top { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.ticket-head .who { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ticket-head .avatar { width: 56px; height: 56px; font-family: var(--font-display); font-size: 18px; font-weight: 700; background: var(--amber-tint); color: var(--amber-ink); }
.ticket-head dl.facts { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 24px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.tabs button.tab { border: 0; border-bottom: 2px solid transparent; background: transparent; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.tabs button.tab.active { color: var(--violet-ink); border-bottom-color: var(--violet); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.steps li { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid #ececec; }
.steps li.done { background: var(--green-wash); border-color: var(--green-tint); }
.steps li.now { background: var(--violet-wash); border-color: var(--violet-border); }
.steps .dot { width: 24px; height: 24px; border-radius: 999px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; background: var(--line); color: var(--text-2); }
.steps li.done .dot { background: var(--green); color: #fff; }
.steps li.now .dot { background: var(--violet); color: #fff; }
.steps .l { display: block; font-size: 13px; font-weight: 500; }
.steps .n { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 18px; align-items: start; }
.pair > div { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.script-box { height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.script-box img { display: block; max-width: none; }
.zoom { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: var(--radius); padding: 2px; }
.zoom button { width: 30px; height: 28px; border: 0; background: transparent; border-radius: 6px; font: inherit; font-size: 16px; cursor: pointer; }
.zoom button:hover { background: var(--surface-2); }
.zoom span { min-width: 44px; text-align: center; font-size: 13px; }
.script-empty { padding: 40px 24px; text-align: center; color: var(--text-3); border: 1px dashed var(--border); border-radius: 10px; display: flex; flex-direction: column; gap: 6px; }
.script-empty p { margin: 0; }
.qa { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.qa dt { font-size: 13px; font-weight: 500; color: var(--text-2); }
.qa dd { margin: 4px 0 0; font-size: 14px; line-height: 1.5; white-space: pre-line; }
.how { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.5; }
.tcards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tcard { display: block; padding: 14px 16px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.tcard:hover { border-color: var(--violet-border); background: #faf9ff; color: var(--ink); }
.tcard .l1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.tcard .t { font-size: 15px; font-weight: 600; }
.tcard .code { color: var(--violet-link); }
.tcard .l2 { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.tcard .l3 { font-size: 14px; margin-top: 6px; }
.tcard .l4 { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; margin-top: 10px; }
.tcard .k, .muted { color: var(--text-3); }
.pill.outline { background: #fff; border: 1px solid var(--border); color: var(--text-2); }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.filter-grid .field select, .filter-grid .field input { height: 36px; font-size: 13px; }
.filter-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.filter-foot select { height: 36px; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 10px; font: inherit; font-size: 13px; background: #fff; }
.filters-button, .sheet-close { display: none; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bars .b { display: grid; grid-template-columns: minmax(110px, 180px) 1fr 40px; gap: 12px; align-items: center; font-size: 13px; }
.bars .track { height: 10px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.bars .fill { display: block; height: 100%; border-radius: 999px; background: var(--violet); }
.bars .v { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.updates { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.updates li { display: flex; gap: 12px; }
.updates .avatar { width: 32px; height: 32px; font-size: 12px; }
.updates .h { display: block; font-size: 13px; }
.updates .x { display: block; font-size: 14px; margin-top: 4px; line-height: 1.5; white-space: pre-line; }
.kind { display: inline-block; font-size: 11px; font-weight: 500; padding: 1px 8px; border-radius: 999px; background: var(--ground); color: var(--text-2); }
.kind.email { background: var(--blue-tint); color: var(--blue-ink); }
.verify-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.verify-list li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.member-pick { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; cursor: pointer; text-align: left; font: inherit; width: 100%; color: var(--ink); }
.member-pick.on { border-color: var(--violet); background: var(--violet-wash); }
.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.compare th { font-size: 12px; font-weight: 500; color: var(--text-3); }
.extra-card { display: flex; flex-direction: column; gap: 12px; }
/* C6.21: the "Change…" link in a fact line; C6.22: "Assign RM…" only at narrow widths. */
.btn.link.inline { height: auto; padding: 0; vertical-align: baseline; }
.only-narrow { display: none; }
@media (max-width: 700px) {
    .only-narrow { display: inline-flex; }
    /* C6.19 / C6.22: the manual payment and assign dialogs open as full-screen sheets. */
    .dialog-backdrop:has(> .dialog.sheet) { padding: 0; }
    .dialog.sheet { max-width: none !important; max-height: none !important; height: 100%; border-radius: 0; }
}
@media (max-width: 700px) {
    .filters-button { display: inline-flex; }
    .filter-card { display: none; }
    .filter-card.open { display: block; position: fixed; inset: 0; z-index: 46; overflow-y: auto; border-radius: 0; padding: 16px; }
    .filter-card.open .sheet-close { display: inline-flex; }
    .script-box { height: 420px; }
    .bars .b { grid-template-columns: minmax(90px, 130px) 1fr 32px; }
}

#blazor-error-ui { background: var(--amber-tint); bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, .2); display: none; left: 0; padding: .6rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; }
    .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 45; width: 272px; max-width: calc(100vw - 48px); transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; }
    .nav-open .sidebar { transform: none; box-shadow: 0 12px 40px rgba(0, 0, 0, .2); }
    .nav-open .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 44; background: rgba(23, 23, 23, .35); }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

@media (max-width: 700px) {
    .content, .topbar { padding-left: 16px; padding-right: 16px; }
    .auth-brand { padding: 32px 24px; }

    /* Phone header (narrow boards C5.02/C5.04; bell C3.01; Lenin, 15 Nov 2026): one row that never wraps — menu, spacer, bell,
       avatar, Sign out — with 44 px touch targets. The name and role stay for screen readers only. The bell panel hangs from
       the whole bar, 8 px from each edge, so it always fits the screen. */
    .topbar { flex-wrap: nowrap; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
    .topbar > * { flex-shrink: 0; }
    .topbar > .topbar-spacer { flex-shrink: 1; min-width: 0; }
    .nav-toggle, .bell-button { width: 44px; height: 44px; }
    .user-chip > span:not(.avatar) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .topbar > form .btn { height: 36px; }
    .bell { position: static; }
    .bell-panel { left: 8px; right: 8px; top: calc(100% + 6px); width: auto; max-width: none; }
    .bell-list { max-height: calc(100dvh - 160px); }
}
