/* The Gulf Awards OS — "night command" theme.
   Deep space navy, glass panels with luminous edges, violet/blue light, Gulf gold for decisions.
   One hero: the 3D agent core. Everything else stays quiet. */
/* Self-hosted fonts (SIL Open Font License): Sora for the interface, Cinzel for the wordmark. */
@font-face { font-family: "Sora"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/sora-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/sora-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/sora-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/sora-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/cinzel-latin-700-normal.woff2") format("woff2"); }
:root {
  --void: #050714;
  --void-2: #0b1030;
  --glass: rgba(22, 28, 66, 0.58);
  --glass-hi: rgba(36, 44, 102, 0.55);
  --glass-lo: rgba(12, 16, 42, 0.62);
  --edge: rgba(150, 162, 255, 0.16);
  --edge-hi: rgba(170, 182, 255, 0.34);
  --text: #eaedff;
  --soft: #c3c9ef;
  --muted: #8a92c2;
  --violet: #7c5cff;
  --violet-hi: #9d86ff;
  --blue: #3d8bff;
  --cyan: #45e3f7;
  --gold: #e6bd5f;
  --gold-deep: #b98a3c;
  --good: #3fe0a2;
  --warn: #ffc56b;
  --bad: #ff5c7a;
  --r-xl: 24px;
  --r-l: 18px;
  --r-m: 13px;
  --r-s: 9px;
  --font: "Sora", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --brand: "Cinzel", "Times New Roman", serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(1100px 650px at 12% -8%, rgba(124, 92, 255, 0.24), transparent 62%),
    radial-gradient(900px 620px at 108% 6%, rgba(61, 139, 255, 0.2), transparent 60%),
    radial-gradient(900px 520px at 50% 118%, rgba(69, 227, 247, 0.09), transparent 62%),
    var(--void);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
/* faint holographic grid + stars, static */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(1px 1px at 72% 12%, rgba(255, 255, 255, 0.45), transparent 60%),
    radial-gradient(1px 1px at 38% 66%, rgba(255, 255, 255, 0.35), transparent 60%),
    radial-gradient(1px 1px at 86% 54%, rgba(255, 255, 255, 0.4), transparent 60%),
    radial-gradient(1px 1px at 22% 88%, rgba(255, 255, 255, 0.3), transparent 60%),
    linear-gradient(rgba(124, 92, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 92, 255, 0.07) 1px, transparent 1px);
  background-size: auto, auto, auto, auto, auto, 56px 56px, 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.25) 55%, rgba(0, 0, 0, 0.75));
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.25) 55%, rgba(0, 0, 0, 0.75));
}
#app { position: relative; z-index: 1; }
a { color: var(--violet-hi); text-decoration: none; }
a:hover { color: #c4b8ff; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }

/* ---------- glass ---------- */
.card, .list, .tile, .panel, .mail, .banner, .login .box {
  background: linear-gradient(180deg, var(--glass-hi), var(--glass-lo));
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 50px rgba(2, 4, 20, 0.45);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(6, 9, 28, 0.62);
  border-bottom: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand .wm { font-family: var(--brand); font-weight: 700; letter-spacing: 0.12em; font-size: 15px; color: #f3e6c4; }
.brand .os {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: #1a1205;
  background: linear-gradient(135deg, #f6dc94, var(--gold)); border-radius: 999px; padding: 2px 9px;
  box-shadow: 0 0 18px rgba(230, 189, 95, 0.45);
}
.top .spacer { flex: 1; }
.mode-pill {
  display: none; align-items: center; gap: 8px; font-size: 12px; color: var(--soft);
  padding: 5px 12px; border: 1px solid var(--edge); border-radius: 999px; background: rgba(124, 92, 255, 0.1);
}
.mode-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good); }
.mode-pill i.off { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
@media (min-width: 760px) { .mode-pill { display: inline-flex; } }
.top .who { font-size: 12px; color: var(--muted); }
.top button { background: transparent; border: 1px solid var(--edge-hi); color: var(--soft); border-radius: 999px; padding: 5px 12px; font-size: 12px; cursor: pointer; white-space: nowrap; }
@media (max-width: 479px) { .top .who { display: none; } .brand .wm { font-size: 13px; letter-spacing: 0.1em; } }
.top button:hover { border-color: var(--violet-hi); color: #fff; }

/* ---------- layout ---------- */
.shell { display: flex; min-height: calc(100vh - 56px); }
.nav { display: none; }
main { flex: 1; min-width: 0; padding: 18px 16px 104px; width: 100%; max-width: 1480px; margin: 0 auto; }
.tabbar {
  position: fixed; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-radius: 22px; border: 1px solid var(--edge-hi);
  background: rgba(10, 13, 38, 0.78); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(124, 92, 255, 0.08);
}
.tabbar a, .nav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px 8px; color: var(--muted); font-size: 11px; font-weight: 600; }
.tabbar a.on, .nav a.on { color: #fff; }
.tabbar a.on svg { filter: drop-shadow(0 0 8px rgba(157, 134, 255, 0.9)); stroke: var(--violet-hi); }
.tabbar svg, .nav svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.badge { position: absolute; top: 4px; right: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 12px rgba(255, 92, 122, 0.7); }
@media (min-width: 980px) {
  .tabbar { display: none; }
  .nav { display: flex; flex-direction: column; gap: 4px; width: 220px; padding: 18px 12px; border-right: 1px solid var(--edge); background: rgba(6, 9, 28, 0.35); position: sticky; top: 56px; height: calc(100vh - 56px); }
  .nav a { flex-direction: row; justify-content: flex-start; gap: 12px; font-size: 14px; padding: 10px 12px; border-radius: 12px; }
  .nav a:hover { background: rgba(124, 92, 255, 0.08); color: var(--text); }
  .nav a.on { background: linear-gradient(90deg, rgba(124, 92, 255, 0.28), rgba(61, 139, 255, 0.08)); box-shadow: inset 0 0 0 1px rgba(157, 134, 255, 0.35); }
  .nav a.on svg { stroke: var(--violet-hi); filter: drop-shadow(0 0 6px rgba(157, 134, 255, 0.8)); }
  .nav .badge { position: static; margin-left: auto; }
  main { padding: 24px 28px 48px; }
}

/* ---------- type ---------- */
h1 { font-size: 26px; font-weight: 700; margin: 2px 0 16px; letter-spacing: -0.015em; color: #fff; }
h1 small, .sub { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
h2 { font-size: 15px; font-weight: 600; color: var(--soft); margin: 24px 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.pre { white-space: pre-wrap; word-break: break-word; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- cards & lists ---------- */
.card { border-radius: var(--r-l); padding: 16px 18px; margin: 0 0 14px; }
.card.tight { padding: 11px 15px; }
.list { border-radius: var(--r-l); overflow: hidden; }
.row { display: block; padding: 13px 16px; border-bottom: 1px solid var(--edge); color: inherit; }
.row:last-child { border-bottom: 0; }
a.row:hover { background: rgba(124, 92, 255, 0.08); color: inherit; }
.row .t { font-weight: 600; color: #fff; }
.row .s { color: var(--soft); font-size: 13px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row .meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 5px; font-size: 12px; color: var(--muted); }
.empty { padding: 26px 16px; text-align: center; color: var(--muted); }

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 10px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(5, 1fr); } }
.tile { border-radius: var(--r-l); padding: 14px 16px; color: inherit; display: block; }
.tile .n { font-size: 28px; font-weight: 700; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; }
.tile .l { font-size: 12px; color: var(--muted); font-weight: 500; }
.tile.hot { border-color: rgba(230, 189, 95, 0.55); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 26px rgba(230, 189, 95, 0.16); }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 600; white-space: nowrap; color: var(--soft); background: rgba(150, 162, 255, 0.1); border: 1px solid var(--edge); }
.chip:first-letter { text-transform: uppercase; }
.chip.gold { color: #ffe3a1; background: rgba(230, 189, 95, 0.12); border-color: rgba(230, 189, 95, 0.4); }
.chip.ok { color: #9ff3cf; background: rgba(63, 224, 162, 0.1); border-color: rgba(63, 224, 162, 0.35); }
.chip.warn { color: #ffe0ad; background: rgba(255, 197, 107, 0.1); border-color: rgba(255, 197, 107, 0.35); }
.chip.bad { color: #ffb3c1; background: rgba(255, 92, 122, 0.12); border-color: rgba(255, 92, 122, 0.4); }
.chip.info { color: #b8d4ff; background: rgba(61, 139, 255, 0.12); border-color: rgba(61, 139, 255, 0.38); }
.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: none; }
.filters button { flex: none; border: 1px solid var(--edge); background: rgba(20, 26, 62, 0.6); border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.filters button:hover { color: var(--text); border-color: var(--edge-hi); }
.filters button.on { color: #fff; border-color: rgba(157, 134, 255, 0.6); background: linear-gradient(135deg, rgba(124, 92, 255, 0.45), rgba(61, 139, 255, 0.25)); box-shadow: 0 0 18px rgba(124, 92, 255, 0.35); }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 9px 17px; border-radius: 999px; border: 1px solid rgba(157, 134, 255, 0.6); background: linear-gradient(135deg, #6a4dff, #3d7bff); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; box-shadow: 0 6px 22px rgba(92, 70, 255, 0.35); }
.btn:hover { filter: brightness(1.1); }
.btn.gold { color: #1b1205; border-color: rgba(246, 220, 148, 0.8); background: linear-gradient(135deg, #f8e1a0, var(--gold) 55%, #cf9d3e); box-shadow: 0 6px 24px rgba(230, 189, 95, 0.35); }
.btn.ghost { background: rgba(20, 26, 62, 0.6); border-color: var(--edge-hi); color: var(--text); box-shadow: none; }
.btn.danger { background: transparent; border-color: rgba(255, 92, 122, 0.5); color: #ffb3c1; box-shadow: none; }
.btn.sm { min-height: 32px; padding: 5px 13px; font-size: 13px; }
.btn[disabled] { opacity: 0.5; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
label.f { display: block; margin: 10px 0; font-size: 13px; font-weight: 600; color: var(--soft); }
label.f small { display: block; font-weight: 400; color: var(--muted); margin-top: 3px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=time], select, textarea {
  width: 100%; margin-top: 5px; padding: 10px 13px; border-radius: 12px; border: 1px solid var(--edge-hi);
  background: rgba(6, 9, 30, 0.65); color: var(--text); font-size: 15px;
}
select option { background: #0b1030; }
textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #5f6796; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet-hi); box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.25); }
input[type=checkbox] { accent-color: var(--violet); width: 16px; height: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.search { position: sticky; top: 56px; z-index: 5; padding: 4px 0 8px; }

/* ---------- banners ---------- */
.banner { border-radius: var(--r-m); padding: 11px 15px; margin: 0 0 12px; font-size: 14px; }
.banner.warn { border-color: rgba(255, 197, 107, 0.4); color: #ffe0ad; }
.banner.bad { border-color: rgba(255, 92, 122, 0.45); color: #ffc1cc; }
.banner.info { border-color: rgba(61, 139, 255, 0.4); color: #cfe0ff; }
.banner.ok { border-color: rgba(63, 224, 162, 0.4); color: #b5f5da; }
.banner b { color: #fff; }

/* ---------- email preview ---------- */
.mail { border-radius: var(--r-m); }
.mail .hd { padding: 11px 14px; border-bottom: 1px solid var(--edge); font-size: 13px; color: var(--soft); }
.mail .hd b { color: #fff; font-weight: 600; }
.mail .bd { padding: 14px; white-space: pre-wrap; word-break: break-word; font-size: 14px; color: var(--text); }
.mail img { display: block; max-width: 100%; border-radius: 10px; margin: 10px 0; border: 1px solid var(--edge); }
.warns { margin: 10px 0 0; padding: 0; list-style: none; }
.warns li { font-size: 13px; color: var(--warn); padding-left: 18px; position: relative; }
.warns li::before { content: "!"; position: absolute; left: 4px; font-weight: 800; }

/* ---------- kv & timeline ---------- */
.kv { display: grid; grid-template-columns: 124px 1fr; gap: 7px 12px; font-size: 14px; }
.kv dt { color: var(--muted); font-size: 12px; padding-top: 2px; }
.kv dd { margin: 0; word-break: break-word; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 13px 20px; font-size: 13.5px; color: var(--soft); }
.tl li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--violet-hi); box-shadow: 0 0 10px var(--violet); }
.tl li::after { content: ""; position: absolute; left: 7.5px; top: 18px; bottom: 0; width: 1px; background: var(--edge); }
.tl li:last-child::after { display: none; }
.tl .when { font-size: 11px; color: var(--muted); }

/* ---------- insights table ---------- */
.bars { width: 100%; border-collapse: collapse; font-size: 13px; }
.bars th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 600; padding: 6px 4px; }
.bars td { padding: 8px 4px; border-top: 1px solid var(--edge); vertical-align: middle; }
.bars td.num { text-align: right; white-space: nowrap; }
.bar { height: 8px; border-radius: 4px; background: rgba(150, 162, 255, 0.1); overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--violet), var(--cyan)); box-shadow: 0 0 12px rgba(124, 92, 255, 0.7); }

/* ---------- markdown ---------- */
.md h2, .md h3, .md h4 { color: #fff; margin: 18px 0 8px; }
.md h2 { font-size: 19px; } .md h3 { font-size: 15.5px; } .md h4 { font-size: 14px; }
.md p, .md li { color: var(--soft); }
.md ul { padding-left: 20px; } .md li { margin: 4px 0; }
.md b { color: #fff; }
.md code { background: rgba(124, 92, 255, 0.15); padding: 1px 5px; border-radius: 5px; font-size: 13px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login .box { width: 100%; max-width: 390px; border-radius: 26px; padding: 30px 24px; border-color: var(--edge-hi); }
.login .mark { text-align: center; margin-bottom: 22px; }
.login .mark .w { font-family: var(--brand); font-weight: 700; letter-spacing: 0.14em; font-size: 19px; color: #f3e6c4; }
.login .mark .ln { width: 54px; height: 2px; margin: 12px auto; background: linear-gradient(90deg, transparent, var(--gold), transparent); box-shadow: 0 0 12px var(--gold); }
.login .mark .t { font-size: 13px; color: var(--muted); }

/* ---------- toast & misc ---------- */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 60; max-width: 92vw; text-align: center; padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #fff; background: rgba(32, 30, 92, 0.92); border: 1px solid rgba(157, 134, 255, 0.55); box-shadow: 0 0 30px rgba(124, 92, 255, 0.45); }
.toast.bad { background: rgba(92, 20, 40, 0.92); border-color: rgba(255, 92, 122, 0.6); box-shadow: 0 0 30px rgba(255, 92, 122, 0.35); }
@media (min-width: 980px) { .toast { bottom: 28px; } }
.spin { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(150, 162, 255, 0.25); border-top-color: var(--violet-hi); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 50px; text-align: center; }
details summary { cursor: pointer; font-weight: 600; color: var(--soft); }
hr { border: 0; border-top: 1px solid var(--edge); margin: 16px 0; }

/* ======================================================================
   Command centre (home)
   ====================================================================== */
.cc { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "core" "needs" "chart" "resp" "week" "insight" "pipe"; }
.cc > * { min-width: 0; }
.a-core { grid-area: core; } .a-needs { grid-area: needs; } .a-chart { grid-area: chart; } .a-resp { grid-area: resp; }
.a-week { grid-area: week; } .a-insight { grid-area: insight; } .a-pipe { grid-area: pipe; }
@media (min-width: 760px) {
  .cc { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "core core" "needs chart" "resp week" "insight pipe"; align-items: start; }
}
/* side columns: invisible wrappers on small screens (children join the grid), real columns on wide screens */
.col { display: contents; }
@media (min-width: 1400px) {
  .cc { grid-template-columns: 310px minmax(0, 1fr) 310px; grid-template-areas: "left core right"; }
  .col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .col-l { grid-area: left; } .col-r { grid-area: right; }
  .a-core { position: sticky; top: 76px; }
}
.panel { border-radius: var(--r-xl); padding: 16px 18px; }
.panel h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--soft); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel h3 a { font-size: 12px; font-weight: 500; }

/* KPI strip inside the chart panel */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.kpi .n { font-size: 24px; font-weight: 700; color: #fff; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 11.5px; color: var(--muted); }
.kpi .d { font-size: 11.5px; color: var(--good); }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .ln-sent { filter: drop-shadow(0 0 6px rgba(124, 92, 255, 0.9)); }
.chart .ln-rep { filter: drop-shadow(0 0 6px rgba(69, 227, 247, 0.9)); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* donut */
.donut { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; }
.donut svg { width: 120px; height: 120px; display: block; }
.donut svg circle.seg { filter: drop-shadow(0 0 5px rgba(124, 92, 255, 0.55)); }
.donut ul { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.donut li { display: flex; align-items: center; gap: 8px; padding: 3px 0; color: var(--soft); }
.donut li i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.donut li b { margin-left: auto; color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }

/* needs-you list */
.need { display: flex; gap: 12px; align-items: flex-start; padding: 11px 2px; border-top: 1px solid var(--edge); color: inherit; }
.need:first-of-type { border-top: 0; }
.need .ic { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(124, 92, 255, 0.16); border: 1px solid rgba(157, 134, 255, 0.35); }
.need .ic svg { width: 18px; height: 18px; stroke: var(--violet-hi); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.need .ic.gold { background: rgba(230, 189, 95, 0.12); border-color: rgba(230, 189, 95, 0.45); }
.need .ic.gold svg { stroke: var(--gold); }
.need .t { font-weight: 600; color: #fff; font-size: 14px; }
.need .s { font-size: 12.5px; color: var(--soft); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
a.need:hover .t { color: var(--violet-hi); }

/* week strip */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 10px; }
.day { text-align: center; padding: 7px 0 8px; border-radius: 12px; border: 1px solid var(--edge); background: rgba(10, 14, 40, 0.5); }
.day .w { font-size: 10.5px; color: var(--muted); }
.day .d { font-size: 15px; font-weight: 700; color: #fff; }
.day .dots { height: 6px; display: flex; gap: 3px; justify-content: center; margin-top: 3px; }
.day .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.day.today { border-color: rgba(157, 134, 255, 0.7); background: linear-gradient(180deg, rgba(124, 92, 255, 0.45), rgba(61, 139, 255, 0.18)); box-shadow: 0 0 18px rgba(124, 92, 255, 0.4); }
.ev { display: flex; gap: 11px; align-items: center; padding: 9px 2px; border-top: 1px solid var(--edge); color: inherit; }
.ev .dt { flex: none; width: 44px; text-align: center; border-radius: 10px; padding: 4px 0; background: rgba(124, 92, 255, 0.14); border: 1px solid rgba(157, 134, 255, 0.3); }
.ev .dt b { display: block; font-size: 15px; color: #fff; line-height: 1.1; }
.ev .dt span { font-size: 10px; color: var(--muted); }
.ev .t { font-size: 13.5px; font-weight: 600; color: #fff; line-height: 1.3; }
.ev .s { font-size: 12px; color: var(--muted); }

/* insights */
.ins { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--edge); font-size: 13.5px; color: var(--soft); }
.ins:first-of-type { border-top: 0; }
.ins i { flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 10px var(--blue); }
.ins.good i { background: var(--good); box-shadow: 0 0 10px var(--good); }
.ins.watch i { background: var(--warn); box-shadow: 0 0 10px var(--warn); }

/* pipeline tiles */
.pipe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pt { border-radius: 14px; padding: 10px 6px 9px; text-align: center; border: 1px solid var(--edge); background: rgba(10, 14, 40, 0.5); color: inherit; }
.pt:hover { border-color: var(--edge-hi); color: inherit; }
.pt .n { font-size: 20px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.pt .l { font-size: 11px; color: var(--muted); }
.pt.talking .n, .pt.quoted .n { color: #ffe3a1; text-shadow: 0 0 14px rgba(230, 189, 95, 0.6); }
.pt.won .n { color: #9ff3cf; text-shadow: 0 0 14px rgba(63, 224, 162, 0.6); }

/* ---------- the agent core ---------- */
.core {
  position: relative; height: 470px; border-radius: 30px; overflow: hidden;
  background:
    radial-gradient(60% 55% at 50% 52%, rgba(124, 92, 255, 0.22), transparent 70%),
    linear-gradient(180deg, rgba(20, 24, 64, 0.55), rgba(8, 10, 32, 0.4));
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 30px 80px rgba(2, 4, 20, 0.55);
}
@media (min-width: 760px) { .core { height: 540px; } }
@media (min-width: 1400px) { .core { height: calc(100vh - 120px); min-height: 620px; max-height: 860px; } }
.core canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.core-head { position: absolute; top: 18px; left: 0; right: 0; text-align: center; z-index: 2; pointer-events: none; }
.core-head .nm { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: -0.01em; text-shadow: 0 0 24px rgba(124, 92, 255, 0.8); }
.core-head .md { font-size: 12px; color: var(--muted); margin-top: 2px; }
.core-head .st { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 11.5px; font-weight: 600; color: #b5f5da; padding: 3px 11px; border-radius: 999px; border: 1px solid rgba(63, 224, 162, 0.4); background: rgba(63, 224, 162, 0.08); }
.core-head .st i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good); animation: blink 2.4s ease-in-out infinite; }
.core-head .st.off { color: #ffe0ad; border-color: rgba(255, 197, 107, 0.45); background: rgba(255, 197, 107, 0.08); }
.core-head .st.off i { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
@keyframes blink { 50% { opacity: 0.35; } }
.node { position: absolute; z-index: 3; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 5px; width: 88px; text-align: center; color: inherit; }
.node .orb {
  position: relative; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(170, 150, 255, 0.5), rgba(40, 34, 110, 0.85) 60%, rgba(14, 16, 48, 0.95));
  border: 1px solid rgba(170, 182, 255, 0.45);
  box-shadow: 0 0 22px rgba(124, 92, 255, 0.45), inset 0 0 12px rgba(157, 134, 255, 0.35);
}
.node .orb svg { width: 21px; height: 21px; stroke: #e6e2ff; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.node .cnt { position: absolute; top: -6px; right: -10px; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 11px; font-weight: 700; display: grid; place-items: center; color: #fff; background: rgba(61, 139, 255, 0.85); box-shadow: 0 0 12px rgba(61, 139, 255, 0.8); }
.node .cnt.hot { color: #1b1205; background: var(--gold); box-shadow: 0 0 14px rgba(230, 189, 95, 0.9); }
.node .lb { font-size: 12px; font-weight: 600; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); }
.node .hn { font-size: 10.5px; color: var(--muted); line-height: 1.25; }
.node:hover .orb { border-color: var(--cyan); box-shadow: 0 0 30px rgba(69, 227, 247, 0.6), inset 0 0 14px rgba(69, 227, 247, 0.35); }
.think {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 3; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 999px;
  font-size: 12.5px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(10, 12, 40, 0.75); border: 1px solid rgba(157, 134, 255, 0.4);
  box-shadow: 0 0 26px rgba(124, 92, 255, 0.35); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.think .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); flex: none; }
.think.busy .dot { animation: blink 1s ease-in-out infinite; }
.think span { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 759px) {
  .core { height: 480px; }
  .node { width: 74px; }
  .node .orb { width: 42px; height: 42px; }
  .node .orb svg { width: 18px; height: 18px; }
  .node .hn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .core-head .st i, .think.busy .dot, .spin { animation: none; }
}
