/* ==========================================================================
   Scout design system
   ========================================================================== */
:root {
  --bg: #020b19;
  --bg-2: #051327;
  --panel: #0a192f;
  --panel-2: #0d203b;
  --panel-3: #112a4b;
  --line: #16304f;
  --line-2: #21426b;
  --text: #eef4ff;
  --text-2: #c7d5ec;
  --muted: #8ea3c4;
  --dim: #637a9e;
  --blue: #1a6dff;
  --blue-2: #3a8dff;
  --blue-3: #6aaeff;
  --green: #2ad795;
  --teal: #18d1b6;
  --purple: #9a5cff;
  --violet: #6366f1;
  --pink: #ff5c9a;
  --yellow: #ffcd3c;
  --orange: #ff9f43;
  --red: #ff4d6a;
  --radius: 9px;
  --radius-sm: 6px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --sidebar: 204px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 12.5px/1.4 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue-2); text-decoration: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
.ic { flex: none; display: inline-block; vertical-align: middle; }
::selection { background: #1a6dff66; }
:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: #24446d transparent; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- shell ---------- */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  background:
    radial-gradient(1100px 500px at 72% -12%, #0f2a52 0, transparent 60%),
    radial-gradient(700px 400px at 0% 100%, #081d3a 0, transparent 70%),
    linear-gradient(160deg, #051630, var(--bg) 55%);
}
.sidebar {
  position: sticky; top: 0; height: 100vh;
  border-right: 1px solid #12294a;
  background: linear-gradient(180deg, #061630, #031024);
  display: flex; flex-direction: column;
  z-index: 30;
}
.sidebar nav { padding: 12px 6px 8px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.sidebar nav a {
  height: 39px; display: flex; align-items: center; gap: 13px;
  padding: 0 14px; border-radius: 6px;
  color: #c9d7ee; font-size: 13.2px; font-weight: 500;
  transition: background .15s, color .15s;
}
.sidebar nav a .ic { color: #d6e5ff; width: 21px; height: 21px; }
.sidebar nav a:hover { background: #0f2647; color: #fff; }
.sidebar nav a.active {
  color: #fff; font-weight: 600;
  background: linear-gradient(90deg, #1d6ef0, #1550d8);
  box-shadow: inset 3px 0 0 #3fb8ff, 0 6px 18px -8px #1a6dffaa;
}
.upgrade {
  margin: auto 14px 40px; padding: 18px 14px 16px; text-align: center;
  border: 1px solid #2c3fa8; border-radius: 9px;
  background: radial-gradient(120% 90% at 50% 0%, #3a2287 0%, #1b1f6a 45%, #0f1c4d 100%);
  box-shadow: inset 0 1px 0 #ffffff14;
}
.upgrade .crown { color: #b46cff; filter: drop-shadow(0 0 10px #a855f7aa); }
.upgrade h3 { margin: 6px 0 6px; font-size: 16px; font-weight: 700; }
.upgrade p { margin: 0 0 14px; color: #bfc8ea; line-height: 1.4; font-size: 12.5px; }
.upgrade button { border: 0; border-radius: 6px; background: linear-gradient(180deg, #2a7bff, #1a5ff0); color: #fff; width: 100%; padding: 9px; font-weight: 700; box-shadow: 0 6px 16px -6px #1a6dff; }
.upgrade button:hover { filter: brightness(1.1); }

main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: 72px; display: flex; align-items: center; gap: 16px; padding: 0 24px;
  border-bottom: 1px solid #10284a;
  background: rgba(4, 16, 34, .82); backdrop-filter: blur(12px);
}
.search {
  width: 498px; max-width: 100%; height: 41px; border: 1px solid #1e3a60; border-radius: 7px;
  background: #0a1a33; display: flex; align-items: center; gap: 10px; padding: 0 9px 0 13px; color: #8aa3c8;
  transition: border-color .15s;
}
.search:hover { border-color: #2b4f7d; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font-size: 13.5px; }
.search input::placeholder { color: #8aa0c2; }
kbd { border: 1px solid #284769; border-radius: 4px; padding: 2px 6px; color: #7b93b6; font: 500 11px Inter, sans-serif; background: #0d2140; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.bell { width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: #d4e3ff; position: relative; display: grid; place-items: center; }
.bell:hover { background: #0e2342; }
.bell i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #ff3f5e; right: 8px; top: 6px; box-shadow: 0 0 0 2px #041022; }
.bell.read i { display: none; }
.me { display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 4px 6px; border-radius: 8px; text-align: left; color: #c7d5ec; }
.me:hover { background: #0e2342; }
.me-text b { display: block; font-size: 14px; color: #fff; font-weight: 600; }
.me-text small { display: block; color: #9cb2d4; font-size: 12px; margin-top: 2px; }
.nav-toggle { display: none; }
#nav-scrim { display: none; }
.content { flex: 1; padding: 6px 14px 8px; min-width: 0; }
.app-foot { display: flex; justify-content: space-between; padding: 6px 16px 10px; color: #b9c7dc; font-size: 11.5px; }
.app-foot span:last-child { color: #9fb1cb; }

/* ---------- primitives ---------- */
.panel {
  background: linear-gradient(180deg, #0b1c35, #091729);
  border: 1px solid #142f52; border-radius: var(--radius);
  padding: 12px 14px; min-width: 0;
  box-shadow: inset 0 1px 0 #ffffff07;
}
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 11px; }
.panel-title h2 { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; letter-spacing: -.1px; }
.panel-title h2 .ic { color: #dbe8ff; }
.panel-title a { color: var(--blue-2); font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.panel-title a:hover { color: var(--blue-3); }
.panel.sm .panel-title h2 { font-size: 13px; gap: 8px; }
.panel.sm .panel-title h2 .ic { width: 17px; height: 17px; }
.panel.sm .panel-title a { font-size: 11px; }

.tile { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 9px; color: #fff; flex: none; }
.tile.sm { width: 32px; height: 32px; border-radius: 8px; }
.tile.blue { background: linear-gradient(145deg, #2a7dff, #1556e0); box-shadow: 0 6px 16px -6px #1a6dffaa; }
.tile.purple { background: linear-gradient(145deg, #9a5cff, #6b34e0); box-shadow: 0 6px 16px -6px #9a5cffaa; }
.tile.teal { background: linear-gradient(145deg, #18c9a8, #0b8f7b); box-shadow: 0 6px 16px -6px #18c9a8aa; }
.tile.violet { background: linear-gradient(145deg, #6d6cff, #4744d6); box-shadow: 0 6px 16px -6px #6366f1aa; }
.tile.green { background: linear-gradient(145deg, #2ad795, #12a06a); }
.tile.pink { background: linear-gradient(145deg, #ff6aa5, #d93a78); }
.tile.yellow { background: linear-gradient(145deg, #ffcd3c, #e09b12); color: #2a1d00; }
.tile.orange { background: linear-gradient(145deg, #ffa04d, #e46a12); }
.tile.slate { background: linear-gradient(145deg, #2a4570, #1a2f52); }

.av { --s: 28px; position: relative; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: inline-grid; place-items: center; overflow: hidden; background: hsl(var(--h) 55% 38%); color: #fff; font-size: calc(var(--s) * .36); font-weight: 700; vertical-align: middle; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av.ring { box-shadow: 0 0 0 2px #2c4a74; }
.av-stack { display: inline-flex; align-items: center; }
.av-stack .av { box-shadow: 0 0 0 2px #fff; margin-left: -8px; }
.av-stack .av:first-child { margin-left: 0; }
.av-stack em { font-style: normal; margin-left: 7px; font-size: 11px; color: #e6eeff; font-weight: 500; }

.logo-tile { --s: 30px; width: var(--s); height: var(--s); border-radius: 7px; display: inline-grid; place-items: center; flex: none; overflow: hidden; }
.logo-tile svg { width: 82%; height: 82%; }
.logo-tile.txt { font-weight: 800; font-size: calc(var(--s) * .36); letter-spacing: -.3px; }

.badge { display: inline-flex; align-items: center; gap: 5px; font-style: normal; font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 5px; white-space: nowrap; line-height: 1.35; }
.badge.slate { background: #1a2f50; color: #b8c9e6; }
.badge.blue { background: #13366c; color: #7cb4ff; }
.badge.purple { background: #2c1f5e; color: #c3a2ff; }
.badge.green { background: #0f4535; color: #4ce6a5; }
.badge.teal { background: #0c4243; color: #3ce8d0; }
.badge.yellow { background: #4a3c0b; color: #ffd659; }
.badge.peach { background: #4d2433; color: #ffb3c7; }
.badge.rose { background: #4a1530; color: #ff8fb8; border: 1px solid #6b2045; }
.badge.mint { background: #0c3d2c; color: #3ee3a0; border: 1px solid #146147; }
.badge.amber { background: #3f300a; color: #ffcb47; border: 1px solid #5f4710; }
.badge.solid.slate { background: #2b4a78; color: #fff; }
.badge.solid.blue { background: #3d8bff; color: #fff; }
.badge.solid.purple { background: #8d5cff; color: #fff; }
.badge.solid.green { background: #34d399; color: #062b1d; }
.badge.solid.teal { background: #22d3bd; color: #032a25; }
.badge.solid.yellow { background: #ffd84a; color: #2b2100; }
.badge.solid.peach { background: #ffd6d0; color: #4a1720; }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.score { display: inline-flex; flex-direction: column; gap: 4px; width: 100%; max-width: 76px; }
.score b { color: var(--c); font-size: 12px; font-weight: 600; }
.score i { height: 4px; border-radius: 3px; background: #1d3556; overflow: hidden; }
.score s { display: block; height: 100%; background: var(--c); border-radius: 3px; }
.delta { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-weight: 600; font-size: 12px; }
.delta span { color: var(--muted); font-weight: 400; margin-left: 6px; }
.delta.down { color: var(--pink); }
.progress { display: block; height: 6px; background: #1a3254; border-radius: 4px; overflow: hidden; }
.progress s { display: block; height: 100%; border-radius: 4px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 6px; border: 1px solid transparent; font-weight: 600; font-size: 12.5px; white-space: nowrap; transition: filter .15s, background .15s, border-color .15s; }
.btn.primary { background: linear-gradient(180deg, #2a7bff, #1a62f2); color: #fff; box-shadow: 0 6px 14px -6px #1a6dffcc; }
.btn.primary:hover { filter: brightness(1.12); }
.btn.ghost { background: #0d213e; border-color: #20406a; color: #d5e2f7; }
.btn.ghost:hover { background: #12294c; border-color: #2b5285; }
.btn.white { background: #fff; color: #0f2a52; }
.btn.white:hover { background: #e8f0ff; }
.btn.danger { background: #c22a4c; color: #fff; }
.btn.success { background: #13a874; color: #fff; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 11.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; border: 0; background: transparent; color: #a9bddc; }
.icon-btn:hover { background: #12294c; color: #fff; }
.link { background: none; border: 0; color: var(--blue-2); padding: 0; font-weight: 500; }

.select { position: relative; display: inline-flex; align-items: center; }
.select select { appearance: none; height: 32px; padding: 0 30px 0 12px; border-radius: 6px; border: 1px solid #1f3d63; background: #0b1c36; color: #dce7fa; font-size: 12px; cursor: pointer; outline: 0; }
.select select:hover { border-color: #2c5285; }
.select .ic { position: absolute; right: 10px; pointer-events: none; color: #a4b8d8; }
.select.block, .select.block select { width: 100%; }
.select.block select { height: 38px; }
.field-search { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 11px; border: 1px solid #1f3d63; border-radius: 6px; background: #0b1c36; color: #8ca3c6; min-width: 200px; }
.field-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 12px; color: #fff; }
.field-search input::placeholder { color: #8197b9; }
.field-search:focus-within, .select select:focus { border-color: var(--blue-2); }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 7px; background: #081730; border: 1px solid #1a3558; }
.segmented button { border: 0; background: none; color: #9cb1d2; padding: 5px 12px; border-radius: 5px; font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.segmented button.active { background: var(--blue); color: #fff; box-shadow: 0 4px 10px -4px #1a6dff; }
.segmented button:not(.active):hover { color: #fff; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch i { position: relative; width: 36px; height: 20px; border-radius: 20px; background: #223d63; transition: background .15s; flex: none; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + i { background: var(--blue); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 2px solid var(--blue-2); outline-offset: 2px; }
.cb { width: 14px; height: 14px; accent-color: var(--blue); cursor: pointer; margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; color: var(--text-2); font-weight: 500; }
.field small { color: var(--dim); font-size: 11px; }
.input, textarea.input { width: 100%; height: 38px; padding: 0 12px; border-radius: 6px; border: 1px solid #1f3d63; background: #081730; color: #fff; outline: 0; font-size: 12.5px; }
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--blue-2); box-shadow: 0 0 0 3px #1a6dff22; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 10px; color: var(--muted); text-align: center; }
.empty .ic { color: #34557f; margin-bottom: 4px; }
.empty b { color: var(--text-2); font-size: 13.5px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: #10284a; border: 1px solid #1f3d63; font-size: 11px; color: #c4d3ea; font-style: normal; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ---------- charts ---------- */
.spark { display: block; overflow: visible; }
.chart { position: relative; }
.line-chart { display: grid; grid-template-columns: auto 1fr; grid-template-rows: var(--h) auto; column-gap: 10px; }
.line-chart .y-axis { display: flex; flex-direction: column; justify-content: space-between; font-size: 10.5px; color: var(--dim); text-align: right; transform: translateY(-6px); height: calc(var(--h) + 12px); }
.line-chart .plot { position: relative; height: var(--h); }
.line-chart .gridlines { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; }
.line-chart .gridlines i { border-top: 1px dashed #1a3458; }
.line-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.line-chart .hits { position: absolute; inset: 0; display: flex; }
.line-chart .hit { flex: 1; position: relative; }
.line-chart .hit:first-child { flex: .5; } .line-chart .hit:last-child { flex: .5; }
.line-chart .hit s { display: none; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px dashed #3a6aa8; }
.line-chart .hit:first-child s { left: 0; } .line-chart .hit:last-child s { left: 100%; }
.line-chart .hit:hover s { display: block; }
.line-chart .x-axis { grid-column: 2; display: flex; justify-content: space-between; font-size: 10.5px; color: var(--dim); margin-top: 6px; }
.tip { display: none; position: absolute; z-index: 5; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #fff; color: #0b1d38; padding: 7px 10px; border-radius: 6px; font-size: 11px; white-space: nowrap; box-shadow: var(--shadow); pointer-events: none; }
.tip b { display: block; margin-bottom: 2px; }
.tip em { display: flex; align-items: center; gap: 6px; font-style: normal; }
.tip em i { width: 8px; height: 8px; border-radius: 2px; }
.line-chart .hit .tip { bottom: auto; top: 8px; }
.line-chart .hit:hover .tip, .bar:hover .tip { display: block; }
.bar-chart .bars-wrap { height: var(--h); display: flex; align-items: flex-end; gap: 8%; padding: 0 2%; border-bottom: 1px solid #1a3458; background: repeating-linear-gradient(to top, transparent 0 calc(var(--h) / 4 - 1px), #142c4c calc(var(--h) / 4 - 1px) calc(var(--h) / 4)); }
.bar { flex: 1; height: 100%; display: flex; align-items: flex-end; position: relative; }
.bar .col { width: 100%; height: 100%; display: flex; flex-direction: column-reverse; justify-content: flex-start; }
.bar .col s { display: block; width: 100%; border-radius: 3px 3px 0 0; transition: filter .15s; }
.bar .col s + s { border-radius: 3px 3px 0 0; margin-bottom: 1px; }
.bar:hover .col s { filter: brightness(1.25); }
.bar-chart .x-axis { display: flex; justify-content: space-around; font-size: 10.5px; color: var(--dim); margin-top: 6px; }
.donut { --s: 96px; position: relative; width: var(--s); height: var(--s); flex: none; display: inline-block; }
.donut svg { width: 100%; height: 100%; display: block; }
.donut circle { transition: opacity .15s; }
.donut circle:hover { opacity: .8; }
.donut-c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.legend li { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-2); }
.legend i { width: 9px; height: 9px; border-radius: 50%; }
.legend b { font-weight: 600; color: #fff; }
.gauge { --s: 150px; position: relative; width: var(--s); display: inline-flex; flex-direction: column; align-items: center; }
.gauge svg { width: 100%; }
.gauge b { position: absolute; top: 42%; font-size: calc(var(--s) * .22); font-weight: 800; }
.gauge > span { margin-top: -4px; font-size: 11px; color: var(--muted); }
.funnel { display: flex; flex-direction: column; gap: 9px; }
.f-row { display: grid; grid-template-columns: 120px 1fr 56px 44px; align-items: center; gap: 12px; font-size: 12px; }
.f-row > span { color: var(--text-2); }
.f-row div { height: 22px; background: #0e2240; border-radius: 4px; overflow: hidden; }
.f-row s { display: block; height: 100%; border-radius: 4px; }
.f-row b { text-align: right; }
.f-row em { font-style: normal; color: var(--muted); text-align: right; font-size: 11px; }

/* ---------- data table ---------- */
.dt { display: flex; flex-direction: column; min-width: 0; }
.dt-scroll { overflow-x: auto; }
.dt-row { display: grid; align-items: center; gap: 0 10px; padding: 0 12px; min-height: 52px; border-bottom: 1px solid #142b4a; font-size: 12px; color: var(--text-2); }
.dt-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dt-row .right { text-align: right; justify-self: end; }
.dt-row .center { text-align: center; justify-self: center; }
.dt-head { min-height: 38px; background: #0b1d38; color: #c1d0e8; font-weight: 500; font-size: 11.5px; border-radius: 6px 6px 0 0; border-bottom-color: #1b3659; position: sticky; top: 0; }
.dt-head .sortable { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; user-select: none; }
.dt-head .sortable:hover { color: #fff; }
.dt-row.clickable { cursor: pointer; }
.dt-row:not(.dt-head):hover { background: #0d2242; }
.dt-row.sel { background: #10284f; }
.dt.compact .dt-row { min-height: 40px; }
.dt-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 4px 0; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.dt-foot b { color: var(--text); font-weight: 600; }
.pager { display: flex; gap: 4px; align-items: center; }
.pager button { min-width: 30px; height: 30px; border-radius: 6px; border: 1px solid #1f3d63; background: #0b1c36; color: #c4d3ea; display: grid; place-items: center; font-size: 12px; }
.pager button.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.pager button:disabled { opacity: .4; cursor: default; }
.pager i { color: var(--dim); font-style: normal; padding: 0 4px; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person b { display: block; color: #fff; font-weight: 500; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person small { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.person > div { min-width: 0; }
.row-act { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; border: 0; background: none; color: #c2d2ea; }
.row-act:hover { background: #17345d; color: #fff; }
.bulkbar { display: none; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 10px; border-radius: 8px; background: #10294f; border: 1px solid #23487a; font-size: 12px; }
.bulkbar.show { display: flex; }
.bulkbar b { margin-right: auto; }

/* ---------- overlays ---------- */
.ov { position: fixed; inset: 0; z-index: 100; display: flex; animation: fade .18s ease; }
.ov.out { animation: fadeout .18s ease forwards; }
.ov-back { position: absolute; inset: 0; background: rgba(1, 6, 15, .66); backdrop-filter: blur(3px); }
.ov-modal { align-items: center; justify-content: center; padding: 16px; }
.modal { position: relative; width: min(var(--w), 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: #0b1a31; border: 1px solid #1f3d63; border-radius: 12px; box-shadow: 0 30px 80px -20px #000; animation: pop .2s ease; }
.m-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 12px; }
.m-head h3 { font-size: 16px; font-weight: 600; }
.m-head p { color: var(--muted); margin-top: 4px; font-size: 12.5px; }
.m-body { padding: 4px 20px 18px; overflow-y: auto; }
.m-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.ov-drawer { justify-content: flex-end; }
.drawer { position: relative; width: min(var(--w), 100%); height: 100%; background: #0a182e; border-left: 1px solid #1f3d63; display: flex; flex-direction: column; animation: slide .22s ease; box-shadow: -30px 0 80px -30px #000; }
.d-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.d-head h3 { font-size: 16px; }
.d-body { flex: 1; overflow-y: auto; padding: 18px 20px 24px; }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.pop { position: fixed; z-index: 120; min-width: 190px; padding: 6px; background: #0d1f3b; border: 1px solid #23456f; border-radius: 9px; box-shadow: 0 20px 50px -14px #000; animation: pop .14s ease; }
.pop > button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 10px; border-radius: 6px; color: #d5e2f7; font-size: 12.5px; text-align: left; }
.pop > button:hover { background: #163259; color: #fff; }
.pop > button.danger { color: #ff7d98; }
.pop hr { border: 0; border-top: 1px solid #1f3d63; margin: 5px 2px; }
.notif-pop { width: 360px; padding: 0; overflow: hidden; }
.np-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid #1f3d63; }
.np-item { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; padding: 11px 14px; border-bottom: 1px solid #172f50; position: relative; }
.np-item.unread::before { content: ""; position: absolute; left: 5px; top: 50%; width: 5px; height: 5px; margin-top: -2px; border-radius: 50%; background: var(--blue-2); }
.np-item b { display: block; font-size: 12.5px; font-weight: 600; }
.np-item span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.np-item small { color: var(--dim); font-size: 11px; }
.np-foot { display: block; text-align: center; padding: 10px; font-size: 12px; }
.ov-cmd { align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.cmd { position: relative; width: min(620px, 100%); background: #0b1a31; border: 1px solid #23456f; border-radius: 12px; box-shadow: 0 30px 80px -20px #000; overflow: hidden; animation: pop .16s ease; }
.cmd > label { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #1f3d63; color: #8ea6c8; }
.cmd > label input { flex: 1; background: none; border: 0; outline: 0; font-size: 15px; color: #fff; }
.cmd-list { max-height: 52vh; overflow-y: auto; padding: 6px; }
.cmd-list h6 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--dim); padding: 10px 10px 4px; font-weight: 600; }
.cmd-list button { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 7px; text-align: left; color: var(--text-2); }
.cmd-list button b { color: #fff; font-weight: 500; }
.cmd-list button span { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-list button > .ic { opacity: 0; color: var(--blue-2); }
.cmd-list button.on { background: #14315a; }
.cmd-list button.on > .ic { opacity: 1; }
.cmd-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: #14315a; color: #a8c6ff; }
.cmd-foot { display: flex; gap: 16px; padding: 9px 14px; border-top: 1px solid #1f3d63; color: var(--dim); font-size: 11px; }
.cmd-foot kbd { margin-right: 3px; padding: 1px 5px; }
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 380px; padding: 11px 14px; border-radius: 9px; background: #0f2443; border: 1px solid #24497a; box-shadow: var(--shadow); font-size: 12.5px; animation: pop .2s ease; }
.toast.success .ic { color: var(--green); } .toast.info .ic { color: var(--blue-2); } .toast.error .ic { color: var(--red); } .toast.warn .ic { color: var(--yellow); }
.toast.out { opacity: 0; transform: translateY(6px); transition: .25s; }

/* ---------- page scaffolding (non-dashboard) ---------- */
.page { animation: fade .25s ease; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 10px 2px 16px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--dim); margin-bottom: 6px; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: #fff; }
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.page-head p { color: var(--muted); margin-top: 4px; font-size: 13px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .grow { flex: 1; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tabs-line { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs-line button { border: 0; background: none; padding: 10px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.tabs-line button:hover { color: #fff; }
.tabs-line button.active { color: #fff; border-bottom-color: var(--blue-2); }
.tabs-line button em { font-style: normal; font-size: 10.5px; padding: 1px 7px; border-radius: 10px; background: #15305a; color: #a9c2e6; }
.tabs-line button.active em { background: var(--blue); color: #fff; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 9px 12px; font-size: 12.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; color: var(--text); }
.section-title { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--dim); font-weight: 600; margin: 18px 0 10px; }
.section-title:first-child { margin-top: 0; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 26px; font-size: 12.5px; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 16px; bottom: -2px; border-left: 1px dashed #2a4a74; }
.timeline li:last-child::before { display: none; }
.timeline li > i { position: absolute; left: 0; top: 2px; width: 15px; height: 15px; border-radius: 50%; background: #0b1a31; border: 3px solid var(--c, var(--blue-2)); }
.timeline b { display: block; font-weight: 600; }
.timeline span { color: var(--muted); font-size: 11.5px; }

/* ==========================================================================
   Dashboard — mirrors the reference layout 1:1
   ========================================================================== */
.dash .stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 11px; }
.kpi { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 14px; min-height: 84px; border-radius: var(--radius); border: 1px solid #142f52; background: linear-gradient(180deg, #0c1f3a, #0a182e); min-width: 0; overflow: hidden; }
.kpi .tile { width: 42px; height: 42px; }
.kpi-body { min-width: 0; }
.kpi-body span { display: block; font-size: 12px; color: #dbe6f8; font-weight: 500; white-space: nowrap; }
.kpi-body b { display: block; font-size: 21px; font-weight: 700; letter-spacing: -.3px; margin: 2px 0 3px; color: #fff; white-space: nowrap; }
.kpi .spark { position: absolute; right: 12px; top: 18px; }
.kpi .delta span { margin-left: 8px; }

.dash .top-grid { display: grid; grid-template-columns: minmax(0, 1.545fr) minmax(0, 1fr); gap: 12px; margin-bottom: 11px; }
.dash .col { display: flex; flex-direction: column; gap: 11px; min-width: 0; }

.pipeline { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 9px; }
.stage { position: relative; display: flex; flex-direction: column; padding: 11px 10px 10px 13px; min-height: 142px; border-radius: 7px; border: 1px solid #ffffff1c; overflow: visible; box-shadow: inset 0 1px 0 #ffffff1a; }
.stage > span { font-size: 11.5px; font-weight: 500; color: #eef3ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage > b { font-size: 22px; font-weight: 700; margin: 3px 0 7px; letter-spacing: -.3px; }
.stage .pill { position: relative; height: 22px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; font-size: 11px; font-weight: 600; margin-right: 6px; }
.stage .pill s { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 12px; }
.stage .pill span { position: relative; }
.stage .av-stack { margin-top: auto; }
.stage .av-stack .av { box-shadow: 0 0 0 2px #fff; }
.stage .arrow { position: absolute; right: -11px; top: 58px; width: 13px; color: #e8f0ff; z-index: 2; }
.stage.blue { background: linear-gradient(160deg, #1f63da, #143b92); }
.stage.blue2 { background: linear-gradient(160deg, #1d58d0, #133a8c); }
.stage.purple { background: linear-gradient(160deg, #7444e0, #4729a6); }
.stage.green { background: linear-gradient(160deg, #1a8160, #0e503b); }
.stage.gold { background: linear-gradient(160deg, #8f6c1a, #5a430d); }
.stage.pink { background: linear-gradient(160deg, #a23366, #6a1d40); }
.stage.teal { background: linear-gradient(160deg, #15937f, #0b5a50); }
.stage.blue .pill, .stage.blue2 .pill { background: #3d7ee8; } .stage.blue .pill s, .stage.blue2 .pill s { background: #2b9bff; }
.stage.purple .pill { background: #8a62e8; } .stage.purple .pill s { background: #b07bff; }
.stage.green .pill { background: #2a9a72; } .stage.green .pill s { background: #33d391; }
.stage.gold .pill { background: #a88630; } .stage.gold .pill s { background: #f2b52a; }
.stage.pink .pill { background: #c0507f; } .stage.pink .pill s { background: #ff4f93; }
.stage.teal .pill { background: #23b39c; } .stage.teal .pill s { background: #2fe6c7; }
.stage:hover { filter: brightness(1.08); cursor: pointer; }

.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 18px 12px; min-height: 180px; border: 1.5px dashed #2f5689; border-radius: 8px; background: #08162c; text-align: center; transition: border-color .15s, background .15s; }
.dropzone.drag { border-color: var(--blue-2); background: #0c2246; }
.dropzone .cloud { color: #9cc4ff; margin-bottom: 4px; }
.dropzone b { font-size: 12.5px; font-weight: 600; }
.dropzone span { font-size: 11.5px; color: var(--muted); }
.dropzone .btn { margin-top: 14px; width: 124px; }
.ats-card { padding: 14px 14px 12px; border-radius: 8px; background: #0c1e3a; border: 1px solid #183659; display: flex; flex-direction: column; }
.ats-card .success { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.ats-card .success > .ic { color: #22c55e; flex: none; }
.ats-card .success b { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 3px; }
.ats-card .success span { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.ats-card ul { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.ats-card li { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: #e2eaf8; }
.ats-card li .ic { color: #22c55e; }
.ats-card .btn { align-self: flex-end; margin-top: auto; height: 28px; font-size: 11.5px; }

.cand-tools { display: flex; gap: 8px; align-items: center; }
.cand-tools .field-search { min-width: 172px; height: 28px; }
.cand-tools .select select { height: 28px; min-width: 96px; font-size: 11.5px; }
.dash-table .dt-row { min-height: 40.5px; padding: 0 10px; font-size: 11.5px; }
.dash-table .dt-head { min-height: 32px; font-size: 11px; }
.dash-table .person b { font-size: 11.5px; }
.dash-table .person small { font-size: 10.5px; }
.dash-table .badge { font-size: 10.5px; padding: 3px 10px; }
.dash-table .dt-row > span:nth-child(n+3) { border-left: 1px solid #142b4a; padding-left: 10px; align-self: stretch; display: flex; align-items: center; }
.dash-table .dt-head > span:nth-child(n+3) { border-left: 1px solid #1b3659; padding-left: 10px; align-self: stretch; display: flex; align-items: center; }
.role-blue { color: var(--blue-2); }

.tabs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 8px; background: #0b1c36; border-radius: 5px; border: 1px solid #183659; overflow: hidden; }
.tabs2 button { border: 0; background: none; color: #c0cfe6; padding: 7px; font-size: 12px; font-weight: 500; }
.tabs2 button.active { background: linear-gradient(180deg, #2a7bff, #1a62f2); color: #fff; border-radius: 4px; }
.match-list { background: #fff; border-radius: 6px; padding: 2px 8px; color: #0e2240; }
.match-row { display: grid; grid-template-columns: 30px minmax(0, 1.5fr) auto auto minmax(0, 1fr) 70px 54px; align-items: center; gap: 10px; padding: 5px 2px; min-height: 35.5px; border-bottom: 1px solid #e7edf6; }
.match-row:last-child { border-bottom: 0; }
.match-row .logo-tile { --s: 26px; }
.match-row b { display: block; font-size: 11.5px; font-weight: 600; color: #0b1b33; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-row small { display: block; font-size: 10.5px; color: #6b7c96; }
.match-row .tag { font-style: normal; font-size: 10px; padding: 3px 9px; border-radius: 4px; background: #edf2fa; color: #5b6f8f; white-space: nowrap; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.match-row .tag.visa { background: #e3ecfb; color: #1b3f80; font-weight: 700; }
.match-row strong { color: #14a46c; font-size: 11px; font-weight: 600; white-space: nowrap; }
.match-row .btn { height: 24px; padding: 0 10px; font-size: 11px; }
.match-row .btn.done { background: #e3f7ee; color: #108a5a; box-shadow: none; }

.dash .bottom-grid { display: grid; grid-template-columns: 284fr 252fr 280fr 332fr 192fr; gap: 9px; }
.dash .bottom-grid .panel { padding: 10px 10px; }
.dash .bottom-grid .panel-title { margin-bottom: 8px; }
.job-types { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.job-type { background: #fff; color: #0e2240; border-radius: 6px; padding: 9px 9px 8px; display: flex; flex-direction: column; cursor: pointer; transition: transform .15s; }
.job-type:hover { transform: translateY(-2px); }
.job-type .head { display: flex; gap: 8px; align-items: flex-start; }
.job-type .head > i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e4eeff; color: #1a6dff; flex: none; }
.job-type .head b { display: block; font-size: 10.5px; color: #1d4ed8; font-weight: 600; }
.job-type .head strong { display: block; font-size: 19px; font-weight: 700; color: #0b1b33; line-height: 1.15; }
.job-type .head span { font-size: 10.5px; color: #475569; }
.job-type .chips2 { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 8px; }
.job-type .chips2 em { font-style: normal; font-size: 9.5px; padding: 3px 4px; border-radius: 4px; background: #eef2f8; color: #475569; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 7px; }
.mini-kpis > div { background: #0d213f; border: 1px solid #183659; border-radius: 6px; padding: 7px 9px; }
.mini-kpis span { display: block; font-size: 10.5px; color: var(--text-2); }
.mini-kpis b { display: flex; align-items: baseline; gap: 10px; font-size: 18px; margin-top: 3px; }
.mini-kpis b small { color: var(--green); font-size: 10.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }
.sub-box { background: #0d213f; border: 1px solid #183659; border-radius: 6px; padding: 7px 9px; }
.sub-box > span { display: block; font-size: 10.5px; color: var(--text-2); margin-bottom: 6px; }
.donut-row { display: flex; align-items: center; gap: 14px; }
.donut-row .legend li { font-size: 10.5px; gap: 6px; grid-template-columns: 8px 1fr auto; }
.donut-row .legend { flex: 1; gap: 6px; }
.donut-c .ic { color: #cfe0ff; }
.pay-body { display: grid; grid-template-columns: 1fr 1.05fr; gap: 6px; }
.plan-box { background: #0d213f; border: 1px solid #183659; border-radius: 6px; padding: 8px 9px; display: flex; flex-direction: column; }
.plan-box > span { font-size: 10.5px; color: var(--text-2); }
.plan-box .plan-name { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; margin: 4px 0 2px; }
.plan-box .plan-name em { font-style: normal; font-size: 10px; background: #5b3fd6; color: #fff; padding: 1px 7px; border-radius: 4px; font-weight: 600; }
.plan-box strong { font-size: 13px; }
.plan-box strong small { font-size: 10.5px; color: var(--muted); font-weight: 400; }
.plan-box .next { margin-top: 8px; font-size: 10.5px; color: var(--muted); }
.plan-box .next b { display: block; color: var(--text); font-weight: 500; }
.plan-box .btn { margin-top: auto; height: 26px; font-size: 10.5px; padding: 0 8px; border: 1px solid #2b5d9e; }
.inv-box { background: #0d213f; border: 1px solid #183659; border-radius: 6px; padding: 8px 8px; }
.inv-box > span { display: block; font-size: 10.5px; color: var(--text-2); margin-bottom: 7px; }
.inv { display: grid; grid-template-columns: 15px auto 1fr auto; align-items: center; gap: 5px; font-size: 9.5px; padding: 4px 0; color: var(--text-2); }
.inv .ic { color: #22c55e; }
.inv.pending .ic { color: #f5b82e; }
.inv em { font-style: normal; font-size: 9.5px; padding: 1px 5px; border-radius: 3px; background: #0d4a32; color: #3ee3a0; }
.inv.pending em { background: #4d3a08; color: #ffcb47; }
.inv b { text-align: right; font-weight: 500; }
.conv { display: grid; grid-template-columns: auto 1fr; gap: 10px; background: #0d213f; border: 1px solid #183659; border-radius: 6px; padding: 7px 9px; margin-bottom: 6px; align-items: center; }
.conv span { display: block; font-size: 10.5px; color: var(--text-2); }
.conv b { display: flex; align-items: baseline; gap: 12px; font-size: 20px; margin-top: 3px; }
.conv b small { color: var(--green); font-size: 11px; font-weight: 600; }
.conv .mini-line svg { width: 100%; height: 34px; display: block; }
.conv .mini-line .x { display: flex; justify-content: space-between; font-size: 8.5px; color: var(--muted); margin-top: 2px; }
.an-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.an-grid .sub-box { padding: 7px 8px; }
.an-grid .donut-row { gap: 8px; }
.an-grid .legend li { font-size: 9px; grid-template-columns: 7px 1fr auto; gap: 4px; }
.an-grid .legend i { width: 7px; height: 7px; border-radius: 2px; }
.an-grid .legend b { font-weight: 500; }
.an-grid .legend { gap: 3px; }
.mini-bars { display: flex; align-items: flex-end; gap: 6px; height: 56px; padding: 0 4px; border-bottom: 1px solid #1d3a60; }
.mini-bars s { flex: 1; background: linear-gradient(180deg, #3a8dff, #1a5ee6); border-radius: 2px 2px 0 0; }
.mini-bars-x { display: flex; justify-content: space-around; font-size: 8.5px; color: var(--muted); margin-top: 3px; }
.sub-box .row-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 10.5px; color: var(--text-2); margin-bottom: 6px; }
.sub-box .row-head small { color: var(--green); font-weight: 600; font-size: 10.5px; }
.assistant { display: flex; flex-direction: column; }
.assistant .panel-title h2 .ic { color: #fff; }
.chat-bubble { background: #fff; color: #0e2240; border-radius: 6px; padding: 8px 10px; font-size: 11px; line-height: 1.4; max-height: 78px; overflow-y: auto; }
.chat-bubble b { font-weight: 600; }
.chat-bubble a { color: #1a5fe6; }
.chat-bubble .bot-list { padding: 0; margin: 4px 0; list-style: none; }
.chat-bubble .bot-list li { display: flex; align-items: center; gap: 5px; padding: 2px 0; }
.chat-bubble .bot-list .logo-tile { --s: 16px; border: 1px solid #e3e9f3; }
.chat-bubble .bot-list em { font-style: normal; margin-left: auto; color: #14a46c; font-weight: 600; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 8px 0; }
.quick button { border: 1px solid #23456f; background: #0d213f; color: #c9d7ee; border-radius: 4px; padding: 4px 4px; font-size: 8.5px; line-height: 1.25; }
.quick button:hover { border-color: var(--blue-2); color: #fff; }
.chat-input { display: flex; align-items: center; gap: 6px; margin-top: auto; padding: 3px 3px 3px 10px; border: 1px solid #23456f; border-radius: 6px; background: #081730; }
.chat-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 11px; color: #fff; }
.chat-input button { width: 28px; height: 28px; border-radius: 5px; border: 0; background: var(--blue); color: #fff; display: grid; place-items: center; }

/* ---------- jobs ---------- */
.job-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.job-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--radius); border: 1px solid #142f52; background: linear-gradient(180deg, #0c1f3a, #0a182e); transition: border-color .15s, transform .15s; cursor: pointer; }
.job-card:hover { border-color: #2b5285; transform: translateY(-2px); }
.job-card .jc-head { display: flex; gap: 12px; align-items: flex-start; }
.job-card .jc-head > div { flex: 1; min-width: 0; }
.job-card h3 { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-card .co { color: var(--muted); font-size: 12px; margin-top: 2px; }
.job-card .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 11.5px; }
.job-card .meta span { display: inline-flex; align-items: center; gap: 5px; }
.job-card .jc-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); margin-top: auto; }
.job-card .salary { font-weight: 600; font-size: 13px; }
.job-card .salary small { color: var(--muted); font-weight: 400; }
.match-ring { --v: 80; --c: var(--green); width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--v) * 1%), #1a3254 0); position: relative; flex: none; }
.match-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #0b1c35; }
.match-ring b { position: relative; font-size: 11px; }
.save-btn.on { color: var(--yellow); }
.save-btn.on .ic { fill: var(--yellow); }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.k-col { background: #081629; border: 1px solid #142f52; border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 250px); min-height: 320px; }
.k-col.over { border-color: var(--blue-2); background: #0b1f3c; }
.k-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px; border-bottom: 1px solid var(--line); }
.k-head i { width: 9px; height: 9px; border-radius: 50%; }
.k-head b { font-size: 13px; font-weight: 600; }
.k-head em { font-style: normal; margin-left: auto; font-size: 11px; padding: 1px 8px; border-radius: 10px; background: #15305a; color: #b6cbe9; }
.k-body { padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; }
.k-card { background: linear-gradient(180deg, #0f2442, #0c1d37); border: 1px solid #1b3a62; border-radius: 8px; padding: 11px; cursor: grab; transition: border-color .15s, transform .15s, opacity .15s; }
.k-card:hover { border-color: #2f5b94; }
.k-card.dragging { opacity: .4; transform: scale(.98); }
.k-card .person { margin-bottom: 9px; }
.k-card .k-meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.k-card .chips { margin-bottom: 9px; }

/* ---------- chatbot page ---------- */
.chat-app { display: grid; grid-template-columns: 260px minmax(0, 1fr) 290px; gap: 12px; height: calc(100vh - 190px); min-height: 540px; }
.chat-app > .panel { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.conv-list { overflow-y: auto; padding: 6px; }
.conv-item { display: flex; gap: 10px; padding: 10px; border-radius: 8px; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; color: var(--text-2); }
.conv-item:hover { background: #0e2445; }
.conv-item.active { background: #12305a; }
.conv-item b { display: block; color: #fff; font-size: 12.5px; font-weight: 500; }
.conv-item span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat-head b { display: block; font-size: 14px; }
.chat-head small { color: var(--green); font-size: 11.5px; display: inline-flex; align-items: center; gap: 5px; }
.chat-head small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.msgs { flex: 1; overflow-y: auto; padding: 18px 18px 8px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; max-width: 78%; }
.msg .bub { padding: 10px 13px; border-radius: 12px; font-size: 13px; line-height: 1.5; background: #10284a; border: 1px solid #1d3e69; }
.msg.bot .bub { border-top-left-radius: 4px; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg.me .bub { background: linear-gradient(180deg, #2a7bff, #1a62f2); border-color: transparent; border-top-right-radius: 4px; }
.msg .bot-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, #2a7dff, #6b34e0); flex: none; }
.msg time { display: block; font-size: 10.5px; color: var(--dim); margin-top: 4px; }
.msg.me time { text-align: right; }
.bot-list { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.bot-list li { display: flex; align-items: center; gap: 8px; }
.bot-list em { font-style: normal; margin-left: auto; color: var(--green); font-weight: 600; }
.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #8aa3c8; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; transform: translateY(-2px); } }
.composer { padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.composer .quick { grid-template-columns: repeat(4, auto); justify-content: start; margin: 0 0 10px; }
.composer .quick button { font-size: 11.5px; padding: 6px 10px; border-radius: 999px; }
.composer .chat-input { padding: 5px 5px 5px 14px; }
.composer .chat-input input { font-size: 13px; }
.composer .chat-input button { width: 36px; height: 36px; }

/* ---------- ATS builder ---------- */
.ats-app { display: grid; grid-template-columns: 380px minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.paper { background: #fff; color: #1f2937; border-radius: 6px; padding: 34px 38px; min-height: 760px; box-shadow: 0 20px 50px -20px #000; font-family: Georgia, "Times New Roman", serif; font-size: 12.5px; line-height: 1.5; }
.paper h1 { font-family: Inter, sans-serif; font-size: 24px; color: #0b1b33; letter-spacing: -.3px; }
.paper .contact { font-family: Inter, sans-serif; color: #475569; font-size: 11.5px; margin: 4px 0 14px; }
.paper h4 { font-family: Inter, sans-serif; font-size: 11.5px; letter-spacing: 1.2px; text-transform: uppercase; color: #1d4ed8; border-bottom: 1.5px solid #dbe4f3; padding-bottom: 4px; margin: 16px 0 8px; }
.paper .job { margin-bottom: 10px; }
.paper .job-h { display: flex; justify-content: space-between; font-family: Inter, sans-serif; font-weight: 600; font-size: 12.5px; color: #0b1b33; }
.paper .job-h span { color: #64748b; font-weight: 400; font-size: 11.5px; }
.paper ul { margin: 4px 0 0; padding-left: 18px; }
.paper .kw { background: #dcfce7; border-radius: 2px; }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.check-list li { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; color: var(--text-2); }
.check-list li .ic { margin-top: 1px; }
.check-list li.ok .ic { color: var(--green); } .check-list li.warn .ic { color: var(--yellow); } .check-list li.bad .ic { color: var(--pink); }
.kw-chips em.hit { background: #0c3d2c; border-color: #146147; color: #3ee3a0; }
.kw-chips em.miss { background: #3f1427; border-color: #6b2045; color: #ff8fb8; }
.exp-block { border: 1px solid #1d3b62; border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 10px; position: relative; background: #0a1a32; }
.exp-block .rm { position: absolute; top: 6px; right: 6px; }

/* ---------- payments & settings ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 12px; border: 1px solid #1a3a62; background: linear-gradient(180deg, #0c1f3a, #0a182e); }
.plan-card.current { border-color: #6d4bff; background: radial-gradient(120% 80% at 50% 0%, #2a1c6b, #0d1a3c 70%); box-shadow: 0 20px 50px -24px #6d4bffaa; }
.plan-card .tag-top { position: absolute; top: -10px; right: 16px; }
.plan-card h3 { font-size: 15px; }
.plan-card .price { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.plan-card .price small { font-size: 13px; color: var(--muted); font-weight: 400; }
.plan-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.plan-card li { display: flex; gap: 8px; align-items: center; }
.plan-card li .ic { color: var(--green); }
.plan-card .btn { margin-top: auto; }
.cc { position: relative; aspect-ratio: 1.6; max-width: 320px; border-radius: 14px; padding: 18px 20px; color: #fff; background: radial-gradient(140% 120% at 100% 0%, #4c3fe0, #1a3fb8 45%, #0b1f5c); box-shadow: 0 20px 40px -20px #1a3fb8; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.cc::after { content: ""; position: absolute; width: 220px; height: 220px; right: -70px; bottom: -110px; border-radius: 50%; background: #ffffff12; }
.cc .num { font-size: 17px; letter-spacing: 2.5px; font-weight: 600; }
.cc .row { display: flex; justify-content: space-between; font-size: 11px; opacity: .9; }
.cc .chip-ic { width: 36px; height: 26px; border-radius: 5px; background: linear-gradient(135deg, #ffd56b, #c8961e); }
.usage { display: flex; flex-direction: column; gap: 14px; }
.usage-row .lbl { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; color: var(--text-2); }
.usage-row .lbl b { color: #fff; font-weight: 600; }
.settings-app { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px; position: sticky; top: 84px; }
.settings-nav button { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 9px 10px; border-radius: 6px; color: var(--text-2); text-align: left; font-weight: 500; }
.settings-nav button:hover { background: #0e2445; color: #fff; }
.settings-nav button.active { background: #12305a; color: #fff; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row b { display: block; font-weight: 600; font-size: 13px; }
.set-row span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.integ-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.integ { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 10px; border: 1px solid #1a3a62; background: #0b1c35; }
.integ .ih { display: flex; gap: 10px; align-items: center; }
.integ .ih b { display: block; font-size: 13px; }
.integ p { color: var(--muted); font-size: 12px; flex: 1; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: #06122a; border: 1px solid #1d3b62; border-radius: 6px; padding: 8px 10px; color: #a9c7ff; }
.profile-head { display: flex; gap: 14px; align-items: center; }
.profile-head h3 { font-size: 18px; }
.profile-head p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.stat-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.stat-mini > div { padding: 10px; border-radius: 8px; background: #0d213f; border: 1px solid #183659; }
.stat-mini span { display: block; font-size: 11px; color: var(--muted); }
.stat-mini b { font-size: 17px; }
.heat { display: grid; grid-template-columns: 70px repeat(12, 1fr); gap: 3px; font-size: 10.5px; color: var(--muted); align-items: center; }
.heat i { aspect-ratio: 1.6; border-radius: 3px; background: rgba(26, 109, 255, var(--a)); }
.heat .hl { text-align: center; }
.leader { display: flex; flex-direction: column; gap: 10px; }
.leader > div { display: grid; grid-template-columns: 18px auto 1fr auto; gap: 10px; align-items: center; font-size: 12px; }
.leader .rank { color: var(--dim); font-weight: 700; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1500px) {
  .dash .bottom-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash .bottom-grid .assistant { grid-column: span 1; }
  .chat-app { grid-template-columns: 240px minmax(0, 1fr); }
  .chat-app .ctx { display: none; }
  .ats-app { grid-template-columns: 340px minmax(0, 1fr); }
  .ats-app .ats-side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
}
@media (max-width: 1360px) {
  .dash .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash .top-grid { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(min(var(--n, 4), 4), minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 240px; transform: translateX(-100%); transition: transform .22s ease; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open #nav-scrim { display: block; position: fixed; inset: 0; background: #000a; z-index: 25; }
  .nav-toggle { display: inline-grid; }
  .grid-main, .grid-2, .ats-app, .settings-app { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .dash .bottom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; }
  .settings-nav button { white-space: nowrap; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .topbar { padding: 0 16px; gap: 10px; height: 62px; }
  .search kbd, .me-text, .me > .ic { display: none; }
  .header-actions { gap: 6px; }
  .content { padding: 6px 16px 8px; }
  .dash .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .kpi .spark { display: none; }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage .arrow { display: none; }
  .upload-grid, .dash .bottom-grid, .grid-3, .form-grid, .chat-app { grid-template-columns: minmax(0, 1fr); }
  .chat-app .conv-panel { display: none; }
  .cand-tools { flex-wrap: wrap; }
  .panel-title { flex-wrap: wrap; }
  .match-row { grid-template-columns: 26px minmax(0, 1fr) auto 54px; }
  .match-row .tag:not(.visa) { display: none; }
  .composer .quick { grid-template-columns: 1fr 1fr; }
  .app-foot { flex-direction: column; gap: 4px; }
  .f-row { grid-template-columns: 90px 1fr 46px; }
  .f-row em { display: none; }
  .paper { padding: 22px 18px; }
  .kv { grid-template-columns: 110px 1fr; }
}

/* ---------- misc states ---------- */
.chip.sel, .cat-card.sel { border-color: var(--blue-2); background: #13325e; color: #fff; }
.cat-card { color: inherit; font: inherit; }
.cat-card:hover { border-color: #2b5285; }
.legend li[data-visa]:hover span { color: #fff; }
.paper.modern h4 { color: #0f766e; border-color: #ccfbf1; }
.paper.modern h1 { color: #0f766e; }

@media print {
  body { background: #fff; }
  .sidebar, .topbar, .app-foot, .page-head, #toasts, #overlay-root, .ats-app > .stack:not(:nth-child(2)), .ats-app .stack > div:first-child { display: none !important; }
  .app-shell { display: block; background: none; }
  .ats-app { display: block; }
  .paper { box-shadow: none; padding: 0; min-height: 0; }
  body:not([data-page="ats"]) .content { display: block; }
}

.topbar .nav-toggle { display: none; }
@media (max-width: 1100px) { .topbar .nav-toggle { display: inline-grid; } }

/* ---------- fit refinements ---------- */
.sidebar nav a { white-space: nowrap; font-size: 13px; gap: 12px; }
.stage { padding: 10px 7px 10px 10px; }
.stage > span { font-size: 10.8px; overflow: visible; text-overflow: clip; white-space: nowrap; letter-spacing: -.1px; }
.dash-table .dt-head > span { white-space: nowrap; }
.dash-table .badge { padding: 3px 8px; }
.dash-table .dt-row > span { overflow: visible; }
.dash .col > .candidates-panel, .dash .col > .matching-panel { flex: 1; }
.donut-c svg { width: 18px; height: 18px; }
.panel.sm .panel-title h2 { white-space: nowrap; font-size: 12.5px; }
.panel.sm .panel-title { flex-wrap: nowrap; gap: 6px; }
.inv { grid-template-columns: 13px auto 1fr auto; gap: 4px; font-size: 9px; white-space: nowrap; }
.inv-box { padding: 7px 6px; }
.pay-body { grid-template-columns: .92fr 1.08fr; }
.job-type .head b { white-space: nowrap; font-size: 10px; }
.job-type .chips2 em { font-size: 8.5px; text-overflow: clip; padding: 3px 2px; }
.an-grid .legend li { white-space: nowrap; font-size: 8.5px; }
.an-grid .donut { --s: 50px !important; }
.an-grid .sub-box > span, .sub-box .row-head { white-space: nowrap; }
.chat-bubble { max-height: 96px; }
.mini-kpis span { white-space: nowrap; }
.dash .bottom-grid .panel { overflow: hidden; }
.job-types > *, .mini-kpis > *, .pay-body > *, .an-grid > *, .upload-grid > * { min-width: 0; }
.sub-box .row-head { gap: 4px; }
.candidates-panel { display: flex; flex-direction: column; }
#dash-table { flex: 1; display: flex; }
#dash-table .dt, #dash-table .dt-scroll { flex: 1; display: flex; flex-direction: column; }
#dash-table .dt-inner { flex: 1; display: flex; flex-direction: column; }
#dash-table .dt-row:not(.dt-head) { flex: 1; }
@media (max-width: 1700px) and (min-width: 1501px) {
  .dash .bottom-grid { gap: 7px; }
  .dash .bottom-grid .panel { padding: 9px 8px; }
  .job-type { padding: 8px 6px 7px; }
  .job-type .head { gap: 5px; }
  .job-type .head > i { width: 24px; height: 24px; }
  .job-type .head b { font-size: 9px; }
  .job-type .chips2 { gap: 3px; }
  .job-type .chips2 em { font-size: 7.5px; }
  .mini-kpis span { font-size: 9.2px; }
  .mini-kpis > div { padding: 7px 6px; }
  .plan-box .plan-name { font-size: 12px; gap: 5px; }
  .plan-box .btn { font-size: 9.5px; padding: 0 4px; }
  .inv { font-size: 8.2px; gap: 3px; }
  .inv em { font-size: 8.2px; padding: 1px 3px; }
  .an-grid .legend li { font-size: 7.8px; }
  .an-grid .donut { --s: 44px !important; }
  .sub-box .row-head { font-size: 9.5px; }
}
.k-meta .score { width: 120px; max-width: none; }
.toolbar .field-search { min-width: 260px; }

/* ---------- auth & portals ---------- */
[hidden] { display: none !important; }
body.locked .app-shell { display: none; }
body:not(.locked) #auth-root { display: none; }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px; background: radial-gradient(900px 500px at 50% -10%, #0f2a52 0, transparent 60%), linear-gradient(160deg, #051630, var(--bg) 60%); }
.auth-card { width: min(440px, 100%); padding: 30px 28px 26px; border-radius: 14px; border: 1px solid #1f3d63; background: linear-gradient(180deg, #0c1f3a, #0a172d); box-shadow: 0 30px 80px -30px #000; }
.auth-logo { display: block; width: 150px; margin: 0 auto 22px; }
.auth-card h1 { font-size: 21px; font-weight: 700; text-align: center; }
.auth-card .sub { color: var(--muted); text-align: center; margin: 6px 0 18px; line-height: 1.5; }
.auth-msg:empty { display: none; }
.auth-msg { padding: 10px 12px; border-radius: 8px; font-size: 12.5px; margin-bottom: 14px; background: #3a1222; border: 1px solid #6b2045; color: #ffb3c7; }
.auth-msg.info { background: #0f2a52; border-color: #23487a; color: #cfe0ff; }
.auth-note { margin-top: 16px; font-size: 11.5px; color: var(--dim); text-align: center; }
.auth-note code { color: var(--blue-3); }
.auth-foot { color: var(--dim); font-size: 11.5px; }
.demo-roles { display: flex; flex-direction: column; gap: 8px; }
.demo-roles button { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; border: 1px solid #1f3d63; background: #0b1c36; text-align: left; transition: border-color .15s, background .15s; }
.demo-roles button > .ic:first-child { width: 38px; height: 38px; padding: 9px; border-radius: 9px; background: #14315a; color: #a8c6ff; }
.demo-roles button:hover { border-color: var(--blue-2); background: #0f2547; }
.demo-roles b { display: block; font-size: 13.5px; }
.demo-roles small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.demo-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: #3f300a; border: 1px solid #5f4710; color: #ffcb47; font-size: 11px; font-weight: 600; white-space: nowrap; }
@media (max-width: 760px) { .demo-pill { display: none; } }
.match-row { grid-template-columns: 26px minmax(0, 1.6fr) auto minmax(0, .9fr) 64px 50px; gap: 8px; }
@media (max-width: 760px) { .match-row { grid-template-columns: 26px minmax(0, 1fr) auto 50px; } }
@media (max-width: 760px) { .match-row strong { display: none; } }
