@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #0b0b14;
  --topbar:  #101022;
  --sidebar: #0e0e1c;
  --col-bg:  #13132a;
  --col-hd:  #1c1c38;
  --card:    #1c1c32;
  --card-in: #161628;
  --b0:      rgba(255,255,255,0.08);
  --b1:      rgba(255,255,255,0.12);
  --b2:      rgba(255,255,255,0.20);
  --b3:      rgba(255,255,255,0.35);
  --text:    #f0eeff;
  --fg:      #f0eeff;
  --sub:     #cccae0;
  --muted:   #a8a8cc;
  --dim:     #7878a8;
  --cyan:    #2B7FFF;
  --c5:      rgba(43,127,255,0.05);
  --c10:     rgba(43,127,255,0.10);
  --cyan-l:  #5BA2FF;
  --accent:  #2B7FFF;
  --accent-h:#4B96FF;
  --accent-l:#5BA2FF;
  --accent-glow: rgba(43,127,255,0.35);
  --bar:     rgba(43,127,255,0.85);
  --bar2:    rgba(43,127,255,0.30);
  --todo-c:  #fbbf24; --todo-bg: rgba(251,191,36,0.10);  --todo-bd: rgba(251,191,36,0.30);
  --ip-c:    #fb923c; --ip-bg:   rgba(251,146,60,0.10);  --ip-bd:   rgba(251,146,60,0.30);
  --done-c:  #22c55e; --done-bg: rgba(34,197,94,0.10);   --done-bd: rgba(34,197,94,0.28);
  --green:   #22c55e;
  --red:     #ef4444;
  --rr:      #ef4444;
  --r: 8px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(ellipse 70% 50% at 85% -5%, rgba(43,127,255,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 5% 100%, rgba(91,162,255,0.04) 0%, transparent 55%),
    #09090e;
  color: var(--text); font-size: 11px;
  height: 100vh; display: flex; flex-direction: column; overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Utilities ── */
.off { display: none !important; }
.icon    { width: 16px; height: 16px; display: block; flex-shrink: 0; }
.icon-sm { width: 14px; height: 14px; display: block; flex-shrink: 0; }
.icon-xs { width: 12px; height: 12px; display: block; flex-shrink: 0; }

/* ── Pane animation ── */
.pane:not(.off) { animation: fadeUp 0.22s ease forwards; }

/* ── Badges ── */
.badge { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 8px; border-radius: 20px; border: 1px solid; flex-shrink: 0; white-space: nowrap; }
.b-todo { color: var(--todo-c); background: var(--todo-bg); border-color: var(--todo-bd); }
.b-ip   { color: var(--ip-c);   background: var(--ip-bg);   border-color: var(--ip-bd); }
.b-done { color: var(--done-c); background: var(--done-bg); border-color: var(--done-bd); }
.b-bl   { color: var(--muted);  background: rgba(255,255,255,.04); border-color: var(--b2); }
.b-nc   { color: var(--dim);    background: rgba(255,255,255,.04); border-color: var(--b1); }
.badge-green { background: rgba(34,197,94,.12); color: var(--green); border: 1px solid rgba(34,197,94,.28); }
.badge-grey  { background: rgba(255,255,255,.04); color: var(--muted); border: 1px solid var(--b1); }

/* ── Severity badges ── */
.sev-badge    { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; padding: 2px 8px; border-radius: 20px; border: 1px solid; white-space: nowrap; }
.sev-critical { background: rgba(239,68,68,0.15);   color: #ef4444; border-color: rgba(239,68,68,0.35); }
.sev-high     { background: rgba(251,146,60,0.15);  color: #fb923c; border-color: rgba(251,146,60,0.35); }
.sev-medium   { background: rgba(251,191,36,0.15);  color: #fbbf24; border-color: rgba(251,191,36,0.35); }
.sev-low      { background: rgba(43,127,255,0.12);  color: #5BA2FF; border-color: rgba(43,127,255,0.30); }

/* ── Top bar ── */
.top-bar { height: 52px; background: linear-gradient(90deg, #0d0d1e 0%, #10101e 100%); border-bottom: 1px solid var(--b0); display: flex; align-items: center; flex-shrink: 0; box-shadow: 0 1px 0 rgba(255,255,255,0.04); }
.toggle-btn { width: 56px; height: 52px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border-right: 1px solid var(--b0); cursor: pointer; color: var(--muted); transition: color .15s, background .15s; }
.toggle-btn:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.top-inner { flex: 1; display: flex; align-items: center; padding: 0 20px; gap: 16px; }
.wordmark { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 800; letter-spacing: -.4px; }
.rr { color: var(--red); }
.ch { color: var(--cyan-l); }
.v-sep { width: 1px; height: 24px; background: var(--b1); }
.lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .8px; color: #b0b0d0; font-weight: 600; }
.ml { margin-left: auto; }
.row { display: flex; align-items: center; gap: 8px; }
.field { background: var(--card); color: var(--text); border: 1px solid var(--b1); border-radius: var(--r); padding: 6px 12px; font-size: 11px; font-family: inherit; cursor: pointer; outline: none; font-weight: 500; }

/* ── Buttons ── */
.btn-ghost { background: transparent; border: 1px solid var(--b1); color: var(--sub); padding: 6px 14px; border-radius: var(--r); font-size: 11px; font-family: inherit; cursor: pointer; display: flex; align-items: center; gap: 6px; font-weight: 500; transition: all .12s; }
.btn-ghost:hover { border-color: var(--b2); color: var(--text); background: rgba(255,255,255,0.03); }
.btn-primary { background: var(--accent); color: #fff; border: none; padding: 6px 16px; border-radius: var(--r); font-size: 11px; font-weight: 700; font-family: inherit; cursor: pointer; display: flex; align-items: center; gap: 6px; box-shadow: 0 2px 12px rgba(43,127,255,.30); transition: opacity .12s, box-shadow .12s; }
.btn-primary:hover { opacity: .88; box-shadow: 0 4px 20px rgba(43,127,255,.45); }
.btn-add { background: transparent; border: 1px solid rgba(43,127,255,.30); color: var(--cyan-l); padding: 4px 10px; border-radius: 6px; font-size: 9px; font-weight: 700; font-family: inherit; cursor: pointer; white-space: nowrap; display: flex; align-items: center; gap: 4px; transition: all .12s; }
.btn-add:hover { background: rgba(43,127,255,.08); border-color: rgba(43,127,255,.5); }
.btn-setup { background: var(--card); border: 1px solid var(--b1); color: var(--muted); padding: 3px 10px; border-radius: 6px; font-size: 10px; font-weight: 600; font-family: inherit; cursor: pointer; transition: all .12s; }
.btn-setup:hover { color: var(--sub); border-color: var(--b2); }
.admin-chip { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 600; color: var(--sub); background: var(--card); border: 1px solid var(--b1); border-radius: var(--r); padding: 5px 12px; }

/* ── Sidebar ── */
.app-body { display: flex; flex: 1; overflow: hidden; }
.sidebar { width: 210px; background: linear-gradient(180deg, #14142a 0%, #0d0d1c 60%, #0a0a16 100%); border-right: 1px solid rgba(255,255,255,0.10); display: flex; flex-direction: column; padding: 12px 10px 16px; gap: 2px; flex-shrink: 0; overflow: hidden; transition: width .2s ease; border-top: 2px solid var(--accent); }
.sidebar.col { width: 56px; padding: 12px 8px 16px; }
.s-sec { font-size: 9px; text-transform: uppercase; letter-spacing: 1.2px; color: #7070a0; padding: 10px 8px 5px; white-space: nowrap; overflow: hidden; }
.sidebar.col .s-sec { opacity: 0; height: 0; padding: 0; }
.s-item { height: 38px; border-radius: 7px; display: flex; align-items: center; gap: 10px; padding: 0 10px; cursor: pointer; color: #d8d7f0; white-space: nowrap; overflow: hidden; position: relative; transition: background .12s, color .12s; flex-shrink: 0; font-size: 12px; font-weight: 500; }
.s-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.s-item.act { background: rgba(43,127,255,0.14); color: #74b3ff; font-weight: 600; }
.s-item.act::before { content: ''; position: absolute; left: -10px; top: 50%; transform: translateY(-50%); width: 3px; height: 22px; background: var(--accent); border-radius: 0 3px 3px 0; box-shadow: 0 0 10px var(--accent-glow); }
.s-item.fade { color: #8080b0; cursor: default; }
.s-item.fade:hover { background: transparent; color: #8080b0; }
.sidebar.col .s-item { justify-content: center; padding: 0; }
.s-lbl { font-size: 12px; font-weight: inherit; transition: opacity .15s; }
.sidebar.col .s-lbl { opacity: 0; width: 0; overflow: hidden; }
.s-div { height: 1px; background: rgba(255,255,255,0.10); margin: 8px 0; flex-shrink: 0; }
.s-sp  { flex: 1; }

/* ── Main + tabs ── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.pane { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.week-bar { height: 40px; background: var(--topbar); border-bottom: 1px solid var(--b0); padding: 0 22px; display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.wk-note { font-size: 10px; color: #b0b0d0; }
.tabs { background: var(--topbar); border-bottom: 1px solid var(--b0); padding: 0 22px; display: flex; flex-shrink: 0; }
.tab { color: #b0b0d0; font-size: 12px; font-weight: 500; padding: 12px 16px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .12s; white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.tab:hover { color: #e0e0f0; }
.tab.act { color: #74b3ff; border-bottom-color: var(--accent); font-weight: 700; }
.content { flex: 1; overflow-y: auto; padding: 12px 16px; background: transparent; }

/* ── Kanban ── */
.stat-row { padding: 14px 22px; border-bottom: 1px solid var(--b0); display: flex; gap: 10px; background: linear-gradient(90deg, #0d0d1c 0%, #111120 100%); flex-shrink: 0; }
.stat-pill { background: linear-gradient(135deg, #242440 0%, #1c1c36 100%); border: 1px solid var(--b1); border-radius: var(--r); padding: 10px 22px; display: flex; align-items: center; gap: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.stat-n { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.stat-l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.board { display: flex; gap: 14px; padding: 16px 22px; flex: 1; overflow: hidden; }
.col { flex: 1; background: var(--col-bg); border: 1px solid var(--b1); border-radius: var(--r); display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.col-hd { padding: 12px 16px; background: var(--col-hd); border-bottom: 1px solid var(--b1); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; border-radius: var(--r) var(--r) 0 0; }
.col-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.col-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-todo { background: var(--todo-c); } .dot-ip { background: var(--ip-c); } .dot-done { background: var(--done-c); }
.t-todo { color: var(--todo-c); } .t-ip { color: var(--ip-c); } .t-done { color: var(--done-c); }
.col-count { font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 20px; border: 1px solid; }
.col-add-row { padding: 10px 16px; font-size: 11px; font-weight: 700; color: var(--muted); cursor: pointer; border-top: 1px solid var(--b1); background: var(--col-bg); }
.col-add-row:hover { color: var(--sub); background: var(--col-hd); }
.col-add-btn { width: 22px; height: 22px; border-radius: 5px; border: 1.5px solid var(--b2); background: var(--card); color: var(--sub); font-size: 16px; line-height: 1; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; font-family: inherit; transition: all .12s; flex-shrink: 0; }
.col-add-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.task-edit-row { padding: 8px 14px; font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer; border-top: 1px solid var(--b1); background: var(--card-in); }
.task-edit-row:hover { color: var(--sub); background: var(--col-hd); }
.cc-todo { color: var(--todo-c); background: var(--todo-bg); border-color: var(--todo-bd); }
.cc-ip   { color: var(--ip-c);   background: var(--ip-bg);   border-color: var(--ip-bd); }
.cc-done { color: var(--done-c); background: var(--done-bg); border-color: var(--done-bd); }
.col-body { padding: 12px; flex: 1; overflow-y: auto; }
.add-task-btn { width: 100%; padding: 9px; background: transparent; border: 1.5px dashed var(--b2); border-radius: var(--r); color: var(--dim); font-size: 11px; font-family: inherit; cursor: pointer; margin-top: 2px; display: flex; align-items: center; justify-content: center; gap: 6px; transition: all .15s; }
.add-task-btn:hover { border-color: var(--cyan-l); color: var(--cyan-l); }

/* ── Task cards ── */
.task-card { background: linear-gradient(145deg, #24243e 0%, #1c1c34 100%); border: 1px solid var(--b1); border-radius: var(--r); margin-bottom: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.3); transition: border-color .15s; }
.task-card:hover { border-color: var(--b2); }
.task-card.ip-card { border-left: 3px solid var(--ip-c); }
.task-card.done-card { opacity: .45; }
.task-hd { padding: 13px 14px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.task-hd:hover { background: rgba(255,255,255,0.02); }
.chev { color: var(--b3); flex-shrink: 0; transition: color .12s, transform .15s; }
.chev.open { transform: rotate(90deg); color: var(--cyan-l); }
.task-name { flex: 1; font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.3; }
.task-name.done { text-decoration: line-through; color: var(--muted); font-weight: 400; }
.prog-pill { display: flex; align-items: center; gap: 3px; background: rgba(255,255,255,0.04); border: 1px solid var(--b1); border-radius: 20px; padding: 4px 10px; font-size: 10px; font-variant-numeric: tabular-nums; font-weight: 700; flex-shrink: 0; }
.prog-pill .pn { color: var(--cyan-l); } .prog-pill .sep { color: var(--b3); } .prog-pill .tot { color: var(--muted); }
.prog-pill.full .pn { color: var(--done-c); }
.task-body { background: var(--card-in); border-top: 1px solid var(--b0); }

/* ── Subtask categories ── */
.cat-g { border-bottom: 1px solid var(--b0); }
.cat-g:last-child { border-bottom: none; }
.cat-hd { padding: 9px 14px 9px 28px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.cat-hd:hover { background: rgba(255,255,255,0.02); }
.cat-name { flex: 1; font-size: 11px; font-weight: 600; color: var(--sub); }
.cat-prog { font-size: 10px; color: var(--muted); background: rgba(255,255,255,0.04); border: 1px solid var(--b1); padding: 2px 8px; border-radius: 10px; font-variant-numeric: tabular-nums; font-weight: 600; }
.issue-row { padding: 8px 16px 8px 36px; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--b0); }
.issue-row:hover { background: rgba(255,255,255,0.02); }
.issue-row input[type=checkbox] { width: 14px; height: 14px; accent-color: var(--cyan-l); cursor: pointer; flex-shrink: 0; }
.issue-text { font-size: 11px; color: var(--muted); flex: 1; }
.issue-text.done { text-decoration: line-through; color: var(--dim); }

/* ── Work Log table ── */
.wl-hd { padding: 16px 22px; border-bottom: 1px solid var(--b0); display: flex; align-items: center; gap: 14px; flex-shrink: 0; background: linear-gradient(90deg, #0e0e20 0%, #111124 100%); }
.wl-title { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; color: var(--text); }
.wl-sub   { font-size: 11px; color: var(--muted); margin-top: 2px; }
.wl-scroll { flex: 1; overflow-y: auto; }
.wl-table { width: 100%; border-collapse: collapse; }
.wl-table thead th { position: sticky; top: 0; background: #181832; border-bottom: 2px solid rgba(255,255,255,0.12); padding: 8px 12px; text-align: left; font-size: 9px; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; color: #9090c0; white-space: nowrap; }
.wl-table thead th:first-child { width: 30px; }
.wl-tr { cursor: pointer; transition: background .08s; }
.wl-tr:hover { background: rgba(255,255,255,0.02); }
.wl-tr td { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); vertical-align: middle; }
.wl-tr:nth-child(even) td { background: rgba(255,255,255,0.025); }
.wl-tr td:first-child { width: 30px; text-align: center; }
.wl-task-name { font-size: 12px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wl-task-name.done { text-decoration: line-through; font-weight: 400; color: var(--muted); }
.assignee-tag { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; padding: 1px 6px; border-radius: 10px; background: rgba(43,127,255,.12); color: var(--cyan-l); border: 1px solid rgba(43,127,255,.25); flex-shrink: 0; }
.assignee-select { font-size: 9px; font-weight: 600; font-family: inherit; padding: 2px 6px; border-radius: 10px; background: rgba(43,127,255,.08); color: var(--cyan-l); border: 1px solid rgba(43,127,255,.25); cursor: pointer; outline: none; flex-shrink: 0; }
.assignee-select:hover { background: rgba(43,127,255,.15); }
.assignee-label { font-size: 9px; font-weight: 600; padding: 2px 6px; border-radius: 10px; background: rgba(43,127,255,.08); color: var(--cyan-l); border: 1px solid rgba(43,127,255,.25); flex-shrink: 0; }
.filter-btn { background: transparent; border: 1px solid var(--b1); color: var(--muted); padding: 3px 10px; border-radius: 20px; font-size: 10px; font-weight: 600; font-family: inherit; cursor: pointer; transition: all .15s; }
.filter-btn:hover { border-color: var(--cyan-l); color: var(--cyan-l); }
.filter-btn.act { background: rgba(43,127,255,.12); border-color: var(--cyan-l); color: var(--cyan-l); }
.wl-cat-cell  { font-size: 10px; color: var(--muted); white-space: nowrap; }
.wl-prog-cell { font-size: 10px; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); white-space: nowrap; }
.wl-prog-cell .n { color: var(--cyan-l); }
.wl-week-cell { font-size: 10px; color: var(--dim); white-space: nowrap; }
.wl-expand-row td { padding: 0; border-bottom: 1px solid var(--b0); }
.wl-expand-inner { padding: 10px 30px 10px 42px; background: var(--card-in); }
.wl-sub-table { width: 100%; border-collapse: collapse; }
.wl-sub-table th { font-size: 9px; text-transform: uppercase; letter-spacing: .7px; color: var(--dim); font-weight: 700; padding: 4px 10px; text-align: left; border-bottom: 1px solid var(--b0); }
.wl-sub-table td { font-size: 10px; padding: 6px 10px; border-bottom: 1px solid var(--b0); color: var(--muted); }
.wl-sub-table td:first-child { font-weight: 600; color: var(--sub); }
.wl-sub-table tr:last-child td { border-bottom: none; }
.wl-sec-row td { padding: 7px 12px; background: var(--col-bg); border-top: 1px solid var(--b1); border-bottom: 1px solid var(--b1); font-size: 9px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; color: var(--muted); }

/* ── Weekly Stats ── */
.stats-scroll { flex: 1; overflow-y: auto; }
.stats-inner  { padding: 16px 22px; display: flex; flex-direction: column; gap: 14px; }
.eng-wrap { background: var(--card); border: 1px solid var(--b1); border-radius: var(--r); padding: 12px 18px; display: flex; align-items: center; gap: 16px; box-shadow: 0 1px 0 rgba(255,255,255,0.03); }
.eng-bar-track { flex: 1; height: 5px; background: var(--b1); border-radius: 3px; }
.eng-bar-fill  { height: 100%; border-radius: 3px; background: var(--accent); }
.eng-label { font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; }
.eng-sub   { font-size: 10px; color: var(--muted); white-space: nowrap; }
.wir { background: linear-gradient(145deg, #242442 0%, #1c1c36 100%); border: 1px solid var(--b1); border-radius: var(--r); overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.wir-hd { padding: 12px 18px; border-bottom: 1px solid var(--b0); display: flex; align-items: center; justify-content: space-between; }
.wir-title { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; color: var(--text); }
.wir-note  { font-size: 12px; color: var(--muted); }
.wir-grid  { display: grid; grid-template-columns: repeat(6, 1fr); }
.wir-cell  { padding: 12px 14px; border-right: 1px solid var(--b0); text-align: center; }
.wir-cell:last-child { border-right: none; }
.wir-n  { font-size: 24px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.wir-l  { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .7px; margin-top: 3px; }
.wir-na { font-size: 11px; color: var(--dim); margin-top: 2px; }
/* ── Gauge bars (SEO Pillar scores) ── */
.gauge-row { border-top: 1px solid var(--b0); }
.gauge-cell { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; padding: 14px 14px 12px; }
.gauge-track { width: 10px; height: 72px; background: linear-gradient(to top, var(--red) 0%, #e6a817 48%, var(--green) 100%); border-radius: 5px; position: relative; flex-shrink: 0; }
.gauge-dot { position: absolute; width: 14px; height: 14px; background: var(--card); border: 2.5px solid; border-radius: 50%; left: 50%; transform: translateX(-50%); box-shadow: 0 1px 6px rgba(0,0,0,.5); }
.gauge-val { font-size: 18px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.gauge-den { font-size: 12px; font-weight: 600; color: var(--muted); }
.gauge-info { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.4; margin-top: 2px; }
.sc-gauge-hd { border-bottom: 1px solid var(--b0); }
.metric-desc { font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 2px; line-height: 1.3; }
.sc { background: linear-gradient(145deg, #242442 0%, #1c1c36 100%); border: 1px solid var(--b1); border-radius: var(--r); overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.sc-hd { padding: 12px 18px; border-bottom: 1px solid var(--b0); display: flex; align-items: center; gap: 10px; }
.sc-title { font-size: 13px; font-weight: 700; color: var(--text); flex: 1; display: flex; align-items: center; gap: 8px; }
.sc-src { font-size: 10px; color: var(--dim); background: rgba(255,255,255,0.04); border: 1px solid var(--b1); border-radius: 4px; padding: 2px 7px; font-weight: 600; }
.vt { display: flex; gap: 2px; background: rgba(255,255,255,0.04); border: 1px solid var(--b1); border-radius: 6px; padding: 2px; flex-shrink: 0; }
.vt-btn { font-size: 9px; padding: 3px 9px; border-radius: 4px; cursor: pointer; color: var(--muted); border: none; background: transparent; font-family: inherit; font-weight: 600; transition: all .12s; }
.vt-btn.act { background: var(--sub); color: var(--bg); }
.sc-tbl-wrap { overflow: hidden; }
.sc-table { width: 100%; border-collapse: collapse; }
.sc-table th { background: rgba(255,255,255,0.03); color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .6px; padding: 7px 18px; text-align: left; font-weight: 700; border-bottom: 1px solid var(--b0); white-space: nowrap; }
.sc-table td { padding: 8px 18px; border-bottom: 1px solid var(--b0); font-size: 13px; font-variant-numeric: tabular-nums; }
.sc-table tr:last-child td { border-bottom: none; }
.sc-table td.m    { color: var(--sub); font-size: 10px; font-weight: 600; }
.sc-table td.p    { color: var(--muted); }
.sc-table td.c    { color: var(--text); font-weight: 700; }
.sc-table td.up   { color: var(--done-c); font-weight: 700; }
.sc-table td.dn   { color: #f87171; font-weight: 700; }
.sc-table td.base { color: var(--dim); font-style: italic; }
.sc-bar-wrap { padding: 14px 18px; }
.bar-legend  { display: flex; gap: 12px; margin-bottom: 12px; }
.bar-leg-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--sub); }
.bar-leg-dot  { width: 8px; height: 8px; border-radius: 2px; }
.sc-footer { padding: 9px 18px; border-top: 1px solid var(--b0); display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: var(--muted); font-size: 10px; font-weight: 600; background: rgba(255,255,255,0.02); transition: color .12s, background .12s; }
.sc-footer:hover { color: var(--cyan-l); background: rgba(43,127,255,.05); }
.llm-platform { border-bottom: 1px solid var(--b0); }
.llm-platform:last-child { border-bottom: none; }
.llm-plat-hd { padding: 10px 18px; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: background .08s; }
.llm-plat-hd:hover { background: rgba(255,255,255,0.02); }
.llm-plat-name  { font-size: 12px; font-weight: 600; color: var(--sub); flex: 1; }
.llm-plat-count { font-size: 13px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.llm-plat-delta { font-size: 10px; font-weight: 700; }
.llm-citations { background: var(--card-in); border-top: 1px solid var(--b0); }
.llm-cite-table { width: 100%; border-collapse: collapse; }
.llm-cite-table th { background: rgba(255,255,255,0.03); color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .6px; padding: 6px 24px; text-align: left; font-weight: 700; border-bottom: 1px solid var(--b0); }
.llm-cite-table td { padding: 7px 24px; border-bottom: 1px solid var(--b0); font-size: 12px; }
.llm-cite-table tr:last-child td { border-bottom: none; }
.llm-cite-table td.q   { color: var(--sub); font-weight: 500; }
.llm-cite-table td.pos { color: var(--cyan-l); font-weight: 700; font-variant-numeric: tabular-nums; }
.nc-card { background: var(--card); border: 1px solid var(--b1); border-radius: var(--r); overflow: hidden; opacity: .72; }
.nc-hd { padding: 12px 18px; border-bottom: 1px solid var(--b0); display: flex; align-items: center; justify-content: space-between; }
.nc-title { font-size: 13px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.nc-body { padding: 14px 18px; display: flex; align-items: center; gap: 14px; }
.nc-msg { font-size: 12px; color: var(--muted); }
.nc-sub { font-size: 10px; color: var(--dim); margin-top: 3px; }
.nc-screenshot { border-top: 1px solid var(--b0); padding: 12px 18px 16px; }
.nc-screenshot-label { font-size: 10px; color: var(--cyan-l); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 8px; }
.nc-screenshot-img { width: 100%; max-height: 340px; object-fit: cover; object-position: top left; border-radius: 4px; border: 1px solid var(--b1); display: block; }

/* ── Overview ── */
.ov-body { flex: 1; overflow-y: auto; padding: 22px; }
.ov-intro { font-size: 12px; color: var(--muted); margin-bottom: 18px; line-height: 1.6; }
.ov-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.ov-card { background: linear-gradient(145deg, #242442 0%, #1c1c36 100%); border: 1px solid var(--b1); border-radius: var(--r); padding: 16px 18px; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.ov-card.built       { border-top: 3px solid var(--green); }
.ov-card.in-progress { border-top: 3px solid var(--accent); }
.ov-card.planned     { border-top: 3px solid var(--b2); }
.ov-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.ov-icon { width: 30px; height: 30px; border-radius: 7px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ov-icon.g { background: rgba(34,197,94,.12); color: var(--green); }
.ov-icon.c { background: var(--c10); color: var(--cyan-l); }
.ov-icon.d { background: rgba(255,255,255,0.04); color: var(--dim); }
.ov-name { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.ov-desc { font-size: 11px; color: var(--muted); line-height: 1.5; }
.ov-features { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.ov-feat { font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.ov-feat.done { color: var(--sub); }
.ov-feat .dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: var(--green); } .dot-grey { background: var(--b2); }
.ov-section-title { font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; color: var(--muted); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--b0); }
.ov-task-card { background: linear-gradient(145deg, #242442 0%, #1c1c36 100%); border: 1px solid var(--b1); border-radius: var(--r); overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.4); border-top: 2px solid var(--accent); }
.ov-task-card .wl-table thead th { background: linear-gradient(90deg, #20203e 0%, #1a1a36 100%); border-bottom: 2px solid rgba(43,127,255,0.25); color: #9090c0; }
.ov-task-card .wl-tr:hover td { background: rgba(43,127,255,0.06); }
.ov-task-card .wl-tr:nth-child(even) td { background: rgba(255,255,255,0.025); }
.ov-timeline { background: var(--card); border: 1px solid var(--b1); border-radius: var(--r); overflow: hidden; }
.ov-tl-row { display: flex; align-items: center; gap: 16px; padding: 11px 18px; border-bottom: 1px solid var(--b0); }
.ov-tl-row:last-child { border-bottom: none; }
.ov-tl-phase { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; width: 70px; flex-shrink: 0; }
.ov-tl-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ov-tl-name { flex: 1; font-size: 12px; color: var(--sub); font-weight: 500; }
.ov-tl-tag { font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
.tl-live  { background: rgba(34,197,94,.12); color: var(--green); border: 1px solid rgba(34,197,94,.28); }
.tl-build { background: var(--c10); color: var(--cyan-l); border: 1px solid rgba(43,127,255,.22); }
.tl-plan  { background: rgba(255,255,255,.04); color: var(--muted); border: 1px solid var(--b1); }

/* ── Modals ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 100; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.modal { background: var(--card); border: 1px solid var(--b2); border-radius: var(--r); padding: 20px; width: 400px; max-width: 90vw; box-shadow: 0 24px 64px rgba(0,0,0,.6); }
.modal h3 { color: var(--text); font-size: 13px; margin-bottom: 14px; }
.modal label { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; margin-top: 10px; }
.modal input, .modal select, .modal textarea { width: 100%; }
.hidden { display: none; }

/* ── Form elements ── */
input, select, textarea { background: var(--card-in); color: var(--text); border: 1px solid var(--b1); border-radius: 4px; padding: 6px 10px; font-size: 11px; font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(43,127,255,0.15); }

/* ── AI Team modal ── */
.ai-team-dept-card { background: #0f0f18; border: 1px solid rgba(255,255,255,0.10); border-radius: 6px; padding: 16px; text-align: center; cursor: pointer; transition: all 0.2s ease; }
.ai-team-dept-card:hover { border-color: var(--accent); background: rgba(43,127,255,0.08); transform: translateY(-2px); }
.ai-team-dept-card:nth-child(2):hover, .ai-team-dept-card:nth-child(3):hover { opacity: 0.6; cursor: not-allowed; transform: none; border-color: rgba(255,255,255,0.10); background: #0f0f18; }

/* ── Progress track ── */
.progress-track { flex: 1; background: var(--b1); border-radius: 20px; height: 7px; overflow: hidden; }
.progress-fill  { background: linear-gradient(90deg, var(--done-c), var(--cyan-l)); height: 100%; border-radius: 20px; transition: width 0.3s; }

/* ── AI Team pane ── */
.ai-body { flex: 1; overflow-y: auto; padding: 20px 22px; }
.ai-exec { display: flex; flex-direction: column; align-items: center; gap: 0; margin-bottom: 20px; }
.ai-exec-card { background: var(--card); border: 1px solid var(--b1); border-radius: var(--r); padding: 10px 24px; text-align: center; min-width: 220px; box-shadow: 0 1px 0 rgba(255,255,255,0.03); }
.ai-exec-card.ceo { border-top: 3px solid var(--cyan-l); }
.ai-exec-card.cos { border-top: 3px solid var(--b2); }
.ai-exec-title { font-size: 12px; font-weight: 700; color: var(--text); }
.ai-exec-role { font-size: 9px; color: var(--muted); margin-top: 2px; }
.ai-exec-line { width: 1px; height: 14px; background: var(--b2); }
.ai-dept-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.ai-dept { background: var(--card); border: 1px solid var(--b1); border-radius: var(--r); overflow: hidden; }
.ai-dept-hd { padding: 8px 12px; border-bottom: 1px solid var(--b1); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text); background: var(--col-hd); }
.ai-dept.mkt .ai-dept-hd { border-top: 3px solid var(--cyan-l); }
.ai-dept.sls .ai-dept-hd { border-top: 3px solid var(--ip-c); }
.ai-dept.fin .ai-dept-hd { border-top: 3px solid var(--done-c); }
.ai-dept.ops .ai-dept-hd { border-top: 3px solid #7c6fcd; }
.ai-dept.ppl .ai-dept-hd { border-top: 3px solid var(--todo-c); }
.ai-dept.it  .ai-dept-hd { border-top: 3px solid var(--red); }
.ai-head-node { margin: 8px 8px 4px; background: rgba(255,255,255,0.03); border: 1px solid var(--b1); border-radius: 6px; padding: 6px 8px; }
.ai-head-title { font-size: 10px; font-weight: 700; color: var(--sub); }
.ai-head-role { font-size: 9px; color: var(--muted); margin-top: 1px; }
.ai-branch-group { margin: 0 8px 6px; padding-left: 8px; border-left: 2px solid var(--b1); }
.ai-branch-name { font-size: 10px; font-weight: 600; color: var(--sub); padding: 3px 0 1px; }
.ai-leaf-name { font-size: 9px; color: var(--muted); padding: 1px 0 1px 8px; position: relative; }
.ai-leaf-name::before { content: '╰'; position: absolute; left: 0; color: var(--b3); font-size: 8px; line-height: 1.4; }
.ai-agent-block { margin-bottom: 2px; }
.ai-skills { display: flex; flex-wrap: wrap; gap: 3px; padding: 2px 0 4px 8px; }
.ai-skill-tag { font-size: 8px; font-weight: 700; padding: 1px 5px; border-radius: 10px; background: var(--c10); color: var(--cyan-l); border: 1px solid rgba(43,127,255,.2); white-space: nowrap; }
.ai-skill-tag.tbd { background: rgba(255,255,255,0.04); color: var(--dim); border-color: var(--b1); }
.ai-sop-group { margin: 6px 0 4px; padding-top: 6px; border-top: 1px dashed var(--b1); }
.ai-sop-label { font-size: 8px; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; color: var(--dim); padding: 0 0 3px 0; }
.ai-sop-item { font-size: 9px; color: var(--muted); padding: 2px 0 2px 8px; position: relative; }
.ai-sop-item::before { content: '▸'; position: absolute; left: 0; color: var(--b3); font-size: 8px; }
.ai-sop-item.tbd { color: var(--dim); font-style: italic; }

/* ── AI Audit ── */
#audit-content { padding: 16px 22px; display: flex; flex-direction: column; gap: 16px; }

.audit-table-wrap {
  background: linear-gradient(145deg, #242440 0%, #1c1c36 100%);
  border: 1px solid var(--b1);
  border-radius: var(--r);
  overflow-x: auto;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.audit-table-wrap .wl-table thead th {
  background: linear-gradient(90deg, #20203a 0%, #1a1a30 100%);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.audit-table-wrap .wl-tr:hover { background: rgba(43,127,255,0.05); }
.audit-table-wrap .wl-tr:nth-child(even) td { background: rgba(255,255,255,0.015); }

.audit-doc {
  background: linear-gradient(145deg, #242440 0%, #1c1c36 100%);
  border: 1px solid var(--b1);
  border-radius: var(--r);
  overflow-x: auto;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  padding: 20px 24px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--sub);
}
.audit-doc h1,.audit-doc h2,.audit-doc h3 { font-family: 'Syne', sans-serif; color: var(--fg); margin: 18px 0 6px; }
.audit-doc h1 { font-size: 17px; font-weight: 700; margin-top: 0; } .audit-doc h2 { font-size: 14px; font-weight: 700; } .audit-doc h3 { font-size: 13px; font-weight: 600; }
.audit-doc p { margin: 4px 0 10px; }
.audit-doc ul,.audit-doc ol { padding-left: 20px; margin: 4px 0 10px; }
.audit-doc hr { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin: 16px 0; }
.audit-doc table { border-collapse: collapse; margin: 8px 0; min-width: 100%; }
.audit-doc th { background: rgba(43,127,255,0.08); padding: 7px 12px; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--cyan-l); white-space: nowrap; border-bottom: 1px solid rgba(43,127,255,0.2); }
.audit-doc td { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--sub); font-size: 12px; vertical-align: top; }
.audit-doc tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
.audit-doc code { background: rgba(43,127,255,0.12); padding: 1px 5px; border-radius: 3px; font-size: 10px; color: var(--cyan-l); }
table.audit-tbl { width: max-content; min-width: 100%; }
.audit-td  { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--sub); vertical-align: top; white-space: nowrap; font-size: 12px; }
.tab.fade  { opacity: .4; cursor: default; pointer-events: none; }
.audit-check { accent-color: #22c55e; width: 14px; height: 14px; cursor: pointer; }
