@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');
/* ==========================================================================
   Wilsonart Surface Intelligence — app chrome
   Layout & component language after the BSW app model (white header with
   logo, fixed left sidebar, Montserrat, rounded card panels, KPI cards,
   footer). Palette: Wilsonart red #E31B2C + charcoal #58585A; teal #0879A1
   (wilsonart.com link colour) for data / interactive accents.
   ========================================================================== */
@font-face { font-family: 'Montserrat'; font-weight: 400; src: url('../fonts/montserrat-v31-cyrillic-ext-400.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }

:root {
  /* brand */
  --wa-red: #E31B2C; --wa-red-700: #B8141F; --wa-red-800: #96101A; --wa-red-100: #F9D2D6; --wa-red-50: #FDEEF0;
  --wa-gray: #58585A; --wa-charcoal: #2E2E30; --wa-teal: #0879A1; --wa-navy: #00476F;
  /* ink & surfaces */
  --ink: #1F2023; --ink-2: #3A3B3E; --ink-3: #64676C; --ink-4: #8A8D92;
  --surface: #FFFFFF; --surface-2: #F6F6F7; --surface-3: #ECECEE; --surface-muted: #FAFAFA;
  --line: #E5E6E8; --line-2: #D2D4D7;
  /* interactive / data accent (teal) */
  --accent: #0879A1; --accent-hover: #066586; --accent-soft: #E6F3F8; --accent-line: #B9DDEA;
  --cyan: #E31B2C; --cyan-soft: #FDEEF0;
  /* semantic */
  --positive: #1F8B4C; --positive-soft: #E8F5EE; --warning: #B7791F; --warning-soft: #FDF4E3;
  --negative: #C53030; --negative-soft: #FBE5E5;
  --font-sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: var(--font-sans);
  --header-h: 64px; --sidebar-w: 248px; --footer-h: 34px;
  --radius: 8px; --radius-sm: 5px;
  --shadow-sm: 0 1px 2px rgba(31, 32, 35, .05); --shadow-md: 0 2px 8px rgba(31, 32, 35, .07);
  --shadow-lg: 0 8px 28px rgba(31, 32, 35, .12); --shadow-xl: 0 14px 36px rgba(31, 32, 35, .14);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-sans); font-size: 14px; line-height: 1.55; color: var(--ink); background: var(--surface-2); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5 { font-family: var(--font-sans); font-weight: 700; color: var(--ink); letter-spacing: -.01em; line-height: 1.2; }
h1 { font-size: 1.55rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; } h4 { font-size: .92rem; font-weight: 600; } h5 { font-size: .86rem; }
p { color: var(--ink-3); }
a { color: var(--accent); text-decoration: none; } a:hover { color: var(--wa-red); }
.serif { font-family: var(--font-sans); font-weight: 700; }
.tnum, td, th, .kpi-value { font-variant-numeric: tabular-nums; }
.text-muted { color: var(--ink-4) !important; }
.eyebrow { font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); }
.eyebrow.accent { color: var(--wa-red); }
.small-caps { font-size: .66rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--ink-3); }

