:root {
  color-scheme: dark;
  --bg: #070b14;
  --panel: #0d1322;
  --panel-2: #111a2c;
  --panel-3: #151f34;
  --line: rgba(255,255,255,.08);
  --line-strong: rgba(255,255,255,.14);
  --text: #f5f7fb;
  --muted: #8c98ad;
  --accent: #8b7cff;
  --accent-2: #5f50f0;
  --success: #47d7a0;
  --warning: #ffb760;
  --danger: #ff6f84;
  --info: #62b5ff;
  --shadow: 0 24px 70px rgba(0,0,0,.26);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 84% 4%, rgba(96,78,240,.13), transparent 32%),
    radial-gradient(circle at 20% 80%, rgba(40,123,255,.07), transparent 26%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, select { cursor: pointer; }

h1,h2,h3,p { margin-top: 0; }
h1 { letter-spacing: -.035em; }
h2,h3 { letter-spacing: -.025em; }

.boot-screen, .center-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
}
.boot-screen p { color: var(--muted); margin: 4px 0 0; }
.spinner {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.12);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #9a8dff, #5d4cec);
  color: white; font-weight: 900; box-shadow: 0 10px 28px rgba(98,80,240,.35);
}
.brand-mark-large { width: 52px; height: 52px; border-radius: 15px; font-size: 20px; }

