/* Trident Hub design system.
   Brand: Trident navy #0D1E46, Trident blue #2B77BB, Trident red #E42624 (website theme), IBM Plex Sans.
   MEP service colours (validated for colour-blind separation, light + dark) follow the 3D models. */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/static/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/static/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/static/fonts/ibm-plex-sans-latin-700-normal.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Consolas, monospace;

  --bg: #f3f5f9; --surface: #ffffff; --surface-2: #f8fafc; --surface-3: #eef2f8; --sunken: #e9eef5;
  --ink: #0b1630; --ink-2: #334155; --muted: #64748b; --faint: #94a3b8;
  --line: #e3e8ef; --line-2: #d3dbe6;
  --navy: #0d1e46; --navy-deep: #081634; --navy-ink: #c8d3e6; --navy-muted: #7f90b0; --navy-line: rgba(148, 170, 210, .14);
  --blue: #2b77bb; --blue-hover: #1f63a0; --blue-tint: #e8f1fb; --blue-ink: #1d5f9b; --on-blue: #ffffff;
  --red: #e42624; --red-tint: #fdecec;
  --ok: #15803d; --ok-tint: #e7f6ec; --warn: #a75c00; --warn-tint: #fff4e0; --serious: #c2410c; --serious-tint: #fdeee6;
  --crit: #d4211f; --crit-tint: #fdeaea; --info: #2b77bb; --info-tint: #e8f1fb;
  /* MEP services */
  --d-water: #2b77bb; --d-fire: #e0402e; --d-hvac: #0f9d8a; --d-electrical: #d99a00; --d-gas: #8754c7; --d-drainage: #a65a1c;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-2: 0 12px 32px -14px rgba(15, 23, 42, .28), 0 2px 6px rgba(15, 23, 42, .05);
  --shadow-3: 0 30px 80px -24px rgba(8, 22, 52, .45);
  --r-sm: 6px; --r: 10px; --r-lg: 14px;
  --sidebar: 252px;
  --grid-line: rgba(43, 119, 187, .10);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #070f22; --surface: #0c1a35; --surface-2: #0f1f3e; --surface-3: #142849; --sunken: #091530;
    --ink: #e8eef8; --ink-2: #c0cbdd; --muted: #8b9bb6; --faint: #5f7192;
    --line: rgba(148, 170, 210, .14); --line-2: rgba(148, 170, 210, .24);
    --navy: #050c1d; --navy-deep: #030916;
    --blue: #4d95d6; --blue-hover: #6aa9e2; --blue-tint: rgba(77, 149, 214, .14); --blue-ink: #8fc0ee; --on-blue: #04111f;
    --red: #f05b58; --red-tint: rgba(240, 91, 88, .14);
    --ok: #3fbf6f; --ok-tint: rgba(63, 191, 111, .14); --warn: #e3a33b; --warn-tint: rgba(227, 163, 59, .14);
    --serious: #f0814a; --serious-tint: rgba(240, 129, 74, .14); --crit: #f05b58; --crit-tint: rgba(240, 91, 88, .15);
    --info: #4d95d6; --info-tint: rgba(77, 149, 214, .14);
    --d-water: #4d95d6; --d-fire: #e5533f; --d-hvac: #1a9f8d; --d-electrical: #b8860b; --d-gas: #a17ce0; --d-drainage: #c77a36;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 16px 40px -16px rgba(0, 0, 0, .7);
    --grid-line: rgba(125, 211, 252, .07);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070f22; --surface: #0c1a35; --surface-2: #0f1f3e; --surface-3: #142849; --sunken: #091530;
  --ink: #e8eef8; --ink-2: #c0cbdd; --muted: #8b9bb6; --faint: #5f7192;
  --line: rgba(148, 170, 210, .14); --line-2: rgba(148, 170, 210, .24);
  --navy: #050c1d; --navy-deep: #030916;
  --blue: #4d95d6; --blue-hover: #6aa9e2; --blue-tint: rgba(77, 149, 214, .14); --blue-ink: #8fc0ee; --on-blue: #04111f;
  --red: #f05b58; --red-tint: rgba(240, 91, 88, .14);
  --ok: #3fbf6f; --ok-tint: rgba(63, 191, 111, .14); --warn: #e3a33b; --warn-tint: rgba(227, 163, 59, .14);
  --serious: #f0814a; --serious-tint: rgba(240, 129, 74, .14); --crit: #f05b58; --crit-tint: rgba(240, 91, 88, .15);
  --info: #4d95d6; --info-tint: rgba(77, 149, 214, .14);
  --d-water: #4d95d6; --d-fire: #e5533f; --d-hvac: #1a9f8d; --d-electrical: #b8860b; --d-gas: #a17ce0; --d-drainage: #c77a36;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 16px 40px -16px rgba(0, 0, 0, .7);
  --grid-line: rgba(125, 211, 252, .07);
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); }
h1, h2, h3, h4 { margin: 0; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 600; line-height: 1.2; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 13px; font-weight: 600; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.lg { width: 22px; height: 22px; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.boot img { animation: pulse 1.6s ease-in-out infinite; border-radius: 10px; }
@keyframes pulse { 50% { opacity: .55; transform: scale(.96); } }

/* ---------------------------------------------------------------- shell */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%); color: var(--navy-ink);
  border-right: 1px solid var(--navy-line); z-index: 30; }
