:root {
  --rail: #010101;
  --frame: #121212;
  --side: #121212;
  --panel: #181818;
  --panel-2: #1e1e1e;
  --panel-3: #202020;
  --hover: #232323;
  --active: #292929;
  --line: rgba(255,255,255,.075);
  --line-2: rgba(255,255,255,.12);
  --text: #ffffff;
  --text-2: #ededed;
  --muted: #959595;
  --muted-2: #6f6f6f;
  --green: #3ecf8e;
  --orange: #f5a524;
  --blue: #7aa2f7;
  --red: #fa4c1f;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--rail); color: var(--text); }
body { font-family: Geist, system-ui, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
svg.lucide { width: 16px; height: 16px; stroke-width: 1.75; flex-shrink: 0; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2c2c2c; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Shell ---------- */
.shell { display: flex; height: 100vh; }
.rail { width: 48px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; padding: 18px 0 12px; gap: 8px; background: var(--rail); }
.rail-sep { width: 21px; height: 1px; background: rgba(255,255,255,.1); margin: 4px 0; }
.rail-btn { position: relative; width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: #fff; transition: transform .15s; }
.rail-btn:hover { transform: scale(1.06); }
.rail-btn.home { background: rgba(255,255,255,.14); }
.rail-btn.home.on { background: #fff; color: #000; }
.rail-btn.on::before { content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: #fff; }
.rail-btn .badge { position: absolute; top: -5px; right: -5px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 9px; background: #fff; color: #000; font-size: 9px; font-weight: 600; display: grid; place-items: center; border: 2px solid var(--rail); box-sizing: content-box; }
.rail-add { color: var(--muted); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; }
.rail-add:hover { background: rgba(255,255,255,.08); color: #fff; }
.rail-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.rail-bottom .rail-add { background: rgba(255,255,255,.09); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; flex-shrink: 0; background: linear-gradient(135deg,#6b5a4a,#2e2620); color: #fff; }
.avatar.sm { width: 20px; height: 20px; font-size: 9px; }

.logo-tile { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; font-weight: 800; font-size: 13px; letter-spacing: -.5px; overflow: hidden; }
.logo-tile.sm { width: 20px; height: 20px; border-radius: 5px; font-size: 10px; }
.logo-tile.lg { width: 44px; height: 44px; border-radius: 10px; font-size: 20px; }

.frame { flex: 1; margin: 8px 8px 8px 0; background: var(--frame); border-radius: var(--radius); display: flex; overflow: hidden; min-width: 0; }
.side { width: 240px; flex-shrink: 0; padding: 10px 8px; display: flex; flex-direction: column; border-right: 1px solid transparent; }
.side-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 12px; }
.side-head .name { font-weight: 500; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.icon-btn { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); position: relative; }
.icon-btn:hover { background: var(--hover); color: #fff; }
.icon-btn .dot { position: absolute; top: 1px; right: 1px; background: #fff; color: #000; font-size: 9px; font-weight: 700; min-width: 14px; height: 14px; border-radius: 8px; display: grid; place-items: center; border: 2px solid var(--frame); box-sizing: content-box; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.nav-item:hover { background: var(--hover); color: #ddd; }
.nav-item.on { background: var(--active); color: #fff; }
.nav-item .count { margin-left: auto; font-size: 12px; color: var(--muted); }
.side-foot { margin-top: auto; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--line); }
.topbar { height: 48px; flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); font-weight: 500; }
.topbar .crumb { display: flex; align-items: center; gap: 8px; }
.topbar .crumb .lucide { color: var(--muted); }
.topbar .spacer { flex: 1; }
.content { flex: 1; overflow: auto; padding: 20px 24px 40px; }
.content.flush { padding: 0; }
.wrap { max-width: 1120px; margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; background: #202020; color: var(--text-2); font-weight: 500; font-size: 13px; border: 1px solid transparent; white-space: nowrap; }
.btn:hover { background: #2a2a2a; }
.btn.primary { background: #f2f2f2; color: #0b0b0b; }
.btn.primary:hover { background: #fff; }
.btn.ghost { background: transparent; border-color: var(--line-2); }
.btn.lg { height: 34px; padding: 0 14px; font-size: 14px; }
.btn .lucide { width: 14px; height: 14px; }
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: #1a1a1a; border: 1px solid var(--line); }
.seg button { height: 24px; padding: 0 9px; border-radius: 7px; color: var(--muted); font-size: 12px; font-weight: 500; display: inline-flex; gap: 5px; align-items: center; }
.seg button.on { background: #2b2b2b; color: #fff; }
.seg button .n { color: var(--muted-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 7px; background: #222; font-size: 12px; font-weight: 500; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 500; }
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.nodot::before { display: none; }
.pill.green { background: rgba(62,207,142,.12); color: #4ad295; }
.pill.blue { background: rgba(122,162,247,.14); color: #8fb1f8; }
.pill.grey { background: rgba(255,255,255,.08); color: #b5b5b5; }
.pill.orange { background: rgba(245,165,36,.13); color: #f3b148; }
.pill.red { background: rgba(250,76,31,.14); color: #ff7f5c; }

/* ---------- Cards ---------- */
.card { background: var(--panel); border: 1px solid rgba(255,255,255,.04); border-radius: var(--radius); }
.card-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 500; font-size: 13px; }
.card-h .muted { font-weight: 400; }
.card-h .end { margin-left: auto; color: var(--muted); }
.muted { color: var(--muted); }
.dim { color: var(--muted-2); }
.small { font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: rgba(255,255,255,.07); border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,.04); }
.stat { background: var(--panel); padding: 14px 18px; }
.stat p { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.stat b { font-size: 24px; font-weight: 450; letter-spacing: -.3px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.h-page { font-size: 24px; font-weight: 500; letter-spacing: -.4px; margin: 4px 0 0; }

/* ---------- Home ---------- */
.today-item { display: block; background: var(--panel-2); border-radius: 6px; padding: 9px 12px; margin: 0 14px 6px; border-left: 2px solid #555; }
.today-item:hover { background: #242424; }
.today-item .t { font-size: 13px; }
.today-item .c { font-size: 12px; color: var(--muted); margin-top: 3px; }
.cu-group { padding: 6px 14px 2px; font-size: 13px; font-weight: 500; }
.cu-row { display: flex; align-items: center; gap: 12px; padding: 7px 14px; }
.cu-date { width: 24px; text-align: center; border: 1px solid var(--line-2); border-radius: 5px; line-height: 1; padding: 3px 0; }
.cu-date b { display: block; font-size: 12px; font-weight: 500; }
.cu-date span { font-size: 7.5px; color: var(--muted); text-transform: uppercase; }
.cu-row .what { flex: 1; font-size: 13px; }
.cu-row .what small { display: block; font-size: 12px; margin-top: 2px; }
.client-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; cursor: pointer; }
.client-row:hover { background: #1c1c1c; }
.client-row .info { flex: 1; min-width: 0; }
.client-row .top { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.phase-bars { display: flex; gap: 2px; margin-top: 8px; }
.phase-bars span { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th .lucide { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }
.table td { padding: 0 10px; height: 41px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table tr:hover td { background: rgba(255,255,255,.02); }
.table td + td, .table th + th { border-left: 1px solid var(--line); }
.cb { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid #555; display: inline-grid; place-items: center; cursor: pointer; vertical-align: middle; }
.cb.on { background: #f2f2f2; border-color: #f2f2f2; }
.cb.on::after { content: ""; width: 7px; height: 4px; border: 2px solid #000; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); }
.done-text { text-decoration: line-through; color: var(--muted); }
.cdot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 7px; }
.due { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }
.due.today, .due.tomorrow { color: #f3a53a; }
.due .lucide { width: 13px; height: 13px; }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: 10px; align-items: flex-start; overflow-x: auto; padding-bottom: 10px; }
.kcol { width: 300px; flex-shrink: 0; background: #161616; border-radius: 10px; padding: 8px; border: 1px solid rgba(255,255,255,.04); min-height: 120px; }
.kcol.drop { outline: 1px dashed #555; }
.kcol-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 500; font-size: 13px; }
.kcol-h .bar { width: 3px; height: 14px; border-radius: 2px; }
.kcard { background: var(--panel-2); border: 1px solid rgba(255,255,255,.05); border-radius: 8px; margin-bottom: 8px; cursor: grab; }
.kcard:hover { border-color: rgba(255,255,255,.12); }
.kcard .kt { display: flex; gap: 8px; padding: 10px 10px 6px; font-size: 13px; }
.kcard .km { display: flex; align-items: center; justify-content: space-between; padding: 2px 10px 10px; font-size: 12px; color: var(--muted); }
.kcard .kf { border-top: 1px solid var(--line); padding: 7px 10px; font-size: 11.5px; color: var(--muted); }

/* ---------- Calendar ---------- */
.cal { background: var(--panel); border-radius: 10px; border: 1px solid rgba(255,255,255,.05); overflow: hidden; display: flex; flex-direction: column; height: calc(100vh - 150px); }
.cal-head { display: grid; grid-template-columns: 52px repeat(7,1fr); border-bottom: 1px solid var(--line); }
.cal-head div { padding: 8px; font-size: 12px; color: var(--muted); border-left: 1px dashed var(--line-2); }
.cal-head div:first-child { border: 0; }
.cal-head b { color: #ddd; font-weight: 500; margin-left: 4px; }
.cal-head b.now { background: #fff; color: #000; border-radius: 4px; padding: 1px 4px; }
.cal-body { flex: 1; overflow: auto; position: relative; }
.cal-grid { display: grid; grid-template-columns: 52px repeat(7,1fr); position: relative; }
.cal-hour { height: 44px; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); text-align: right; padding: 0 8px; transform: translateY(-7px); border: 0; }
.cal-cell { height: 44px; border-bottom: 1px solid var(--line); border-left: 1px dashed var(--line-2); cursor: cell; }
.cal-cell:hover { background: rgba(255,255,255,.015); }
.cal-ev { position: absolute; border-radius: 5px; padding: 4px 7px; font-size: 11.5px; overflow: hidden; border-left: 2px solid; cursor: pointer; }
.cal-ev b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month { display: grid; grid-template-columns: repeat(7,1fr); background: var(--panel); border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,.05); }
.month .mh { padding: 8px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.month .md { min-height: 104px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; font-size: 12px; }
.month .md.out { color: var(--muted-2); }
.month .md .e { font-size: 11px; padding: 2px 5px; border-radius: 4px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Finance ---------- */
.chart { height: 140px; display: flex; align-items: flex-end; gap: 0; padding: 10px 70px 0 14px; position: relative; border-top: 1px solid var(--line); }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .track { flex: 1; width: 100%; position: relative; }
.chart .bar { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 18px; border-radius: 3px 3px 0 0; background: linear-gradient(#2e5c3b,#1d3524); border-top: 2px solid #4ade80; min-height: 2px; }
.chart .bar.zero { background: rgba(255,255,255,.06); border-top: 0; }
.chart .lab { font-size: 11px; color: var(--muted); padding: 6px 0; border-top: 1px solid var(--line); width: 100%; text-align: center; }
.chart .yl { position: absolute; right: 12px; font-size: 11px; color: var(--muted); }
.progress { height: 6px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; display: flex; }
.share { width: 60px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 10px; }
.share i { display: block; height: 100%; }
.donut { display: grid; place-items: center; padding: 16px; }

/* ---------- Client dashboard ---------- */
.proj-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.proj-head h1 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.3px; }
.phases { display: grid; grid-template-columns: repeat(4,1fr) 44px; background: var(--panel); border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,.04); margin-bottom: 10px; }
.phase { display: flex; align-items: center; gap: 12px; padding: 14px; border-right: 1px solid var(--line); cursor: pointer; position: relative; }
.phase:hover { background: #1c1c1c; }
.phase.on { background: #222; }
.phase.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #fff; }
.phase .ring { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid #555; display: grid; place-items: center; font-size: 12px; }
.phase .ring.done { background: #3a3a3a; border-color: #3a3a3a; }
.phase small { color: var(--muted); font-size: 11.5px; display: block; }
.phase b { font-weight: 500; font-size: 18px; letter-spacing: -.2px; display: block; }
.phase-add { display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.dash-cols { display: grid; grid-template-columns: 1fr 360px; gap: 10px; height: calc(100vh - 250px); min-height: 380px; }
.step-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.step-row:hover { background: #1c1c1c; }
.step-row .sc { width: 14px; height: 14px; border-radius: 50%; border: 1.5px dashed #666; }
.step-row .sc.done { border: 0; background: #4ad295; }
.convo { display: flex; flex-direction: column; overflow: hidden; }
.convo-body { flex: 1; overflow: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.ev-sys { align-self: center; font-size: 11.5px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 8px; padding: 5px 10px; }
.ev-sys b { color: #ddd; font-weight: 500; }
.ev-pub { border: 1px dashed var(--line-2); border-radius: 8px; padding: 8px 10px; display: flex; align-items: center; font-size: 12px; }
.ev-pub div { flex: 1; }
.ev-pub small { color: var(--muted); display: block; font-size: 11px; }
.msg { max-width: 80%; padding: 8px 11px; border-radius: 12px; font-size: 13px; line-height: 1.4; }
.msg.me { align-self: flex-end; background: #2d2d2d; }
.msg.them { align-self: flex-start; background: #1f1f1f; border: 1px solid var(--line); }
.msg small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 3px; }
.composer { margin: 8px; display: flex; align-items: center; gap: 6px; background: #222; border-radius: 10px; padding: 4px 4px 4px 12px; }
.composer input { flex: 1; background: none; border: 0; outline: none; height: 30px; font-size: 13px; }
.send { width: 26px; height: 26px; border-radius: 50%; background: #444; display: grid; place-items: center; }
.send .lucide { width: 14px; height: 14px; }

/* ---------- Documents / Library / Artifacts ---------- */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 10px; }
.doc-card { display: flex; gap: 12px; padding: 6px; background: var(--panel); border-radius: var(--radius); border: 1px solid rgba(255,255,255,.05); cursor: pointer; }
.doc-card:hover { border-color: rgba(255,255,255,.12); }
.doc-thumb { width: 72px; height: 62px; border-radius: 8px; border: 1px dashed var(--line-2); display: grid; place-items: center; color: var(--muted); flex-shrink: 0; position: relative; overflow: hidden; }
.doc-thumb .paper { position: absolute; inset: 6px 10px 0; background: #f4f4f4; border-radius: 2px; }
.doc-thumb .paper i { display: block; height: 2px; margin: 5px 6px 0; background: #cfcfcf; }
.doc-card .info { flex: 1; display: flex; flex-direction: column; padding: 4px 6px 2px 0; min-width: 0; }
.doc-card .info b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-card .info .row { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.sec-title { font-size: 13px; font-weight: 500; margin: 22px 0 10px; color: #ddd; display: flex; gap: 8px; align-items: center; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(170px,1fr)); gap: 10px; }
.file { background: var(--panel); border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,.05); cursor: pointer; }
.file:hover { border-color: rgba(255,255,255,.14); }
.file .prev { height: 110px; display: grid; place-items: center; font-weight: 700; }
.file .meta { padding: 8px 10px; font-size: 12px; }
.file .meta b { display: block; font-weight: 500; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Boards ---------- */
.masonry { columns: 4 220px; column-gap: 10px; }
.mood { break-inside: avoid; margin-bottom: 10px; border-radius: 10px; overflow: hidden; position: relative; cursor: pointer; }
.mood .lbl { position: absolute; left: 8px; bottom: 8px; font-size: 11px; background: rgba(0,0,0,.55); padding: 3px 7px; border-radius: 6px; opacity: 0; transition: .15s; }
.mood:hover .lbl { opacity: 1; }
.mood .heart { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.5); display: grid; place-items: center; }
.mood .heart.on { background: #fff; color: #e5484d; }
.dir-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.empty { text-align: center; padding: 60px 20px; }
.empty h3 { margin: 12px 0 6px; font-weight: 500; font-size: 15px; }
.empty p { color: var(--muted); font-size: 12.5px; max-width: 280px; margin: 0 auto 14px; line-height: 1.45; }

/* ---------- Canvas ---------- */
.canvas-wrap { position: relative; flex: 1; overflow: hidden; background-color: #0f0f0f; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 22px 22px; height: 100%; }
.canvas-tools { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 2px; background: #1d1d1d; border: 1px solid var(--line-2); border-radius: 12px; padding: 4px; z-index: 5; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.canvas-tools button { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: #bbb; }
.canvas-tools button.on, .canvas-tools button:hover { background: #2e2e2e; color: #fff; }
.cv-item { position: absolute; user-select: none; cursor: move; }
.cv-item.sel { outline: 1.5px solid #7aa2f7; outline-offset: 2px; }
.cv-note { width: 170px; min-height: 120px; padding: 12px; border-radius: 4px; color: #1a1a1a; font-size: 13px; line-height: 1.4; box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.cv-frame { border: 1px solid rgba(255,255,255,.18); border-radius: 6px; background: rgba(255,255,255,.02); }
.cv-frame > span { position: absolute; top: -20px; left: 0; font-size: 12px; color: var(--muted); }
.cv-text { font-size: 22px; font-weight: 500; }
.cv-img { border-radius: 6px; }
.cursor { position: absolute; pointer-events: none; z-index: 4; transition: transform 1.4s ease-in-out; }
.cursor .tag { margin-left: 12px; font-size: 11px; padding: 2px 7px; border-radius: 10px; color: #fff; font-weight: 500; display: inline-block; }
.canvas-top { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; z-index: 5; align-items: center; }
.faces { display: flex; }
.faces .avatar { border: 2px solid #0f0f0f; margin-left: -6px; width: 26px; height: 26px; font-size: 10px; }

/* ---------- Process ---------- */
.proc { display: grid; grid-template-columns: 300px 1fr; gap: 14px; }
.stage { display: flex; gap: 10px; align-items: center; padding: 12px; background: var(--panel); border-radius: 10px; border: 1px solid rgba(255,255,255,.05); cursor: pointer; }
.stage.on { border-color: rgba(255,255,255,.3); background: #1c1c1c; }
.stage .num { width: 22px; height: 22px; border-radius: 50%; background: #f2f2f2; color: #000; display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.stage small { color: var(--muted); display: block; font-size: 11.5px; margin-top: 2px; }
.link-v { display: grid; place-items: center; height: 18px; color: var(--muted-2); }
.pstep { background: var(--panel); border-radius: 10px; border: 1px solid rgba(255,255,255,.05); display: grid; grid-template-columns: 1fr 1fr; }
.pstep > div { padding: 12px 14px; }
.pstep > div + div { border-left: 1px solid var(--line); }
.pstep .ttl { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.pstep .ttl .ic { width: 26px; height: 26px; border-radius: 7px; background: #262626; display: grid; place-items: center; }
.sub-task { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: #ccc; padding: 4px 0; }

/* ---------- Discovery ---------- */
.wizard { max-width: 640px; margin: 0 auto; padding-top: 40px; text-align: center; }
.wizard .eyebrow { color: var(--muted); font-size: 12px; }
.wizard h2 { font-size: 30px; font-weight: 500; letter-spacing: -.5px; margin: 10px 0; }
.wizard p.lead { color: #aaa; line-height: 1.5; margin: 0 0 26px; }
.field { width: 100%; background: #171717; border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; outline: none; font-size: 14px; }
.field:focus { border-color: #555; }
textarea.field { min-height: 110px; resize: vertical; line-height: 1.5; }
.people { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.wiz-progress { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; padding: 0 0 6px; border-bottom: 1px solid var(--line); max-width: 760px; margin: 0 auto; position: relative; }
.wiz-progress i { position: absolute; left: 0; bottom: -1px; height: 1px; background: #fff; transition: width .3s; }
.wiz-foot { display: flex; justify-content: space-between; margin-top: 30px; }
.qlist { text-align: left; }
.qcard { background: var(--panel); border-radius: 10px; border: 1px solid rgba(255,255,255,.05); padding: 14px; margin-bottom: 10px; }
.qcard h4 { margin: 0 0 8px; font-weight: 500; font-size: 14px; display: flex; gap: 10px; }
.qcard h4 span { color: var(--muted); font-weight: 400; }
.strategy { max-width: 720px; margin: 0 auto; background: #f6f5f2; color: #191919; border-radius: 10px; padding: 46px 52px; line-height: 1.6; }
.strategy h1 { font-size: 30px; letter-spacing: -.6px; margin: 0 0 6px; font-weight: 600; }
.strategy h3 { margin: 26px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: #777; }

/* ---------- Brand hub ---------- */
.hub { display: flex; height: 100%; background: #fff; color: #0b0d14; }
.hub-side { width: 220px; flex-shrink: 0; border-right: 1px solid #e8e8e8; display: flex; flex-direction: column; font-size: 13px; }
.hub-logo { padding: 14px 16px; border-bottom: 1px solid #ececec; font-family: Michroma, sans-serif; font-size: 17px; display: flex; gap: 8px; align-items: center; }
.hub-meta { padding: 12px 16px; border-bottom: 1px solid #ececec; font-size: 12px; }
.hub-meta span { color: #888; display: block; }
.hub-nav { padding: 8px 0; border-bottom: 1px solid #ececec; }
.hub-nav a { display: flex; gap: 10px; padding: 6px 16px; cursor: pointer; }
.hub-nav a:hover, .hub-nav a.on { background: #f3f3f3; }
.hub-nav a.sub { padding-left: 34px; color: #888; }
.hub-dl { margin: auto 12px 12px; background: #0b0d14; color: #fff; border-radius: 6px; height: 34px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; }
.hub-main { flex: 1; overflow: auto; }
.hub-hero { padding: 120px 80px 40px; font-family: Michroma, sans-serif; text-transform: uppercase; }
.hub-hero h1 { font-size: 52px; line-height: 1; margin: 0; font-weight: 400; letter-spacing: -1px; }
.hub-hero h1 span { opacity: .55; display: block; }
.hub-sec-hero { display: grid; grid-template-columns: 200px 1fr auto; align-items: end; padding: 140px 18px 24px; font-family: Michroma, sans-serif; font-size: 40px; }
.hub-lead { font-size: 24px; line-height: 1.3; padding: 40px 18px 60px; max-width: 740px; border-bottom: 1px solid #ececec; margin: 0; }
.hub-body { padding: 30px 18px 60px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.swatch { height: 170px; border-radius: 6px; padding: 12px; font-size: 13px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; }
.swatch small { font-family: ui-monospace, monospace; font-size: 11.5px; }
.layout-pick { position: absolute; top: 12px; right: 12px; z-index: 6; }

/* ---------- Modals & menus ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 50; animation: fade .12s; }
.modal { width: 440px; max-width: calc(100vw - 32px); background: #191919; border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal-h { padding: 14px 16px; font-weight: 500; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.modal-h button { margin-left: auto; }
.modal-b { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.modal-b label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.modal-f { padding: 12px 16px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
select.field { appearance: none; }
.drawer { position: fixed; top: 8px; right: 8px; bottom: 8px; width: 420px; background: #171717; border: 1px solid var(--line-2); border-radius: 12px; z-index: 40; display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0,0,0,.5); animation: slide .18s ease-out; }
.menu { position: fixed; z-index: 60; background: #1c1c1c; border: 1px solid var(--line-2); border-radius: 10px; padding: 4px; min-width: 220px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.menu a { display: flex; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 7px; font-size: 13px; cursor: pointer; }
.menu a:hover { background: #2a2a2a; }
.menu .sep { height: 1px; background: var(--line); margin: 4px 0; }
.menu .hd { padding: 6px 10px; font-size: 11.5px; color: var(--muted); }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: #f2f2f2; color: #000; padding: 8px 14px; border-radius: 9px; font-size: 13px; font-weight: 500; opacity: 0; transition: .2s; z-index: 99; pointer-events: none; }
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.helper { position: fixed; right: 16px; bottom: 16px; width: 28px; height: 28px; border-radius: 7px; background: rgba(255,255,255,.09); display: grid; place-items: center; color: #999; z-index: 30; }
.helper:hover { color: #fff; }
.agent { position: fixed; right: 16px; bottom: 54px; width: 360px; height: 460px; background: #171717; border: 1px solid var(--line-2); border-radius: 14px; z-index: 31; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: fade .15s; }
.tool-call { font-size: 11px; color: var(--muted); font-family: ui-monospace, monospace; align-self: flex-start; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }

@media (max-width: 900px) {
  .side { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .grid-2, .dash-cols, .proc, .hub-body { grid-template-columns: 1fr; }
  .dash-cols { height: auto; }
  .phases { grid-template-columns: 1fr 1fr; }
  .phase-add { display: none; }
  .content { padding: 16px; }
  .hub-side { display: none; }
}
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ad295; margin-right: 4px; transition: background .2s; }
.sync-dot.error { background: #ff5c5c; box-shadow: 0 0 0 3px rgba(255,92,92,.2); }