.eyebrow {
  color: #8d99b2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.muted { color: var(--muted); }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(420px,.9fr); }
.auth-panel { padding: clamp(32px, 6vw, 90px); display: flex; flex-direction: column; }
.auth-brand-panel {
  justify-content: space-between;
  background:
    linear-gradient(135deg, rgba(122,104,255,.14), transparent 45%),
    linear-gradient(180deg, #0c1220, #090d17);
  border-right: 1px solid var(--line);
}
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-lockup h1 { font-size: 25px; margin: 0; }
.auth-copy { max-width: 700px; margin: auto 0; }
.auth-copy h2 { font-size: clamp(44px, 5vw, 76px); line-height: .98; margin-bottom: 24px; }
.auth-copy p { max-width: 620px; color: #a4aec0; font-size: 18px; }
.launch-chip { width: fit-content; border: 1px solid var(--line); padding: 12px 16px; border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.025); }
.launch-chip strong { color: var(--text); margin-left: 6px; }
.auth-form-panel { justify-content: center; background: rgba(6,9,16,.6); }
.auth-card { width: min(430px, 100%); margin: 0 auto; }
.auth-card h2 { font-size: 38px; margin-bottom: 8px; }
.auth-card > .muted { margin-bottom: 30px; }
.stack-form { display: grid; gap: 18px; }
.auth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.notice { border: 1px solid rgba(98,181,255,.25); background: rgba(98,181,255,.08); color: #c9e6ff; padding: 12px 14px; border-radius: 12px; margin: 18px 0; }

.field { display: grid; gap: 8px; }
.field > span { color: #aab4c6; font-size: 12px; font-weight: 700; }
.field input, .field select, .field textarea, .filter-select, .search-field {
  border: 1px solid var(--line-strong);
  background: #0b1120;
  color: var(--text);
  border-radius: 11px;
  outline: none;
}
.field input, .field select, .field textarea { width: 100%; padding: 12px 13px; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .filter-select:focus, .search-field:focus-within { border-color: rgba(139,124,255,.7); box-shadow: 0 0 0 3px rgba(139,124,255,.09); }

.button {
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 14px;
  font-weight: 750;
  transition: .16s ease;
}
.button:disabled { opacity: .55; cursor: wait; }
.button-primary { background: linear-gradient(135deg, #8b7cff, #6555ef); color: white; box-shadow: 0 8px 24px rgba(93,76,236,.22); }
.button-primary:hover { transform: translateY(-1px); filter: brightness(1.06); }
.button-secondary { background: rgba(255,255,255,.04); border-color: var(--line); color: #d9dfeb; }
.button-secondary:hover { background: rgba(255,255,255,.07); }
.button-row { display: flex; gap: 10px; margin-top: 22px; }
.text-button { border: 0; padding: 0; background: none; color: #9e94ff; font-weight: 700; }
.text-button:hover { color: #c7c0ff; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.04); font-size: 22px; }

.message-card { width: min(560px,100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.message-card .brand-mark { margin-bottom: 24px; }
.message-card h1 { font-size: 32px; }
.message-card p:not(.eyebrow) { color: var(--muted); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0,1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  border-right: 1px solid var(--line);
  background: rgba(8,12,22,.88);
  backdrop-filter: blur(18px);
  padding: 22px 15px;
  display: flex; flex-direction: column;
}
.sidebar-brand { display: flex; gap: 11px; align-items: center; padding: 4px 7px 24px; }
.sidebar-brand div:last-child { display: grid; line-height: 1.15; }
.sidebar-brand strong { font-size: 15px; }
.sidebar-brand span { color: var(--muted); font-size: 12px; }
.nav-list { display: grid; gap: 4px; }
.nav-item {
  border: 0; background: transparent; color: #8f9aaf;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 11px; border-radius: 10px; text-align: left; font-weight: 700;
}
.nav-item span { width: 18px; text-align: center; color: #78839a; }
.nav-item:hover { background: rgba(255,255,255,.035); color: #dfe5f1; }
.nav-item.active { background: rgba(126,110,255,.12); color: #f7f5ff; }
.nav-item.active span { color: #9b8eff; }
.sidebar-launch { margin-top: auto; border: 1px solid var(--line); border-radius: 14px; padding: 15px; background: rgba(255,255,255,.025); }
.sidebar-launch > span { display: block; font-size: 31px; font-weight: 850; letter-spacing: -.04em; }
.sidebar-launch small { color: var(--muted); }
.sidebar-launch strong { display: block; font-size: 11px; color: #b8c1d0; margin-top: 8px; }
.mini-progress, .progress-track { height: 6px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.07); }
.mini-progress { margin-top: 13px; }
.mini-progress i, .progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6a59f2, #9d90ff); }
.sidebar-user { border-top: 1px solid var(--line); padding: 15px 6px 2px; margin-top: 16px; display: grid; gap: 4px; }
.sidebar-user span { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .text-button { width: fit-content; font-size: 11px; }

.workspace { min-width: 0; }
.topbar {
  min-height: 104px;
  border-bottom: 1px solid var(--line);
  padding: 22px clamp(22px, 4vw, 52px);
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  background: rgba(7,11,20,.68); backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 5;
}
.topbar h1 { margin: 0; font-size: 29px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.launch-date-card { display: grid; text-align: right; line-height: 1.2; padding-right: 4px; }
.launch-date-card span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.launch-date-card strong { font-size: 12px; margin-top: 4px; }
.content { padding: 30px clamp(22px, 4vw, 52px) 64px; max-width: 1540px; margin: 0 auto; }

.hero-card {
  border: 1px solid rgba(139,124,255,.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 20%, rgba(139,124,255,.2), transparent 31%),
    linear-gradient(130deg, rgba(139,124,255,.08), rgba(13,19,34,.96) 50%);
  padding: clamp(24px, 4vw, 42px);
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  box-shadow: 0 20px 65px rgba(0,0,0,.18);
}
.hero-card h2 { font-size: clamp(30px, 4vw, 50px); margin-bottom: 10px; }
.hero-card > div:first-child > p:not(.eyebrow) { color: #9da9bc; max-width: 720px; }
.hero-meta { display: flex; align-items: center; gap: 12px; margin-top: 19px; color: #abb5c6; font-size: 12px; }
.countdown { min-width: 180px; text-align: center; border-left: 1px solid var(--line-strong); padding-left: 30px; }
.countdown strong { display: block; font-size: clamp(52px, 7vw, 86px); letter-spacing: -.06em; line-height: .9; }
.countdown span { color: #a3aec0; font-size: 12px; }

.metric-grid { display: grid; gap: 14px; margin: 18px 0; }
.metric-grid-four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.metric-card { border: 1px solid var(--line); background: var(--panel); border-radius: 15px; padding: 18px; position: relative; overflow: hidden; }
.metric-card::after { content: ''; position: absolute; width: 75px; height: 75px; border-radius: 50%; right: -35px; top: -35px; background: currentColor; opacity: .07; }
.metric-card > span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.metric-card strong { display: block; font-size: 31px; letter-spacing: -.04em; margin: 6px 0 1px; }
.metric-card small { color: #7e8a9f; }
.metric-accent { color: #aa9fff; }
.metric-danger { color: var(--danger); }
.metric-warning { color: var(--warning); }
.metric-success { color: var(--success); }
.metric-info { color: var(--info); }
.metric-card strong, .metric-card > span, .metric-card small { position: relative; z-index: 1; }
.metric-card strong { color: var(--text); }

.two-column { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.panel { background: rgba(13,19,34,.9); border: 1px solid var(--line); border-radius: 17px; padding: 20px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.panel-header h3 { margin: 0; font-size: 19px; }
.task-list { display: grid; }
.compact-task { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 13px 4px; border-top: 1px solid var(--line); }
.compact-task:first-child { border-top: 0; }
.task-state { width: 7px; height: 7px; border-radius: 50%; background: #69758b; }
.task-state-in_progress { background: var(--info); box-shadow: 0 0 0 4px rgba(98,181,255,.08); }
.task-state-blocked { background: var(--danger); box-shadow: 0 0 0 4px rgba(255,111,132,.08); }
.task-state-complete { background: var(--success); }
.task-state-review { background: var(--warning); }
.compact-task-copy { min-width: 0; display: grid; gap: 3px; }
.compact-task-copy strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.compact-task-copy span { color: var(--muted); font-size: 10px; }
.all-clear, .empty-state { min-height: 138px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.all-clear div { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(71,215,160,.11); color: var(--success); margin-bottom: 9px; }
.all-clear strong { color: #dce4ef; font-size: 13px; }
.all-clear span { font-size: 11px; }
.empty-state span { font-size: 22px; color: #566278; }
.empty-state p { margin: 5px 0 0; font-size: 12px; }

.pill, .classification { display: inline-flex; align-items: center; gap: 6px; width: fit-content; border-radius: 999px; white-space: nowrap; font-size: 9px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.pill { padding: 5px 8px; background: rgba(255,255,255,.05); color: #aeb7c7; border: 1px solid var(--line); }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-in_progress { color: var(--info); background: rgba(98,181,255,.07); }
.pill-blocked { color: var(--danger); background: rgba(255,111,132,.07); }
.pill-complete, .pill-released { color: var(--success); background: rgba(71,215,160,.07); }
.pill-review, .pill-delayed { color: var(--warning); background: rgba(255,183,96,.07); }
.classification { padding: 5px 8px; }
.classification-launch_blocker { background: rgba(255,111,132,.10); color: #ff8da0; }
.classification-pre_launch { background: rgba(98,181,255,.09); color: #8ccaff; }
.classification-post_launch { background: rgba(139,124,255,.11); color: #ada3ff; }
.classification-backlog { background: rgba(255,255,255,.05); color: #9ca6b7; }

.phase-summary-list { display: grid; }
.phase-summary-row { display: grid; grid-template-columns: 44px minmax(0,1fr) 220px; gap: 14px; align-items: center; padding: 14px 4px; border-top: 1px solid var(--line); }
.phase-summary-row:first-child { border-top: 0; }
.phase-index { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.04); color: #7f8ba1; font-size: 10px; font-weight: 800; }
.phase-summary-copy { min-width: 0; display: grid; gap: 4px; }
.phase-title-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.phase-summary-copy > span { color: var(--muted); font-size: 10px; }
.phase-progress { display: grid; grid-template-columns: 38px 1fr; gap: 9px; align-items: center; }
.phase-progress > span { font-size: 10px; color: var(--muted); text-align: right; }

.roadmap-stack { display: grid; }
.roadmap-phase { display: grid; grid-template-columns: 48px minmax(0,1fr); }
.phase-rail { display: flex; flex-direction: column; align-items: center; }
.phase-rail span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); background: var(--bg); color: #8590a5; font-size: 10px; font-weight: 800; z-index: 1; }
.phase-rail i { width: 1px; background: var(--line-strong); flex: 1; min-height: 32px; }
.roadmap-phase.current .phase-rail span { background: var(--accent-2); color: white; border-color: transparent; box-shadow: 0 0 0 5px rgba(139,124,255,.09); }
.phase-card { border: 1px solid var(--line); background: var(--panel); border-radius: 18px; padding: 22px; margin-bottom: 18px; }
.roadmap-phase.current .phase-card { border-color: rgba(139,124,255,.36); box-shadow: 0 18px 60px rgba(45,34,110,.12); }
.phase-card-top { display: flex; justify-content: space-between; gap: 28px; }
.phase-card-top h2 { margin: 0 0 8px; font-size: 24px; }
.phase-card-top p:not(.eyebrow) { color: var(--muted); max-width: 780px; font-size: 12px; }
.current-flag { background: rgba(139,124,255,.12); color: #aa9fff; border: 1px solid rgba(139,124,255,.22); border-radius: 999px; padding: 3px 7px; font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.phase-date-block { display: flex; align-items: center; gap: 8px; color: #9da8ba; font-size: 11px; white-space: nowrap; }
.phase-date-block strong { color: #535e72; }
.phase-card-stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 34px; padding: 15px 0; margin-top: 10px; border-top: 1px solid var(--line); }
.phase-card-stats > div { display: grid; gap: 2px; align-content: start; }
.phase-card-stats strong { font-size: 17px; }
.phase-card-stats span:not(.pill):not(.pill-dot) { color: var(--muted); font-size: 9px; }
.progress-track.large { height: 8px; }
.phase-item-preview { margin-top: 13px; }
.more-row { border: 0; border-top: 1px solid var(--line); width: 100%; padding: 12px 4px 2px; background: none; color: #948aff; text-align: left; font-size: 11px; font-weight: 700; }

.filter-panel { padding: 13px; margin-bottom: 14px; }
.filters { display: grid; grid-template-columns: minmax(220px,1fr) repeat(3, auto); gap: 9px; }
.search-field { display: flex; align-items: center; gap: 8px; padding: 0 11px; }
.search-field span { color: #68758c; font-size: 17px; }
.search-field input { width: 100%; border: 0; background: transparent; color: var(--text); outline: 0; padding: 9px 0; }
.filter-select { padding: 9px 29px 9px 10px; min-width: 140px; }
.table-panel { padding: 0; overflow: hidden; }
.table-panel .panel-header { padding: 20px 20px 0; }
.work-table-wrap { overflow-x: auto; }
.work-table { width: 100%; border-collapse: collapse; min-width: 980px; }
.work-table th, .work-table td { padding: 13px 16px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.work-table th { color: #707c91; font-size: 9px; text-transform: uppercase; letter-spacing: .11em; font-weight: 800; }
.work-table td { color: #aab4c5; font-size: 11px; }
.work-table tbody tr:hover { background: rgba(255,255,255,.018); }
.table-item-title { display: flex; align-items: center; gap: 9px; min-width: 300px; }
.table-item-title strong { color: #e9edf5; font-size: 12px; }
.work-table td small { display: block; margin-top: 4px; color: #6e7b91; padding-left: 0; }
.type-chip { border: 1px solid var(--line); border-radius: 6px; padding: 3px 5px; color: #7d899e; text-transform: uppercase; font-size: 7px; font-weight: 900; letter-spacing: .06em; }
.priority { text-transform: capitalize; font-weight: 800; }
.priority-critical { color: var(--danger); }
.priority-high { color: var(--warning); }
.priority-medium { color: #9eabc0; }
.priority-low { color: #68758b; }
.status-select { border: 1px solid var(--line); border-radius: 8px; padding: 7px 28px 7px 8px; background: #0b1120; color: #b6c0d1; font-size: 10px; }
.status-in_progress { color: var(--info); }
.status-blocked { color: var(--danger); }
.status-complete { color: var(--success); }

.release-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.release-card { display: grid; grid-template-columns: 90px minmax(0,1fr); border: 1px solid var(--line); background: var(--panel); border-radius: 17px; overflow: hidden; }
.release-final { border-color: rgba(139,124,255,.3); }
.release-version { display: grid; place-items: center; background: rgba(255,255,255,.025); border-right: 1px solid var(--line); font-weight: 900; color: #9e94ff; font-size: 18px; }
.release-body { padding: 18px; }
.release-top { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.release-top h2 { font-size: 19px; margin-bottom: 0; }
.release-date { color: var(--muted); font-size: 11px; margin-bottom: 17px; }
.release-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: #7e899d; font-size: 10px; }
.release-foot strong { color: #b8c2d3; }

.modal {
  width: min(740px, calc(100vw - 30px));
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 0;
  background: #0c1220;
  color: var(--text);
  box-shadow: 0 30px 100px rgba(0,0,0,.5);
}
.modal::backdrop { background: rgba(3,6,12,.75); backdrop-filter: blur(4px); }
.modal form { padding: 24px; }
.modal-header { display: flex; align-items: start; justify-content: space-between; margin-bottom: 22px; }
.modal-header h2 { margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.field-wide { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }

@media (max-width: 1100px) {
  .metric-grid-four { grid-template-columns: repeat(2,1fr); }
  .two-column { grid-template-columns: 1fr; }
  .release-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .phase-card-stats { grid-template-columns: repeat(2, auto); }
}

@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-panel { display: none; }
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; align-items: center; gap: 10px; overflow-x: auto; padding: 10px 12px; }
  .sidebar-brand { padding: 0 12px 0 0; }
  .sidebar-brand div:last-child, .sidebar-launch, .sidebar-user { display: none; }
  .nav-list { display: flex; gap: 4px; }
  .nav-item { white-space: nowrap; }
  .topbar { position: static; padding: 18px; }
  .launch-date-card { display: none; }
  .content { padding: 18px; }
  .hero-card { display: block; }
  .countdown { margin-top: 25px; border-left: 0; border-top: 1px solid var(--line); padding: 22px 0 0; text-align: left; }
  .countdown strong { font-size: 52px; }
  .phase-summary-row { grid-template-columns: 36px 1fr; }
  .phase-progress { grid-column: 2; }
  .phase-card-top { display: block; }
  .phase-date-block { margin-top: 16px; }
}

@media (max-width: 600px) {
  .metric-grid-four { grid-template-columns: 1fr 1fr; }
  .metric-card strong { font-size: 25px; }
  .topbar h1 { font-size: 23px; }
  .topbar .button { padding: 9px 11px; font-size: 12px; }
  .roadmap-phase { grid-template-columns: 32px minmax(0,1fr); }
  .phase-card { padding: 16px; }
  .phase-card-stats { gap: 18px; }
  .filters { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .release-card { grid-template-columns: 70px minmax(0,1fr); }
}
