@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=DM+Mono:wght@400;500&display=swap');
:root {
  --blue-900: #0b2e59;
  --blue-700: #005cb9;
  --blue-100: #e3edf9;
  --orange: #f38b00;
  --green: #1a7f37;
  --red: #c0392b;
  --amber: #b7791f;
  --ink: #1d2733;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f4f7fb;
  --card: #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

#app { display: flex; min-height: 100vh; }

/* ---- sidebar ---- */
#sidebar {
  width: 220px; flex: none;
  background: var(--blue-900); color: #dbe7f5;
  display: flex; flex-direction: column;
  padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--blue-700), var(--orange));
  color: #fff; font-weight: 800; font-size: 18px;
  display: grid; place-items: center;
}
.brand-name { font-weight: 700; color: #fff; }
.brand-name small { display: block; font-weight: 400; font-size: 10px; opacity: .7; }
#sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  text-align: left; padding: 10px 12px; border: 0; border-radius: 8px;
  background: transparent; color: #cddcf0; font-size: 14px; cursor: pointer;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: var(--blue-700); color: #fff; }
.sidebar-foot { margin-top: auto; font-size: 11px; opacity: .55; padding: 0 8px; }

/* ---- main ---- */
#main { flex: 1; min-width: 0; padding: 20px 26px 60px; }
#topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
#view-title { font-size: 22px; margin: 0; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
#period-badge { background: var(--blue-100); color: var(--blue-700); padding: 4px 10px; border-radius: 999px; font-weight: 600; font-size: 12px; }
#sana-btn {
  background: linear-gradient(135deg, var(--blue-700), #3b82f6);
  color: #fff; border: 0; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600;
}
#sana-btn:hover { filter: brightness(1.08); }

/* ---- cards & kpis ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.kpi .label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.kpi .value { font-size: 20px; font-weight: 700; margin-top: 4px; }
.kpi .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.card h3 { margin: 0 0 12px; font-size: 15px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---- tables ---- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
td { padding: 7px 8px; border-bottom: 1px solid #eef2f7; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- badges & pills ---- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge.ok { background: #e6f4ea; color: var(--green); }
.badge.warn { background: #fdf3e0; color: var(--amber); }
.badge.bad { background: #fdecea; color: var(--red); }
.badge.info { background: var(--blue-100); color: var(--blue-700); }
.badge.neutral { background: #eef2f7; color: var(--muted); }

button.action {
  background: var(--blue-700); border: 0; color: #fff; padding: 6px 12px;
  border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600;
}
button.action.secondary { background: #eef2f7; color: var(--ink); }
button.action.danger { background: var(--red); }
button.action:disabled { opacity: .45; cursor: not-allowed; }

/* ---- forms ---- */
form.stack label { display: block; font-size: 12px; font-weight: 600; margin: 10px 0 4px; }
form.stack input, form.stack select, form.stack textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit;
}
.row-inline { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.row-inline > div { flex: 1; min-width: 120px; }

/* ---- progress / meters ---- */
.meter { height: 8px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.meter > div { height: 100%; background: var(--blue-700); border-radius: 999px; }
.checklist li { list-style: none; padding: 8px 0; border-bottom: 1px solid #eef2f7; display: flex; justify-content: space-between; gap: 10px; }
.checklist ul { margin: 0; padding: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot.g { background: var(--green); } .dot.a { background: var(--amber); } .dot.r { background: var(--red); }

/* ---- activity feed ---- */
.feed li { padding: 7px 0; border-bottom: 1px solid #eef2f7; font-size: 13px; }
.feed { margin: 0; padding: 0; }
.feed .when { color: var(--muted); font-size: 11px; }

/* ---- sliders ---- */
.slider-row { margin: 14px 0; }
.slider-row .head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
input[type=range] { width: 100%; accent-color: var(--blue-700); }

/* ---- sana panel ---- */
#sana-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 95vw;
  background: #fff; border-left: 1px solid var(--line); box-shadow: -12px 0 30px rgba(11,46,89,.12);
  display: flex; flex-direction: column; z-index: 50;
}
#sana-panel header { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 8px; }
#sana-close { margin-left: auto; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--muted); }
#sana-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; white-space: pre-wrap; font-size: 13px; }
.msg.user { align-self: flex-end; background: var(--blue-700); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.cites { margin-top: 6px; display: flex; gap: 5px; flex-wrap: wrap; }
.cite { background: #fff; border: 1px solid var(--line); color: var(--blue-700); font-size: 10px; padding: 1px 7px; border-radius: 999px; font-weight: 600; }
#sana-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
#sana-input { flex: 1; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; font: inherit; }
#sana-form button { border: 0; background: var(--blue-700); color: #fff; border-radius: 999px; padding: 0 18px; cursor: pointer; }
#sana-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; }
#sana-suggest button { border: 1px solid var(--line); background: #fff; border-radius: 999px; font-size: 11px; padding: 4px 10px; cursor: pointer; color: var(--blue-700); }

/* ---- toast & modal ---- */
#toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; z-index: 90; font-size: 13px;
}
#toast.err { background: var(--red); }
dialog#modal { border: 0; border-radius: 14px; padding: 22px; width: 520px; max-width: 92vw; box-shadow: 0 24px 70px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(11,46,89,.35); }
.muted { color: var(--muted); font-weight: 400; }
.section-note { font-size: 12px; color: var(--muted); margin: -6px 0 14px; }

/* WorkSmart / NFL dashboard visual system */
:root { --blue-900:#101413; --blue-700:#c8ff38; --blue-100:#202a1d; --orange:#ff6846; --green:#c8ff38; --red:#ff6846; --amber:#f1cb4b; --ink:#f4f1e9; --muted:#a5ada8; --line:#2a312f; --bg:#0a0d0c; --card:#141918; color-scheme:dark; }
body { font-family:'Barlow Condensed',Arial,sans-serif; font-size:16px; }
#sidebar { background:#0e1211; border-right:1px solid var(--line); width:220px; padding:24px 14px; }
.brand { padding-bottom:28px; font-size:21px; letter-spacing:.06em; }
.brand-mark { border-radius:0; background:var(--blue-700); color:#0a0d0c; clip-path:polygon(15% 0,100% 0,85% 100%,0 100%); }
.brand-name small,.sidebar-foot { font:10px/1.6 'DM Mono',monospace; color:#9da69f; letter-spacing:.06em; }
.nav-item { border-radius:0; color:#a8b1aa; font-size:16px; letter-spacing:.03em; border-left:2px solid transparent; }
.nav-item.active { background:#1a2219; color:#f4f1e9; border-left-color:var(--blue-700); }
#main { padding:28px 3vw 60px; }
#topbar { border-bottom:1px solid var(--line); padding-bottom:22px; margin-bottom:26px; }
#view-title { font-size:clamp(36px,4vw,58px); line-height:1; text-transform:uppercase; letter-spacing:-.03em; }
#period-badge { background:transparent; color:#aeb6ae; border:1px solid var(--line); border-radius:0; font:10px 'DM Mono',monospace; }
#sana-btn,button.action,#sana-form button { background:var(--blue-700); color:#0a0d0c; border-radius:0; font-weight:700; }
.kpis { gap:8px; }
.kpi,.card { border-radius:0; background:var(--card); }
.kpi { border-top:2px solid #3b4839; padding:16px; }
.kpi .label,th,.section-note { font-family:'DM Mono',monospace; font-size:10px; letter-spacing:.05em; }
.kpi .value { font-size:28px; }
.card { padding:20px; }
.card h3 { font-size:21px; text-transform:uppercase; letter-spacing:.02em; }
td,.checklist li,.feed li { border-color:var(--line); }
.badge { border-radius:0; }
.badge.ok { background:#23331c; color:#c8ff38; }.badge.warn { background:#352f19; color:#f1cb4b; }.badge.bad { background:#39211c; color:#ff9077; }.badge.info,.badge.neutral { background:#242d28; color:#cbd5cc; }
button.action.secondary { background:#252e29; color:var(--ink); } button.action.danger { color:#fff; }
input,select,textarea { background:#0e1311; color:var(--ink); border:1px solid #3a443e; padding:7px; font:inherit; }
form.stack input,form.stack select,form.stack textarea { border-radius:0; }
.meter { background:#29312c; }.meter > div { background:var(--blue-700); }
#sana-panel,dialog#modal { background:#141918; color:var(--ink); border:1px solid var(--line); border-radius:0; }
#sana-panel[hidden],#toast[hidden] { display:none; }
#sana-form button,#sana-input,#sana-suggest button,.msg { border-radius:0; }
#sana-suggest button,.cite { background:#202821; color:var(--blue-700); border-color:var(--line); }
.msg.user { background:var(--blue-700); color:#0a0d0c; }
button:focus-visible,input:focus-visible,select:focus-visible { outline:2px solid var(--blue-700); outline-offset:2px; }
@media(max-width:760px) { #app { display:block; } #sidebar { width:auto; padding:12px; border-right:0; border-bottom:1px solid var(--line); } .brand { padding-bottom:12px; } #sidebar nav { flex-direction:row; overflow-x:auto; } .nav-item { white-space:nowrap; padding:8px 12px; border-left:0; border-bottom:2px solid transparent; } .nav-item.active { border-bottom-color:var(--blue-700); } .sidebar-foot { display:none; } #main { padding:22px 4vw 50px; } #topbar { align-items:flex-start; gap:12px; flex-direction:column; } .topbar-right { flex-wrap:wrap; } .card { overflow-x:auto; } }

/* BennuForge brand system */
@font-face { font-family:Manrope; src:url('/brand/manrope-400.ttf') format('truetype'); font-weight:400; font-display:swap; }
@font-face { font-family:Manrope; src:url('/brand/manrope-600.ttf') format('truetype'); font-weight:600; font-display:swap; }
@font-face { font-family:Manrope; src:url('/brand/manrope-700.ttf') format('truetype'); font-weight:700; font-display:swap; }
:root { --blue-900:#0c0e12; --blue-700:#68a7ff; --blue-100:#182a43; --green:#76d8b4; --ink:#fff; --muted:#c2c5cb; --line:#30343b; --bg:#050608; --card:#0c0e12; }
body { font-family:Manrope,Arial,sans-serif; font-size:14px; }
[hidden] { display:none !important; }
#sidebar { background:#0c0e12; }
.brand { font-size:17px; letter-spacing:-.04em; }.brand-mark { background:#68a7ff; }
.nav-item { font-size:13px; }.nav-item.active { background:#151e2c; border-left-color:#68a7ff; }
#view-title { font-size:clamp(30px,3.5vw,48px); font-weight:700; }
.kpi { border-top-color:#377dff; }.kpi .value { font-size:24px; }.card h3 { font-size:16px; }
.badge.ok { background:#142d2a; color:#86e4bd; }.badge.info { background:#192b43; color:#a5caff; }
#sana-btn,button.action,#sana-form button,.msg.user { background:#68a7ff; color:#050608; }
#auth-screen { min-height:100vh; display:flex; gap:60px; justify-content:center; align-items:center; padding:48px 6vw; background:radial-gradient(circle at 15% 15%,#172a48,transparent 45%),#050608; }
.auth-copy { width:min(500px,100%); }.auth-copy img { width:165px; max-height:80px; object-fit:contain; object-position:left; }.auth-eyebrow { margin-top:48px; color:#68a7ff; letter-spacing:.14em; font-size:11px; font-weight:700; }.auth-copy h1 { font-size:clamp(42px,6vw,72px); line-height:1; letter-spacing:-.06em; margin:18px 0; }.auth-copy h1 span { color:#68a7ff; }.auth-copy>p:not(.auth-eyebrow) { color:#c2c5cb; font-size:17px; line-height:1.7; }.auth-copy small { color:#aeb7c6; line-height:1.6; } #auth-error { color:#ff9786; }
@media(max-width:760px) { #auth-screen { flex-direction:column; align-items:stretch; gap:30px; padding:32px 6vw; }.auth-eyebrow { margin-top:24px; } #clerk-sign-in { align-self:center; max-width:100%; } .nav-item.active { border-bottom-color:#68a7ff; } }
#organization-setup { min-height:100vh; display:grid; place-items:center; padding:24px; }.setup-card { width:min(520px,100%); padding:32px; border:1px solid var(--line); background:var(--card); }.setup-card h1 { font-size:36px; }.setup-card p { color:var(--muted); line-height:1.7; }.setup-card label,.setup-card input { display:block; width:100%; margin:10px 0; }.setup-card button { margin:8px 4px 0 0; }.member-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:8px 0; border-bottom:1px solid var(--line); }.member-row span { flex:1; overflow-wrap:anywhere; }.member-row select { max-width:120px; } dialog#modal { max-height:90vh; overflow:auto; } #invite-result input { display:block; width:100%; }
.setup-card input[type=checkbox] { display:inline-block; width:auto; margin-right:8px; }
