:root {
  --ink: #122033;
  --navy: #12324d;
  --sidebar: #0c1c2e;
  --sidebar-2: #13283d;
  --sidebar-end: #0a1726;
  --sand: #c6a15a;
  --paper: #eef2f6;
  --card: #ffffff;
  --input: #ffffff;
  --input-line: #d5dde6;
  --soft: #f8fafc;
  --chip: #e8eef5;
  --label: #334155;
  --line: #e3e8ee;
  --muted: #64748b;
  --topbar: rgba(255, 255, 255, .92);
  --side-text: #d7e2ec;
  --side-muted: #7f93a8;
  --side-faint: #8ea2b5;
  --side-brand: #9aafc3;
  --side-active: #ffffff;
  --side-hover: rgba(255, 255, 255, .06);
  --focus: rgba(18, 50, 77, .18);
  --good: #157a45;
  --fair: #9a6b12;
  --poor: #c05621;
  --critical: #9f2d2d;
  --shadow: 0 10px 30px rgba(16, 35, 58, 0.06);
  --radius: 14px;
}
/* Appearance = mode (light | dim | dark) x accent shade x sidebar style, set on <html> by js/theme-boot.js.
   --a is the accent for light pages, --a-dark the accent on dark pages, --a-side* its deep tones. */
:root { --a: #12324d; --a-dark: #2f7fb8; --a-side: #0c1c2e; --a-side-2: #13283d; --a-side-end: #0a1726; }
html[data-accent="teal"] { --a: #0f5e63; --a-dark: #14918b; --a-side: #0a2b2e; --a-side-2: #113c3f; --a-side-end: #072124; }
html[data-accent="emerald"] { --a: #166045; --a-dark: #1f8f5f; --a-side: #0b2a1f; --a-side-2: #12392b; --a-side-end: #082119; }
html[data-accent="indigo"] { --a: #3730a3; --a-dark: #5b5bd6; --a-side: #17153d; --a-side-2: #232053; --a-side-end: #100f2e; }
html[data-accent="plum"] { --a: #6b2160; --a-dark: #a6449a; --a-side: #2a0f27; --a-side-2: #3b1737; --a-side-end: #1f0a1d; }
html[data-accent="maroon"] { --a: #8a1c2b; --a-dark: #c2404f; --a-side: #2e0d12; --a-side-2: #42151c; --a-side-end: #22090d; }
html[data-accent="saffron"] { --a: #9a4a06; --a-dark: #c96d12; --a-side: #2e1704; --a-side-2: #432208; --a-side-end: #221103; --sand: #d9b26a; }
html[data-accent="graphite"] { --a: #334155; --a-dark: #64748b; --a-side: #111827; --a-side-2: #1f2937; --a-side-end: #0b1120; }

:root, html[data-mode="light"] {
  color-scheme: light;
  --navy: var(--a);
  --paper: color-mix(in srgb, var(--a) 5%, #f1f4f8);
  --soft: color-mix(in srgb, var(--a) 3%, #fafbfc);
  --chip: color-mix(in srgb, var(--a) 9%, #ffffff);
  --focus: color-mix(in srgb, var(--a) 20%, transparent);
  --side-hover: rgba(255, 255, 255, .07);
}
html[data-mode="dim"] {
  color-scheme: dark;
  --navy: var(--a-dark);
  --ink: #e8eef5;
  --paper: color-mix(in srgb, var(--a-side) 35%, #1a2433);
  --card: color-mix(in srgb, var(--a-side) 25%, #243244);
  --input: color-mix(in srgb, var(--a-side) 25%, #1c2838);
  --input-line: #3d5168;
  --soft: color-mix(in srgb, var(--a-side) 25%, #2a394c);
  --chip: color-mix(in srgb, var(--a-dark) 22%, #2c3b4f);
  --label: #d0dbe6;
  --line: #3a4c62;
  --muted: #a3b4c6;
  --topbar: color-mix(in srgb, var(--paper) 94%, transparent);
  --focus: color-mix(in srgb, var(--a-dark) 35%, transparent);
  --shadow: 0 10px 30px rgba(0, 0, 0, .28);
}
html[data-mode="dark"] {
  color-scheme: dark;
  --navy: var(--a-dark);
  --ink: #e7eef6;
  --paper: color-mix(in srgb, var(--a-side) 30%, #080d15);
  --card: color-mix(in srgb, var(--a-side) 30%, #121a28);
  --input: color-mix(in srgb, var(--a-side) 25%, #0e1521);
  --input-line: #31445c;
  --soft: color-mix(in srgb, var(--a-side) 30%, #182233);
  --chip: color-mix(in srgb, var(--a-dark) 22%, #1e2a3a);
  --label: #c5d2e0;
  --line: #26364a;
  --muted: #93a4b8;
  --topbar: color-mix(in srgb, var(--paper) 94%, transparent);
  --focus: color-mix(in srgb, var(--a-dark) 35%, transparent);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

:root, html[data-sidebar="deep"] {
  --sidebar: var(--a-side);
  --sidebar-2: var(--a-side-2);
  --sidebar-end: var(--a-side-end);
}
html[data-sidebar="accent"] {
  --sidebar: var(--a);
  --sidebar-2: color-mix(in srgb, #ffffff 14%, var(--a));
  --sidebar-end: var(--a-side);
  --side-text: rgba(255, 255, 255, .9);
  --side-muted: rgba(255, 255, 255, .62);
  --side-faint: rgba(255, 255, 255, .6);
  --side-brand: rgba(255, 255, 255, .7);
  --side-active: #ffffff;
  --side-hover: rgba(255, 255, 255, .09);
}
html[data-sidebar="plain"] {
  --sidebar: var(--card);
  --sidebar-2: var(--chip);
  --sidebar-end: var(--card);
  --side-text: var(--ink);
  --side-muted: var(--muted);
  --side-faint: var(--muted);
  --side-brand: var(--muted);
  --side-active: var(--navy);
  --side-hover: color-mix(in srgb, var(--navy) 7%, transparent);
}
html[data-sidebar="plain"] .sidebar { border-right: 1px solid var(--line); }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Source Sans 3", "Segoe UI", sans-serif; background: var(--paper); color: var(--ink); }
a { color: inherit; }
.shell { display: flex; flex-direction: column; height: 100vh; min-height: 100vh; overflow: hidden; }
.shell-body { display: flex; flex: 1; min-height: 0; }
.sidebar {
  width: 292px;
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-end) 100%);
  color: var(--side-text);
  padding: 16px 12px 18px;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.brand { display: flex; gap: 12px; align-items: center; flex: 0 0 auto; margin: 0; padding-right: 18px; border-right: 1px solid var(--line); }
.crest-logo { width: 48px; height: 48px; flex: 0 0 48px; object-fit: contain; background: #fff; border-radius: 50%; }
.brand strong { display: block; color: var(--ink); font-size: 15px; line-height: 1.15; }
.brand small { display: block; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-size: 10px; margin-top: 2px; line-height: 1.3; max-width: 150px; }
.nav-toggle {
  width: 100%; display: flex; align-items: center; gap: 10px;
  margin: 16px 0 4px; padding: 4px 10px; min-height: 28px; border: 0; background: transparent; cursor: pointer;
  color: var(--side-muted); font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-align: left;
}
.sidebar > .nav-toggle:first-of-type { margin-top: 0; }
.nav-toggle > span { flex: 1; min-width: 0; line-height: 1.3; }
.nav-toggle .chevron { width: 14px; height: 14px; margin-left: 0; flex: 0 0 14px; transition: transform .15s ease; }
.nav-toggle[aria-expanded="false"] .chevron { transform: rotate(-90deg); }
.nav-subtoggle {
  margin: 1px 0; padding: 7px 10px; min-height: 38px; border-radius: 10px;
  color: var(--side-text); font-size: 14px; font-weight: 650; letter-spacing: 0; text-transform: none;
}
.nav-subtoggle:hover { background: var(--side-hover); color: var(--side-active); }
.nav-subtoggle > svg:not(.chevron),
.sidebar a.nav-link svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: .9; stroke-linecap: round; stroke-linejoin: round; }
.nav-panel.is-closed { display: none; }
.nav-panel > .nav-panel {
  margin: 2px 0 8px 19px;
  padding: 2px 0 2px 8px;
  border-left: 1px solid color-mix(in srgb, var(--side-text) 22%, transparent);
}
.nav-sub { padding-left: 8px; }
.sidebar a.nav-link {
  display: flex; align-items: center; gap: 10px;
  min-height: 38px; padding: 7px 10px; margin: 1px 0; border-radius: 10px;
  text-decoration: none; color: var(--side-text); font-size: 14px; font-weight: 650; line-height: 1.25;
}
.sidebar a.nav-link.nav-sub { min-height: 34px; padding-top: 6px; padding-bottom: 6px; font-size: 13px; font-weight: 600; }
.sidebar a.nav-link.nav-sub svg { width: 16px; height: 16px; flex-basis: 16px; opacity: .8; }
.sidebar a.nav-link:hover { background: var(--side-hover); color: var(--side-active); }
.sidebar a.nav-link.active { background: var(--sidebar-2); color: var(--side-active); box-shadow: inset 3px 0 0 var(--sand); }
.sidebar-foot { margin-top: auto; padding: 14px 12px 4px; color: var(--side-faint); font-size: 12px; }
.main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: auto; }
.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 10px 20px; background: var(--topbar);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(8px);
  flex: 0 0 auto; z-index: 5;
}
.topbar-title { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.menu-toggle {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--navy);
  display: grid; place-items: center; padding: 0;
}
.menu-toggle:hover { border-color: var(--navy); }
.menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle .icon-open { display: none; }
body.sidebar-collapsed .menu-toggle .icon-collapse { display: none; }
body.sidebar-collapsed .menu-toggle .icon-open { display: block; }
body.sidebar-collapsed .sidebar { width: 84px; padding-left: 12px; padding-right: 12px; }
body.sidebar-collapsed .nav-toggle,
body.sidebar-collapsed .sidebar-foot { display: none; }
body.sidebar-collapsed .nav-panel.is-closed { display: block; }
body.sidebar-collapsed .nav-panel > .nav-panel { margin-left: 0; padding-left: 0; border-left: 0; }
body.sidebar-collapsed .sidebar a.nav-link,
body.sidebar-collapsed .nav-sub { justify-content: center; font-size: 0; gap: 0; padding-left: 0; padding-right: 0; }
.topbar h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.topbar .crumb { margin: 0 0 2px; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.page-help-btn {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--navy);
  display: grid; place-items: center; padding: 0;
}
.page-help-btn:hover, .page-help-btn[aria-expanded="true"] { border-color: var(--navy); background: var(--soft); }
.page-help-btn svg { width: 18px; height: 18px; }
.page-help-backdrop {
  position: fixed; inset: 0; background: color-mix(in srgb, var(--ink) 28%, transparent);
  z-index: 40;
}
.page-help-dialog {
  position: fixed; top: 72px; right: 20px; width: min(480px, calc(100vw - 32px));
  max-height: min(78vh, 640px); overflow: auto; z-index: 41;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); padding: 18px 18px 16px;
}
.page-help-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.page-help-kicker { margin: 0 0 4px; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.page-help-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.page-help-close {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  display: grid; place-items: center; padding: 0;
}
.page-help-close:hover { border-color: var(--navy); color: var(--navy); }
.page-help-close svg { width: 16px; height: 16px; }
.page-help-summary { margin: 0 0 14px; color: var(--ink); line-height: 1.5; }
.page-help-sub { margin: 0 0 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.page-help-points { margin: 0; padding-left: 18px; display: grid; gap: 9px; color: var(--ink); }
.page-help-points li { line-height: 1.45; }
body.page-help-open { overflow: hidden; }
.theme-switch { position: relative; }
.theme-trigger { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 4px 12px 4px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); color: var(--ink); font-weight: 650; font-size: 13px; cursor: pointer; }
.theme-trigger:hover { border-color: var(--navy); }
.theme-trigger .theme-dot { width: 26px; height: 26px; border-radius: 50%; background: conic-gradient(var(--navy) 0 50%, var(--sidebar) 50% 75%, var(--paper) 75% 100%); border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.theme-trigger svg { width: 14px; height: 14px; color: var(--muted); }
.theme-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 1200; width: 340px; max-width: calc(100vw - 24px); padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); box-shadow: 0 24px 60px rgba(8, 18, 32, .22); }
.theme-panel[hidden] { display: none; }
.theme-panel h3 { margin: 0 0 2px; font-size: 15px; }
.theme-panel > p { margin: 0 0 12px; color: var(--muted); font-size: 12.5px; }
.theme-group { margin-top: 14px; }
.theme-group > span { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.theme-group > span b { font-weight: 650; letter-spacing: 0; text-transform: none; color: var(--ink); font-size: 12px; }
.theme-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.theme-mode { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 6px; min-height: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font-size: 12px; font-weight: 650; cursor: pointer; }
.theme-mode:hover { border-color: var(--navy); }
.theme-mode.is-on { border-color: var(--navy); box-shadow: 0 0 0 2px var(--focus); }
.theme-preview { position: relative; display: flex; height: 44px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(0, 0, 0, .08); }
.theme-preview i { width: 28%; background: var(--a-side); }
.theme-preview b { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 6px; }
.theme-preview b::before, .theme-preview b::after { content: ""; display: block; border-radius: 3px; }
.theme-preview b::before { height: 6px; width: 60%; background: var(--a); }
.theme-preview b::after { flex: 1; }
.theme-preview.light b { background: #f1f4f8; }
.theme-preview.light b::after { background: #ffffff; }
.theme-preview.dim b { background: #1f2a3a; }
.theme-preview.dim b::after { background: #2b3a4e; }
.theme-preview.dim b::before, .theme-preview.dark b::before { background: var(--a-dark); }
.theme-preview.dark b { background: #0b111b; }
.theme-preview.dark b::after { background: #172131; }
.theme-preview.auto b { background: linear-gradient(135deg, #f1f4f8 50%, #0b111b 50%); }
.theme-preview.auto b::after { background: linear-gradient(135deg, #ffffff 50%, #172131 50%); }
.theme-accents { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.theme-accent { width: 100%; aspect-ratio: 1; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); cursor: pointer; background: var(--swatch); position: relative; }
.theme-accent:hover { transform: scale(1.08); }
.theme-accent.is-on { box-shadow: 0 0 0 2px var(--swatch); }
.theme-accent.is-on::after { content: ""; position: absolute; inset: 0; margin: auto; width: 34%; height: 18%; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-15%) rotate(-45deg); }
.theme-sidebars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 3px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); }
.theme-sidebar { min-height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 650; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.theme-sidebar i { width: 10px; height: 14px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .12); }
.theme-sidebar[data-sidebar="deep"] i { background: var(--a-side); }
.theme-sidebar[data-sidebar="accent"] i { background: var(--a); }
.theme-sidebar[data-sidebar="plain"] i { background: #fff; }
.theme-sidebar.is-on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.theme-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.theme-foot button { min-height: 0; padding: 0; border: 0; background: none; color: var(--navy); font-weight: 650; cursor: pointer; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--chip); color: var(--navy);
  font-weight: 700; font-size: 13px;
}
.user-chip strong { display: block; font-size: 14px; line-height: 1.1; }
.user-chip small { color: var(--muted); }
.content { padding: 24px 28px 32px; flex: 1; }
.content.is-loading { opacity: .55; pointer-events: none; }
.app-footer {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 28px; color: var(--muted); font-size: 13px;
  border-top: 1px solid var(--line); background: var(--soft);
}
.kpis { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; box-shadow: var(--shadow); color: inherit; transition: border-color .15s ease, transform .15s ease; }
.kpi:hover { border-color: var(--navy); transform: translateY(-1px); }
.kpi-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.kpi-figure { text-decoration: none; color: inherit; display: block; }
.kpi span { color: var(--muted); font-size: 13px; }
.kpi strong { display: block; font-size: 28px; margin-top: 4px; }
.kpi p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.section-icon, .icon-button svg, .btn-icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.section-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--chip); color: var(--navy); display: grid; place-items: center; flex: 0 0 36px; }
.section-icon svg { width: 18px; height: 18px; }
.icon-button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--navy); background: var(--card); text-decoration: none; flex: 0 0 34px; }
.icon-button:hover { border-color: var(--navy); background: var(--soft); }
.icon-button svg, .btn-icon { width: 16px; height: 16px; }
.section-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.section-head > .button { margin-left: auto; }
.section-head h2 { margin: 0 0 4px; font-size: 16px; }
.section-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.section-head .icon-button { margin-left: auto; }
.grid-2 { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; margin-top: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.card h2 { margin: 0 0 12px; font-size: 16px; }
.card .section-head h2 { margin: 0 0 4px; }
.card p.hint { margin: -6px 0 12px; color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.page-head p { margin: 0; color: var(--muted); max-width: 560px; }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-head .toolbar-actions,
.asset-hero .toolbar-actions { flex-wrap: nowrap; flex-shrink: 0; align-items: center; white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
input, select, textarea, button { font: inherit; }
input, select, textarea { border: 1px solid var(--input-line); background: var(--input); padding: 10px 12px; border-radius: 10px; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); border-color: var(--navy); }
button, .button {
  background: var(--navy); color: #fff; border: 0; padding: 10px 16px; border-radius: 10px;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 650;
}
[hidden] { display: none !important; }
.button.secondary, button.secondary { background: var(--card); color: var(--navy); border: 1px solid var(--input-line); }
.button.ghost { background: transparent; color: var(--navy); border: 1px solid var(--input-line); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; background: #eef2f5; }
.badge.Poor, .badge.High { background: #fde8d0; color: var(--poor); }
.badge.Critical { background: #f8d7d7; color: var(--critical); }
.badge.Good, .badge.Excellent, .badge.Low, .badge.Yes, .badge.Operational { background: #e5f4ec; color: var(--good); }
.badge.Fair, .badge.Medium, .badge.UnderMaintenance { background: #f8efd8; color: var(--fair); }
.badge.Warranty { background: #e5f4ec; color: var(--good); }
.badge.Amc { background: #e4eef8; color: var(--navy); }
.badge.Support { background: #f8efd8; color: var(--fair); }
.badge.PostWarranty { background: #f8d7d7; color: var(--critical); }
.badge.No, .badge.Draft, .badge.Closed { background: var(--chip); color: var(--muted); }
.badge.Assigned, .badge.Accepted, .badge.InProgress { background: color-mix(in srgb, var(--navy) 14%, var(--card)); color: var(--navy); }
.badge.OnHold { background: color-mix(in srgb, var(--fair) 18%, var(--card)); color: var(--fair); }
.badge.Completed, .badge.Verified { background: color-mix(in srgb, var(--good) 16%, var(--card)); color: var(--good); }
.badge.Cancelled { background: color-mix(in srgb, var(--critical) 16%, var(--card)); color: var(--critical); }
.grid-toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 0; padding: 10px 14px; color: var(--muted); flex-wrap: wrap; background: color-mix(in srgb, var(--soft) 72%, var(--card)); border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; }
.grid-count { margin: 0; font-size: 13px; }
.grid-count strong { color: var(--ink); font-size: 14px; font-weight: 700; }
.grid-tools { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.grid-search { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.grid-search input { width: 220px; padding: 7px 10px; border-radius: 8px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.page-size { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.page-size select { width: auto; min-width: 72px; padding: 6px 10px; border-radius: 8px; text-transform: none; letter-spacing: 0; font-weight: 650; }
.grid-nav { display: inline-flex; align-items: center; gap: 4px; }
.grid-nav a, .grid-nav .disabled { min-width: 34px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--navy); text-decoration: none; font-weight: 700; line-height: 1; }
.grid-nav a:hover { border-color: var(--navy); }
.grid-nav .disabled { color: var(--muted); background: var(--soft); }
.grid-export { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--navy); font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.grid-export:hover { border-color: var(--navy); }
.grid-page { min-width: 48px; text-align: center; font-size: 13px; font-weight: 700; color: var(--ink); }
.asset-grid { padding: 14px 16px 8px; }
.asset-grid .table-scroll { max-height: calc(100vh - 320px); overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.asset-grid table { border-collapse: separate; border-spacing: 0; min-width: 1560px; }
.asset-grid th, .asset-grid td { background: var(--card); white-space: nowrap; }
.asset-grid thead th { position: sticky; top: 0; z-index: 2; background: var(--soft); border-bottom: 1px solid var(--input-line); }
.asset-grid tbody tr:nth-child(even) td { background: var(--soft); }
.asset-grid tbody tr:hover td { background: var(--chip); }
.asset-grid .sticky { position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 0 var(--line); }
.asset-grid .sticky-end { position: sticky; right: 0; z-index: 1; box-shadow: -1px 0 0 var(--line); }
.asset-grid thead .sticky, .asset-grid thead .sticky-end { z-index: 3; background: var(--soft); }
.asset-grid .code-link { font-family: Consolas, "Courier New", monospace; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--navy); text-decoration: none; background: #e8eef5; border-radius: 6px; padding: 4px 7px; }
.asset-grid .code-link:hover { background: var(--navy); color: white; }
.asset-grid .name-cell { white-space: normal; min-width: 180px; }
.asset-grid .name-cell strong, .asset-grid .name-cell .muted { display: block; }
.asset-grid .clip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.asset-grid .nowrap { white-space: nowrap; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 6px 10px; border: 1px solid var(--line); background: var(--card); text-decoration: none; border-radius: 99px; }
.tabs a.active { background: var(--navy); color: white; }
.detail-tabs { flex-wrap: wrap; gap: 4px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); position: sticky; top: 76px; z-index: 4; }
.detail-tabs a { border-color: transparent; background: transparent; color: var(--label); font-weight: 650; padding: 7px 12px; white-space: nowrap; }
.detail-tabs a:hover { background: var(--chip); color: var(--ink); }
.detail-tabs a.active { background: var(--navy); color: white; }
@media (max-width: 720px) { .detail-tabs { position: static; } }
.section-tabs { position: static; width: max-content; max-width: 100%; }
.section-tabs a { display: inline-flex; align-items: center; gap: 7px; }
.section-tabs svg { width: 16px; height: 16px; flex: none; }
.asset-hero { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); }
.asset-hero h2 { margin: 8px 0 6px; font-size: 30px; letter-spacing: -0.03em; }
.asset-hero .code-link { display: inline-block; }
.login-body { min-height: 100vh; background: var(--paper); }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; }
.login-hero {
  position: relative; overflow: hidden; color: #f6f1e6;
  padding: 48px 64px; display: flex; flex-direction: column; justify-content: center;
  background:
    radial-gradient(820px 420px at 8% 108%, rgba(198, 161, 90, .28), transparent 62%),
    linear-gradient(165deg, color-mix(in srgb, var(--a) 92%, #ffffff) 0%, var(--a-side) 46%, var(--a-side-end) 100%);
}
.login-hero::after {
  content: "Authorised municipal officers";
  position: absolute; left: 64px; bottom: 36px; z-index: 1;
  letter-spacing: .14em; text-transform: uppercase; font-size: 12px; font-weight: 700; color: #d9c7a2;
}
.login-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .7), transparent 78%);
}
.login-brand { position: absolute; top: 48px; left: 64px; z-index: 1; }
.login-copy { position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: 16px; }
.login-logo { width: 72px; height: 72px; object-fit: contain; background: #fff; border-radius: 50%; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); }
.login-brand small { display: block; letter-spacing: .12em; text-transform: uppercase; font-size: 11px; color: #d9c7a2; font-weight: 700; }
.login-brand strong { display: block; margin-top: 4px; font-size: 20px; letter-spacing: -.02em; }
.login-kicker { margin: 0 0 10px; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; font-weight: 700; color: #d9c7a2; }
.login-hero h1 { font-size: 48px; line-height: 1.05; letter-spacing: -.03em; margin: 0 0 16px; max-width: 560px; }
.login-copy > p:last-of-type { margin: 0; max-width: 460px; font-size: 18px; line-height: 1.5; color: #d7e2ec; }
.login-points { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 28px 0 0; padding: 0; }
.login-points li { border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 650; }
.login-panel { display: grid; place-items: center; padding: 40px 32px; background: var(--paper); }
.login-card {
  width: min(420px, 100%); background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 32px 32px 28px; box-shadow: 0 18px 50px rgba(16, 35, 58, .08);
  display: grid; gap: 14px; position: relative; overflow: hidden;
}
.login-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--sand), #e8d7b0); }
.login-card h2 { margin: 0; font-size: 28px; letter-spacing: -.03em; }
.login-lead { margin: -4px 0 4px; color: var(--muted); }
.login-card .field input { width: 100%; padding: 12px 14px; }
.login-password { position: relative; }
.login-password input { padding-right: 72px; }
.login-reveal {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: transparent; color: var(--navy); border: 0; padding: 6px 10px; font-size: 13px; font-weight: 700;
}
.login-card button[type="submit"] { width: 100%; justify-content: center; margin-top: 6px; padding: 12px 16px; font-size: 16px; }
.login-note { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.error { background: #fdecec; color: var(--critical); border-radius: 10px; padding: 10px 12px; }
.map { height: 640px; border: 1px solid var(--line); border-radius: var(--radius); }
.map-analytics { height: 460px; border: 1px solid var(--line); border-radius: 12px; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.zone-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.zone-chips a { text-decoration: none; background: white; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; font-weight: 650; color: var(--navy); }
.zone-chips a span { color: var(--muted); font-weight: 600; margin-left: 6px; }
.zone-chips a.active { background: var(--navy); color: white; border-color: var(--navy); }
.zone-chips a.active span { color: #d7e2ec; }
.audit-ranges { margin-bottom: 14px; }
.audit-ranges a { padding: 5px 11px; font-size: 12.5px; }
td.nowrap { white-space: nowrap; }
.dash { display: grid; gap: 16px; }
.dash-hero {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 22px 24px; border-radius: 18px; color: var(--side-active);
  background:
    radial-gradient(720px 180px at 100% 0%, color-mix(in srgb, var(--sand) 42%, transparent), transparent 58%),
    linear-gradient(115deg, var(--sidebar) 0%, color-mix(in srgb, var(--sidebar) 62%, var(--navy)) 100%);
  box-shadow: var(--shadow);
}
.dash-kicker { margin: 0 0 6px; letter-spacing: .12em; text-transform: uppercase; font-size: 11px; font-weight: 700; color: var(--sand); }
.dash-hero h2 { margin: 0; font-size: 32px; letter-spacing: -.03em; line-height: 1.05; }
.dash-hero h2 + p { margin: 8px 0 0; max-width: 420px; color: color-mix(in srgb, var(--side-active) 78%, transparent); }
.dash-hero .button { background: var(--sand); color: #12324d; }
.dash-hero .button.secondary { background: color-mix(in srgb, var(--side-active) 10%, transparent); color: var(--side-active); border: 1px solid color-mix(in srgb, var(--side-active) 28%, transparent); }
.dash-hero .button.secondary:hover { background: color-mix(in srgb, var(--side-active) 18%, transparent); }
.dash .zone-chips { margin: 0; padding: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.dash .zone-chips a { background: var(--soft); border-color: transparent; color: var(--ink); }
.dash .zone-chips a span { color: var(--muted); }
.dash .zone-chips a:hover { border-color: var(--navy); }
.dash .zone-chips a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.dash .zone-chips a.active span { color: #d7e2ec; }
.dash .kpis { gap: 12px; }
.brief .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.forecast .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.forecast-rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.forecast-rules li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: 0 10px 28px rgba(16, 35, 58, .05); }
.forecast-rules strong { display: block; margin-bottom: 4px; }
.forecast-rules span { color: var(--muted); font-size: 13px; line-height: 1.35; }
.forecast-score { font-size: 22px; line-height: 1; letter-spacing: -.03em; color: var(--ink); }
.forecast-why { color: var(--muted); font-size: 12px; line-height: 1.4; }
.score-bar.act i { background: var(--critical); }
.score-bar.watch i { background: var(--sand); }
.score-bar.steady i { background: var(--good); }
.plan-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.plan-list, .plan-raised { display: grid; gap: 10px; }
.plan-raised { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan-card { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.plan-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-card time { color: var(--muted); font-size: 12px; }
.plan-card p { margin: 0; }
.plan-card a { text-decoration: none; }
.plan-card strong { color: var(--navy); letter-spacing: .02em; }
.plan-card form { margin: 8px 0 0; }
.plan-card button { width: 100%; }
.brief-lines ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.brief-lines li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; margin: 0; }
.brief-lines li span { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 13px; font-weight: 700; }
.brief-lines li p { margin: 4px 0 0; }
.brief-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.brief-list { display: grid; gap: 8px; }
.brief-item { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; background: var(--soft); }
.brief-item:hover { border-color: var(--navy); }
.brief-item strong { color: var(--navy); font-size: 13px; letter-spacing: .02em; }
.brief-item span { color: var(--muted); font-size: 13px; line-height: 1.35; }
.dash .kpi { position: relative; padding: 16px 16px 14px 18px; border-radius: 16px; }
.dash .kpi:hover, .dash .kpi:focus-within { z-index: 6; }
.dash .kpi.is-clamped:hover::after, .dash .kpi.is-clamped:focus-within::after { content: attr(data-full); position: absolute; left: 10px; right: 10px; top: calc(100% + 6px); padding: 10px 12px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px rgba(12, 28, 46, .18); font-size: 12.5px; line-height: 1.45; pointer-events: none; }
.dash .tone-navy { --accent: var(--navy); }
.dash .tone-good { --accent: var(--good); }
.dash .tone-poor { --accent: var(--poor); }
.dash .tone-critical { --accent: var(--critical); }
.dash .tone-sand { --accent: var(--sand); }
.dash .tone-muted { --accent: #8ea0b3; }
.dash .section-icon { background: color-mix(in srgb, var(--accent, var(--navy)) 16%, var(--card)); color: var(--accent, var(--navy)); }
.dash .kpi strong { font-size: 32px; letter-spacing: -.03em; color: var(--ink); line-height: 1; }
.dash .kpi-figure span { font-size: 13px; font-weight: 650; }
.dash .kpi p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.dash .card, .dash .kpi { box-shadow: 0 10px 28px rgba(16, 35, 58, .05); }
.dash .kpi { box-shadow: inset 4px 0 0 var(--accent, var(--navy)), 0 10px 28px rgba(16, 35, 58, .05); }
.dash .card { border-radius: 16px; }
.dash .chart-grid, .dash .grid-2 { margin: 0; }
.dash .map-analytics { height: 420px; border: 0; border-radius: 12px; overflow: hidden; }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.leaflet-popup-content { margin: 12px 14px; }
.pin-card { min-width: 240px; max-width: 300px; }
.pin-code { margin: 0; color: var(--muted); font-size: 12px; letter-spacing: .04em; font-weight: 700; }
.pin-name { display: block; margin: 2px 0 8px; color: var(--ink); font-size: 15px; line-height: 1.3; }
.pin-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-top: 1px solid var(--line); font-size: 13px; }
.pin-row span { color: var(--muted); }
.pin-row strong { color: var(--ink); text-align: right; font-weight: 650; }
.pin-open { display: inline-flex; margin-top: 10px; color: var(--navy); font-weight: 700; font-size: 13px; }
.section-gap { margin-top: 22px; }
.table-wrap { overflow-x: auto; }
th.sortable { cursor: pointer; }
th.sortable:hover { color: var(--navy); }
.card:not(.table-card) > table[data-grid] { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; }
.card:not(.table-card) > .pager { margin-top: 0; }
table[data-grid] thead th, .table-card thead th { background: var(--soft); }
table[data-grid] tbody tr:hover td, .table-card tbody tr:hover td { background: var(--chip); }
.table-scroll table { min-width: 1280px; }
.asset-grid .table-scroll table { min-width: 1560px; }
.row-actions { display: flex; gap: 6px; align-items: center; }
.row-actions form { margin: 0; }
.button.small { padding: 6px 10px; font-size: 13px; }
.button.danger { background: #9f2d2d; color: white; border: 0; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin: 0; padding: 10px 14px; color: var(--muted); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; background: color-mix(in srgb, var(--soft) 45%, var(--card)); flex-wrap: wrap; }
.muted { color: var(--muted); font-size: 12px; }
.form-shell { display: grid; gap: 16px; }
.form-section h2 { margin: 0 0 4px; font-size: 16px; }
.form-section p.hint { margin: 0 0 14px; color: var(--muted); }
.form-section .section-head { margin-bottom: 16px; }
.form-section .section-head p.hint { margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.step-row { display: grid; grid-template-columns: 2fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.step-row .check { margin-bottom: 10px; }
.evidence-picks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.requirement-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.step-row .requirement-picks, #add-step .requirement-picks { grid-column: 1 / -1; flex-basis: 100%; }
#add-step .evidence-picks { flex-basis: 100%; }
.file-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.evidence-picks .file-line { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.file-line .check { margin: 0; }
.file-line > .check:first-child { min-width: 96px; }
.file-line .check.req { font-weight: 500; color: var(--muted); }
.file-line .check.req:has(input:disabled) { opacity: .5; }
.follow-ups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.follow-up { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--soft); }
.follow-up > .check { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.follow-up-body { margin-top: 10px; display: grid; gap: 10px; }
.follow-up-body .hint { margin: 0; }
.follow-ups .follow-up-note { grid-column: 1 / -1; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; max-height: 220px; overflow: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.check-list .check { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
.follow-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.follow-board { --test: #1287b8; --doc: var(--sand); --soon-c: var(--fair); }
.follow-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 6px 0 16px; }
.follow-stat { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, var(--card)), var(--card) 70%); }
button.follow-stat { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
button.follow-stat:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(16, 35, 58, .07); }
button.follow-stat.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), 0 8px 20px rgba(16, 35, 58, .08); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--card)), var(--card) 80%); }
button.follow-stat:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.follow-item[hidden], .follow-none[hidden] { display: none; }
.follow-stat strong { display: block; font-size: 24px; line-height: 1; letter-spacing: -.02em; color: var(--ink); }
.follow-stat small { display: block; margin-top: 4px; font-size: 12px; font-weight: 650; color: var(--muted); }
.follow-stat-icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent, var(--navy)) 15%, var(--card)); color: var(--accent, var(--navy)); }
.follow-stat-icon svg { width: 19px; height: 19px; }
.follow-stat.tone-navy { --accent: var(--navy); }
.follow-stat.tone-test { --accent: var(--test); }
.follow-stat.tone-doc { --accent: var(--doc); }
.follow-stat.tone-critical { --accent: var(--critical); }
.follow-stat.tone-soon { --accent: var(--soon-c); }
.follow-filters { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.follow-filters button { background: transparent; color: var(--label, var(--muted)); border: 0; padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 650; }
.follow-filters button span { margin-left: 4px; padding: 1px 7px; border-radius: 99px; font-size: 11px; background: color-mix(in srgb, var(--navy) 10%, var(--card)); color: var(--navy); }
.follow-filters button.is-on { background: var(--card); color: var(--navy); box-shadow: 0 2px 8px rgba(16, 35, 58, .08); }
.follow-filters button.is-on span { background: var(--navy); color: #fff; }
.follow-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.follow-item { --u: var(--good); position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.follow-item::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--u); }
.follow-item:hover { border-color: color-mix(in srgb, var(--navy) 35%, var(--line)); box-shadow: 0 8px 22px rgba(16, 35, 58, .07); transform: translateY(-1px); }
.follow-item.is-late { --u: var(--critical); }
.follow-item.is-soon { --u: var(--soon-c); }
.follow-item.is-open { --u: #8ea0b3; }
.follow-kind { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; display: grid; place-items: center; }
.follow-kind svg { width: 21px; height: 21px; }
.follow-kind.is-test { background: color-mix(in srgb, var(--test) 14%, var(--card)); color: var(--test); }
.follow-kind.is-doc { background: color-mix(in srgb, var(--doc) 18%, var(--card)); color: color-mix(in srgb, var(--doc) 80%, var(--ink)); }
.follow-main { flex: 1; min-width: 0; }
.follow-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.follow-title strong { font-size: 15px; color: var(--ink); }
.follow-tag { padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.follow-tag.is-test { background: color-mix(in srgb, var(--test) 12%, var(--card)); color: var(--test); }
.follow-tag.is-doc { background: color-mix(in srgb, var(--doc) 16%, var(--card)); color: color-mix(in srgb, var(--doc) 80%, var(--ink)); }
.follow-remarks { margin: 4px 0 0; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.follow-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.follow-meta .dot { opacity: .5; }
.follow-code { font-family: Consolas, "Courier New", monospace; font-size: 11.5px; font-weight: 700; color: var(--navy); background: color-mix(in srgb, var(--navy) 8%, var(--card)); padding: 3px 7px; border-radius: 6px; text-decoration: none; }
.follow-code:hover { background: var(--navy); color: #fff; }
.follow-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }
.follow-side small { font-size: 11.5px; color: var(--muted); }
.follow-side .button { padding: 7px 12px; font-size: 13px; }
.follow-due { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--good) 13%, var(--card)); color: var(--good); white-space: nowrap; }
.follow-due svg { width: 13px; height: 13px; }
.follow-due.is-late { background: color-mix(in srgb, var(--critical) 13%, var(--card)); color: var(--critical); }
.follow-due.is-soon { background: color-mix(in srgb, var(--soon-c) 16%, var(--card)); color: var(--soon-c); }
.follow-due.is-open { background: var(--soft); color: var(--muted); }
.follow-empty { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 14px; border: 1px dashed var(--line); background: color-mix(in srgb, var(--good) 6%, var(--card)); --accent: var(--good); }
.follow-empty strong { color: var(--ink); }
.follow-empty p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.follow-none { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
@media (max-width: 1100px) { .follow-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .follow-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .follow-item { flex-wrap: wrap; }
  .follow-side { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
}
.follow-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.follow-upload input:not([type="file"]) { width: 160px; }
@media (max-width: 980px) { .follow-ups { grid-template-columns: 1fr; } }
.badge.cover-Active { background: #e5f4ec; color: var(--good); }
.badge.cover-Expiring { background: #f8efd8; color: var(--fair); }
.badge.cover-Expired { background: #f8d7d7; color: var(--critical); }
.badge.cover-None { background: var(--chip); color: var(--muted); }
a.badge { text-decoration: none; }
.cover-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cover-card { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--soft); }
.cover-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cover-card header .badge { text-transform: none; letter-spacing: 0; }
.cover-card strong { font-size: 17px; color: var(--ink); }
.cover-card p { margin: 0; color: var(--label); }
.cover-card .cover-days { color: var(--muted); font-size: 13px; }
.cover-card a { margin-top: auto; padding-top: 8px; font-weight: 650; }
.life-bar { height: 8px; border-radius: 99px; background: var(--chip); overflow: hidden; margin: 6px 0 2px; }
.life-bar span { display: block; height: 100%; border-radius: inherit; }
.life-bar .cover-Active { background: var(--good); }
.life-bar .cover-Expiring { background: var(--fair); }
.life-bar .cover-Expired { background: var(--critical); }
.cover-section { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); scroll-margin-top: 190px; }
.cover-add { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--soft); }
.cover-add summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.cover-add[open] summary { margin-bottom: 12px; }
.amc-choice { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; font-weight: 650; }
.amc-choice .check { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.cover-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.cover-strip > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--soft); }
.cover-strip span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 4px; }
.cover-strip p { margin: 4px 0 0; font-size: 13px; color: var(--label); }
.cover-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.cover-filters > span { color: var(--muted); font-weight: 650; margin-right: 4px; }
.dash-tabs { margin-bottom: 16px; position: static; }
.dash .kpi.is-selected { outline: 2px solid var(--accent, var(--navy)); outline-offset: -2px; }
@media (max-width: 980px) { .cover-cards, .cover-strip { grid-template-columns: 1fr; } }
.pick { position: relative; }
.pick-menu { position: absolute; z-index: 8; top: calc(100% + 4px); left: 0; min-width: 240px; max-height: 240px; overflow: auto; padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(12, 28, 46, .16); }
.pick-menu .check { display: flex; align-items: center; gap: 8px; margin: 6px 0; white-space: nowrap; }
.evidence-files { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.visit-evidence-pick { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border: 2px dashed color-mix(in srgb, var(--navy) 35%, var(--line)); border-radius: 14px; background: var(--soft); }
.visit-evidence-pick label { font-size: 14px; font-weight: 700; color: var(--navy); }
.visit-evidence-pick input[type="file"] { max-width: 100%; }
.check-steps { display: flex; flex-direction: column; gap: 12px; }
.check-step { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--soft); }
.check-step header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.check-step h3 { margin: 0; font-size: 15px; }
.step-no { width: 28px; height: 28px; border-radius: 99px; background: var(--navy); color: white; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: 0 0 28px; }
.evidence-list { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.evidence-list[hidden] { display: none !important; }
.evidence-list img, .evidence-list video { width: 220px; max-height: 200px; object-fit: cover; object-position: bottom center; border-radius: 8px; background: #eef2f5; }
.row-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; white-space: nowrap; }
.row-actions form { margin: 0; }
.row-actions .icon-button:disabled { opacity: .35; cursor: default; }
.step-table td { vertical-align: middle; }
.step-table .file-options { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.step-table .check { display: inline-flex; align-items: center; gap: 8px; margin: 0; white-space: nowrap; font-weight: 650; color: var(--label); }
.step-table .check input { width: 16px; height: 16px; min-width: 16px; padding: 0; margin: 0; flex: 0 0 16px; }
.step-table input[type="text"], .step-table input:not([type]), .step-table select { width: 100%; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 650; color: var(--label); }
.field.check { flex-direction: row; align-items: center; gap: 10px; }
.field.check input { width: 18px; height: 18px; padding: 0; }
.template-map { display: flex; flex-direction: column; gap: 8px; }
.template-choice { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.template-choice[hidden] { display: none !important; }
.template-choice input[type="checkbox"] { width: 18px; height: 18px; padding: 0; margin: 0; }
.template-choice strong { display: block; color: var(--navy); }
.template-choice small { display: block; color: var(--muted); margin-top: 2px; font-weight: 500; }
.template-default { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; font-weight: 650; color: var(--muted); white-space: nowrap; }
.template-choice:has(input[type="checkbox"]:checked) { border-color: var(--navy); background: var(--soft); }
.template-choice:has(input[type="radio"]:checked) .template-default { color: var(--navy); }
.amc-fields[hidden] { display: none; }
.filter-card { margin-bottom: 16px; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.filter-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 650; color: #334155; }
.filter-grid input, .filter-grid select { width: 100%; }
.filter-card.inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.filter-card.inline .filter-grid { display: flex; flex: 1 1 320px; max-width: 520px; margin-bottom: 0; }
.filter-card.inline .filter-grid label { flex: 1 1 auto; }
.filter-card.inline .toolbar-actions { margin: 0; flex-wrap: nowrap; }
.sort-link { text-decoration: none; color: inherit; display: inline-flex; align-items: center; gap: 4px; }
.sort-link:hover { color: var(--navy); }
.card.table-card { padding: 0; background: transparent; border: 0; box-shadow: none; }
.table-card:not(.asset-grid) .table-wrap { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; background: var(--card); }
.card.table-card > table[data-grid] { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; background: var(--card); }
.code-link { color: var(--navy); font-weight: 650; }
.asset-grid .table-scroll { border-radius: 0 0 12px 12px; border-top: 0; }
.asset-grid .pager { border-top: 0; }
.pager-pages { display: flex; gap: 6px; flex-wrap: wrap; }
.pager-pages a, .pager-pages .disabled { min-width: 34px; text-align: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; background: var(--card); color: var(--ink); }
.pager-pages a:hover { border-color: var(--navy); color: var(--navy); }
.pager-pages a.active { background: var(--navy); color: white; border-color: var(--navy); }
.pager-pages .disabled { color: var(--muted); background: var(--soft); }
.asset-hero { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.place { display: grid; grid-template-columns: 1.45fr .75fr; gap: 16px; align-items: start; }
.place-stage { display: grid; gap: 12px; }
.map-place { height: 480px; border-radius: 16px; border: 1px solid var(--line); }
.place-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.place-empty { min-height: 280px; border: 1px dashed #c9d4df; border-radius: 16px; background: #f8fafc; display: grid; align-content: center; justify-items: start; gap: 8px; padding: 28px; }
.place-empty p { margin: 0; color: var(--muted); max-width: 420px; }
.place-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.place-card { background: #fbfcfe; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.place-card.wide { grid-column: 1 / -1; }
.place-card span { display: block; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.place-card strong { display: block; margin-top: 6px; font-size: 15px; line-height: 1.35; }
.hero-meta { margin: 0 0 10px; color: var(--muted); }
.stat-row { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb a { color: var(--navy); text-decoration: none; }
.detail-panel h2 { margin: 0 0 14px; }
.detail-panel { transition: opacity .15s ease; }
.detail-panel.is-loading { opacity: .55; pointer-events: none; }
#coverPanel { transition: opacity .15s ease; }
#coverPanel.is-loading { opacity: .55; pointer-events: none; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 0; }
.facts > div { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.facts dd { margin: 4px 0 0; }
.split { display: grid; grid-template-columns: 1.5fr .7fr; gap: 18px; align-items: start; }
.qr-card { text-align: center; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.qr-card p { color: var(--muted); font-size: 13px; }
.map-sm { height: 280px; border-radius: 12px; border: 1px solid var(--line); }
.empty { color: var(--muted); padding: 8px 0 4px; }
.kpi-mini { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 10px; }
.kpi-mini div { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fbfcfe; }
.kpi-mini span { color: var(--muted); font-size: 12px; }
.kpi-mini strong { display: block; font-size: 18px; margin-top: 4px; }
.risk-formula { margin-top: 18px; }
.risk-formula h3 { margin: 0 0 8px; font-size: 15px; }
.risk-equation { margin: 0 0 8px; }
.risk-equation code, .risk-table code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: var(--navy); background: var(--soft); padding: 2px 6px; border-radius: 6px; }
.risk-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.risk-table th, .risk-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 13px; }
.risk-table thead th { color: var(--label); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.risk-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.risk-table tfoot th { border-bottom: 0; border-top: 2px solid var(--line); font-size: 14px; }
.risk-sum { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; }
.callout { background: #f8fafc; border-left: 3px solid var(--sand); padding: 12px 14px; border-radius: 8px; }
.upload-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.media-grid figure { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white; }
.media-grid img { width: 100%; height: 140px; object-fit: cover; display: block; background: #e8eef5; }
.media-grid figcaption { padding: 8px 10px; font-size: 13px; }
.field input, .field select, .field textarea { width: 100%; }
.app-date-wrap { position: relative; display: block; width: 100%; }
.app-date-wrap .app-date { width: 100%; padding-right: 2.6rem; }
.app-date-wrap .app-date-native {
  position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; clip: rect(0, 0, 0, 0);
}
.app-date-wrap .app-date-pick {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted);
  display: grid; place-items: center; cursor: pointer; border-radius: 8px;
}
.app-date-wrap .app-date-pick:hover { color: var(--navy); background: var(--soft); }
.app-date-wrap .app-date-pick svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.field textarea { min-height: 96px; resize: vertical; }
.asset-pick { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; display: grid; gap: 6px; margin-top: 10px; }
.asset-pick label { display: flex; gap: 10px; align-items: flex-start; padding: 6px 4px; }
.asset-pick input { width: 16px; height: 16px; margin-top: 3px; }
.form-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding-top: 4px;
}
.wo-board .wo-table td { vertical-align: top; }
.wo-number { display: inline-block; font-weight: 700; letter-spacing: .02em; color: var(--navy); text-decoration: none; }
.wo-number:hover { text-decoration: underline; }
.wo-issue { display: block; max-width: 280px; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wo-open { color: var(--navy); font-weight: 700; font-size: 13px; text-decoration: none; }
.wo-open:hover { text-decoration: underline; }
.wo-table tbody tr:hover td { background: var(--soft); }
.wo-hero { flex-wrap: wrap; align-items: flex-start; }
.wo-hero h2 { font-size: 26px; line-height: 1.25; max-width: 760px; }
.wo-hero .toolbar-actions { margin-left: auto; justify-content: flex-end; }
.wo-metrics { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 12px; margin-bottom: 16px; }
.wo-metrics article { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.wo-metrics span { display: block; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.wo-metrics strong { display: block; margin-top: 6px; font-size: 18px; letter-spacing: -.02em; }
.wo-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .7fr); gap: 16px; align-items: start; }
.wo-main, .wo-side { display: grid; gap: 16px; }
.wo-panel h2 { margin: 0 0 14px; font-size: 16px; }
.wo-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin: 0; }
.wo-facts .wide { grid-column: 1 / -1; }
.wo-facts dt { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.wo-facts dd { margin: 4px 0 0; font-size: 15px; line-height: 1.4; }
.wo-file { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); text-decoration: none; }
.wo-file span { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--navy); color: white; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.wo-file strong { color: var(--ink); font-size: 14px; }
.wo-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.wo-timeline li { position: relative; padding: 0 0 16px 18px; border-left: 2px solid var(--line); }
.wo-timeline li:last-child { padding-bottom: 0; }
.wo-timeline li::before { content: ""; position: absolute; left: -5px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--sand); }
.wo-timeline time { display: block; color: var(--muted); font-size: 12px; }
.wo-timeline strong { display: block; margin-top: 2px; font-size: 14px; }
.wo-timeline p { margin: 4px 0 0; color: var(--label); font-size: 14px; }
.wo-map { height: 280px; }
.wo-status { display: grid; gap: 12px; }
.wo-form { counter-reset: wo-step; }
.wo-form .form-section h2 { display: flex; align-items: center; gap: 10px; }
.wo-form .form-section h2::before { counter-increment: wo-step; content: counter(wo-step); width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: white; display: grid; place-items: center; font-size: 13px; }
.wo-form input[type="file"] { padding: 10px; background: var(--soft); border-style: dashed; }
.user-chip a { color: var(--navy); text-decoration: none; font-weight: 650; }
.user-chip a:hover { text-decoration: underline; }
.banner { background: color-mix(in srgb, var(--good) 16%, var(--card)); color: var(--good); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.perm-group { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--soft); }
.perm-group h3 { margin: 0 0 8px; font-size: 14px; }
.perm-item { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 8px; font-weight: 650; color: var(--label); }
.perm-item input { width: 16px; height: 16px; margin-top: 3px; flex: 0 0 16px; }
.perm-item small { display: block; color: var(--muted); font-weight: 600; }
.perm-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.perm-head h2 { margin: 0 0 4px; }
.perm-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.perm-tab { appearance: none; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 8px 14px; font: inherit; font-weight: 650; cursor: pointer; }
.perm-tab:hover { border-color: var(--navy); }
.perm-tab.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.perm-matrix-wrap { margin-top: 4px; }
.perm-matrix { width: 100%; border-collapse: collapse; }
.perm-matrix th, .perm-matrix td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.perm-matrix th { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: color-mix(in srgb, var(--soft) 80%, var(--card)); }
.perm-matrix tbody tr:hover { background: color-mix(in srgb, var(--soft) 55%, transparent); }
.perm-col-check { text-align: center !important; width: 88px; }
.perm-col-check input { width: 16px; height: 16px; margin: 0; }
.perm-col-module { width: 120px; }
#permMatrix:not(.perm-show-all) .perm-col-module { display: none; }
.perm-module-tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--navy); background: color-mix(in srgb, var(--navy) 8%, var(--card)); padding: 3px 8px; border-radius: 999px; }
.perm-page-code { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 600; }
.perm-na { color: var(--muted); }
.perm-code { font-size: 12px; color: var(--navy); background: color-mix(in srgb, var(--navy) 8%, var(--card)); padding: 3px 8px; border-radius: 6px; }
.perm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.perm-action { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; font-weight: 650; color: var(--label); user-select: none; }
.perm-action input { width: 15px; height: 15px; margin: 0; }
.perm-action.is-on { border-color: var(--navy); background: color-mix(in srgb, var(--navy) 8%, var(--card)); color: var(--ink); }
.perm-action-mark { display: inline-block; min-width: 1.2rem; font-weight: 700; color: var(--navy); }
.perm-action-mark.is-off { color: var(--muted); font-weight: 600; }
@media (max-width: 900px) {
  .perm-tabs { gap: 6px; }
  .perm-tab { padding: 7px 10px; font-size: 13px; }
}
.perm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.perm-list li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.perm-list span, .perm-list a { color: var(--muted); font-size: 13px; }
.perm-list a { color: var(--navy); font-weight: 700; text-decoration: none; }
.dept-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.dept-head label { margin: 0; }
.dept-count { color: var(--navy); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.dept-picker { border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--soft) 70%, var(--card)); padding: 12px; }
.dept-search { width: 100%; margin-bottom: 10px; }
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.dept-card { position: relative; display: grid; gap: 2px; margin: 0; padding: 14px 36px 14px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; box-shadow: 0 6px 16px rgba(16, 35, 58, .04); }
.dept-card input { position: absolute; opacity: 0; }
.dept-card:hover { border-color: var(--navy); }
.dept-card.is-on { border-color: var(--navy); background: color-mix(in srgb, var(--navy) 8%, var(--card)); box-shadow: inset 3px 0 0 var(--sand); }
.dept-code { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.dept-card strong { color: var(--ink); font-size: 15px; }
.dept-mark { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); }
.dept-card.is-on .dept-mark { border-color: var(--navy); background: var(--navy); }
.dept-card.is-on .dept-mark::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.dept-empty { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
@media (max-width: 980px) {
  .shell { display: block; height: auto; overflow: visible; }
  .shell-body { display: block; }
  .sidebar { width: auto; height: auto; }
  .main { overflow: visible; }
  body.sidebar-collapsed .sidebar { display: none; }
  body.sidebar-collapsed .brand-copy,
  body.sidebar-collapsed .sidebar-foot { display: block; }
  body.sidebar-collapsed .sidebar a.nav-link { justify-content: flex-start; font-size: inherit; gap: 10px; padding: 7px 10px; }
  body.sidebar-collapsed .nav-panel > .nav-panel { margin: 2px 0 8px 19px; padding: 2px 0 2px 8px; border-left: 1px solid color-mix(in srgb, var(--side-text) 22%, transparent); }
  body.sidebar-collapsed .nav-sub { padding-left: 8px; }
  .kpis, .brief .kpis, .brief-board, .brief-lines ol, .plan .kpis, .plan-board, .plan-raised, .forecast .kpis, .forecast-rules, .alerts .kpis, .grid-2, .login-wrap, .form-grid, .page-head, .dash-hero, .filter-grid, .facts, .split, .place, .place-facts, .kpi-mini, .asset-hero, .chart-grid, .wo-metrics, .wo-layout, .wo-facts, .perm-grid { grid-template-columns: 1fr; display: grid; }
  .login-hero { padding: 28px 24px; justify-content: flex-start; gap: 28px; }
  .login-brand { position: static; }
  .login-hero::after { position: static; margin-top: auto; }
  .login-hero h1 { font-size: 34px; }
  .login-panel { padding: 24px 16px 40px; }
  .page-head { align-items: stretch; }
}

.alert-bell { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--input-line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.alert-bell svg { width: 16px; height: 16px; }
.alert-bell span { min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--critical); color: #fff; font-size: 12px; line-height: 18px; text-align: center; }
.brief-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.score-bar { display: block; height: 8px; margin-top: 6px; background: var(--soft); border-radius: 99px; overflow: hidden; min-width: 72px; }
.score-bar i { display: block; height: 100%; background: var(--sand); }
.form-error { color: var(--critical); margin: 0 0 12px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.suggestion { border-left: 4px solid var(--sand); }
.ph-layout { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.2fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.ph-layout .card { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ph-step { display: flex; align-items: center; gap: 10px; font-weight: 750; color: var(--ink); }
.ph-step span { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--navy); color: #fff; font-size: 13px; }
.ph-step-gap { margin-top: 8px; }
.ph-drop { position: relative; display: grid; place-items: center; min-height: 280px; border: 2px dashed var(--line); border-radius: 14px; cursor: pointer; overflow: hidden; transition: border-color .15s, background .15s; }
.ph-drop:hover, .ph-drop.is-over { border-color: var(--navy); background: color-mix(in srgb, var(--navy) 6%, transparent); }
.ph-drop.has-photo { border-style: solid; }
.ph-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ph-drop img { width: 100%; height: 100%; max-height: 360px; object-fit: cover; }
.ph-drop-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); text-align: center; padding: 20px; pointer-events: none; }
.ph-drop-empty svg { width: 44px; height: 44px; fill: var(--navy); opacity: .8; }
.ph-drop-empty strong { color: var(--ink); }
.ph-file-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.ph-file-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-link { background: none; border: 0; padding: 0; color: var(--critical); font-weight: 650; cursor: pointer; min-height: 0; }
.ph-filter, .ph-asset-list, .ph-details textarea { width: 100%; }
.ph-asset-list { padding: 4px; border-radius: 10px; }
.ph-asset-list option { padding: 7px 8px; border-radius: 6px; }
.ph-asset-list option:checked { background: var(--navy); color: #fff; }
.ph-hint { color: var(--muted); font-size: 12px; text-align: right; margin-top: -4px; }
.ph-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-tag { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; min-height: 0; cursor: pointer; }
.ph-tag:hover { border-color: var(--navy); color: var(--navy); }
.ph-draft { border-top: 4px solid var(--sand); position: sticky; top: 16px; }
.ph-draft h3 { margin: 0 0 6px; font-size: 18px; }
.ph-draft p { margin: 0 0 8px; }
.ph-draft-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ph-placeholder { color: var(--muted); }
#ph-draft-body { min-height: 120px; transition: opacity .15s; }
#ph-draft-body.is-loading { opacity: .5; }
.ph-missing { margin: 0; padding-left: 18px; color: var(--poor); font-size: 13px; }
.ph-missing:empty { display: none; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.ph-actions button { flex: 1 1 140px; }
.ph-actions button:disabled { opacity: .5; cursor: not-allowed; }
.ph-error { padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--critical) 10%, transparent); }
@media (max-width: 1100px) {
  .ph-layout { grid-template-columns: 1fr 1fr; }
  .ph-draft { grid-column: 1 / -1; position: static; }
}
@media (max-width: 720px) {
  .ph-layout { grid-template-columns: 1fr; }
  .ph-drop { min-height: 200px; }
}
.insight-note { color: var(--muted); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.alerts .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.alerts button.kpi-figure { width: 100%; background: transparent; color: inherit; border: 0; padding: 0; border-radius: 0; text-align: left; font: inherit; font-weight: inherit; }
.alerts button.kpi-figure:hover strong, .alerts button.kpi-figure[aria-pressed="true"] strong { color: var(--accent, var(--navy)); }
.alerts-notice { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--good) 35%, var(--line)); background: color-mix(in srgb, var(--good) 10%, var(--card)); color: var(--ink); font-weight: 600; }
.alerts-chips { margin: 0 0 16px; padding: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); display: flex; flex-wrap: wrap; gap: 8px; }
.alerts-chips .chip-button { display: inline-flex; align-items: center; gap: 6px; }
.alerts-chips .chip-button span { color: var(--muted); font-weight: 600; }
.alerts-chips .chip-button.active span { color: #d7e2ec; }
.alerts-panel .section-head { align-items: center; }
.alerts-search { margin-left: auto; }
.alerts-search input { min-width: 220px; padding: 8px 12px; }
.alerts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.alerts-item { display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.alerts-item:hover { border-color: color-mix(in srgb, var(--navy) 45%, var(--line)); background: var(--card); }
.alerts-mark { width: 6px; align-self: stretch; border-radius: 99px; background: var(--sand); }
.alerts-item.tone-overdue .alerts-mark { background: var(--critical); }
.alerts-item.tone-week .alerts-mark { background: var(--poor); }
.alerts-item.tone-later .alerts-mark { background: var(--sand); }
.alerts-main { display: grid; gap: 6px; min-width: 0; }
.alerts-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.alerts-when { color: var(--ink); font-size: 13px; }
.alerts-asset { display: grid; gap: 1px; text-decoration: none; color: inherit; }
.alerts-asset span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.alerts-asset strong { color: var(--navy); font-size: 15px; line-height: 1.3; }
.alerts-asset:hover strong { text-decoration: underline; }
.alerts-main > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.alerts-side { display: grid; justify-items: end; gap: 8px; text-align: right; }
.alerts-date { color: var(--ink); font-weight: 700; font-size: 14px; white-space: nowrap; }
.alerts-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.alerts-actions a { color: var(--navy); font-size: 13px; font-weight: 700; text-decoration: none; }
.alerts-actions a:hover { text-decoration: underline; }
.alerts-empty { padding: 28px 8px; text-align: center; color: var(--muted); }
.alerts-empty strong { display: block; color: var(--ink); margin-bottom: 6px; }
.alerts-empty p { margin: 0 auto; max-width: 420px; }

.nearby-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 12px 16px; margin-bottom: 16px; }
.btn-icon { width: 18px; height: 18px; }
.nearby-radius { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nearby-radius > span, .nearby-type > span { color: var(--label); font-size: 13px; font-weight: 650; }
.chip-button { background: var(--soft); color: var(--ink); border: 1px solid transparent; border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.chip-button:hover { border-color: var(--navy); }
.chip-button.active { background: var(--navy); color: #fff; }
.nearby-type { display: flex; align-items: center; gap: 8px; margin: 0; }
.nearby-type select { padding: 7px 10px; min-width: 170px; }
.nearby-status { flex: 1 1 260px; margin: 0; color: var(--muted); font-size: 14px; text-align: right; }
.nearby { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.nearby-map-card { padding: 0; overflow: hidden; }
.nearby-map { height: calc(100vh - 290px); min-height: 440px; }
.nearby-list-card { padding: 0; display: flex; flex-direction: column; max-height: calc(100vh - 290px); min-height: 440px; }
.nearby-list-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.nearby-list-head h2 { margin: 0; font-size: 16px; }
.nearby-list-head small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.nearby-here { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 16px; }
.nearby-here-icon { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, #1d6fd8 14%, var(--card)); color: #1d6fd8; }
.nearby-here-icon svg { width: 22px; height: 22px; }
.nearby-here-main { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; }
.nearby-here-main small { color: var(--label); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.nearby-here-main strong { color: var(--ink); font-size: 16px; line-height: 1.35; }
.nearby-here-coords { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 13px; }
.nearby-here-coords b { color: var(--ink); font-family: ui-monospace, Consolas, monospace; font-weight: 600; }
.nearby-here-accuracy { color: var(--good); font-size: 13px; font-weight: 600; }
.nearby-here-accuracy.is-low { color: var(--poor); }
.nearby-here-actions { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.nearby-coords { font-family: ui-monospace, Consolas, monospace; }
.nearby-main .nearby-ward { color: var(--label); }
.nearby-ward b { color: var(--ink); font-weight: 650; }
.leaflet-tooltip.nearby-line-label { background: var(--navy); color: #fff; border: 0; border-radius: 999px; padding: 3px 10px; font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.leaflet-tooltip.nearby-line-label::before { display: none; }
.nearby-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.nearby-list .empty { padding: 18px 16px; color: var(--muted); }
.nearby-item { border-bottom: 1px solid var(--line); }
.nearby-item.active { background: color-mix(in srgb, var(--navy) 7%, var(--card)); box-shadow: inset 3px 0 0 var(--sand); }
.nearby-focus { width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; background: transparent; color: var(--ink); border-radius: 0; padding: 12px 16px 6px; text-align: left; font-weight: 400; }
.nearby-focus:hover { background: var(--chip); }
.nearby-rank { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); color: var(--navy); font-size: 12px; font-weight: 700; }
.nearby-main { display: grid; gap: 2px; min-width: 0; }
.nearby-main strong { font-size: 14px; line-height: 1.3; }
.nearby-main small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nearby-side { display: grid; justify-items: end; gap: 4px; }
.nearby-side b { color: var(--navy); font-size: 14px; white-space: nowrap; }
.nearby-time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.nearby-actions { display: flex; gap: 14px; padding: 0 16px 12px 54px; }
.nearby-actions a { color: var(--navy); font-size: 13px; font-weight: 700; text-decoration: none; }
.nearby-actions a:hover { text-decoration: underline; }
.you-pin span { display: block; width: 22px; height: 22px; border-radius: 50%; background: #1d6fd8; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(29, 111, 216, .25), 0 2px 6px rgba(0, 0, 0, .3); cursor: grab; }
.pin-distance { margin: 0 0 4px; color: var(--navy); font-size: 13px; font-weight: 700; }
@media (max-width: 980px) {
  .nearby { grid-template-columns: 1fr; }
  .nearby-map { height: 420px; min-height: 0; }
  .nearby-list-card { max-height: none; min-height: 0; }
  .nearby-status { text-align: left; }
  .nearby-here { flex-wrap: wrap; }
  .alerts-item { grid-template-columns: 6px minmax(0, 1fr); }
  .alerts-side { justify-items: start; text-align: left; grid-column: 2; }
  .alerts-actions { justify-content: flex-start; }
  .alerts-search { margin-left: 0; width: 100%; }
  .alerts-search input { width: 100%; min-width: 0; }
  .alerts-panel .section-head { flex-wrap: wrap; }
}

/* Guided tour */
.tour-overlay { position: fixed; inset: 0; z-index: 900; background: transparent; }
.tour-overlay.is-dim { background: rgba(8, 18, 32, .58); backdrop-filter: blur(2px); }
.tour-spot { position: fixed; z-index: 901; border-radius: 14px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(8, 18, 32, .58), 0 0 0 3px var(--sand); transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease, opacity .2s ease; }
.tour-card { position: fixed; z-index: 902; width: min(360px, calc(100vw - 24px)); background: var(--card); color: var(--ink); border-radius: 18px; padding: 18px 18px 16px; box-shadow: 0 24px 60px rgba(8, 18, 32, .35); border: 1px solid var(--line); transition: left .25s ease, top .25s ease; }
.tour-card.is-center { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 24px)); text-align: center; padding: 26px 24px 20px; }
.tour-card h3 { margin: 6px 0 6px; font-size: 18px; letter-spacing: -.01em; }
.tour-card p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 14px; }
.tour-card .tour-lead { color: var(--sand); font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.tour-hero { width: 76px; height: 76px; margin: 0 auto 12px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 10px 26px rgba(16, 35, 58, .18), 0 0 0 6px color-mix(in srgb, var(--navy) 10%, transparent); }
.tour-hero img { width: 62px; height: 62px; object-fit: contain; }
.tour-hero.is-done { background: color-mix(in srgb, var(--good) 14%, var(--card)); color: var(--good); }
.tour-hero.is-done svg { width: 36px; height: 36px; }
.tour-top { display: flex; justify-content: space-between; align-items: center; }
.tour-step { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); background: color-mix(in srgb, var(--navy) 9%, var(--card)); padding: 3px 9px; border-radius: 99px; }
.tour-x { width: 30px; height: 30px; padding: 0; border-radius: 9px; background: transparent; color: var(--muted); border: 1px solid var(--line); font-size: 18px; line-height: 1; justify-content: center; }
.tour-x:hover { color: var(--ink); border-color: var(--navy); }
.tour-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; }
.tour-dots { display: flex; gap: 5px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--line); transition: width .2s ease, background .2s ease; }
.tour-dots i.on { width: 18px; background: var(--navy); }
.tour-actions { display: flex; gap: 8px; justify-content: flex-end; }
.tour-card.is-center .tour-actions { justify-content: center; margin-top: 18px; }
.tour-actions .button { padding: 8px 14px; font-size: 14px; }
body.tour-open { overflow: hidden; }
.page-help-tour { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.page-help-tour strong { display: block; color: var(--ink); }
.page-help-tour span { font-size: 13px; color: var(--muted); }

/* Morning brief on sign-in */
.mb-backdrop { position: fixed; inset: 0; z-index: 880; background: rgba(8, 18, 32, .55); backdrop-filter: blur(2px); animation: mb-fade .2s ease; }
.mb-dialog { position: fixed; z-index: 881; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: auto; background: var(--card); color: var(--ink); border-radius: 20px; box-shadow: 0 30px 70px rgba(8, 18, 32, .4); animation: mb-rise .25s ease; }
.mb-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 22px 18px; color: #fff; border-radius: 20px 20px 0 0;
  background: radial-gradient(520px 160px at 100% 0%, color-mix(in srgb, var(--sand) 40%, transparent), transparent 60%), linear-gradient(115deg, var(--sidebar), color-mix(in srgb, var(--sidebar) 60%, var(--navy))); }
.mb-head h2 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.mb-head p { margin: 4px 0 0; color: rgba(255, 255, 255, .78); font-size: 13px; }
.mb-head .mb-name { color: #fff; font-weight: 650; font-size: 15px; }
.mb-head .tour-x { color: #fff; border-color: rgba(255, 255, 255, .3); }
.mb-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 18px 22px 4px; }
.mb-tile { --accent: var(--navy); padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--accent); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--card)), var(--card) 70%); }
.mb-tile strong { display: block; font-size: 26px; line-height: 1; letter-spacing: -.02em; }
.mb-tile span { display: block; margin-top: 6px; font-size: 12px; font-weight: 650; color: var(--muted); }
.mb-tile.tone-sand { --accent: var(--sand); }
.mb-tile.tone-poor { --accent: var(--poor); }
.mb-tile.tone-critical { --accent: var(--critical); }
.mb-tile.tone-muted { --accent: #8ea0b3; }
.mb-tile.tone-good { --accent: var(--good); }
.mb-sub { margin: 16px 22px 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.mb-lines { list-style: none; margin: 0; padding: 0 22px; display: grid; gap: 8px; }
.mb-lines li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--soft); }
.mb-lines li span { flex: 0 0 24px; height: 24px; border-radius: 99px; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; }
.mb-lines li p { margin: 2px 0 0; font-size: 14px; }
.mb-dialog > .tour-actions { padding: 18px 22px 22px; }
@keyframes mb-fade { from { opacity: 0; } }
@keyframes mb-rise { from { opacity: 0; transform: translate(-50%, -46%); } }
@media (max-width: 560px) { .mb-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Inspection approvals ---------- */
.appr-hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding: 22px 24px; margin-bottom: 16px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #07304d, #0b5c8e 60%, #1287b8); box-shadow: var(--shadow); }
.appr-hero-text { max-width: 560px; }
.appr-hero h2 { margin: 2px 0 6px; font-size: 24px; color: #fff; }
.appr-hero p { margin: 0; color: rgba(255,255,255,.82); line-height: 1.5; }
.appr-eyebrow, .lg-eyebrow { font-size: 11px !important; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 700; color: var(--sand) !important; }
.appr-chain { list-style: none; display: flex; gap: 0; margin: 0; padding: 0; }
.appr-chain li { position: relative; display: grid; justify-items: center; text-align: center; gap: 2px; width: 128px; }
.appr-chain li + li::before { content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px; background: rgba(255,255,255,.25); z-index: 0; }
.appr-chain strong { font-size: 13px; }
.appr-chain small { font-size: 11px; color: rgba(255,255,255,.7); }
.appr-chain .appr-dot { position: relative; z-index: 1; background: #fff; color: #07304d; }
.appr-dot { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 800; font-size: 13px; flex: none; }
.appr-flash { padding: 10px 14px; border-radius: 12px; margin: 0 0 14px; font-weight: 600; }
.appr-flash.ok { background: color-mix(in srgb, var(--good) 12%, var(--card)); color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 30%, transparent); }
.appr-flash.bad { background: color-mix(in srgb, var(--critical) 10%, var(--card)); color: var(--critical); border: 1px solid color-mix(in srgb, var(--critical) 30%, transparent); }
.appr-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.appr-tab { --c: var(--navy); display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.appr-tab:hover { transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
.appr-tab.is-on { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); background: color-mix(in srgb, var(--c) 7%, var(--card)); }
.appr-tab-n { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 8px; border-radius: 12px; font-size: 20px; font-weight: 800; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.appr-tab-l { font-weight: 700; }
.appr-tab.tone-review { --c: #1287b8; } .appr-tab.tone-approve { --c: var(--good); } .appr-tab.tone-back { --c: var(--poor); } .appr-tab.tone-done { --c: var(--navy); }
.appr-bulkbar { display: flex; align-items: center; gap: 14px; padding: 10px 14px; margin-bottom: 10px; border: 1px dashed var(--line); border-radius: 12px; background: var(--soft); }
.appr-bulkbar button { margin-left: auto; }
.appr-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin: 0; }
.appr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.appr-item { --u: #1287b8; position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px 14px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); transition: border-color .15s ease, box-shadow .15s ease; }
.appr-item::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 4px; background: var(--u); }
.appr-item:hover { box-shadow: var(--shadow); }
.appr-item.is-pendingapproval { --u: var(--good); } .appr-item.is-sentback { --u: var(--poor); } .appr-item.is-approved { --u: var(--navy); }
.appr-item.is-late { border-color: color-mix(in srgb, var(--poor) 45%, var(--line)); }
.appr-item.is-picked { background: color-mix(in srgb, var(--navy) 6%, var(--card)); border-color: var(--navy); }
.appr-pick { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.appr-main { flex: 1; min-width: 0; }
.appr-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.appr-title strong { font-size: 15px; }
.appr-tag { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; color: var(--fair); background: color-mix(in srgb, var(--fair) 12%, transparent); }
.appr-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.appr-meta span + span::before { content: "•"; margin-right: 14px; opacity: .5; }
.appr-quote { margin: 10px 0 0; padding: 8px 12px; border-left: 3px solid var(--poor); border-radius: 0 10px 10px 0; background: color-mix(in srgb, var(--poor) 7%, var(--card)); font-size: 13.5px; }
.appr-quote span { font-weight: 700; margin-right: 4px; }
.appr-side { display: grid; justify-items: end; gap: 10px; flex: none; }
.appr-wait { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--chip); color: var(--label); white-space: nowrap; }
.appr-wait.late { background: color-mix(in srgb, var(--poor) 14%, transparent); color: var(--poor); }
.appr-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.appr-empty { display: grid; justify-items: center; gap: 6px; padding: 40px 20px; text-align: center; border: 1px dashed var(--line); border-radius: 16px; background: var(--card); color: var(--muted); }
.appr-empty svg { width: 46px; height: 46px; color: var(--good); }
.appr-empty strong { color: var(--ink); font-size: 16px; }
.appr-empty p { margin: 0; }
.appr-dialog { border: 0; padding: 0; border-radius: 18px; width: min(520px, calc(100vw - 24px)); background: var(--card); color: var(--ink); box-shadow: 0 30px 70px rgba(8, 18, 32, .4); }
.appr-dialog::backdrop { background: rgba(8, 18, 32, .55); backdrop-filter: blur(2px); }
.appr-dialog form { padding: 20px 22px; display: grid; gap: 14px; }
.appr-dialog-head { display: flex; gap: 12px; align-items: flex-start; }
.appr-dialog-head h3 { margin: 0; font-size: 18px; }
.appr-dialog-head p { margin: 4px 0 0; }
.appr-dialog-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; }
.appr-dialog-icon svg { width: 22px; height: 22px; }
.appr-dialog-icon.ok { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
.appr-dialog-icon.bad { color: var(--poor); background: color-mix(in srgb, var(--poor) 12%, transparent); }
.appr-dialog-field { display: grid; gap: 6px; font-weight: 600; margin: 0; }
.appr-dialog-field textarea { width: 100%; resize: vertical; }
.appr-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.appr-badge { text-decoration: none; font-weight: 700; }
.appr-badge.is-pendingreview { background: color-mix(in srgb, #1287b8 14%, transparent); color: #1287b8; }
.appr-badge.is-pendingapproval { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.appr-badge.is-sentback { background: color-mix(in srgb, var(--poor) 14%, transparent); color: var(--poor); }
.appr-badge.is-approved { background: color-mix(in srgb, var(--navy) 14%, transparent); color: var(--navy); }
.appr-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.appr-panel-head h2 { margin: 0 0 4px; }
.appr-panel-head p { margin: 0; }
.appr-state { font-weight: 800; font-size: 13px; padding: 6px 12px; border-radius: 99px; background: var(--chip); }
.appr-panel.is-pendingreview .appr-state { color: #1287b8; background: color-mix(in srgb, #1287b8 12%, transparent); }
.appr-panel.is-pendingapproval .appr-state { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
.appr-panel.is-sentback .appr-state { color: var(--poor); background: color-mix(in srgb, var(--poor) 12%, transparent); }
.appr-panel.is-approved .appr-state { color: #fff; background: var(--good); }
.appr-stepper { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 18px 0 6px; padding: 0; }
.appr-stepper li { position: relative; display: flex; align-items: center; gap: 10px; padding-right: 12px; }
.appr-stepper li + li::before { content: ""; position: absolute; left: -12px; right: calc(100% + 4px); top: 15px; height: 2px; background: var(--line); }
.appr-stepper li div { display: grid; }
.appr-stepper small { color: var(--muted); font-size: 12px; }
.appr-stepper .appr-dot { background: var(--chip); color: var(--muted); }
.appr-stepper li.is-done .appr-dot { background: var(--good); color: #fff; }
.appr-stepper li.is-current .appr-dot { background: #1287b8; color: #fff; box-shadow: 0 0 0 5px color-mix(in srgb, #1287b8 22%, transparent); }
.appr-stepper li.is-returned .appr-dot { background: var(--poor); color: #fff; box-shadow: 0 0 0 5px color-mix(in srgb, var(--poor) 22%, transparent); }
.appr-stepper li.is-todo strong { color: var(--muted); }
.appr-timeline { list-style: none; margin: 16px 0 0; padding: 0 0 0 6px; display: grid; gap: 0; }
.appr-timeline li { position: relative; display: flex; gap: 14px; padding: 0 0 16px 0; }
.appr-timeline li:not(:last-child)::after { content: ""; position: absolute; left: 5px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.appr-tl-dot { width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; background: var(--navy); flex: none; }
.appr-timeline .act-approved .appr-tl-dot { background: var(--good); }
.appr-timeline .act-reviewed .appr-tl-dot { background: #1287b8; }
.appr-timeline .act-sentback .appr-tl-dot { background: var(--poor); }
.appr-timeline .act-resubmitted .appr-tl-dot { background: var(--fair); }
.appr-timeline p { margin: 0; }
.appr-panel-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.appr-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--soft); color: var(--muted); font-size: 13.5px; }
@media (max-width: 720px) {
  .appr-item { flex-wrap: wrap; }
  .appr-side { width: 100%; justify-items: start; }
  .appr-actions { justify-content: flex-start; }
  .appr-chain li { width: 96px; }
  .appr-stepper { grid-template-columns: 1fr; gap: 10px; }
  .appr-stepper li + li::before { display: none; }
}

/* ---------- Zone league ---------- */
.lg-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 24px; margin-bottom: 18px; border-radius: 20px; color: #fff; background: radial-gradient(circle at 85% 20%, rgba(198,161,90,.28), transparent 45%), linear-gradient(135deg, #07304d, #0b5c8e 60%, #1287b8); box-shadow: var(--shadow); }
.lg-hero-text { max-width: 520px; }
.lg-hero h2 { margin: 2px 0 6px; font-size: 26px; color: #fff; }
.lg-hero p { margin: 0; color: rgba(255,255,255,.82); line-height: 1.5; }
.lg-period { display: inline-flex; gap: 4px; margin-top: 14px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.12); }
.lg-period a { padding: 6px 14px; border-radius: 9px; color: #fff; font-weight: 700; font-size: 13px; text-decoration: none; }
.lg-period a.is-on { background: #fff; color: #07304d; }
.lg-city { display: flex; align-items: center; gap: 18px; padding: 14px 18px; border-radius: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.lg-city .lg-ring { width: 100px; height: 100px; flex: none; }
.lg-city .lg-ring strong { font-size: 26px; }
.lg-ring { --p: 0; --c: var(--good); position: relative; display: grid; place-items: center; align-content: center; width: 116px; height: 116px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255,255,255,.16) 0); }
.lg-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #0a3d5e; }
.lg-ring > * { position: relative; }
.lg-ring strong { font-size: 30px; font-weight: 800; line-height: 1; color: #fff; }
.lg-ring span { font-size: 11px; color: rgba(255,255,255,.75); margin-top: 3px; }
.lg-ring.tone-good { --c: #34d399; } .lg-ring.tone-fair { --c: #fbbf24; } .lg-ring.tone-poor { --c: #f87171; }
.lg-ring.small { width: 84px; height: 84px; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--chip) 0); }
.lg-ring.small::before { inset: 7px; background: var(--card); }
.lg-ring.small strong { font-size: 22px; color: var(--ink); }
.lg-city-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lg-city-facts li { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.lg-city-facts li + li { padding-top: 6px; border-top: 1px solid rgba(255,255,255,.1); }
.lg-city-facts strong { min-width: 56px; font-size: 17px; text-align: right; font-variant-numeric: tabular-nums; }
.lg-city-facts span { font-size: 12.5px; color: rgba(255,255,255,.75); }
@media (max-width: 860px) {
    .lg-hero { grid-template-columns: 1fr; }
    .lg-city { justify-self: start; }
}
.lg-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; align-items: end; }
.lg-medal { --m: #c6a15a; position: relative; display: grid; justify-items: center; gap: 6px; padding: 22px 16px 18px; text-align: center; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--m) 16%, var(--card)), var(--card) 65%); box-shadow: var(--shadow); }
.lg-medal.place-1 { order: 2; padding-top: 30px; border-color: color-mix(in srgb, var(--m) 55%, var(--line)); }
.lg-medal.place-2 { --m: #94a3b8; order: 1; }
.lg-medal.place-3 { --m: #c07a3c; order: 3; }
.lg-medal-badge { position: absolute; top: -14px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 800; color: #fff; background: var(--m); box-shadow: 0 6px 14px color-mix(in srgb, var(--m) 45%, transparent); }
.lg-medal h3 { margin: 4px 0 0; font-size: 17px; }
.lg-medal p { margin: 0; }
.lg-strength { font-size: 12.5px; color: var(--muted); }
.lg-move { font-size: 12px; font-weight: 800; }
.lg-move.up { color: var(--good); } .lg-move.down { color: var(--critical); } .lg-move.same { color: var(--muted); }
.lg-table-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.lg-table-head h2 { margin: 0; }
.lg-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.lg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.k-cov { background: #1287b8; } .k-con { background: var(--good); } .k-wo { background: #8b5cf6; } .k-vis { background: var(--sand); }
.k-cov-t { color: #1287b8; } .k-con-t { color: var(--good); } .k-wo-t { color: #8b5cf6; } .k-vis-t { color: #b8862f; }
.lg-purpose { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); max-width: 820px; }
.lg-purpose svg { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--navy); }
.lg-purpose b { color: var(--label); font-weight: 700; }
.lg-section-head { margin: 4px 0 26px; }
.lg-section-head h2 { margin: 0; font-size: 18px; }
.lg-hero .lg-hero-formula { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; padding: 5px 10px; border-radius: 8px; font-size: 12.5px; font-family: ui-monospace, Consolas, monospace; color: #fff; background: rgba(255,255,255,.10); border: 1px dashed rgba(255,255,255,.28); }
.lg-hero-formula span { font-family: inherit; font-weight: 700; color: var(--sand); }
.lg-calc { grid-column: 2 / -1; min-width: 0; overflow-x: auto; font-size: 13px; }
.lg-calc summary { cursor: pointer; width: max-content; font-size: 12.5px; font-weight: 700; color: var(--navy); }
.lg-calc summary:hover { text-decoration: underline; }
.lg-calc table, .lg-method-table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 12.5px; }
.lg-calc th, .lg-calc td, .lg-method-table th, .lg-method-table td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.lg-calc th, .lg-method-table th { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.lg-calc .num, .lg-method-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lg-calc td:first-child, .lg-method-table td:first-child { white-space: nowrap; font-weight: 650; }
.lg-calc td i, .lg-method-table td i { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 3px; }
.lg-calc td:nth-child(2) { color: var(--muted); }
.lg-calc-note { display: block; margin-top: 2px; font-size: 11.5px; opacity: .8; }
.lg-calc tfoot td { border-bottom: 0; font-weight: 700; }
.lg-calc tfoot strong { font-size: 16px; }
.lg-formula { margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.lg-formula-label { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.lg-formula code { display: block; font-family: ui-monospace, Consolas, monospace; font-size: 14px; line-height: 1.7; color: var(--ink); background: none; padding: 0; }
.lg-formula small { display: block; margin-top: 6px; color: var(--muted); }
.lg-glossary { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 18px; margin: 14px 0 0; }
.lg-glossary dt { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.lg-glossary dd { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.lg-rows { list-style: none; margin: 0; padding: 0; }
.lg-row { display: grid; grid-template-columns: 56px minmax(150px, 1.2fr) minmax(140px, 1fr) 96px minmax(250px, 1.4fr); gap: 8px 18px; align-items: center; padding: 14px 4px; border-top: 1px solid var(--line); }
.lg-rank { display: grid; justify-items: center; }
.lg-rank strong { font-size: 22px; font-weight: 800; }
.lg-zone { display: grid; gap: 2px; }
.lg-zone strong { font-size: 15px; }
.lg-zone .muted { font-size: 12px; }
.lg-score-top { display: flex; align-items: baseline; gap: 8px; }
.lg-score-top strong { font-size: 20px; font-weight: 800; }
.lg-score-top span { font-size: 12px; }
.lg-row .tone-good { color: var(--good); } .lg-row .tone-fair { color: var(--fair); } .lg-row .tone-poor { color: var(--critical); }
.lg-bar { height: 8px; border-radius: 99px; background: var(--chip); overflow: hidden; margin-top: 6px; }
.lg-bar span { display: block; height: 100%; border-radius: 99px; background: currentColor; }
.lg-parts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; height: 44px; align-items: end; }
.lg-parts div { position: relative; height: 100%; border-radius: 5px; background: var(--chip); overflow: hidden; }
.lg-parts i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 5px; }
.lg-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0; }
.lg-facts div { display: grid; }
.lg-facts dt { font-size: 11px; color: var(--muted); }
.lg-facts dd { margin: 0; font-weight: 800; font-size: 15px; }
.lg-facts dd.warn { color: var(--poor); }
.lg-focus { grid-column: 2 / -1; margin: 0; font-size: 13px; color: var(--label); }
.lg-focus span { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--poor); background: color-mix(in srgb, var(--poor) 12%, transparent); }
.lg-foot { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 16px; }
.lg-method ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; color: var(--label); }
.lg-mail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
@media (max-width: 980px) {
  .lg-row { grid-template-columns: 48px 1fr 1fr; }
  .lg-parts, .lg-facts { grid-column: 2 / -1; }
  .lg-foot { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .lg-podium { grid-template-columns: 1fr; }
  .lg-medal { order: 0 !important; }
}

/* Reports */
.report-tabs { width: auto; flex-wrap: wrap; }
.report-about { margin: 0 0 12px; font-size: 13px; }
.report-downloads { display: inline-flex; gap: 8px; margin-left: auto; }
.report-downloads .button { display: inline-flex; align-items: center; gap: 6px; }
.report-downloads svg { width: 16px; height: 16px; }
.report-title { padding: 4px 4px 10px; }
.report-title h2 { margin: 0 0 4px; font-size: 18px; }
.report-title p { margin: 0; font-size: 13px; }
.report-table th.num, .report-table td.num { text-align: right; white-space: nowrap; }
.report-table tfoot th { background: var(--soft); border-top: 2px solid var(--line); font-weight: 700; white-space: nowrap; }
.report-table td.report-late { color: var(--critical); font-weight: 700; }
.report-table td.report-soon { color: var(--poor); font-weight: 700; }
.report-status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--ink); white-space: nowrap; }
.report-status.expired, .report-status.overdue, .report-status.cancelled { background: #f8d7d7; color: var(--critical); }
.report-status.expiring, .report-status.due, .report-status.on, .report-status.pending, .report-status.in, .report-status.scheduled { background: #f8efd8; color: var(--fair); }
.report-status.active, .report-status.completed, .report-status.verified, .report-status.closed { background: #e5f4ec; color: var(--good); }
.report-alert { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--poor) 40%, var(--line)); background: color-mix(in srgb, var(--poor) 10%, var(--card)); font-weight: 600; }

/* Company profile */
.crest-mark, .login-logo-mark {
  display: grid; place-items: center; flex: 0 0 auto;
  background: #fff; color: var(--navy); border-radius: 50%; font-weight: 700; letter-spacing: .02em;
}
.crest-mark { width: 48px; height: 48px; font-size: 15px; }
.login-logo-mark { width: 72px; height: 72px; font-size: 22px; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); }
.logo-picker { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo-preview { width: 72px; height: 72px; }
.credential-list { display: grid; gap: 10px; margin: 8px 0 16px; }
.credential-list > div { display: grid; gap: 2px; padding: 10px 12px; background: var(--soft); border-radius: 10px; }
.credential-list dt { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.credential-list dd { margin: 0; font-size: 16px; font-weight: 700; }
.credential-secret { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .04em; }
.field .muted { display: block; margin-top: 4px; }

.setup-body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 100% -10%, color-mix(in srgb, var(--sand) 22%, transparent), transparent 58%),
    radial-gradient(720px 380px at -8% 110%, color-mix(in srgb, var(--navy) 16%, transparent), transparent 54%),
    var(--paper);
}
.setup-hero {
  position: relative;
  overflow: hidden;
  color: #f6f1e6;
  padding: 28px 16px 72px;
  background:
    radial-gradient(640px 280px at 88% -10%, color-mix(in srgb, var(--sand) 42%, transparent), transparent 62%),
    radial-gradient(520px 260px at 6% 120%, rgba(255, 255, 255, .1), transparent 58%),
    linear-gradient(158deg, color-mix(in srgb, var(--a) 90%, #ffffff) 0%, var(--a-side) 46%, var(--a-side-end) 100%);
}
.setup-hero::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .75), transparent 78%);
}
.setup-hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 88px; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 88' preserveAspectRatio='none'%3E%3Cpath fill='rgba(0,0,0,.2)' d='M0 88V52h18V30h16v10h14V18h28v20h12V36h22v52H0z'/%3E%3Cpath fill='rgba(0,0,0,.28)' d='M180 88V40h14V22h20v12h16V14h26v26h18V34h24v54H180z'/%3E%3Cpath fill='rgba(0,0,0,.18)' d='M360 88V48h22V26h18v16h20V20h30v18h16V38h28v50H360z'/%3E%3Cpath fill='rgba(0,0,0,.26)' d='M620 88V36h16V16h22v14h14V10h32v24h18V28h26v60H620z'/%3E%3Cpath fill='rgba(0,0,0,.2)' d='M860 88V46h20V24h18v12h16V18h28v22h14V34h24v54H860z'/%3E%3Cpath fill='rgba(0,0,0,.3)' d='M1100 88V38h18V20h24v10h16V12h30v22h20V32h28v56H1100z'/%3E%3Cpath fill='rgba(255,255,255,.06)' d='M0 88h1440v-10H0z'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: bottom;
}
.setup-hero-glow {
  position: absolute; right: 8%; top: -70px; width: 260px; height: 260px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--sand) 70%, #fff), transparent 68%);
  filter: blur(6px); opacity: .4;
}
.setup-hero-inner { width: min(880px, 100%); margin: 0 auto; display: grid; gap: 28px; position: relative; z-index: 1; }
.setup-shell { width: min(880px, calc(100% - 32px)); margin: -36px auto 0; padding: 0 0 48px; display: grid; gap: 22px; position: relative; z-index: 1; }
.setup-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.setup-brand { display: flex; align-items: center; gap: 12px; }
.setup-brand-logo, .setup-brand-mark {
  width: 48px; height: 48px; border-radius: 14px; object-fit: contain;
  background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}
.setup-brand-mark { display: grid; place-items: center; font-weight: 700; color: var(--navy); }
.setup-hero .brand-copy small { display: block; letter-spacing: .1em; text-transform: uppercase; font-size: 11px; font-weight: 700; color: #d9c7a2; }
.setup-hero .brand-copy strong { display: block; margin-top: 2px; font-size: 18px; letter-spacing: -.02em; color: #fff; }
.setup-top-note { margin: 0; color: #d7e2ec; font-size: 13px; font-weight: 650; }
.setup-kicker { margin: 0 0 8px; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; font-weight: 700; color: var(--sand); }
.setup-hero .setup-kicker { color: #d9c7a2; }
.setup-intro h1 { margin: 0 0 8px; font-size: 40px; letter-spacing: -.02em; line-height: 1.15; font-weight: 700; color: #fff; max-width: 640px; }
.setup-hero .setup-lead { color: #d7e2ec; }
.setup-lead { margin: 0; max-width: 560px; color: var(--muted); font-size: 17px; line-height: 1.5; }
.setup-done h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.setup-progress {
  list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px;
}
.setup-progress li button {
  width: 100%; justify-content: flex-start; gap: 10px; padding: 10px 12px;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  box-shadow: none; font-weight: 650;
}
.setup-progress li button b {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--chip); color: var(--navy); font-size: 12px;
}
.setup-progress li button span { font-size: 13px; }
.setup-progress li.is-on button { border-color: var(--navy); box-shadow: 0 0 0 3px var(--focus); }
.setup-progress li.is-on button b, .setup-progress li.is-done button b { background: var(--navy); color: #fff; }
.setup-progress li.is-done button { color: var(--muted); }
.setup-form { display: grid; gap: 18px; }
.setup-form[data-wizard] [data-setup-step] { display: none; }
.setup-form[data-wizard] [data-setup-step].is-on { display: block; }
.setup-form .card {
  padding: 22px 24px 24px; border-radius: 20px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(10px);
}
.setup-form .section-head { margin-bottom: 18px; }
.setup-form .section-head h2 { font-size: 22px; letter-spacing: -.02em; }
.setup-form .hint { margin: 0; }
.setup-form .field input, .setup-form .field select, .setup-form .field textarea { padding: 12px 14px; border-radius: 12px; }
.setup-drop {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px; border: 1.5px dashed var(--input-line); border-radius: 16px;
  background: var(--soft); cursor: pointer;
}
.setup-drop:hover, .setup-drop.is-over { border-color: var(--navy); background: color-mix(in srgb, var(--navy) 6%, var(--card)); }
.setup-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.setup-drop-mark, .setup-drop-image { width: 84px; height: 84px; border-radius: 50%; }
.setup-drop-copy { display: grid; gap: 4px; }
.setup-drop-copy strong { font-size: 15px; }
.setup-nav {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  position: sticky; bottom: 12px; padding: 12px 14px; border-radius: 16px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(12px);
}
.setup-nav-note { margin: 0 auto 0 4px; color: var(--muted); font-size: 13px; font-weight: 650; }
.setup-nav .button { min-height: 44px; padding: 11px 18px; }
.setup-done {
  display: grid; justify-items: start; gap: 12px; padding: 36px 32px;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
}
.setup-done-mark {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--good) 14%, var(--card)); color: var(--good);
}
.setup-done-mark svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.setup-secrets { width: 100%; display: grid; gap: 10px; margin: 8px 0 8px; }
.setup-secrets > div { padding: 12px 14px; background: var(--soft); border-radius: 14px; }
.setup-secrets dt { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.setup-secrets dd { margin: 6px 0 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 18px; font-weight: 700; }
.setup-copy { background: var(--card); color: var(--navy); border: 1px solid var(--line); padding: 6px 10px; font-size: 12px; }
.setup-primary { margin-top: 8px; }
@media (max-width: 720px) {
  .setup-hero { padding: 20px 16px 64px; }
  .setup-shell { width: calc(100% - 24px); }
  .setup-intro h1 { font-size: 30px; }
  .setup-top { flex-direction: column; align-items: flex-start; }
  .setup-progress { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .setup-progress li button { justify-content: center; padding: 10px 6px; }
  .setup-progress li button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .setup-nav { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .setup-nav-note { grid-column: 1 / -1; margin: 0; }
  .setup-nav .button { width: 100%; justify-content: center; }
}

.notice-dialog {
  border: 0; padding: 0; width: min(400px, calc(100vw - 28px));
  border-radius: 24px; background: var(--card); color: var(--ink);
  box-shadow: 0 28px 80px rgba(8, 18, 32, .38);
  animation: notice-pop .22s ease;
}
.notice-dialog::backdrop {
  background: rgba(8, 18, 32, .5);
  backdrop-filter: blur(8px);
}
.notice-dialog form {
  display: grid; justify-items: center; text-align: center; gap: 0;
  padding: 32px 28px 24px;
}
.notice-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 16px;
}
.notice-icon svg { width: 30px; height: 30px; }
.notice-icon.ok {
  color: var(--good);
  background: color-mix(in srgb, var(--good) 14%, var(--card));
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--good) 8%, transparent);
}
.notice-icon.bad {
  color: var(--critical);
  background: color-mix(in srgb, var(--critical) 12%, var(--card));
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--critical) 8%, transparent);
}
.notice-kicker {
  margin: 0 0 6px; font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.notice-dialog h3 {
  margin: 0; font-size: 22px; letter-spacing: -.03em; line-height: 1.2; color: var(--ink);
}
.notice-text {
  margin: 10px 0 22px; color: var(--muted); font-size: 14.5px; line-height: 1.5; max-width: 32em;
}
.notice-actions { display: flex; width: 100%; justify-content: center; }
.notice-actions .button { min-width: 132px; justify-content: center; padding: 11px 22px; }
@keyframes notice-pop {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to { opacity: 1; transform: none; }
}

