:root {
  --bg: #0b0f1a; --bg2: #11172a; --card: rgba(255,255,255,0.045); --card2: rgba(255,255,255,0.08); --line: rgba(255,255,255,0.08);
  --text: #e7ecf7; --muted: #8a94ad; --green: #10b981; --green2: #34d399; --amber: #f59e0b; --red: #f43f5e; --blue: #60a5fa; --violet: #a78bfa;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { background: radial-gradient(1200px 600px at 80% -10%, rgba(16,185,129,0.12), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(96,165,250,0.10), transparent 60%), var(--bg); min-height: 100vh; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 12px; }
a { color: var(--green2); text-decoration: none; } a:hover { text-decoration: underline; }
.logo { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--green), var(--blue)); display: inline-block; margin-right: 10px; position: relative; box-shadow: 0 0 24px rgba(16,185,129,0.5); }
.logo::after { content: ""; position: absolute; inset: 7px 6px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: skewX(-8deg); opacity: .9; }
.brand { display: flex; align-items: center; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand.big { font-size: 34px; justify-content: center; }

/* login */
.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(380px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 34px 28px; text-align: center; backdrop-filter: blur(20px); }
input, select, textarea { width: 100%; background: rgba(0,0,0,0.25); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 12px 14px; font: inherit; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(16,185,129,0.2); }
.login-card input { margin: 18px 0 12px; }
.err { color: var(--red); min-height: 20px; margin-top: 8px; }

/* layout */
#app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 22px 16px; border-right: 1px solid var(--line); background: rgba(5,8,16,0.5); backdrop-filter: blur(16px); display: flex; flex-direction: column; gap: 22px; }
nav { display: flex; flex-direction: column; gap: 4px; }
nav a { display: flex; align-items: center; justify-content: space-between; color: var(--muted); padding: 10px 12px; border-radius: 12px; font-weight: 600; }
nav a:hover { background: var(--card); color: var(--text); text-decoration: none; }
nav a.on { background: linear-gradient(90deg, rgba(16,185,129,0.18), rgba(16,185,129,0.04)); color: var(--text); box-shadow: inset 2px 0 0 var(--green); }
.pill { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--card2); color: var(--text); }
.pill.hot { background: var(--amber); color: #111; }
.side-foot { margin-top: auto; font-size: 12px; }
main { padding: 22px clamp(14px, 3vw, 36px) 60px; min-width: 0; }
.top { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.top h1 { margin: 0; font-size: 26px; letter-spacing: -0.02em; }
.top-right { margin-left: auto; }
.menu { display: none; background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 6px 12px; font-size: 18px; }

/* cards & grids */
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: relative; overflow: hidden; }
.card h3 { margin: 0 0 12px; font-size: 15px; letter-spacing: 0.01em; }
.kpi .label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.kpi .value { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; margin-top: 6px; }
.kpi .delta { font-size: 12px; font-weight: 700; }
.kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--green), transparent); opacity: .8; }
.up { color: var(--green2); } .down { color: var(--red); }
.cols2 { grid-template-columns: 2fr 1fr; } .cols3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.section-title { margin: 28px 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }

/* streams */
.stream { display: flex; flex-direction: column; gap: 10px; }
.stream .head { display: flex; align-items: center; gap: 10px; }
.stream .icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: var(--card2); flex: none; }
.stream .name { font-weight: 800; } .stream .sub { color: var(--muted); font-size: 13px; }
.status { margin-left: auto; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 99px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.s-live { background: rgba(16,185,129,.18); color: var(--green2); }
.s-ready { background: rgba(96,165,250,.18); color: var(--blue); }
.s-building { background: rgba(167,139,250,.18); color: var(--violet); }
.s-setup { background: rgba(245,158,11,.18); color: var(--amber); }
.s-idea { background: var(--card2); color: var(--muted); }
.bar { height: 6px; border-radius: 9px; background: var(--card2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--blue)); border-radius: 9px; }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:hover td { background: rgba(255,255,255,0.02); }
.table-wrap { overflow-x: auto; }

