/* Riviera Towers: navy and brass from the building's monogram, on a calm light canvas.
   Every color is a token; dark mode redefines the tokens only. */
:root {
  --bg: #f4f5f7; --panel: #ffffff; --panel-2: #f7f8fa; --sunken: #eef0f4;
  --ink: #18202e; --ink-2: #3a4456; --muted: #697386; --line: #e3e6ec; --line-2: #cfd5de;
  --accent: #1f4a8a; --accent-hover: #173a6e; --accent-ink: #ffffff; --accent-soft: #e9effa;
  --title: #18202e; --brass: #a88452; --brass-soft: #f5efe4;
  --nav-bg: #0f2240; --nav-bg-2: #15305a; --nav-ink: #c8d2e2; --nav-ink-strong: #ffffff; --nav-muted: #8394b0; --nav-line: #22385d;
  --danger: #b42318; --focus: #2f6fd6;
  --c-ok: #16a34a99; --c-info: #2563eb99; --c-warn: #d9970699; --c-danger: #dc262699; --c-violet: #7c3aed99; --c-muted: #6b728066; --c-unknown: #94a3b833; --c-yellow: #eab30899;
  --t-ok: #e6f4ea; --t-ok-ink: #17643a; --t-info: #e8effc; --t-info-ink: #1e4597; --t-warn: #fcf1db; --t-warn-ink: #85560a; --t-danger: #fde8e7; --t-danger-ink: #a5251b;
  --t-violet: #f0e9fc; --t-violet-ink: #5f3aa6; --t-muted: #eef0f3; --t-muted-ink: #4b5565;
  --sheet-head: #f1f3f7; --sheet-filter: #f7f8fa; --sheet-zebra: #fafbfc; --sheet-hover: #eef3fb;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05); --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .04); --shadow-lg: 0 12px 40px rgba(16, 24, 40, .18);
  --radius: 12px; --radius-sm: 8px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1420; --panel: #151e2d; --panel-2: #1a2436; --sunken: #111a28;
    --ink: #e7ecf3; --ink-2: #c3ccd9; --muted: #8e9ab0; --line: #26324a; --line-2: #34425e;
    --accent: #7fb0ff; --accent-hover: #a3c6ff; --accent-ink: #0b1220; --accent-soft: #1b2b47;
    --title: #e7ecf3; --brass: #cfae7c; --brass-soft: #2b2418;
    --nav-bg: #0a111c; --nav-bg-2: #142038; --nav-ink: #b5c0d2; --nav-muted: #6f7d96; --nav-line: #1c2840;
    --danger: #ff8a80; --focus: #7fb0ff;
    --t-ok: #12321f; --t-ok-ink: #86e0a6; --t-info: #12274a; --t-info-ink: #a7c8ff; --t-warn: #362a0e; --t-warn-ink: #f1cd73; --t-danger: #3b1618; --t-danger-ink: #ffa39b;
    --t-violet: #2a1f48; --t-violet-ink: #d2bcff; --t-muted: #222c3d; --t-muted-ink: #b6c0cf;
    --sheet-head: #1c2740; --sheet-filter: #182235; --sheet-zebra: #172031; --sheet-hover: #1f2d48;
    --shadow-sm: none; --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--font); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; } a:hover { color: var(--accent-hover); }