.sidebar::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: linear-gradient(to right, rgba(77, 149, 214, .06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(77, 149, 214, .06) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: linear-gradient(180deg, #000 0%, transparent 38%); }
.brand { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px 18px 14px; }
.brand-tile { display: inline-flex; align-items: center; background: #fff; border-radius: 10px; padding: 7px 11px;
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .6); width: fit-content; }
.brand-tile img { height: 34px; width: auto; display: block; }
.brand-sub { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--navy-muted); padding-left: 2px; }
.brand-sub::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--red); }
.side-nav { position: relative; flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
.nav-group { margin: 18px 10px 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--navy-muted); }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; margin: 1px 0; border-radius: 8px;
  color: var(--navy-ink); font-weight: 500; font-size: 13.5px; position: relative; }
.nav-item svg.i { color: #8ea4c8; }
.nav-item:hover { background: rgba(148, 170, 210, .09); color: #fff; }
.nav-item:hover svg.i { color: #fff; }
.nav-item.on { background: rgba(77, 149, 214, .18); color: #fff; }
.nav-item.on svg.i { color: #8cc3f5; }
.nav-item.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0;
  background: #4d95d6; }
.nav-count { margin-left: auto; font-size: 11.5px; font-weight: 500; color: var(--navy-muted); font-variant-numeric: tabular-nums; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red);
  color: #fff; font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; }
.side-foot { position: relative; border-top: 1px solid var(--navy-line); padding: 12px; display: flex; align-items: center; gap: 10px; }
.side-foot .who { min-width: 0; flex: 1; line-height: 1.3; }
.side-foot .who b { display: block; color: #fff; font-weight: 600; font-size: 13px; }
.side-foot .who span { font-size: 11.5px; color: var(--navy-muted); }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0;
  background: transparent; color: inherit; cursor: pointer; }
.icon-btn:hover { background: var(--surface-3); }
.side-foot .icon-btn { color: var(--navy-ink); }
.side-foot .icon-btn:hover { background: rgba(148, 170, 210, .12); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; height: 60px;
  padding: 0 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; color: var(--muted); flex: 1; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs b { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs svg.i { width: 14px; height: 14px; color: var(--faint); }
.search-trigger { display: flex; align-items: center; gap: 10px; width: min(380px, 34vw); height: 38px; padding: 0 10px 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); cursor: pointer;
  box-shadow: var(--shadow-1); }
.search-trigger:hover { border-color: var(--line-2); color: var(--ink-2); }
.search-trigger span { flex: 1; text-align: left; }
kbd { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--muted); }
.menu-btn { display: none; }
.page { width: 100%; max-width: 1480px; margin: 0 auto; padding: 26px 28px 60px; }

/* ---------------------------------------------------------------- page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }
.page-head p { color: var(--muted); margin-top: 6px; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 500;
  font-size: 13.5px; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-1); transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-2); border-color: var(--faint); color: var(--ink); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.btn.primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: var(--on-blue); }
.btn.dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-3); }
.btn.danger { color: var(--crit); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 7px; gap: 5px; }
.btn.icon { width: 36px; padding: 0; }
.btn.sm.icon { width: 30px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg.i { width: 16px; height: 16px; }
.input, select.input, textarea.input { height: 36px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 9px;
  background: var(--surface); color: var(--ink); min-width: 0; outline: none; transition: border-color .12s, box-shadow .12s; }
textarea.input { height: auto; min-height: 92px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
select.input { padding-right: 30px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 15px; }
.input.sm { height: 30px; font-size: 12.5px; border-radius: 8px; }
.search { position: relative; display: flex; align-items: center; }
.search svg.i { position: absolute; left: 10px; color: var(--faint); width: 16px; height: 16px; }
.search .input { padding-left: 34px; width: 100%; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ink-2); font-size: 13px; }
.check input { width: 16px; height: 16px; accent-color: var(--blue); }

.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--sunken); border: 1px solid var(--line); gap: 2px; }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 8px; color: var(--muted);
  font-weight: 500; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.seg button .count { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- cards & layout */
.grid { display: grid; gap: 18px; }
.cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: 1 / -1; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.card-head h2 { display: flex; align-items: center; gap: 9px; font-size: 14.5px; }
.card-head h2 svg.i { color: var(--muted); }
.card-head .sub { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.card-body { padding: 14px 18px 18px; }
.card-foot { border-top: 1px solid var(--line); padding: 10px 18px; display: flex; justify-content: space-between; align-items: center; }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 500; }
.link-more svg.i { width: 14px; height: 14px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.stack > * + * { margin-top: 18px; }

/* ---------------------------------------------------------------- KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.kpi .label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi .label .dot { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--blue-tint); color: var(--blue); }
.kpi .label .dot svg.i { width: 15px; height: 15px; }
.kpi .value { font-size: 30px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; color: var(--ink); }
.kpi .meta { font-size: 12.5px; color: var(--muted); }
.kpi:hover { border-color: var(--line-2); }
a.card, a.kpi, a.doc-tile, a.card:hover, a.kpi:hover, a.doc-tile:hover { color: inherit; }
a.kpi:hover { box-shadow: var(--shadow-2); }
button.card { font: inherit; color: inherit; }

.hero-deadline { position: relative; overflow: hidden; color: #e6eefb; border: 0;
  background: radial-gradient(120% 140% at 100% 0%, #1d3a78 0%, var(--navy) 55%, #071230 100%); padding: 20px 22px;
  display: flex; flex-direction: column; justify-content: space-between; min-height: 100%; }
.hero-deadline::before { content: ""; position: absolute; inset: 0; opacity: .9; pointer-events: none;
  background-image: linear-gradient(to right, rgba(125, 211, 252, .08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(125, 211, 252, .08) 1px, transparent 1px);
  background-size: 22px 22px; }
.hero-deadline > * { position: relative; }
.hero-deadline .eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #8fb6e6;
  display: flex; align-items: center; gap: 8px; }
.hero-deadline .big { font-size: 56px; font-weight: 600; line-height: 1; letter-spacing: -.03em; color: #fff; margin: 14px 0 2px; }
.hero-deadline .big small { font-size: 18px; font-weight: 500; color: #a8c4ec; letter-spacing: 0; margin-left: 6px; }
.hero-deadline .what { font-weight: 600; color: #fff; font-size: 15px; line-height: 1.35; }
.hero-deadline .when { font-size: 12.5px; color: #a8c4ec; margin-top: 3px; }
.hero-deadline .btn { margin-top: 16px; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); color: #fff; box-shadow: none; }
.hero-deadline .btn:hover { background: rgba(255, 255, 255, .18); }
.hero-deadline.urgent .big { color: #ffb4b2; }

/* ---------------------------------------------------------------- pills, chips, badges */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px;
  font-weight: 500; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.pill svg.i { width: 13px; height: 13px; }
.pill.blue { background: var(--blue-tint); color: var(--blue-ink); }
.pill.ok { background: var(--ok-tint); color: var(--ok); }
.pill.warn { background: var(--warn-tint); color: var(--warn); }
.pill.serious { background: var(--serious-tint); color: var(--serious); }
.pill.crit { background: var(--crit-tint); color: var(--crit); }
.pill.outline { background: transparent; border: 1px solid var(--line-2); }
.pill.dark { background: var(--navy); color: #fff; }
.stage { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--ink-2); }
.stage::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.stage.s-enquiry { color: #64748b; background: rgba(100, 116, 139, .12); }
.stage.s-site-visit { color: #0e7490; background: rgba(14, 116, 144, .12); }
.stage.s-design { color: #6d4fc4; background: rgba(109, 79, 196, .12); }
.stage.s-quote-tender { color: var(--blue-ink); background: var(--blue-tint); }
.stage.s-submitted { color: #a75c00; background: var(--warn-tint); }
.stage.s-won, .stage.s-completed { color: var(--ok); background: var(--ok-tint); }
.stage.s-execution { color: #0f766e; background: rgba(15, 118, 110, .12); }
.stage.s-lost { color: var(--crit); background: var(--crit-tint); }
.stage.s-on-hold { color: var(--muted); background: var(--surface-3); }
.disc { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 7px; border-radius: 7px; font-size: 12px;
  font-weight: 500; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.disc svg.i { width: 14px; height: 14px; color: var(--dc, var(--muted)); }
.disc.d-water { --dc: var(--d-water); } .disc.d-fire { --dc: var(--d-fire); } .disc.d-hvac { --dc: var(--d-hvac); }
.disc.d-electrical { --dc: var(--d-electrical); } .disc.d-gas { --dc: var(--d-gas); } .disc.d-drainage { --dc: var(--d-drainage); }
.disc.icon-only { padding: 0; width: 24px; justify-content: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.flag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.flag i { width: 16px; height: 11px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); display: inline-block; }
.flag .f-rw { background: linear-gradient(180deg, #20603d 0 25%, #fad201 25% 50%, #00a1de 50% 100%); }
.flag .f-ug { background: repeating-linear-gradient(180deg, #000 0 1.83px, #fcdc04 1.83px 3.66px, #d90000 3.66px 5.5px); }
.flag .f-ke { background: linear-gradient(180deg, #000 0 30%, #fff 30% 35%, #bb0000 35% 65%, #fff 65% 70%, #006600 70% 100%); }
.flag .f-et { background: linear-gradient(180deg, #078930 0 33%, #fcdd09 33% 66%, #da121a 66% 100%); }
.flag .f-xx { background: var(--surface-3); }
.countdown { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  padding: 3px 9px; border-radius: 999px; }
.countdown svg.i { width: 14px; height: 14px; }
.countdown.crit { color: var(--crit); background: var(--crit-tint); }
.countdown.warn { color: var(--warn); background: var(--warn-tint); }
.countdown.ok { color: var(--blue-ink); background: var(--blue-tint); }
.countdown.past { color: var(--muted); background: var(--surface-3); font-weight: 500; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 600;
  background: linear-gradient(135deg, #2b77bb, #0d1e46); color: #fff; flex: none; letter-spacing: .02em; }
.avatar.sm { width: 24px; height: 24px; font-size: 10.5px; }
.side-foot .avatar { width: 34px; height: 34px; background: linear-gradient(135deg, #e42624, #8f1715); }

/* ---------------------------------------------------------------- progress ring & bars */
.ring { --p: 0; --c: var(--blue); width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--sunken) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface); }
.ring span { position: relative; font-size: 10.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ring.lg { width: 64px; height: 64px; }
.ring.lg::before { inset: 6px; }
.ring.lg span { font-size: 14px; }
.meter { height: 8px; border-radius: 999px; background: var(--sunken); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: var(--blue); }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 118px minmax(0, 1fr) 92px; align-items: center; gap: 12px; font-size: 13px; }
.bar-row .track { position: relative; height: 22px; display: flex; align-items: center; }
.bar-row .track i { display: block; height: 18px; border-radius: 0 4px 4px 0; background: var(--blue); min-width: 3px; }
.bar-row .track::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.bar-row .v { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.bar-row .v b { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
table.t th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-weight: 600; font-size: 11.5px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line);
  white-space: nowrap; z-index: 1; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--surface-2); }
table.t tr.sel td { background: var(--blue-tint); }
table.t .title-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 560px; }
table.t .title-cell b { font-weight: 600; color: var(--ink); line-height: 1.35; }
table.t .title-cell span { font-size: 12.5px; color: var(--muted); }
.t-card { overflow: hidden; }
.t-card table.t th:first-child, .t-card table.t td:first-child { padding-left: 18px; }
.t-card table.t th:last-child, .t-card table.t td:last-child { padding-right: 18px; }

.date-block { width: 46px; flex: none; text-align: center; border-radius: 9px; border: 1px solid var(--line); overflow: hidden;
  background: var(--surface); line-height: 1; }
.date-block .m { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 4px 0 3px;
  background: var(--surface-3); color: var(--muted); }
.date-block .d { font-size: 18px; font-weight: 600; padding: 5px 0 6px; color: var(--ink); }
.date-block.crit .m { background: var(--crit); color: #fff; }
.date-block.warn .m { background: var(--warn); color: #fff; }

/* ---------------------------------------------------------------- agenda & feed */
.agenda-group { margin-top: 6px; }
.agenda-group + .agenda-group { margin-top: 16px; }
.agenda-group h4 { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 6px; }
.agenda-group h4 .n { letter-spacing: 0; font-weight: 500; color: var(--faint); background: var(--surface-3); border-radius: 999px; padding: 0 7px; }
.agenda-item { display: flex; align-items: center; gap: 14px; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; cursor: pointer; color: inherit; }
.agenda-item:hover { background: var(--surface-2); color: inherit; }
.agenda-item .body { flex: 1; min-width: 0; }
.agenda-item .body b { display: block; font-weight: 600; font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-item .body > span { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--muted); margin-top: 2px; min-width: 0; white-space: nowrap; }
.agenda-item .body > span .ellipsis { min-width: 0; max-width: 260px; }
.agenda-item .countdown { flex: none; }
.agenda-more { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 500; margin: 4px 0 0 60px; }
.agenda-more svg.i { width: 14px; height: 14px; }
.type-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; flex: none; }
.type-tag::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--tc, var(--faint)); }
.type-tag.t-submission { --tc: var(--blue); } .type-tag.t-tender { --tc: #64748b; } .type-tag.t-followup { --tc: var(--warn); }
.type-tag.t-clarification { --tc: #6d4fc4; } .type-tag.t-site_visit { --tc: #0e7490; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 10px 0; }
.feed li + li { border-top: 1px solid var(--line); }
.feed .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); flex: none; }
.feed .ic svg.i { width: 15px; height: 15px; }
.feed .tx { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2); }
.feed .tx b { color: var(--ink); font-weight: 600; }
.feed .tm { font-size: 12px; color: var(--faint); white-space: nowrap; }

/* ---------------------------------------------------------------- project cards */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.pcard { display: flex; flex-direction: column; overflow: hidden; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, border-color .16s; }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.cover { position: relative; aspect-ratio: 16 / 9; background: var(--navy); overflow: hidden; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #fff; }
.cover.pdf img { object-fit: cover; object-position: top center; }
.cover .blueprint { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px;
  background: radial-gradient(130% 120% at 100% 0%, #1d3a78 0%, var(--navy) 60%, #06112b 100%); color: #cfe0f8; }
.cover .blueprint::before { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(to right, rgba(125, 211, 252, .1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(125, 211, 252, .1) 1px, transparent 1px),
    linear-gradient(to right, rgba(125, 211, 252, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(125, 211, 252, .05) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px, 12px 12px, 12px 12px; }
.cover .blueprint > * { position: relative; }
.cover .blueprint .code { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: #8fb6e6; }
.cover .blueprint .disc-icons { display: flex; gap: 8px; margin-top: 8px; color: #fff; }
.cover .blueprint .disc-icons svg.i { width: 20px; height: 20px; opacity: .85; }
.cover .tl, .pcard .tl { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; z-index: 2; }
.cover .tr, .pcard .tr { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; z-index: 2; }
.pcard .tl .stage { background: rgba(255, 255, 255, .92); box-shadow: 0 2px 8px rgba(8, 22, 52, .25); }
.cover .glass, .pcard .glass { backdrop-filter: blur(8px); background: rgba(8, 22, 52, .62); color: #fff; border-radius: 8px; height: 26px;
  padding: 0 9px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; }
.cover .glass svg.i, .pcard .glass svg.i { width: 14px; height: 14px; }
.cover .scrim { position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(0deg, rgba(5, 12, 29, .55), transparent); pointer-events: none; }
.pcard .body { padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pcard .code { font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: .03em; }
.pcard .name { font-weight: 600; font-size: 15px; line-height: 1.35; color: var(--ink); display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .where { font-size: 12.5px; color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pcard .foot { border-top: 1px solid var(--line); padding: 10px 16px; display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--muted); }
.pcard .foot .stat { display: inline-flex; align-items: center; gap: 5px; }
.pcard .foot .stat svg.i { width: 15px; height: 15px; }
.pcard .foot .grow { flex: 1; }
.mini-proj { display: flex; gap: 12px; align-items: center; padding: 10px; margin: 0 -10px; border-radius: 10px; cursor: pointer; }
.mini-proj:hover { background: var(--surface-2); }
.mini-proj .thumb { width: 72px; height: 48px; border-radius: 8px; overflow: hidden; flex: none; background: var(--navy); position: relative; }
.mini-proj .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; background: #fff; }
.mini-proj { color: inherit; }
.mini-proj:hover { color: inherit; }
.mini-proj .thumb .mono-code { position: absolute; inset: 0; display: grid; place-items: center; color: #8fb6e6; font-family: var(--mono); font-size: 9.5px; }
.mini-proj .body { flex: 1; min-width: 0; }
.mini-proj .body b { display: block; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- project workspace */
.proj-hero { position: relative; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-1); display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); }
.proj-hero .info { padding: 22px 24px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.proj-hero .code { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); letter-spacing: .04em; }
.proj-hero h1 { font-size: 25px; line-height: 1.25; }
.proj-hero .sub { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 13px; align-items: center; }
.proj-hero .sub span { display: inline-flex; align-items: center; gap: 6px; }
.proj-hero .sub svg.i { width: 15px; height: 15px; }
.proj-hero .visual { position: relative; min-height: 220px; background: var(--navy); }
.proj-hero .visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; background: #fff; }
.proj-hero .visual .cover.pdf img { object-position: top center; }
.proj-hero .visual .blueprint { position: absolute; inset: 0; }
.facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); grid-column: 1 / -1; }
.fact { padding: 14px 20px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact .k { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.fact .v { font-size: 17px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; min-width: 0; }
.fact .v small { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 22px 0 20px; overflow-x: auto; scrollbar-width: none; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 11px 14px; color: var(--muted); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: 13.5px; }
.tabs a svg.i { width: 16px; height: 16px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--blue); }
.tabs a .count { font-size: 11.5px; color: var(--faint); background: var(--surface-3); border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums; }

.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 9px 14px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.timeline-v { position: relative; padding-left: 22px; }
.timeline-v::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline-v .tv { position: relative; padding: 4px 0 14px; }
.timeline-v .tv::before { content: ""; position: absolute; left: -21px; top: 8px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--faint); }
.timeline-v .tv.done::before { background: var(--ok); border-color: var(--ok); }
.timeline-v .tv.next::before { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-tint); }
.timeline-v .tv b { display: block; font-size: 13.5px; }
.timeline-v .tv span { font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------- documents (register) */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.folder-rail { position: sticky; top: 78px; padding: 8px; }
.folder-rail a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2);
  font-size: 13px; font-weight: 500; }
.folder-rail a:hover { background: var(--surface-2); color: var(--ink); }
.folder-rail a.on { background: var(--blue-tint); color: var(--blue-ink); }
.folder-rail a svg.i { width: 16px; height: 16px; color: var(--faint); }
.folder-rail a.on svg.i { color: var(--blue); }
.folder-rail a .n { margin-left: auto; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.folder-rail a .lock { color: var(--warn); width: 13px; height: 13px; }
.folder-rail .sep { height: 1px; background: var(--line); margin: 8px 6px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.toolbar .search { flex: 1 1 220px; }
.ftype { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; flex: none; position: relative;
  background: var(--surface-3); color: var(--muted); overflow: hidden; }
.ftype svg.i { width: 19px; height: 19px; }
.ftype img { width: 100%; height: 100%; object-fit: cover; object-position: top center; background: #fff; }
.ftype.k-pdf { color: #c2410c; background: rgba(194, 65, 12, .1); } .ftype.k-cad { color: #0e7490; background: rgba(14, 116, 144, .1); }
.ftype.k-sheet { color: #15803d; background: rgba(21, 128, 61, .1); } .ftype.k-image { color: #6d4fc4; background: rgba(109, 79, 196, .1); }
.ftype.k-model, .ftype.k-viewer, .ftype.k-bim { color: var(--blue); background: var(--blue-tint); }
.ftype.k-doc, .ftype.k-note { color: #334155; background: var(--surface-3); }
.ext { font-family: var(--mono); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 5px; }
.docno { font-family: var(--mono); font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.ver { font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: var(--blue-ink); background: var(--blue-tint);
  border-radius: 5px; padding: 1px 6px; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; padding: 16px; }
.doc-tile { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--surface);
  transition: box-shadow .15s, border-color .15s; display: flex; flex-direction: column; }
.doc-tile:hover { box-shadow: var(--shadow-2); border-color: var(--line-2); }
.doc-tile .pv { aspect-ratio: 4 / 3; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; position: relative; }
.doc-tile .pv img { width: 100%; height: 100%; object-fit: cover; object-position: top center; background: #fff; }
.doc-tile .pv svg.i { width: 34px; height: 34px; color: var(--faint); }
.doc-tile .pv .ext { position: absolute; left: 8px; top: 8px; background: var(--surface); }
.doc-tile .meta { padding: 10px 12px; }
.doc-tile .meta b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 600; line-height: 1.35; }
.doc-tile .meta span { font-size: 12px; color: var(--muted); }
.dropzone { position: fixed; inset: 0; z-index: 60; background: rgba(8, 22, 52, .55); backdrop-filter: blur(3px); display: grid; place-items: center; }
.dropzone .box { border: 2px dashed rgba(255, 255, 255, .7); border-radius: 20px; padding: 48px 64px; color: #fff; text-align: center; }
.dropzone .box svg.i { width: 40px; height: 40px; }
.upload-bar { position: fixed; right: 24px; bottom: 24px; z-index: 55; width: 360px; padding: 14px 16px; }
.upload-bar .meter { margin-top: 8px; }

/* ---------------------------------------------------------------- 3D model stage */
.model-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.model-list a { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; color: var(--ink-2); }
.model-list a:hover { background: var(--surface-2); }
.model-list a.on { background: var(--blue-tint); color: var(--blue-ink); }
.model-list a b { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.model-list a span { font-size: 12px; color: var(--muted); }
.stage-wrap { position: relative; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); background: #0b1630;
  height: min(76vh, 820px); box-shadow: var(--shadow-1); }
.stage-wrap iframe, .stage-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.stage-bar { position: absolute; top: 12px; right: 12px; z-index: 3; display: flex; gap: 6px; }
.stage-bar .btn { background: rgba(8, 22, 52, .72); color: #fff; border-color: rgba(255, 255, 255, .16); backdrop-filter: blur(8px); box-shadow: none; }
.stage-bar .btn:hover { background: rgba(8, 22, 52, .9); }
.stage-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; color: #a8c4ec; text-align: center; padding: 24px; }
.stage-empty svg.i { width: 42px; height: 42px; color: #4d95d6; }
.v3d-panel { position: absolute; left: 12px; top: 12px; bottom: 12px; width: 250px; z-index: 3; overflow: auto; border-radius: 12px;
  background: rgba(8, 22, 52, .78); backdrop-filter: blur(10px); color: #dbe6f6; padding: 12px; font-size: 12.5px;
  border: 1px solid rgba(255, 255, 255, .1); }
.v3d-panel h4 { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #8fb6e6; margin: 10px 0 6px; }
.v3d-panel h4:first-child { margin-top: 0; }
.v3d-panel label { display: flex; align-items: center; gap: 8px; padding: 4px 4px; border-radius: 6px; cursor: pointer; }
.v3d-panel label:hover { background: rgba(255, 255, 255, .06); }
.v3d-panel label i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.v3d-panel input[type=checkbox] { accent-color: #4d95d6; }
.v3d-panel input[type=range] { width: 100%; accent-color: #4d95d6; }
.v3d-panel.min { bottom: auto; width: auto; padding: 8px 10px; }
.v3d-panel.min .v3d-body { display: none; }
.v3d-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.v3d-panel.min .v3d-head { margin: 0; }
.v3d-head b { font-size: 12.5px; color: #fff; font-weight: 600; }
.v3d-min { border: 0; background: rgba(255, 255, 255, .08); color: #cfe0f8; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; cursor: pointer; }
.v3d-min:hover { background: rgba(255, 255, 255, .16); }
.v3d-seg { display: flex; gap: 4px; }
.v3d-seg button { flex: 1; height: 26px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .14); background: transparent; color: #cfe0f8;
  font: 500 12px var(--font); cursor: pointer; }
.v3d-seg button:hover { background: rgba(255, 255, 255, .06); }
.v3d-seg button.on { background: #2b77bb; border-color: #2b77bb; color: #fff; }
.v3d-panel .btn.xs { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: #dbe6f6; box-shadow: none; }
.v3d-panel .btn.xs:hover { background: rgba(255, 255, 255, .14); }
.model-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.model-head .t { min-width: 0; }
.model-head .t b { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.model-head .t span { font-size: 12.5px; color: var(--muted); }
.v3d-progress { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; width: min(360px, 80%);
  color: #cfe0f8; text-align: center; font-size: 13px; }
.v3d-progress .meter { margin-top: 10px; background: rgba(255, 255, 255, .12); }
.v3d-progress .meter > i { background: #4d95d6; transition: width .2s; }

/* ---------------------------------------------------------------- tender checklist */
.ck-section + .ck-section { margin-top: 18px; }
.ck-section h3 { display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.ck-item { display: grid; grid-template-columns: 26px minmax(0, 1fr) 150px 150px 130px 32px; gap: 10px; align-items: center;
  padding: 9px 10px; border-radius: 10px; border: 1px solid transparent; }
.ck-item:hover { background: var(--surface-2); border-color: var(--line); }
.ck-item .tick { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-2); display: grid; place-items: center;
  cursor: pointer; background: var(--surface); color: transparent; padding: 0; }
.ck-item .tick svg.i { width: 15px; height: 15px; stroke-width: 2.4; }
.ck-item.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.ck-item.done .ttl { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.ck-item.na .ttl { color: var(--faint); }
.ck-item .ttl { font-size: 13.5px; }
.ck-item select.input, .ck-item input.input { height: 30px; font-size: 12.5px; border-radius: 8px; }

/* ---------------------------------------------------------------- overlays: modal, drawer, palette */
.overlay { position: fixed; inset: 0; z-index: 70; background: rgba(5, 12, 29, .48); backdrop-filter: blur(2px); animation: fade .14s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { position: fixed; z-index: 71; left: 50%; top: 9vh; transform: translateX(-50%); width: min(640px, calc(100vw - 32px));
  max-height: 82vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-3);
  animation: rise .18s ease-out; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 4px; }
.modal-body { padding: 14px 20px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-2);
  border-radius: 0 0 16px 16px; }
.drawer { position: fixed; z-index: 71; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface);
  border-left: 1px solid var(--line); box-shadow: var(--shadow-3); display: flex; flex-direction: column; animation: slide .2s ease-out; }
.drawer.wide { width: min(1180px, 100vw); }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.drawer-head .t { min-width: 0; }
.drawer-head h2 { font-size: 17px; line-height: 1.35; }
.drawer-body { flex: 1; overflow: auto; padding: 18px 20px 28px; }
.drawer-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; flex: 1; min-height: 0; }
.drawer-split .preview { background: #1a2236; position: relative; min-height: 0; }
.drawer-split .preview iframe, .drawer-split .preview img, .drawer-split .preview video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.drawer-split .preview img { object-fit: contain; background: #1a2236; }
.drawer-split .side { overflow: auto; padding: 18px 20px; border-left: 1px solid var(--line); }
.preview-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: #a8b8d4; text-align: center; padding: 24px; }
.preview-empty svg.i { width: 46px; height: 46px; }
.palette { position: fixed; z-index: 72; left: 50%; top: 12vh; transform: translateX(-50%); width: min(680px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-3); overflow: hidden; animation: rise .16s ease-out; }
.palette .pin { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.palette .pin input { flex: 1; height: 56px; border: 0; outline: none; background: transparent; font-size: 16px; color: var(--ink); }
.palette .pin svg.i { color: var(--faint); width: 20px; height: 20px; }
.palette .res { max-height: 56vh; overflow: auto; padding: 8px; }
.palette .grp { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 10px 10px 4px; }
.palette .opt { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; color: var(--ink-2); }
.palette .opt.on, .palette .opt:hover { background: var(--blue-tint); color: var(--ink); }
.palette .opt b { color: var(--ink); font-weight: 600; font-size: 13.5px; }
.palette .opt .r { margin-left: auto; font-size: 12px; color: var(--faint); }
.palette .hint { padding: 22px; text-align: center; color: var(--muted); font-size: 13px; }

.toast { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
  background: var(--navy); color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow-3); font-size: 13.5px; max-width: min(560px, 92vw); }
.toast.err { background: #8f1715; }
.toast svg.i { width: 17px; height: 17px; }

.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 40px 24px; color: var(--muted); }
.empty .art { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--blue-tint); color: var(--blue); }
.empty .art svg.i { width: 28px; height: 28px; }
.empty b { color: var(--ink); font-size: 15px; }
.empty p { max-width: 420px; font-size: 13px; }
.skeleton { background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%); background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.loading-page { display: grid; gap: 18px; }
.loading-page .skeleton { height: 120px; }

/* ---------------------------------------------------------------- login */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr); background: var(--surface); }
.login .art { position: relative; overflow: hidden; color: #dce8fb; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(120% 120% at 100% 0%, #1d3a78 0%, var(--navy) 50%, #050d22 100%); }
.login .art::before { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(to right, rgba(125, 211, 252, .09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(125, 211, 252, .09) 1px, transparent 1px),
    linear-gradient(to right, rgba(125, 211, 252, .04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(125, 211, 252, .04) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px, 16px 16px, 16px 16px; }
.login .art > * { position: relative; }
.login .art h1 { color: #fff; font-size: 40px; line-height: 1.1; letter-spacing: -.02em; max-width: 520px; }
.login .art p { color: #a8c4ec; font-size: 15px; max-width: 480px; margin-top: 14px; line-height: 1.6; }
.login .feat { display: grid; gap: 14px; margin-top: 34px; }
.login .feat div { display: flex; gap: 12px; align-items: center; color: #dce8fb; }
.login .feat svg.i { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: rgba(77, 149, 214, .18); color: #8cc3f5; }
.login .panel { display: grid; place-content: center; padding: 40px; }
.login .panel .box { width: min(380px, 86vw); }
.login .panel h2 { font-size: 22px; }
.login .panel p { color: var(--muted); margin: 8px 0 24px; }
.login .countries { display: flex; gap: 16px; color: #8fb6e6; font-size: 12.5px; letter-spacing: .06em; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1240px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fact:nth-child(4) { border-left: 0; }
  .fact:nth-child(n+4) { border-top: 1px solid var(--line); }
  .ck-item { grid-template-columns: 26px minmax(0, 1fr) 140px 120px 32px; }
  .ck-item .ck-owner { display: none; }
}
@media (max-width: 1080px) {
  .cols-12 > [class*="span-"] { grid-column: 1 / -1; }
  .proj-hero { grid-template-columns: 1fr; }
  .proj-hero .visual { min-height: 200px; order: -1; }
  .model-layout, .docs { grid-template-columns: 1fr; }
  .folder-rail { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .folder-rail a { white-space: nowrap; }
  .folder-rail .sep { display: none; }
  .drawer-split { grid-template-columns: 1fr; grid-template-rows: minmax(300px, 55vh) auto; }
  .drawer-split .side { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .2s ease; }
  .app.nav-open .sidebar { transform: none; box-shadow: var(--shadow-3); }
  .app.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(5, 12, 29, .45); z-index: 25; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 16px; gap: 10px; }
  .search-trigger { width: auto; flex: none; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .page { padding: 18px 16px 48px; }
  .login { grid-template-columns: 1fr; }
  .login .art { padding: 32px 24px; }
  .login .art h1 { font-size: 30px; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi .value { font-size: 24px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact { border-left: 0 !important; border-top: 1px solid var(--line); }
  .hide-sm { display: none !important; }
  h1 { font-size: 22px; }
  .proj-hero h1 { font-size: 21px; }
  .ck-item { grid-template-columns: 26px minmax(0, 1fr) 32px; }
  .ck-item .ck-status, .ck-item .ck-due { display: none; }
  .bar-row { grid-template-columns: 92px minmax(0, 1fr) 70px; }
  .drawer, .drawer.wide { width: 100vw; }
  .v3d-panel { width: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