/* buttons */
.btn { border: 1px solid var(--line); background: var(--card2); color: var(--text); padding: 9px 16px; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; transition: transform .08s, background .2s; }
.btn:hover { background: rgba(255,255,255,0.12); } .btn:active { transform: scale(.98); }
.btn.primary { background: linear-gradient(135deg, var(--green), #059669); border-color: transparent; color: #fff; box-shadow: 0 6px 20px rgba(16,185,129,.25); }
.btn.warn { background: rgba(245,158,11,.15); border-color: rgba(245,158,11,.35); color: var(--amber); }
.btn.danger { background: rgba(244,63,94,.12); border-color: rgba(244,63,94,.35); color: #fb7185; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 10px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* approvals */
.approval { display: grid; grid-template-columns: 180px 1fr; gap: 18px; }
.approval img.cover { width: 100%; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.4); cursor: zoom-in; background: #fff; }
.approval .title { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.tag { font-size: 11px; font-weight: 700; background: var(--card2); color: var(--muted); padding: 3px 9px; border-radius: 99px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0; }
.thumbs img { height: 120px; border-radius: 6px; background: #fff; cursor: zoom-in; }
.desc { white-space: pre-wrap; color: #c7cede; font-size: 14px; background: rgba(0,0,0,0.2); border-radius: 12px; padding: 12px 14px; max-height: 220px; overflow: auto; }

/* checklist */
.check { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: 0; }
.check input { width: 22px; height: 22px; accent-color: var(--green); flex: none; margin-top: 3px; }
.check .t { font-weight: 800; } .check.done .t { color: var(--muted); text-decoration: line-through; }
.check .how { color: var(--muted); font-size: 14px; white-space: pre-wrap; margin-top: 4px; }

/* activity */
.feed { display: flex; flex-direction: column; }
.feed .it { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.feed .dot { width: 8px; height: 8px; border-radius: 9px; margin-top: 7px; flex: none; background: var(--muted); }
.feed .good .dot { background: var(--green); } .feed .warn .dot { background: var(--amber); }

/* charts */
.chart { width: 100%; height: 240px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* research */
.md { line-height: 1.65; } .md h1 { font-size: 22px; } .md h2 { font-size: 17px; margin-top: 22px; } .md code { background: var(--card2); padding: 1px 6px; border-radius: 6px; }
.md table td, .md table th { border: 1px solid var(--line); }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; padding: 20px; max-width: min(1000px, 96vw); max-height: 92vh; overflow: auto; }
.modal-card img { max-width: 100%; max-height: 82vh; display: block; margin: auto; border-radius: 8px; background: #fff; }

.empty { text-align: center; padding: 40px 10px; color: var(--muted); }
.empty .big { font-size: 40px; }

@media (max-width: 900px) {
  #app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 40; width: 260px; left: -280px; transition: left .25s; }
  body.nav-open .side { left: 0; box-shadow: 20px 0 60px rgba(0,0,0,.6); }
  .menu { display: block; }
  .cols2 { grid-template-columns: 1fr; }
  .approval { grid-template-columns: 1fr; }
  .approval img.cover { max-width: 240px; }
}
.approval > div { min-width: 0; }
.approval .muted { overflow-wrap: anywhere; }
.tags .tag { white-space: normal; }

/* organization */
.tabs { display: flex; gap: 6px; margin: 22px 0 14px; overflow-x: auto; }
.tabs a { padding: 8px 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.tabs a.on { background: var(--card2); color: var(--text); border-color: rgba(16,185,129,.5); }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: rgba(255,255,255,0.025); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 120px; }
.colhead { padding: 2px 4px 10px; }
.ocard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; transition: border-color .15s, transform .15s; }
.ocard:hover { border-color: rgba(16,185,129,.5); transform: translateY(-1px); }
.ocard .t { font-weight: 700; font-size: 13px; line-height: 1.35; }
.verdict { font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 99px; letter-spacing: .04em; }
.v-BUILD { background: rgba(16,185,129,.2); color: var(--green2); } .v-TEST { background: rgba(96,165,250,.2); color: var(--blue); }
.v-WATCH { background: rgba(245,158,11,.18); color: var(--amber); } .v-REJECT { background: rgba(244,63,94,.18); color: var(--red); }
.bar .unlock { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--amber); border-radius: 2px; }
.detail { max-width: 760px; } .detail h3 { font-size: 14px; } .detail table td { padding: 3px 8px 3px 0; vertical-align: top; }
.up { color: var(--green2); } .down { color: var(--red); }

/* grouped nav + launch board */
.navgroup { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); opacity: .7; margin: 14px 12px 4px; }
.navgroup:first-child { margin-top: 0; }
.launchrow { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.launchrow:first-of-type { border-top: 0; }
.launchrow img, .launchrow .noimg { width: 56px; height: 70px; object-fit: cover; border-radius: 6px; background: #fff; cursor: zoom-in; flex-shrink: 0; }
@media (max-width: 640px) { .launchrow > .row { width: 100%; justify-content: flex-start !important; } }
