/* ═══════════════════════════════════════════════════════════
   edBuddy Pro Admin — admin.css
   Same brand as edbuddypro.com: Figtree, brand blue #0559B3, navy
   #06213D, 8px corners, no pills. Light theme only.
   ═══════════════════════════════════════════════════════════ */
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(/fonts/figtree-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(/fonts/figtree-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+A720-A7FF; }

:root {
  --blue: #0559B3; --blue-600: #044A96; --blue-50: #EEF4FC; --blue-100: #DCE9F8;
  --navy: #06213D; --ink: #0B1220; --ink-2: #26334A; --muted: #5A6B82; --faint: #8593A6;
  --line: #E3E8EF; --line-2: #EEF1F5; --grid: #E8ECF2; --bg: #F5F7FA; --card: #FFFFFF;
  --green: #127A3A; --green-bg: #E7F5EC; --amber: #8A5300; --amber-bg: #FFF3DD;
  --red: #B42318; --red-bg: #FDECEA; --violet: #5B3DB8; --violet-bg: #F0ECFB; --teal: #0B6E78; --teal-bg: #E3F4F5;
  --grey: #4A5568; --grey-bg: #EEF1F5;
  --font: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --r: 8px; --top: 64px; --side: 264px;
  --shadow: 0 1px 2px rgba(6, 33, 61, .04), 0 8px 24px -12px rgba(6, 33, 61, .12);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.i { width: 18px; height: 18px; flex: none; }
.flip { transform: scaleX(-1); }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; letter-spacing: -.01em; }
.muted { color: var(--muted); } .small { font-size: 13px; } .pad { padding: 16px 20px; }
.sub { display: block; color: var(--muted); font-size: 13px; margin-top: 1px; }
.bad { color: var(--red) !important; } .good { color: var(--green); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* ── buttons ─────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn .i { width: 17px; height: 17px; }
.btn:hover { background: var(--bg); border-color: #D3DAE4; }
.btn--primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-600); border-color: var(--blue-600); }
.btn--danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn--danger:hover { background: #962017; border-color: #962017; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn--block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r); border: 0; background: transparent; color: var(--ink-2); }
.icon-btn:hover { background: var(--line-2); color: var(--ink); }
.icon-btn .i { width: 20px; height: 20px; }
.icon-btn--sm { width: 30px; height: 30px; } .icon-btn--sm .i { width: 16px; height: 16px; }
.link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; color: var(--blue); font-weight: 600; font-size: 13.5px; }
.link .i { width: 15px; height: 15px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link--danger { color: var(--red); }

/* ── chips, avatars ──────────────────────────────────────── */
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; line-height: 1; }
.chip--grey { background: var(--grey-bg); color: var(--grey); } .chip--blue { background: var(--blue-50); color: var(--blue); }
.chip--green { background: var(--green-bg); color: var(--green); } .chip--amber { background: var(--amber-bg); color: var(--amber); }
.chip--red { background: var(--red-bg); color: var(--red); } .chip--violet { background: var(--violet-bg); color: var(--violet); }
.chip--teal { background: var(--teal-bg); color: var(--teal); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--grey); }
.dot--blue { background: var(--blue); } .dot--violet { background: var(--violet); } .dot--teal { background: var(--teal); }
.dot--amber { background: #D98A00; } .dot--green { background: #1E9E4E; } .dot--grey { background: var(--faint); }
.av { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.av--lg { width: 40px; height: 40px; font-size: 14px; background: var(--blue); }
.av--sm { width: 26px; height: 26px; font-size: 10.5px; } .av--xs { width: 22px; height: 22px; font-size: 9.5px; }
.who { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.who--lg { gap: 12px; white-space: normal; }

/* ── top bar ─────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 40; height: var(--top); display: flex; align-items: center; gap: 8px;
  padding: 0 20px 0 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.top-menu { display: none; margin-left: -8px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.logo { display: block; height: 30px; width: auto; color: var(--blue); --ebp-ink: var(--ink); }
.brand-tag { height: 24px; display: inline-flex; align-items: center; padding: 0 8px; border: 1px solid var(--line);
  border-radius: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.env-tag { height: 24px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 6px; background: #B45309; color: #fff;
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.env-tag--test { background: #7C3AED; } .env-tag--preview, .env-tag--local { background: #475569; }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.me { position: relative; }
.me-btn { border: 0; background: none; padding: 0; border-radius: 50%; display: block; }
.me-menu, .sw-menu { position: absolute; z-index: 60; min-width: 240px; padding: 6px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px -12px rgba(6, 33, 61, .25);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s var(--ease), visibility .15s; }
.me-menu { right: 0; top: calc(100% + 8px); }
.me-menu.open, .sw-menu.open { opacity: 1; visibility: visible; transform: none; }
.me-who { display: grid; gap: 2px; padding: 10px 10px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.me-who span:not(.chip) { color: var(--muted); font-size: 13px; }
.me-who .chip { justify-self: start; margin-top: 6px; }
.me-menu a, .sw-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; font-size: 14px; font-weight: 500; }
.me-menu a:hover, .sw-menu a:hover { background: var(--bg); }
.me-menu .i, .sw-menu .i { color: var(--muted); }

/* ── home ────────────────────────────────────────────────── */
.home { max-width: 1240px; margin: 0 auto; padding: 64px 32px 140px; }
.home-date { color: var(--muted); font-size: 15px; font-weight: 500; }
.home-h { margin-top: 10px; font-size: clamp(32px, 4vw, 44px); line-height: 1.1; font-weight: 800; letter-spacing: -.025em; color: var(--navy); }
.home-sub { margin-top: 12px; color: var(--muted); font-size: 18px; }
.ws-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.ws { position: relative; display: flex; flex-direction: column; min-height: 300px; padding: 32px 28px 26px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .2s, box-shadow .25s var(--ease), transform .25s var(--ease); }
.ws:hover { border-color: #C9D6E6; box-shadow: var(--shadow); transform: translateY(-2px); }
.mark { width: 64px; height: 64px; color: var(--navy); }
.mark .ac { stroke: var(--blue); }
.ws h2 { margin-top: 28px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.ws p { margin-top: 8px; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.ws-f { margin-top: auto; padding-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ws-s { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.ws-s.is-warn { color: var(--amber); }
.ws-go { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink-2); transition: background .2s, color .2s, border-color .2s; }
.ws-go .i { width: 16px; height: 16px; }
.ws:hover .ws-go { background: var(--blue); border-color: var(--blue); color: #fff; }
.home-row { margin-top: 32px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; }
.att { list-style: none; margin: 0; padding: 6px; }
.att a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--r); }
.att a:hover { background: var(--bg); }
.att-i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r); background: var(--amber-bg); color: var(--amber); flex: none; }
.att-t { display: grid; min-width: 0; }
.att-t span { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-go { margin-left: auto; color: var(--faint); }
.feed { list-style: none; margin: 0; padding: 8px 20px 12px; }
.feed li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 14px; color: var(--ink-2); }
.feed li:first-child { border-top: 0; }
.feed li > span:not(.av) { flex: 1; min-width: 0; padding-top: 2px; }
.feed b { font-weight: 600; color: var(--ink); }
.feed time { color: var(--faint); font-size: 12.5px; white-space: nowrap; padding-top: 3px; }

/* ── sign in ─────────────────────────────────────────────── */
.is-signin { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: var(--bg) linear-gradient(var(--line-2) 1px, transparent 1px) 0 0 / 40px 40px,
              linear-gradient(90deg, var(--line-2) 1px, transparent 1px) 0 0 / 40px 40px; }
.signin-card { width: min(420px, 100%); padding: 40px 36px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); text-align: center; }
.signin-card .logo { height: 36px; margin: 0 auto 28px; }
.signin-card h1 { font-size: 26px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.signin-card > p { margin-top: 8px; color: var(--muted); }
.btn--google { width: 100%; height: 46px; margin-top: 28px; font-size: 15px; }
.btn--google svg { width: 18px; height: 18px; }
.signin-note { display: flex; gap: 8px; align-items: flex-start; text-align: left; margin: 16px 0 20px !important; padding: 12px; border-radius: var(--r); background: var(--bg); font-size: 13px; color: var(--muted); }
.signin-note .i { width: 16px; height: 16px; margin-top: 2px; }

/* ── module layout ───────────────────────────────────────── */
.layout { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: calc(100vh - var(--top)); }
.layout.side-collapsed { --side: 72px; }
.side { position: sticky; top: var(--top); height: calc(100vh - var(--top)); display: flex; flex-direction: column;
  background: var(--card); border-right: 1px solid var(--line); padding: 16px 12px; overflow-y: auto; }
.side-top { display: flex; align-items: center; gap: 6px; padding: 0 0 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line-2); }
.sw { position: relative; flex: 1; min-width: 0; }
.sw-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 0; background: none; border-radius: var(--r); text-align: left; }
.sw-btn:hover { background: var(--bg); }
.sw-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r); background: var(--blue-50); flex: none; }
.sw-mark .mark { width: 24px; height: 24px; }
.sw-mark--sm { width: 26px; height: 26px; } .sw-mark--sm .mark { width: 18px; height: 18px; }
.sw-name { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-chev { margin-left: auto; width: 16px; height: 16px; color: var(--muted); }
.sw-menu { left: 0; top: calc(100% + 6px); }
.side-collapse { flex: none; width: 34px; height: 34px; border: 1px solid var(--line); }
.side-collapse .i { width: 18px; height: 18px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-g { margin: 14px 10px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.side-a { position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 10px; border-radius: var(--r); color: var(--ink-2); font-weight: 500; font-size: 15px; }
.side-a .i { width: 19px; height: 19px; color: var(--muted); }
.side-a:hover { background: var(--bg); color: var(--ink); }
.side-a.on { background: var(--blue-50); color: var(--blue); font-weight: 650; }
.side-a.on .i { color: var(--blue); }
.side-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-n { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 6px; background: var(--amber-bg); color: var(--amber); font-size: 12px; font-weight: 700; }
.side-home { margin-top: auto; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 10px; border-radius: var(--r); color: var(--muted); font-size: 14px; font-weight: 500; }
.side-home:hover { background: var(--bg); color: var(--ink); }
.side.is-collapsed { padding: 16px 10px; }
.side.is-collapsed .side-top { flex-direction: column; }
.side.is-collapsed .sw-name, .side.is-collapsed .sw-chev, .side.is-collapsed .side-l, .side.is-collapsed .side-g { display: none; }
.side.is-collapsed .side-g + .side-a { margin-top: 10px; }
.side.is-collapsed .side-a, .side.is-collapsed .side-home { justify-content: center; padding: 0; }
.side.is-collapsed .side-n { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
.side.is-collapsed .sw-btn { justify-content: center; padding: 4px; }
.side-scrim { display: none; }

.main { min-width: 0; display: flex; flex-direction: column;
  background: var(--bg) linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 48px 48px,
              linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 48px 48px; }
.crumbs { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 32px; background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); position: sticky; top: var(--top); z-index: 20; backdrop-filter: blur(6px); }
.crumbs a:hover { color: var(--ink); }
.crumbs span { color: #C2CBD7; }
.crumbs b { color: var(--ink); font-weight: 600; }
.content { width: 100%; max-width: 1280px; padding: 32px 32px 140px; display: flex; flex-direction: column; gap: 20px; }

/* ── page head, kpis, panels ─────────────────────────────── */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.ph-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--blue); }
.ph h1 { margin-top: 4px; font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.ph-desc { margin-top: 6px; color: var(--muted); max-width: 680px; }
.ph-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.kpi-l { color: var(--muted); font-size: 13.5px; font-weight: 500; }
.kpi-v { margin-top: 6px; font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: var(--navy); font-variant-numeric: tabular-nums; }
.kpi-s { margin-top: 4px; font-size: 13px; color: var(--muted); }
.kpi-s.is-warn { color: var(--amber); font-weight: 600; } .kpi-s.is-bad { color: var(--red); font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 14px 20px; border-bottom: 1px solid var(--line-2); }
.panel-h h2 { font-size: 16px; font-weight: 700; }
.panel--flush .tbl-wrap { border: 0; border-radius: 0 0 10px 10px; }
.bars { list-style: none; margin: 0; padding: 16px 20px 18px; display: grid; gap: 12px; }
.bars li { display: grid; grid-template-columns: 130px minmax(0, 1fr) 82px; align-items: center; gap: 12px; font-size: 14px; }
.bars-l { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars-t { height: 10px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.bars-f { display: block; height: 100%; border-radius: 3px; background: var(--blue); }
.bars-v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── toolbar, tabs, fields ───────────────────────────────── */
.bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search { position: relative; flex: 1 1 280px; max-width: 420px; }
.search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search input { width: 100%; height: 40px; padding: 0 12px 0 38px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.search input:focus, .sel:focus, .fld input:focus, .fld select:focus, .fld textarea:focus, textarea:focus, .verify input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.sel { height: 40px; padding: 0 34px 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6B82' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; appearance: none; font-size: 14px; max-width: 100%; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--blue); }
.tab.on::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--blue); border-radius: 2px; }
.tab-n { min-width: 22px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 6px; background: var(--line-2); color: var(--muted); font-size: 12px; }
.tab.on .tab-n { background: var(--blue-50); color: var(--blue); }
.foot-note { color: var(--faint); font-size: 13px; margin-top: -8px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r); background: var(--blue-50); color: var(--ink-2); font-size: 14px; }
.notice .i { color: var(--blue); margin-top: 1px; }
.notice--warn { background: var(--amber-bg); } .notice--warn .i { color: var(--amber); }

/* ── tables ──────────────────────────────────────────────── */
.tbl-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { height: 42px; padding: 0 16px; text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); background: #FAFBFC; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td b { font-weight: 600; }
.tbl .r { text-align: right; } .tbl .c { text-align: center; } .tbl .nowrap { white-space: nowrap; }
.tbl--click tbody tr { cursor: pointer; }
.tbl--click tbody tr:hover, .tbl--click tbody tr:focus-visible { background: #F8FAFD; outline: none; }
.tbl--click tbody tr:focus-visible td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
.ext { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); }
.ext .i { width: 13px; height: 13px; }
.prog { display: inline-flex; align-items: center; gap: 10px; }
.prog-t { width: 80px; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.prog-f { display: block; height: 100%; background: var(--blue); }
.prog-v { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; }

/* ── empty states ────────────────────────────────────────── */
.empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 56px 24px; }
.empty .i { width: 40px; height: 40px; padding: 9px; border-radius: 10px; background: var(--blue-50); color: var(--blue); margin-bottom: 8px; box-sizing: content-box; }
.empty h3 { font-size: 17px; font-weight: 700; }
.empty p { max-width: 420px; color: var(--muted); font-size: 14.5px; }
.empty--sm { padding: 36px 20px; }

/* ── pipeline ────────────────────────────────────────────── */
.kb { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kb-col { display: flex; flex-direction: column; min-height: 420px; background: rgba(238, 241, 245, .85); border: 1px solid var(--line); border-radius: 10px; transition: background .15s, border-color .15s; }
.kb-col.is-over { background: var(--blue-50); border-color: var(--blue); }
.kb-h { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; }
.kb-h h2 { font-size: 14.5px; font-weight: 700; }
.kb-n { font-size: 13px; color: var(--muted); font-weight: 600; }
.kb-v { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.kb-list { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 0 10px 12px; }
.kb-card { display: grid; gap: 2px; padding: 12px 12px 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); cursor: grab; transition: box-shadow .15s, border-color .15s; }
.kb-card:hover { border-color: #C9D6E6; box-shadow: var(--shadow); }
.kb-card.is-drag { opacity: .5; }
.kb-card b { font-size: 14.5px; font-weight: 600; }
.kb-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.kb-src { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.kb-empty { padding: 18px 8px; text-align: center; color: var(--faint); font-size: 13px; border: 1px dashed #D3DAE4; border-radius: var(--r); }

/* ── tasks, inbox, lists ─────────────────────────────────── */
.tasks, .inbox, .people, .mini-tasks, .notes, .role-list { list-style: none; margin: 0; padding: 0; }
.tasks { background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.task { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.task:last-child { border-bottom: 0; }
.task-b { flex: 1; min-width: 0; display: grid; }
.task-b b { font-weight: 600; }
.task-lead { justify-self: start; border: 0; background: none; padding: 0; margin-top: 1px; color: var(--muted); font-size: 13px; }
.task-lead:hover { color: var(--blue); text-decoration: underline; }
.task time, .mini-tasks time { font-size: 13px; color: var(--muted); white-space: nowrap; }
.task.is-done b, .mini-tasks .is-done span { color: var(--faint); text-decoration: line-through; }
.cb { display: grid; place-items: center; width: 22px; height: 22px; flex: none; padding: 0; border: 1.5px solid #B9C4D2; border-radius: 6px; background: var(--card); color: transparent; }
.cb .i { width: 14px; height: 14px; stroke-width: 2.4; }
.cb .i rect { display: none; }
.cb:hover { border-color: var(--blue); }
.cb.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.inbox { display: grid; gap: 10px; }
.msg { display: grid; gap: 4px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.msg-top { display: flex; align-items: center; justify-content: space-between; }
.msg-top time { font-size: 13px; color: var(--muted); }
.msg-s { margin-top: 6px; font-size: 15.5px; font-weight: 600; }
.msg-f { color: var(--muted); font-size: 14px; }
.msg-f a { color: var(--blue); }
.msg-a { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.msg-own { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; color: var(--muted); }
.msg-own .sel { height: 32px; font-size: 13px; }
.people li { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--line-2); }
.people li:first-child { border-top: 0; }
.people li > span:not(.av) { flex: 1; min-width: 0; }
.people time { font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.role-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.role-list li { display: grid; gap: 2px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.role-list li span:not(.muted) { color: var(--ink-2); }
.role-list .muted { font-size: 13px; margin-top: 4px; }
.perm td, .perm th { white-space: nowrap; }
.perm-b { border: 0; background: none; padding: 4px; border-radius: 8px; }
.perm-b:hover .chip { box-shadow: 0 0 0 2px var(--blue-100); }
.perm-lock { display: inline-block; padding: 4px; opacity: .7; }

/* ── verify, courses, apps, forms ────────────────────────── */
.verify { padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.verify label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.verify-row { display: flex; gap: 10px; max-width: 520px; }
.verify input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); font-family: ui-monospace, Menlo, monospace; font-size: 14px; text-transform: uppercase; }
.verify-r { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px !important; font-size: 14px; }
.verify-r .i { width: 18px; height: 18px; margin-top: 1px; }
.verify-r.ok { color: var(--green); } .verify-r.bad { color: var(--red); }
.verify-r span { color: var(--ink-2); }
.courses, .apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.course, .app { padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.course header, .app header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.course header .icon-btn { width: 32px; height: 32px; margin: -4px -6px -4px 0; }
.course header .icon-btn .i { width: 16px; height: 16px; }
.course h2 { margin-top: 16px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.course-s { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line-2); }
.course-s dt { font-size: 12.5px; color: var(--muted); }
.course-s dd { margin: 2px 0 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.app h2 { font-size: 16.5px; font-weight: 700; }
.app p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.card-form { padding: 8px 24px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; max-width: 860px; }
.card-form h2 { margin: 20px 0 14px; font-size: 16px; font-weight: 700; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.fields .fld:not(.fld--half) { grid-column: 1 / -1; }
.card-form footer { margin-top: 24px; display: flex; justify-content: flex-end; }
.fld { display: grid; gap: 6px; grid-column: 1 / -1; }
.fld--half { grid-column: span 1; }
.fld label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.fld label i { font-style: normal; font-weight: 500; color: var(--faint); margin-left: 4px; }
.fld.is-missing label i { color: var(--amber); }
.fld input, .fld select, .fld textarea, textarea { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); font-size: 14.5px; }
.fld textarea, textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.fld.is-missing input { border-style: dashed; border-color: #E2C08A; }
.fld.is-bad input, .fld.is-bad select, .fld.is-bad textarea { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }

/* ── drawer + modal ──────────────────────────────────────── */
.ov { position: fixed; inset: 0; z-index: 100; }
.ov-bg { position: absolute; inset: 0; background: rgba(6, 33, 61, .32); opacity: 0; transition: opacity .2s; }
.ov.open .ov-bg { opacity: 1; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(500px, 100%); display: flex; flex-direction: column; background: var(--card);
  box-shadow: -20px 0 50px -20px rgba(6, 33, 61, .3); transform: translateX(24px); opacity: 0; transition: transform .25s var(--ease), opacity .2s; }
.ov.open .drawer { transform: none; opacity: 1; }
.drawer-h, .modal-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line-2); }
.drawer-h h2, .modal-h h2 { font-size: 20px; font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
.drawer-h p, .modal-h p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.drawer-h .icon-btn, .modal-h .icon-btn { margin: -6px -10px 0 0; }
.drawer-b { flex: 1; overflow-y: auto; padding: 20px 24px 32px; }
.drawer-f { padding: 16px 24px; border-top: 1px solid var(--line-2); }
.modal { position: absolute; left: 50%; top: 50%; width: min(560px, calc(100% - 32px)); max-height: calc(100% - 48px); display: flex; flex-direction: column;
  background: var(--card); border-radius: 12px; box-shadow: 0 30px 80px -20px rgba(6, 33, 61, .45);
  transform: translate(-50%, -46%); opacity: 0; transition: transform .25s var(--ease), opacity .2s; }
.modal--sm { width: min(440px, calc(100% - 32px)); }
.ov.open .modal { transform: translate(-50%, -50%); opacity: 1; }
.modal-b { overflow-y: auto; padding: 20px 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.modal-text { grid-column: 1 / -1; color: var(--ink-2); }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line-2); }
.dl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dl-actions .btn { height: 36px; padding: 0 12px; font-size: 13.5px; }
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; padding: 16px; background: var(--bg); border-radius: 10px; }
.dl-f { display: grid; gap: 6px; font-size: 13px; }
.dl-f > span { color: var(--muted); font-weight: 600; }
.dl-f b { font-size: 14.5px; font-weight: 600; padding-top: 9px; }
.dl-f .sel { width: 100%; }
.dl { display: grid; grid-template-columns: 120px 1fr; gap: 10px 16px; margin: 20px 0 0; font-size: 14px; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; overflow-wrap: anywhere; }
.dl-h { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 10px; font-size: 15px; font-weight: 700; }
.mini-tasks li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.mini-tasks li span { flex: 1; }
.note-new { display: grid; gap: 8px; }
.note-new .btn { justify-self: end; height: 36px; }
.notes { margin-top: 14px; }
.notes li { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.notes time { display: block; margin-top: 4px; font-size: 12.5px; color: var(--faint); }
.inv { display: grid; gap: 20px; }
.inv-h { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.inv-h > div { display: grid; gap: 2px; }
.inv-h .mono { white-space: nowrap; }
.inv .dl { margin: 0; }
.inv-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.inv-t td { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.inv-t .r { text-align: right; }
.inv-tot td { font-weight: 800; font-size: 16px; border-bottom: 0; border-top: 2px solid var(--ink); }

/* ── preview bar + toast ─────────────────────────────────── */
.pv { position: fixed; left: 50%; bottom: 20px; z-index: 50; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
  padding: 7px 7px 7px 18px; background: var(--navy); color: #fff; border-radius: 12px; box-shadow: 0 16px 40px -12px rgba(6, 33, 61, .5);
  font-size: 14px; white-space: nowrap; max-width: calc(100% - 24px); }
.pv-dot { width: 8px; height: 8px; border-radius: 50%; background: #F5A524; box-shadow: 0 0 0 3px rgba(245, 165, 36, .25); }
.pv-t { color: rgba(255, 255, 255, .72); }
.pv-b { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: #fff; font-weight: 600; font-size: 13px; }
.pv-b:hover { background: rgba(255, 255, 255, .1); }
.pv-b--solid { background: #fff; color: var(--navy); border-color: #fff; }
.pv-b--solid:hover { background: #E8EEF6; }
.toast { position: fixed; left: 50%; bottom: 80px; z-index: 200; transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 460px); padding: 12px 18px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 500;
  box-shadow: 0 16px 40px -12px rgba(6, 33, 61, .5); transition: opacity .2s, transform .25s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── responsive ──────────────────────────────────────────── */
@media (max-width: 1180px) {
  .ws-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .layout, .layout.side-collapsed { grid-template-columns: minmax(0, 1fr); }
  .top-menu { display: inline-grid; }
  .side, .side.is-collapsed { position: fixed; z-index: 70; top: 0; left: 0; bottom: 0; height: 100%; width: 288px; padding: 16px 12px;
    transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: 20px 0 50px -20px rgba(6, 33, 61, .3); }
  .side.is-collapsed .sw-name, .side.is-collapsed .sw-chev, .side.is-collapsed .side-l, .side.is-collapsed .side-g { display: revert; }
  .side.is-collapsed .side-top { flex-direction: row; }
  .side.is-collapsed .side-a, .side.is-collapsed .side-home { justify-content: flex-start; padding: 0 10px; }
  .side.is-collapsed .side-n { position: static; }
  .side-collapse { display: none; }
  body.side-open .side { transform: none; }
  body.side-open .side-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(6, 33, 61, .32); }
  .home-row, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .crumbs { padding: 0 20px; }
  .content { padding: 24px 20px 140px; }
}
@media (max-width: 640px) {
  :root { --top: 58px; }
  .top { padding: 0 12px 0 16px; }
  .logo { height: 26px; }
  .brand { gap: 8px; }
  .home { padding: 36px 16px 120px; }
  .home-sub { font-size: 16px; }
  .ws-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 32px; }
  .ws { min-height: 0; padding: 22px 20px 18px; }
  .ws .mark { width: 48px; height: 48px; }
  .ws h2 { margin-top: 16px; font-size: 20px; }
  .ws p { font-size: 15px; }
  .ws-f { padding-top: 16px; }
  .kpis { gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-v { font-size: 22px; }
  .ph h1 { font-size: 26px; }
  .ph-actions { width: 100%; }
  .ph-actions .btn { flex: 1; }
  .content { padding: 20px 16px 130px; gap: 16px; }
  .crumbs { padding: 0 16px; height: 46px; font-size: 13px; }
  .search { max-width: none; flex-basis: 100%; }
  .bar .sel { flex: 1 1 calc(50% - 5px); }
  .bars li { grid-template-columns: 96px minmax(0, 1fr) 70px; font-size: 13px; }
  /* tables become stacked cards */
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; border: 0; text-align: right !important; }
  .tbl td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; font-weight: 500; text-align: left; flex: none; }
  .tbl td[data-label=""]::before { content: none; }
  .tbl td:first-child { display: block; text-align: left !important; padding-bottom: 6px; }
  .tbl td:first-child::before { content: none; }
  .tbl td .sub { text-align: inherit; }
  .perm thead { display: table-header-group; }
  .perm, .perm tbody { display: table; } .perm tr { display: table-row; padding: 0; } .perm td { display: table-cell; padding: 8px; text-align: center !important; }
  .perm td::before { content: none; } .perm td:first-child { display: table-cell; text-align: left !important; }
  .task { flex-wrap: wrap; padding: 14px; gap: 10px; }
  .task-b { flex-basis: calc(100% - 40px); }
  .task time { margin-left: 32px; }
  .task .who { margin-left: auto; }
  .modal-b, .fields, .dl-grid { grid-template-columns: minmax(0, 1fr); }
  .fld--half { grid-column: 1 / -1; }
  .modal { top: auto; bottom: 0; transform: translate(-50%, 24px); width: 100%; max-height: 92%; border-radius: 14px 14px 0 0; }
  .ov.open .modal { transform: translate(-50%, 0); }
  .dl { grid-template-columns: 96px 1fr; }
  .pv { left: 12px; right: 12px; transform: none; bottom: 12px; padding: 6px 6px 6px 14px; gap: 8px; font-size: 13px; }
  .pv-t { display: none; }
  .pv-b:first-of-type { margin-left: auto; }
  .toast { bottom: 76px; }
  .kb { grid-auto-columns: minmax(240px, 82%); }
  .msg-own { margin-right: 0; width: 100%; }
}