/* ── Header ─────────────────────────────────────────────────────────── */
.app-header { position: fixed; inset: 0 0 auto 0; height: var(--header-h); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); z-index: 1030; }
.header-brand { display: flex; align-items: center; gap: 14px; }
.header-logo { display: flex; align-items: center; } .header-logo img { height: 34px; width: auto; }
.header-divider { width: 1px; height: 28px; background: var(--line-2); }
.header-title { font-size: .92rem; font-weight: 600; color: var(--wa-gray); letter-spacing: .01em; }
.sidebar-toggle { display: none; flex-direction: column; justify-content: center; gap: 4px; width: 34px; height: 34px; padding: 0 6px; background: transparent; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.sidebar-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.scope-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; font-size: .72rem; font-weight: 600; border-radius: 999px; background: var(--accent-soft); color: var(--wa-navy); border: 1px solid var(--accent-line); white-space: nowrap; }
.scope-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--positive); box-shadow: 0 0 0 3px var(--positive-soft); }
.inbox-chip { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm); color: var(--wa-gray); }
.inbox-chip:hover { background: var(--surface-2); color: var(--wa-red); } .inbox-chip i { font-size: 1.15rem; }
.inbox-badge { position: absolute; top: 1px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border-radius: 9px; background: var(--wa-red); color: #fff; font-size: .6rem; font-weight: 700; }
.user-chip { position: relative; display: flex; align-items: center; gap: 10px; padding: 5px 10px; border-radius: var(--radius); cursor: pointer; }
.user-chip:hover { background: var(--surface-2); }
.user-info { display: flex; flex-direction: column; line-height: 1.25; text-align: right; }
.user-name { font-size: .8rem; font-weight: 600; } .user-role { font-size: .68rem; color: var(--ink-3); }
.user-avatar, .avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--wa-red); color: #fff; font-size: .72rem; font-weight: 700; flex: 0 0 auto; }
.user-chip-caret { font-size: .7rem; color: var(--ink-4); }
.user-chip-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 1040; cursor: default; }
.user-chip-menu.open { display: block; }
.user-chip-menu .menu-header { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-chip-menu .menu-header .name { font-weight: 600; font-size: .82rem; } .user-chip-menu .menu-header .email { font-size: .72rem; color: var(--ink-3); }
.user-chip-menu .menu-item { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: var(--radius-sm); font-size: .8rem; color: var(--ink); }
.user-chip-menu .menu-item:hover { background: var(--surface-2); } .user-chip-menu .menu-item.danger { color: var(--wa-red); }

/* ── Layout + Wilsonart-red sidebar ─────────────────────────────────── */
.app-layout { display: flex; padding-top: var(--header-h); min-height: 100vh; }
.app-sidebar { position: fixed; top: var(--header-h); bottom: 0; left: 0; width: var(--sidebar-w); padding: 14px 12px 60px; overflow-y: auto;
  background: linear-gradient(180deg, var(--wa-red) 0%, #D11826 55%, var(--wa-red-700) 100%); z-index: 1020; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.3) transparent; }
.sidebar-persona { display: flex; gap: 10px; align-items: center; padding: 10px 10px 14px; margin-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.22); }
.sidebar-persona .sp-ic { width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; font-size: 1.05rem; flex: 0 0 auto; }
.sidebar-persona .sp-name { color: #fff; font-weight: 700; font-size: .82rem; line-height: 1.2; }
.sidebar-persona .sp-role { color: rgba(255,255,255,.78); font-size: .68rem; line-height: 1.3; }
.sidebar-group-label { margin: 16px 10px 6px; font-size: .62rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.sidebar-link { display: flex; align-items: center; gap: 10px; padding: 9px 11px; margin-bottom: 2px; border-radius: var(--radius-sm); font-size: .815rem; font-weight: 500; color: rgba(255,255,255,.92); transition: background .12s ease; }
.sidebar-link i { font-size: 1rem; width: 18px; text-align: center; }
.sidebar-link:hover { background: rgba(255,255,255,.14); color: #fff; }
.sidebar-link.active { background: #fff; color: var(--wa-red-700); font-weight: 700; box-shadow: var(--shadow-md); }
.sidebar-link.active i { color: var(--wa-red); }
.sidebar-count { margin-left: auto; background: #fff; color: var(--wa-red); font-size: .62rem; font-weight: 700; border-radius: 9px; padding: 1px 7px; }
.sidebar-link.active .sidebar-count { background: var(--wa-red); color: #fff; }
.sidebar-foot { margin: 22px 10px 0; font-size: .66rem; color: rgba(255,255,255,.75); display: flex; gap: 6px; align-items: flex-start; line-height: 1.4; }
.app-main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); padding: 22px 26px 64px; }
.app-main.flush { padding: 0; }
.sidebar-overlay { position: fixed; inset: var(--header-h) 0 0 0; background: rgba(16,24,32,.35); display: none; z-index: 1010; }
.sidebar-overlay.show { display: block; }
.app-footer { position: fixed; bottom: 0; left: var(--sidebar-w); right: 0; height: var(--footer-h); display: flex; align-items: center; gap: 10px; padding: 0 24px; font-size: .7rem; color: var(--ink-3); background: var(--surface); border-top: 1px solid var(--line); z-index: 1000; }
.footer-divider { color: var(--line-2); }
.page { padding: 0; }

/* ── Page head (was page-hero) ──────────────────────────────────────── */
.page-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.page-hero h1 { font-size: 1.42rem; margin: 3px 0 0; }
.page-hero p { margin: 5px 0 0; font-size: .82rem; color: var(--ink-3); max-width: 86ch; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 22px 0 12px; }
.section-title h3, .section-title h4 { margin: 0; font-size: .95rem; }

/* ── Cards ──────────────────────────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px 17px; height: 100%; }
.panel.tight { padding: 13px 14px; }
.panel.alt { background: var(--surface-muted); }
.panel.ink { background: linear-gradient(150deg, var(--wa-charcoal) 0%, #3D3D40 60%, var(--wa-red-800) 140%); border-color: var(--wa-charcoal); color: #E4E4E6; }
.panel.ink h1, .panel.ink h2, .panel.ink h3, .panel.ink h4 { color: #fff; } .panel.ink p { color: #C2C3C6; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin: -16px -17px 14px; padding: 12px 17px; border-bottom: 1px solid var(--line); gap: .5rem; }
.panel.ink .panel-head { border-bottom-color: rgba(255,255,255,.12); }
.panel.tight .panel-head { margin: -13px -14px 12px; padding: 10px 14px; }
.panel-head h4 { margin: 0; font-size: .87rem; font-weight: 600; }

.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 15px; box-shadow: var(--shadow-sm); height: 100%; border-top: 3px solid var(--line-2); }
.kpi.accent { border-top-color: var(--wa-red); }
.kpi .kpi-label { font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.kpi .kpi-value { font-size: 1.5rem; font-weight: 700; color: var(--wa-navy); line-height: 1.15; margin: 6px 0 4px; }
.kpi.accent .kpi-value { color: var(--wa-red); }
.kpi .kpi-sub { font-size: .7rem; color: var(--ink-3); }
.delta-up { color: var(--positive); font-weight: 600; } .delta-down { color: var(--negative); font-weight: 600; }

.chip { display: inline-flex; align-items: center; gap: .3rem; padding: 3px 9px; font-size: .68rem; font-weight: 600; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--surface); white-space: nowrap; }
.chip.accent { background: var(--accent-soft); border-color: var(--accent-line); color: var(--wa-navy); }
.chip.cyan { background: var(--wa-red-50); border-color: var(--wa-red-100); color: var(--wa-red-700); }
.chip.pos { background: var(--positive-soft); border-color: #BFE0CC; color: var(--positive); }
.chip.warn { background: var(--warning-soft); border-color: #EFD8AE; color: #92560E; }
.chip.neg { background: var(--negative-soft); border-color: #F2C3C3; color: var(--negative); }
.chip.ink { background: var(--wa-charcoal); border-color: var(--wa-charcoal); color: #fff; }

.btn { border-radius: var(--radius-sm); font-weight: 600; font-size: .78rem; padding: 8px 15px; font-family: var(--font-sans); display: inline-flex; align-items: center; gap: 7px; justify-content: center; }
.btn-sm { font-size: .72rem; padding: 5px 11px; }
.btn-primary { --bs-btn-bg: var(--wa-red); --bs-btn-border-color: var(--wa-red); --bs-btn-hover-bg: var(--wa-red-700); --bs-btn-hover-border-color: var(--wa-red-700); --bs-btn-active-bg: var(--wa-red-800); --bs-btn-disabled-bg: var(--wa-red); --bs-btn-disabled-border-color: var(--wa-red); }
.btn-ink { background: var(--wa-charcoal); color: #fff; border: 1px solid var(--wa-charcoal); } .btn-ink:hover { background: #000; color: #fff; }
.btn-outline-ink { border: 1px solid var(--line-2); color: var(--ink-2); background: #fff; } .btn-outline-ink:hover { border-color: var(--wa-gray); background: var(--surface-2); color: var(--ink); }
.form-control, .form-select { border-radius: var(--radius-sm); border-color: var(--line-2); font-size: .82rem; font-family: var(--font-sans); }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-check-input:checked { background-color: var(--wa-red); border-color: var(--wa-red); }

/* tables */
.dm-table { width: 100%; border-collapse: collapse; font-size: .79rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.dm-table th { padding: 10px 12px; text-align: left; font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); background: var(--surface-muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.dm-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dm-table tbody tr:last-child td { border-bottom: 0; }
.dm-table tbody tr:hover { background: var(--surface-muted); }
.dm-table .num { text-align: right; }
.row-link { cursor: pointer; }

.bar { height: 6px; background: var(--surface-3); position: relative; border-radius: 3px; overflow: hidden; }
.bar > span { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 3px; }
.bar.cyan > span { background: var(--wa-red); } .bar.ink > span { background: var(--wa-charcoal); }

.swatch { width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid rgba(0,0,0,.1); border-radius: 6px; position: relative; overflow: hidden; }
.swatch.lg { width: 64px; height: 64px; flex-basis: 64px; }
.swatch::after { content: ""; position: absolute; inset: 0; background: linear-gradient(125deg, transparent 40%, var(--sw2, #999) 41%, transparent 47%, transparent 60%, var(--sw2, #999) 61%, transparent 64%); opacity: .45; }
.swatch.Solids::after { display: none; }
.swatch.Woodgrains::after { background: repeating-linear-gradient(0deg, transparent 0 5px, var(--sw2) 5px 6px); opacity: .35; }
.swatch.Fibers::after { background: repeating-linear-gradient(90deg, transparent 0 2px, var(--sw2) 2px 3px), repeating-linear-gradient(0deg, transparent 0 2px, var(--sw2) 2px 3px); opacity: .2; }
.swatch.Patterns::after, .swatch.Abstracts::after { background: radial-gradient(var(--sw2) 1px, transparent 1.5px) 0 0/7px 7px; opacity: .6; }

/* ── Login (split layout) ───────────────────────────────────────────── */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 38%) 1fr; }
.login-side { background: linear-gradient(155deg, var(--wa-red) 0%, #C4141F 45%, var(--wa-charcoal) 115%); color: #fff; padding: 52px 52px 36px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-side .login-logo { height: 46px; width: auto; align-self: flex-start; }
.login-side h1 { color: #fff; font-size: 2rem; margin: 26px 0 12px; line-height: 1.18; }
.login-side .lede { color: rgba(255,255,255,.85); font-size: .92rem; line-height: 1.62; max-width: 46ch; }
.login-side .uc { border-top: 1px solid rgba(255,255,255,.22); padding: 12px 0; display: flex; gap: 12px; }
.login-side .uc .n { font-weight: 700; color: #fff; font-size: .95rem; width: 1.7rem; opacity: .85; }
.login-side .uc b { color: #fff; font-weight: 600; display: block; font-size: .86rem; }
.login-side .uc span { font-size: .74rem; color: rgba(255,255,255,.75); }
.login-side .tex { position: absolute; right: -140px; bottom: -120px; width: 460px; height: 460px; opacity: .08; background: repeating-linear-gradient(115deg, #fff 0 1px, transparent 1px 16px); border-radius: 50%; }
.login-main { padding: 44px 46px 30px; background: var(--surface-2); }
.persona-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.persona { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; text-align: left; width: 100%; cursor: pointer; transition: all .18s ease; display: flex; flex-direction: column; gap: .7rem; position: relative; font-family: var(--font-sans); }
.persona:hover { border-color: var(--wa-red); box-shadow: var(--shadow-xl); transform: translateY(-2px); }
.persona .p-top { display: flex; gap: .85rem; align-items: center; }
.persona .p-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--wa-red-50); color: var(--wa-red); display: grid; place-items: center; font-size: 1.25rem; }
.persona:hover .p-icon { background: var(--wa-red); color: #fff; }
.persona h4 { margin: 0; font-size: 1rem; font-weight: 700; } .persona .role { font-size: .74rem; color: var(--ink-3); }
.persona .tag { font-size: .8rem; color: var(--ink-2); min-height: 2.6em; }
.persona .go { position: absolute; right: 1rem; top: 1.2rem; color: var(--ink-4); transition: .18s; }
.persona:hover .go { color: var(--wa-red); transform: translateX(3px); }

/* ── Agent action cards ─────────────────────────────────────────────── */
.agent-card { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px 15px; display: flex; flex-direction: column; gap: .55rem; transition: .18s; height: 100%; }
.agent-card:hover { box-shadow: var(--shadow-md); border-color: var(--line-2); }
.agent-card .ag-top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.agent-card .ag-name { font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--wa-red); display: flex; gap: .35rem; align-items: center; }
.agent-card h5 { font-size: .86rem; font-weight: 600; margin: 0; color: var(--ink); line-height: 1.4; }
.agent-card .why { font-size: .76rem; color: var(--ink-3); margin: 0; }
.agent-card .impact { font-size: 1.3rem; font-weight: 700; color: var(--wa-navy); line-height: 1; }
.agent-card .impact small { font-size: .64rem; font-weight: 500; color: var(--ink-4); display: block; margin-top: .25rem; }
.agent-card .ag-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: .5rem; padding-top: .6rem; border-top: 1px solid var(--line); margin-top: auto; }
.agent-card.executed { border-left: 3px solid var(--positive); }
.agent-card .result { font-size: .76rem; background: var(--surface-muted); padding: .6rem .75rem; border-left: 3px solid var(--positive); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-2); }
.agent-card .result p { color: var(--ink-2); margin-bottom: .35rem; }
.conf { display: inline-flex; align-items: center; gap: .35rem; font-size: .66rem; color: var(--ink-4); } .conf .bar { width: 46px; height: 4px; }

/* ── Portfolio cards / roadmap ──────────────────────────────────────── */
.uc-card { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.uc-card .uc-top { padding: 15px 17px; border-bottom: 1px solid var(--line); border-top: 3px solid var(--wa-red); }
.uc-card .uc-num { font-weight: 700; color: var(--wa-red); font-size: .8rem; }
.uc-card h4 { margin: .3rem 0 .45rem; font-size: .95rem; font-weight: 700; }
.uc-card .uc-body { padding: 12px 17px; flex: 1; font-size: .78rem; color: var(--ink-2); }
.uc-card .uc-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); background: var(--surface-muted); }
.uc-card .uc-stats div { padding: 10px 12px; border-right: 1px solid var(--line); } .uc-card .uc-stats div:last-child { border-right: 0; }
.uc-card .uc-stats b { display: block; font-size: .92rem; color: var(--wa-navy); font-weight: 700; }
.uc-card .uc-stats span { font-size: .6rem; color: var(--ink-4); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.gantt-row { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .8rem; }
.gantt-track { position: relative; height: 24px; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--surface-2) 0 calc(100%/12 - 1px), var(--line) calc(100%/12 - 1px) calc(100%/12)); }
.gantt-bar { position: absolute; top: 3px; bottom: 3px; background: var(--wa-red); color: #fff; font-size: .66rem; font-weight: 600; padding: 0 .5rem; display: flex; align-items: center; white-space: nowrap; border-radius: 4px; }
.gantt-bar.ghost { background: var(--wa-red-100); color: var(--wa-red-800) !important; }
.gantt-scale { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; font-size: .64rem; color: var(--ink-4); }
.gantt-scale .ticks { display: grid; grid-template-columns: repeat(12, 1fr); }

.brief { font-size: .84rem; }
.brief h3 { font-size: 1.02rem; color: #fff; margin-bottom: .8rem; }
.brief ul, .brief ol { padding-left: 1.2rem; } .brief li { margin-bottom: .35rem; color: #E4E4E6; }
.brief strong { color: #fff; }
.brief h4, .brief h5 { color: #FF9AA3; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; margin-top: 1rem; font-weight: 700; }
.brief p { color: #D2D3D6; }

.skel { height: 11px; border-radius: 4px; background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.18), rgba(255,255,255,.06)); background-size: 200% 100%; animation: sh 1.4s infinite; margin-bottom: .6rem; }
.panel:not(.ink) .skel { background: linear-gradient(90deg, #EEF0F2 25%, #F6F7F8 50%, #EEF0F2 75%); background-size: 200% 100%; }
@keyframes sh { to { background-position: -200% 0; } }

/* ── Vision ─────────────────────────────────────────────────────────── */
.cam { position: relative; background: #111; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.cam img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam .hud { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; padding: .5rem .7rem; font-size: .64rem; color: #fff; background: linear-gradient(rgba(0,0,0,.7), transparent); letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }
.cam .rec { display: inline-flex; gap: .35rem; align-items: center; } .cam .rec::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--wa-red); animation: blink 1.2s infinite; }
.cam .scan { position: absolute; left: 0; right: 0; height: 2px; background: var(--wa-red); box-shadow: 0 0 12px var(--wa-red); animation: scan 2.4s linear infinite; opacity: .85; }
@keyframes scan { from { top: 0; } to { top: 100%; } }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.verdict { padding: 12px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); display: flex; justify-content: space-between; align-items: center; }
.verdict.Pass { border-left: 4px solid var(--positive); } .verdict.Reject { border-left: 4px solid var(--negative); }
.verdict.Rework, .verdict.Hold { border-left: 4px solid var(--warning); }
.verdict .v { font-size: 1.4rem; font-weight: 700; color: var(--ink); }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.metric-grid > div { padding: .65rem .85rem; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.metric-grid > div:nth-child(2n) { border-right: 0; }
.metric-grid b { display: block; font-weight: 700; font-size: 1rem; color: var(--wa-navy); }
.metric-grid span { font-size: .62rem; color: var(--ink-4); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.feed { max-height: 520px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 .7rem; }
.feed-row { display: grid; grid-template-columns: 54px 1fr auto; gap: .7rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .76rem; animation: pop .3s ease both; }
.feed-row img { width: 54px; height: 54px; object-fit: cover; border-radius: 5px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .5rem; }
.gallery button { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; padding: 0; background: #fff; position: relative; cursor: pointer; transition: .15s; }
.gallery button:hover, .gallery button.on { border-color: var(--wa-red); box-shadow: 0 0 0 2px var(--wa-red-100); }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.gallery .lbl { position: absolute; left: 0; right: 0; bottom: 0; font-size: .58rem; color: #fff; background: rgba(0,0,0,.65); padding: .15rem .3rem; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.lib-item { border: 1px solid var(--line); background: #fff; font-size: .72rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: .15s; }
.lib-item:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.lib-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--surface-3); }
.lib-item .cap { padding: .5rem .6rem; } .lib-item .cap b { color: var(--ink); display: block; font-size: .78rem; }
.cand { display: grid; grid-template-columns: 44px 1fr auto; gap: .6rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .76rem; }
.cand img { width: 44px; height: 44px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); }
.drop { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 1rem; text-align: center; color: var(--ink-3); font-size: .78rem; cursor: pointer; background: #fff; transition: .15s; }
.drop:hover, .drop.drag { border-color: var(--wa-red); color: var(--wa-red); background: var(--wa-red-50); }

/* docs */
.doc-row { display: grid; grid-template-columns: 42px 1fr auto; gap: .8rem; align-items: center; padding: .7rem .8rem; border-bottom: 1px solid var(--line); background: #fff; }
.doc-ic { width: 40px; height: 48px; border: 1px solid var(--line-2); border-radius: 4px; display: grid; place-items: center; font-size: .6rem; font-weight: 700; color: var(--wa-red); background: #fff; }
.doc-ic.PPTX, .doc-ic.PPT { color: #C2410C; } .doc-ic.DWG, .doc-ic.DXF { color: var(--accent); } .doc-ic.PNG, .doc-ic.JPG, .doc-ic.TXT { color: var(--positive); }
.md-body h1, .md-body h2 { font-size: 1.15rem; margin-top: 1.5rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
.md-body h3 { font-size: .98rem; margin-top: 1.2rem; }
.md-body table { font-size: .76rem; border-collapse: collapse; width: 100%; margin: .6rem 0 1rem; }
.md-body th { border-bottom: 1px solid var(--line-2); background: var(--surface-muted); text-align: left; padding: .4rem .5rem; font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.md-body td { border-bottom: 1px solid var(--line); padding: .4rem .5rem; vertical-align: top; }
.md-body code { background: var(--surface-2); padding: .05rem .3rem; font-size: .8em; color: var(--ink-2); border-radius: 3px; }
.md-body pre { background: var(--surface-2); padding: .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .72rem; }

/* toasts, tabs, misc */
.toast-wrap { position: fixed; right: 20px; bottom: 48px; z-index: 2000; display: flex; flex-direction: column; gap: 9px; }
.wa-toast { min-width: 260px; max-width: 400px; padding: 11px 15px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--wa-red); box-shadow: var(--shadow-lg); font-size: .79rem; color: var(--ink); animation: pop .25s ease both; }
.nav-tabs { border-bottom: 1px solid var(--line); }
.nav-tabs .nav-link { border: none; border-bottom: 2px solid transparent; color: var(--ink-3); font-weight: 600; border-radius: 0; font-size: .8rem; font-family: var(--font-sans); }
.nav-tabs .nav-link:hover { color: var(--ink); }
.nav-tabs .nav-link.active { color: var(--wa-red); border-bottom-color: var(--wa-red); background: none; }
.cite { display: inline-block; font-size: .6rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 3px; padding: 0 .28rem; margin-left: .15rem; vertical-align: super; line-height: 1.3; cursor: help; }
.cite.bad { color: var(--negative); background: var(--negative-soft); border-color: #F2C3C3; }
.trace { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .55rem; }
.trace .step { font-size: .68rem; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--wa-navy); padding: .12rem .45rem; border-radius: 999px; display: inline-flex; gap: .3rem; align-items: center; animation: pop .25s ease both; }
.trace .step.warn { border-color: #EFD8AE; background: var(--warning-soft); color: #92560E; }
.trace .step em { color: var(--ink-3); font-style: normal; } .trace .step b { color: var(--ink); }
.evidence { font-size: .74rem; border-top: 1px solid var(--line); padding-top: .4rem; }
.evidence summary { cursor: pointer; color: var(--ink-3); font-weight: 700; font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; }
code { color: var(--wa-red-700); background: var(--wa-red-50); padding: .05rem .35rem; border-radius: 3px; font-size: .8em; }
::-webkit-scrollbar { width: 9px; height: 9px; } ::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; border: 2px solid var(--surface-2); }

@media (max-width: 992px) {
  .sidebar-toggle { display: flex; }
  .app-sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .app-sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; padding: 18px 16px 64px; }
  .app-footer { left: 0; }
  .header-title, .user-info, .scope-chip, .header-divider { display: none; }
  .login-wrap { grid-template-columns: 1fr; } .login-side { padding: 28px 20px; } .login-main { padding: 22px 16px; }
  .gantt-row, .gantt-scale { grid-template-columns: 110px 1fr; }
}

/* ══ Refinements: wilsonart.com language (photography, uppercase CTAs) + balanced content pane ══ */
.content-wrap { max-width: 1400px; margin: 0 auto; }
.app-main.flush .content-wrap { max-width: none; }
/* hero band: copy on the left, Wilsonart interior photography fading in on the right */
.page-hero { position: relative; background:
    linear-gradient(90deg, #fff 0%, #fff 46%, rgba(255,255,255,.86) 60%, rgba(255,255,255,.15) 82%, rgba(255,255,255,0) 100%),
    var(--hero-img) right center / 48% auto no-repeat, #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm); padding: 22px 24px; min-height: 148px; margin-bottom: 18px; overflow: hidden; align-items: center; }
.page-hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--wa-red); }
.page-hero > div:first-child { max-width: 62%; }
.page-hero h1 { font-size: 1.5rem; }
.page-hero .btn { box-shadow: var(--shadow-md); }
@media (max-width: 1100px) { .page-hero { background: #fff; } .page-hero > div:first-child { max-width: none; } }
/* uppercase CTAs like wilsonart.com */
.btn { text-transform: uppercase; letter-spacing: .05em; font-size: .7rem; padding: 9px 16px; white-space: nowrap; }
.btn-sm { font-size: .64rem; padding: 6px 11px; }
/* consistent rhythm in the centre pane */
.app-main .row { --bs-gutter-x: 16px; --bs-gutter-y: 16px; }
.app-main .row.mt-1, .app-main .row.mt-4 { margin-top: 2px !important; }
.app-main .row + .row { margin-top: 0; }
.panel-head { min-height: 50px; }
.panel-head h4 { font-size: .86rem; }
.kpi { min-height: 112px; display: flex; flex-direction: column; }
.kpi .kpi-sub { margin-top: auto; }
.kpi .kpi-value { font-size: 1.6rem; }
.section-title { margin: 20px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.section-title h3 { font-size: .92rem; text-transform: uppercase; letter-spacing: .06em; color: var(--wa-charcoal); }
.dm-table { margin-bottom: 4px; }
.agent-card .ag-foot .d-flex.gap-1 { flex-wrap: nowrap; }
.nav-tabs { background: #fff; border: 1px solid var(--line); border-radius: 10px 10px 0 0; padding: 0 10px; }
.tab-content.pt-4 { padding-top: 16px !important; }
/* sidebar: subtle texture so the red reads like a laminate sheet, not a flat block */
.app-sidebar::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .06;
  background: repeating-linear-gradient(115deg, #fff 0 1px, transparent 1px 18px); }
.app-sidebar > * { position: relative; }
/* login: photography + red brand overlay */
.login-side { background: linear-gradient(160deg, rgba(227,27,44,.94) 0%, rgba(196,20,31,.9) 48%, rgba(46,46,48,.92) 100%), var(--login-img) center / cover no-repeat; }
.login-side .tex { display: none; }
/* wider centre pane: full width, slim side padding */
.content-wrap { max-width: none; }
.app-main { padding: 16px 16px 56px; }
@media (min-width: 1700px) { .app-main { padding: 18px 22px 56px; } }
.agent-card .ag-foot { flex-wrap: wrap; row-gap: 10px; }
.agent-card .ag-foot > div:last-child { margin-left: auto; }

/* footer: never widen the page on phones */
.app-footer { overflow: hidden; white-space: nowrap; }
@media (max-width: 768px) { .app-footer > :not(:first-child) { display: none; } }

.scope-chip.off { background: var(--warning-soft); border-color: #EFD8AE; color: #92560E; }
.scope-chip.off .dot { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