h1 { font: 600 26px/1.2 var(--serif); margin: 0; color: var(--title); letter-spacing: -.005em; }
h3 { font-size: 16px; margin: 0; color: var(--title); font-weight: 650; letter-spacing: -.005em; }
h4 { font-size: 12px; margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
::selection { background: var(--accent-soft); }

/* ---------- controls ---------- */
button, .btn { font: inherit; font-weight: 600; font-size: 14px; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: var(--radius-sm); padding: 7px 14px; cursor: pointer; line-height: 1.3; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: background .12s, border-color .12s, color .12s; }
button:hover:not(:disabled), .btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.ghost, .btn.ghost { background: var(--panel); color: var(--ink-2); border-color: var(--line-2); font-weight: 600; }
button.ghost:hover:not(:disabled), .btn.ghost:hover, .tab:hover { background: var(--panel-2); border-color: var(--accent); color: var(--accent); }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button.ghost.danger { background: transparent; color: var(--danger); border-color: var(--line-2); } button.ghost.danger:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); background: var(--t-danger); }
button.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; font-weight: 600; } button.link:hover:not(:disabled) { background: none; color: var(--accent-hover); }
.btn-lg { padding: 11px 16px; font-size: 15px; width: 100%; }
input, select, textarea { font: inherit; font-size: 14px; color: var(--ink); background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 7px 10px; max-width: 100%; transition: border-color .12s, box-shadow .12s; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; padding: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
textarea { width: 100%; resize: vertical; }
code, pre { font-family: ui-monospace, "Cascadia Mono", Menlo, monospace; font-size: 12px; white-space: pre-wrap; word-break: break-all; }

/* ---------- utilities ---------- */
.small { font-size: 12.5px; } .muted { color: var(--muted); } .mt { margin-top: 10px; }
.row { display: flex; align-items: center; } .gap { gap: 8px; } .wrap { flex-wrap: wrap; } .end { justify-content: flex-end; margin-top: 12px; } .spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 20px; } .stack-sm { display: flex; flex-direction: column; gap: 12px; }
.narrow { max-width: 760px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; margin-bottom: 10px; align-items: end; }
.form-end { display: flex; align-items: end; }
.field { display: flex; flex-direction: column; gap: 5px; } .field-label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; } .hint { font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; }
.toggle { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--ink-2); font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- surfaces ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; max-width: 100%; overflow-wrap: break-word; overflow-x: auto; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: -2px 0 14px; flex-wrap: wrap; }
.card-lead { margin: -6px 0 14px; font-size: 14px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.error { background: var(--t-danger); color: var(--t-danger-ink); border: 1px solid color-mix(in srgb, var(--t-danger-ink) 18%, transparent); border-radius: var(--radius-sm); padding: 9px 12px; margin: 8px 0; font-size: 14px; }
.warn-note { background: var(--t-warn); color: var(--t-warn-ink); border-radius: var(--radius-sm); padding: 9px 12px; }
.ok-note { background: var(--t-ok); color: var(--t-ok-ink); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 14px; }
.notice { background: var(--brass-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--brass) 40%, transparent); border-left: 4px solid var(--brass); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; }
.notice.dismiss { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; } .notice.dismiss button { padding: 0 8px; border: 0; background: transparent; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; margin: 1px 3px 1px 0; line-height: 1.5; }
.tone-ok { background: var(--t-ok); color: var(--t-ok-ink); } .tone-info { background: var(--t-info); color: var(--t-info-ink); } .tone-warn { background: var(--t-warn); color: var(--t-warn-ink); }
.tone-danger { background: var(--t-danger); color: var(--t-danger-ink); } .tone-violet { background: var(--t-violet); color: var(--t-violet-ink); } .tone-muted, .tone-neutral { background: var(--t-muted); color: var(--t-muted-ink); }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 140px; box-shadow: var(--shadow-sm); }
.stat-value { font-size: 26px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; } .stat-label { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.stat.tone-danger .stat-value { color: var(--t-danger-ink); } .stat.tone-warn .stat-value { color: var(--t-warn-ink); } .stat.tone-ok .stat-value { color: var(--t-ok-ink); }
.stat.tone-ok, .stat.tone-warn, .stat.tone-danger { background: var(--panel); }
.stats-row { display: flex; gap: 12px; flex-wrap: wrap; } .stats-row .stat { flex: 1; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; } .table-wrap.tall { max-height: 520px; overflow-y: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; position: sticky; top: 0; background: var(--panel); white-space: nowrap; }
.table tbody tr:hover { background: var(--panel-2); } .table tr.sel { background: var(--t-info); }
.table td { overflow-wrap: break-word; } .table td:has(> .num), .num { white-space: nowrap; font-variant-numeric: tabular-nums; } .table td .small.muted { max-width: 520px; }
.table.small td, .table.small th { padding: 6px 8px; font-size: 13px; }
ul.plain { list-style: none; padding: 0; margin: 0; } ul.plain li { padding: 4px 0; }
dl.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; } dl.kv dt { color: var(--muted); font-size: 12.5px; } dl.kv dd { margin: 0; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.nav { background: linear-gradient(180deg, var(--nav-bg) 0%, var(--nav-bg-2) 100%); color: var(--nav-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.nav a.brand { display: flex; align-items: center; gap: 12px; padding: 20px 18px 18px; text-decoration: none; border-bottom: 1px solid var(--nav-line); border-radius: 0; }
.nav a.brand:hover { background: transparent; }
.brand > span:last-child { display: flex; flex-direction: column; }
.brand-name { font: 600 18px/1.15 var(--serif); color: var(--nav-ink-strong); letter-spacing: .01em; } .brand-sub { font-size: 11.5px; color: var(--nav-muted); letter-spacing: .04em; margin-top: 2px; }
.monogram { display: inline-flex; align-items: center; justify-content: center; flex: none; border: 1.5px solid var(--brass); border-radius: 50%; color: var(--brass); font: italic 600 16px var(--serif); letter-spacing: .02em; }
.nav-scroll { flex: 1; overflow-y: auto; padding: 10px 10px 14px; scrollbar-width: thin; scrollbar-color: var(--nav-line) transparent; }
.nav-group { margin-top: 6px; }
.nav-group-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--nav-muted); letter-spacing: .12em; margin: 14px 10px 4px; }
.nav a { display: block; padding: 7px 12px; border-radius: 7px; text-decoration: none; color: var(--nav-ink); font-size: 14px; position: relative; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: var(--nav-ink-strong); }
.nav a.active { background: rgba(255, 255, 255, .1); color: var(--nav-ink-strong); font-weight: 600; }
.nav a.active::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brass); }
.nav-foot { border-top: 1px solid var(--nav-line); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.nav a.me { display: flex; align-items: center; gap: 10px; padding: 8px; } .nav a.me.active::before { display: none; }
.me-text { display: flex; flex-direction: column; min-width: 0; } .me-name { color: var(--nav-ink-strong); font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-role { font-size: 11.5px; color: var(--nav-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav .avatar { background: var(--brass); color: var(--nav-bg); }
.nav-signout { background: transparent; border: 1px solid var(--nav-line); color: var(--nav-ink); font-weight: 500; font-size: 13px; padding: 6px; }
.nav-signout:hover:not(:disabled) { background: rgba(255, 255, 255, .06); border-color: var(--nav-muted); color: var(--nav-ink-strong); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 14px 32px; min-height: 68px; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.topbar-title { display: flex; flex-direction: column; min-width: 0; } .crumb { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--brass); font-weight: 700; }
.nav-toggle { display: none; }
.page { padding: 24px 32px 48px; max-width: 1480px; width: 100%; }
.boot { min-height: 100vh; display: grid; place-items: center; padding: 16px; } .boot .monogram { opacity: .6; }
.nav-scrim { display: none; }

/* ---------- sign-in ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 100vh; }
.auth-hero { background: radial-gradient(120% 90% at 0% 0%, #1c3a68 0%, transparent 60%), linear-gradient(160deg, #0f2240 0%, #0b1a33 100%); color: #d5deeb; padding: 56px 56px 32px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-hero::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border: 1px solid rgba(207, 174, 124, .18); border-radius: 50%; box-shadow: 0 0 0 40px rgba(207, 174, 124, .04), 0 0 0 80px rgba(207, 174, 124, .03); }
.auth-hero-inner { max-width: 440px; margin: auto 0; position: relative; z-index: 1; }
.auth-hero .monogram { border-color: #cfae7c; color: #cfae7c; }
.auth-title { font: 600 44px/1.1 var(--serif); color: #fff; margin: 22px 0 6px; letter-spacing: -.01em; }
.auth-sub { margin: 0 0 28px; color: #cfae7c; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; font-weight: 600; }
.auth-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.auth-points li { padding-left: 22px; position: relative; } .auth-points li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 1px; background: #cfae7c; }
.auth-foot { font-size: 12.5px; color: #8394b0; margin: 32px 0 0; position: relative; z-index: 1; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.auth-h { font: 600 30px/1.2 var(--serif); margin: 0; color: var(--title); }
.auth-lead { margin: -6px 0 4px; }
.eyebrow { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--brass); font-weight: 700; }
.auth-alt { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; } .auth-alt p { margin: 0 0 8px; font-size: 14px; }
.auth-back { align-self: flex-start; }
.sso { display: flex; flex-direction: column; gap: 10px; }
.sso-btn { background: var(--panel); color: var(--ink); border: 1px solid var(--line-2); padding: 10px 14px; font-size: 15px; font-weight: 600; width: 100%; box-shadow: var(--shadow-sm); }
.sso-btn:hover:not(:disabled) { background: var(--panel-2); color: var(--ink); border-color: var(--muted); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; } .divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- people & account ---------- */
.invite-link { background: var(--panel); border: 1px solid var(--accent); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.invite-link .row > button.ghost { border: 0; padding: 2px 8px; }
.link-box { display: flex; gap: 8px; } .link-box input { flex: 1; font-family: ui-monospace, "Cascadia Mono", Menlo, monospace; font-size: 13px; background: var(--panel-2); }
.req-list { display: flex; flex-direction: column; }
.req { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px 24px; padding: 14px 0; border-top: 1px solid var(--line); } .req:first-child { border-top: 0; padding-top: 0; }
.req-name { font-weight: 650; font-size: 15px; } .req-note { margin: 8px 0 0; padding: 8px 12px; background: var(--panel-2); border-radius: var(--radius-sm); font-size: 14px; color: var(--ink-2); }
.req-act { display: flex; flex-direction: column; gap: 10px; }
.person { display: flex; align-items: center; gap: 12px; } .person-name { font-weight: 600; } .person.lg .avatar { width: 52px; height: 52px; font-size: 18px; } .person.lg .person-name { font-size: 18px; }
.role-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; margin: 2px 4px 2px 0; white-space: nowrap; }
.chip-x { background: none; border: 0; color: inherit; padding: 0 0 0 2px; font-size: 15px; line-height: 1; opacity: .6; } .chip-x:hover:not(:disabled) { background: none; color: var(--danger); opacity: 1; }
.table.people tr.inactive td { opacity: .55; }
td.actions { width: 1%; white-space: nowrap; text-align: right; }
.menu { position: relative; display: inline-block; } .menu > summary { list-style: none; cursor: pointer; padding: 2px 10px; border-radius: 6px; font-size: 18px; line-height: 1.2; color: var(--muted); border: 1px solid transparent; }
.menu > summary::-webkit-details-marker { display: none; } .menu > summary:hover, .menu[open] > summary { border-color: var(--line-2); color: var(--ink); background: var(--panel); }
.menu-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 15; min-width: 210px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column; }
.menu-list button { justify-content: flex-start; border: 0; background: transparent; font-weight: 500; width: 100%; padding: 7px 10px; }
ul.methods { list-style: none; margin: 0; padding: 0; } ul.methods li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); } ul.methods li:first-child { border-top: 0; padding-top: 0; }
ul.methods .sso { flex-direction: row; } ul.methods .sso-btn { width: auto; font-size: 14px; padding: 7px 14px; }

/* ---------- garage ---------- */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.tabs, .seg { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { background: var(--panel); color: var(--ink-2); border-color: var(--line-2); } .tab.active, .tab.active:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tab .tab-count { margin-left: 6px; font-size: 11px; background: var(--t-ok); color: var(--t-ok-ink); border-radius: 999px; padding: 0 7px; font-weight: 700; } .tab.active .tab-count { background: rgba(255, 255, 255, .22); color: inherit; }
.drawing-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; } .count { white-space: nowrap; }
.garage-body { display: flex; gap: 16px; align-items: flex-start; } .garage-map { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.garage-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.level-title { font: 600 20px var(--serif); color: var(--title); margin: 6px 0 12px; }
.map-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow-sm); }
.map-tools { margin-bottom: 8px; flex-wrap: wrap; } .map-tools button { padding: 3px 12px; }
svg.map { width: 100%; height: min(62vh, 560px); background: #f6f7f9; border-radius: var(--radius-sm); cursor: grab; touch-action: none; } svg.map.editing { cursor: crosshair; }
svg.map.has-image { height: auto; max-height: 72vh; background: #fff; }
.spot polygon { stroke: #24406b; stroke-width: .0012; cursor: pointer; } .spot:hover polygon { stroke-width: .003; }
.spot.sel polygon { stroke: #d6332f; stroke-width: .004; } .spot.hl polygon { stroke: #e0a235; stroke-width: .004; } .spot.draft polygon { stroke-dasharray: .004 .003; }
.spot-label { font-size: .011px; text-anchor: middle; dominant-baseline: middle; fill: #1d2230; pointer-events: none; font-weight: 600; }
.shape { fill: transparent; stroke: #8a8a8a; stroke-width: .001; stroke-dasharray: .004 .004; } .shape.sel { stroke: #d6332f; stroke-width: .003; }
.dot-reloc { fill: #e0a235; stroke: #7a5310; stroke-width: .0008; } .dot-reloc-legend { background: #e0a235 !important; border-radius: 50%; }
.draft-line { fill: rgba(36, 64, 107, .12); stroke: #d6332f; stroke-width: .002; } .draft-pt { fill: #d6332f; }
.has-image .spot-label { fill: #0b0f19; font-weight: 700; paint-order: stroke; stroke: #fff; stroke-width: .0012px; }
.has-image .spot polygon { fill-opacity: .82; stroke: #111827; stroke-width: .0011; stroke-dasharray: none; }
.has-image .spot.draft polygon { stroke-dasharray: none; }
.has-image .spot:hover polygon { stroke: #000; stroke-width: .003; fill-opacity: 1; }
.has-image .spot.sel polygon { stroke: #dc2626; stroke-width: .004; fill-opacity: 1; }
.has-image .spot.hl polygon { stroke: #f59e0b; stroke-width: .004; }
svg.map.filtering .spot:not(.hl) polygon { fill-opacity: .12 !important; } svg.map.filtering .spot:not(.hl) .spot-label { opacity: .25; }
svg.map.filtering .spot.hl polygon { stroke: #16a34a; stroke-width: .004; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; margin-top: 8px; color: var(--ink-2); } .legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-item i { width: 16px; height: 12px; border-radius: 3px; border: 1px solid #0003; display: inline-block; }
.drawer { width: 380px; flex: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; box-shadow: var(--shadow); }
.geom-panel { border-color: var(--accent); }
.view-switch { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; background: var(--panel); }
.view-switch button { border: 0; border-radius: 0; background: transparent; color: var(--ink-2); padding: 7px 16px; font-weight: 600; } .view-switch button:hover:not(:disabled) { background: var(--panel-2); color: var(--accent); }
.view-switch button.active, .view-switch button.active:hover { background: var(--accent); color: var(--accent-ink); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.tile { position: relative; min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 4px; border-radius: var(--radius-sm); border: 1px solid var(--line); border-left-width: 5px; background: var(--panel-2); cursor: pointer; text-align: center; color: var(--ink); font: inherit; font-weight: 400; }
.tile:hover:not(:disabled) { border-color: var(--accent); background: var(--panel-2); color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow); }
.tile.sel { outline: 2px solid var(--accent); } .tile.hl { outline: 2px dashed var(--brass); } .tile.dim { opacity: .35; }
.tile-label { font-weight: 800; font-size: 16px; color: var(--accent); } .tile-unit { font-size: 12px; color: var(--ink); font-weight: 600; } .tile-name { font-size: 11px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-dot { position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #e3b341; }
.placing-bar { display: flex; align-items: center; gap: 10px; background: var(--t-warn); color: var(--t-warn-ink); padding: 9px 14px; border-radius: var(--radius-sm); margin-bottom: 8px; }
.small-title { font-size: 16px; margin-top: 14px; }
/* spreadsheet view */
.sheet-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.sheet-wrap { overflow: auto; max-height: calc(100vh - 280px); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); }
table.sheet { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
table.sheet th, table.sheet td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 5px 9px; white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
table.sheet thead th { position: sticky; top: 0; z-index: 2; background: var(--sheet-head); color: var(--ink-2); text-align: left; font-weight: 700; cursor: pointer; user-select: none; }
table.sheet thead tr.filters th { top: 31px; background: var(--sheet-filter); cursor: default; padding: 4px; }
table.sheet thead tr.filters input, table.sheet thead tr.filters select { width: 100%; min-width: 60px; padding: 3px 6px; font-size: 12px; }
table.sheet td.rn, table.sheet th.rn { position: sticky; left: 0; background: var(--sheet-head); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; z-index: 1; }
table.sheet thead th.rn { z-index: 3; }
table.sheet tbody tr:nth-child(even) td { background: var(--sheet-zebra); } table.sheet tbody tr:hover td { background: var(--sheet-hover); } table.sheet tbody tr.sel td { background: var(--t-info); }
table.sheet td.empty-cell { color: var(--muted); }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(9, 15, 28, .45); display: grid; place-items: center; padding: 16px; z-index: 40; backdrop-filter: blur(2px); }
.modal { background: var(--panel); border-radius: var(--radius); padding: 20px; width: min(640px, 100%); max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.modal .card-head button.ghost { border: 0; padding: 2px 8px; }

/* ---------- misc modules ---------- */
.steps { display: inline-flex; align-items: center; gap: 3px; } .step { width: 14px; height: 6px; border-radius: 3px; background: var(--line-2); } .step.done { background: var(--accent); } .step.cur { outline: 2px solid var(--t-warn-ink); }
.assessment { margin-top: 10px; padding: 10px; border-radius: var(--radius-sm); } .packet section { margin-bottom: 8px; } .mine { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.doc-group { margin-bottom: 10px; } ul.doc-list { list-style: none; padding: 0; margin: 0; } ul.doc-list li { padding: 7px 0; border-bottom: 1px solid var(--line); } .doc-list .dl { margin-left: 10px; }
.project { padding: 12px 0; border-bottom: 1px solid var(--line); } .gantt { position: relative; height: 14px; background: var(--sunken); border-radius: 4px; margin: 6px 0; }
.gantt .bar { position: absolute; top: 3px; height: 8px; background: var(--accent); border-radius: 4px; opacity: .7; } .gantt .ms { position: absolute; top: 1px; width: 10px; height: 10px; margin-left: -5px; transform: rotate(45deg); background: var(--c-warn); }
.gantt .ms-verified_complete { background: var(--c-ok); } .gantt .ms-missed { background: var(--c-danger); } .gantt .today { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #d6332f; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding: 6px 0; overflow-x: auto; } .bar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.bar-pair { flex: 1; display: flex; align-items: flex-end; gap: 2px; } .bar-pair .b { width: 12px; display: block; border-radius: 3px 3px 0 0; } .b.rev { background: var(--c-info); } .b.exp { background: var(--c-warn); }
.agent-notes { background: var(--t-info); border: 1px solid color-mix(in srgb, var(--t-info-ink) 25%, transparent); border-radius: var(--radius); padding: 12px 16px; }
.agent-notes-head { font-weight: 650; color: var(--t-info-ink); text-decoration: none; }
.agent-note { border-top: 1px solid color-mix(in srgb, var(--t-info-ink) 18%, transparent); padding: 8px 0; white-space: pre-wrap; }
.agent-note.attention strong::before { content: "⚠ "; color: #d97706; }

/* ---------- home ---------- */
.highlights { display: flex; gap: 12px; flex-wrap: wrap; } .highlights .stat { flex: 1; min-width: 160px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; align-items: start; } .home-grid > * { min-width: 0; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.cal-head { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; text-align: center; padding: 8px 0; background: var(--panel-2); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 96px; background: var(--panel); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 3px; cursor: default; overflow: hidden; }
.cal-day.other { background: var(--panel-2); } .cal-day.other .cal-num { color: var(--line-2); }
.cal-day.today .cal-num { background: var(--accent); color: var(--accent-ink); border-radius: 999px; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; }
.cal-num { font-size: 12.5px; font-weight: 600; color: var(--ink-2); align-self: flex-start; }
.cal-ev { display: block; font-size: 11.5px; color: #fff; border-radius: 4px; padding: 1px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; font-weight: 500; }
.cal-more { font-size: 11px; color: var(--muted); cursor: pointer; }
.up-item { display: flex; align-items: center; gap: 10px; } .up-date { width: 52px; flex: none; font-weight: 700; color: var(--brass); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.ask-card { background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%); }
.ask-card .ask-row { display: flex; gap: 8px; } .ask-card .ask-row input { flex: 1; font-size: 15px; padding: 11px 14px; } .ask-card .ask-row button { padding: 0 20px; }
.ask-answer { margin-top: 12px; }
.ask-text { white-space: pre-wrap; line-height: 1.55; background: var(--accent-soft); border-left: 3px solid var(--accent); padding: 12px 14px; border-radius: 6px; }
.ask-excerpt { white-space: pre-wrap; margin: 4px 0 8px; max-height: 9em; overflow: hidden; }
.faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px 28px; }
.faq-section h4 { margin: 4px 0 6px; color: var(--brass); }
.faq-item { border-top: 1px solid var(--line); padding: 8px 0; } .faq-item summary { cursor: pointer; font-weight: 600; } .faq-item p { margin: 6px 0; white-space: pre-wrap; }

/* ---------- Drive files ---------- */
.card-toggle { color: var(--title) !important; text-decoration: none !important; font-size: 16px; font-weight: 650; }
.drive-group { border-top: 1px solid var(--line); padding: 6px 0; } .drive-group summary { cursor: pointer; font-weight: 650; color: var(--ink); padding: 4px 0; }
.ftype { display: inline-block; width: 36px; font-size: 10px; font-weight: 800; color: var(--accent); background: var(--accent-soft); border-radius: 4px; text-align: center; margin-right: 8px; padding: 1px 0; letter-spacing: .03em; }
.drive-tree { display: flex; flex-direction: column; }
.drive-folder { border-top: 1px solid var(--line); }
.drive-folder > summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: 7px 0; list-style: none; display: flex; gap: 6px; align-items: center; }
.drive-folder > summary::-webkit-details-marker { display: none; }
.drive-folder > summary .folder-ico { display: inline-block; width: 1em; transition: transform .15s; color: var(--muted); }
.drive-folder[open] > summary .folder-ico { transform: rotate(90deg); }
.drive-folder .folder-body { padding-left: 18px; border-left: 2px solid var(--line); margin-left: 6px; }

/* ---------- small screens ---------- */
@media (max-width: 1100px) { .auth { grid-template-columns: 1fr 1fr; } .auth-hero { padding: 40px; } .auth-title { font-size: 36px; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: fixed; z-index: 30; left: 0; top: 0; width: 272px; transform: translateX(-100%); transition: transform .2s ease; }
  .nav.open { transform: none; box-shadow: var(--shadow-lg); }
  .nav-scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(9, 15, 28, .4); }
  .nav-toggle { display: inline-flex; padding: 6px 10px; font-size: 18px; }
  .topbar { padding: 10px 16px; min-height: 58px; } h1 { font-size: 21px; }
  .page { padding: 16px 16px 40px; }
  .card { padding: 16px; }
  .garage-body { flex-direction: column; } .drawer { width: 100%; position: static; max-height: none; }
  .grid2, .grid3 { grid-template-columns: 1fr; } dl.kv { grid-template-columns: 110px 1fr; } svg.map { height: 52vh; }
  .garage-stats .stat { min-width: 0; flex: 1; padding: 8px 12px; } .garage-stats .stat-value { font-size: 20px; } .tiles { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .home-grid { grid-template-columns: 1fr; } .cal-day { min-height: 58px; padding: 3px; } .cal-ev { font-size: 9.5px; padding: 0 3px; }
  .req { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 28px 20px 24px; } .auth-hero::after, .auth-points, .auth-foot { display: none; }
  .auth-hero-inner { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; margin: 0; }
  .auth-hero-inner .monogram { grid-row: span 2; width: 52px !important; height: 40px !important; font-size: 18px !important; }
  .auth-title { font-size: 26px; margin: 0; } .auth-sub { margin: 2px 0 0; font-size: 11px; }
  .auth-panel { padding: 24px 16px 40px; align-items: flex-start; } .auth-h { font-size: 26px; }
  .stats-row .stat { min-width: 0; }
  .link-box { flex-direction: column; }
  ul.methods li { flex-wrap: wrap; }
}
