/* NetlenCP status page. Design tokens mirror the panel design system
   (single Netlen palette; change here + apps/panel/styles/tokens.css together). */

:root {
  --brand: #0066cc;
  --brand-700: #0052a6;
  --brand-300: #4d9be0;
  --brand-50: #e8f1fb;
  --accent: #ff6b35;
  --accent-600: #e85a28;

  --ok: #16a34a;
  --ok-bg: #dcfce7;
  --wip: #f59e0b;
  --wip-bg: #fef3c7;
  --idle: #94a3b8;
  --idle-bg: #eef2f6;

  --bg: #f4f6f9;
  --panel: #ffffff;
  --panel-2: #fafbfc;
  --border: #e3e8ef;
  --border-strong: #cdd5e0;
  --text: #1a2433;
  --text-dim: #5b6878;
  --text-mut: #8a94a3;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 8px 24px rgba(16, 24, 40, .10);
  --radius: 10px;
  --radius-sm: 7px;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
  --brand: #4d9be0;
  --brand-700: #2f7fd0;
  --brand-300: #7bb5e8;
  --brand-50: #14233a;
  --accent: #ff7d4d;

  --ok: #4ade80;
  --ok-bg: #14321f;
  --wip: #fbbf24;
  --wip-bg: #36290c;
  --idle: #64748b;
  --idle-bg: #1b2533;

  --bg: #0c1118;
  --panel: #141b25;
  --panel-2: #111824;
  --border: #243040;
  --border-strong: #33425a;
  --text: #e7ecf3;
  --text-dim: #a4b0c0;
  --text-mut: #6b7888;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* topbar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; height: 56px; gap: 14px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; letter-spacing: -.02em; }
.logo .mark { width: auto; height: 26px; }
.logo b { color: var(--brand); font-weight: 700; }
.topbar .spacer { flex: 1; }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a { color: var(--text-dim); padding: 6px 10px; border-radius: var(--radius-sm); font-weight: 500; }
.topbar nav a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.btn-demo {
  display: inline-flex; align-items: center; height: 34px; padding: 0 16px;
  border-radius: var(--radius-sm); background: var(--brand); color: #fff;
  font-weight: 600; font-size: 14px; white-space: nowrap;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--brand) 35%, transparent);
}
.btn-demo:hover { background: color-mix(in srgb, var(--brand) 88%, #000); text-decoration: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--border); background: var(--panel); border-radius: var(--radius-sm);
  color: var(--text-dim); cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }

/* hero */
.hero { padding: 44px 0 28px; border-bottom: 1px solid var(--border); background:
  radial-gradient(1100px 300px at 50% -120px, var(--brand-50), transparent); }
.hero .wrap { text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600;
  color: var(--brand); background: var(--brand-50); border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  padding: 4px 11px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em;
}
.hero h1 { font-size: 38px; margin: 16px 0 6px; letter-spacing: -.03em; }
.hero .tagline { color: var(--text-dim); font-size: 15px; max-width: 620px; margin: 0 auto; }

.progress-block { max-width: 720px; margin: 26px auto 0; }
.progress-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.progress-head .label { font-weight: 600; color: var(--text-dim); font-size: 13px; }
.progress-head .pct { font-size: 30px; font-weight: 720; letter-spacing: -.02em; }
.progress-head .pct small { font-size: 15px; color: var(--text-mut); font-weight: 600; }
.bar { height: 12px; background: var(--idle-bg); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.bar > span { display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--brand), var(--brand-300));
  border-radius: 999px; transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.bar.seg { display: flex; }
.bar.seg i { height: 100%; display: block; position: relative; overflow: hidden; }
/* flowing gradient — the fill "waves" */
.bar.seg .s-done { background: linear-gradient(90deg, color-mix(in srgb,var(--ok) 78%,#000), var(--ok), color-mix(in srgb,var(--ok) 55%,#fff), var(--ok)); background-size: 220% 100%; animation: barflow 3s linear infinite; }
.bar.seg .s-wip  { background: linear-gradient(90deg, color-mix(in srgb,var(--wip) 78%,#000), var(--wip), color-mix(in srgb,var(--wip) 55%,#fff), var(--wip)); background-size: 220% 100%; animation: barflow 3.2s linear infinite; }
/* sweeping highlight — a light streak glides across */
.bar.seg i::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-100%); animation: barshine 2.6s ease-in-out infinite; }
@keyframes barflow { to { background-position: -220% 0; } }
@keyframes barshine { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(220%); } }
@media (prefers-reduced-motion: reduce) {
  .bar.seg .s-done, .bar.seg .s-wip { animation: none; }
  .bar.seg i::after { display: none; }
}

.hero-stats { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; margin-top: 22px; }
.hero-stats .s { text-align: center; }
.hero-stats .s .n { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.hero-stats .s .k { font-size: 12px; color: var(--text-mut); text-transform: uppercase; letter-spacing: .04em; }
.hero-stats .s .n.done { color: var(--ok); }
.hero-stats .s .n.wip { color: var(--wip); }

/* sections */
section.block { padding: 36px 0; }
section.block + section.block { border-top: 1px solid var(--border); }
.sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.sec-head h2 { font-size: 19px; }
.sec-head .count { color: var(--text-mut); font-size: 13px; font-weight: 600; background: var(--panel-2);
  border: 1px solid var(--border); padding: 1px 9px; border-radius: 999px; }
.sec-head .line { flex: 1; height: 1px; background: var(--border); }

/* status columns */
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.col { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.col > header { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border);
  font-weight: 650; font-size: 13px; }
.col > header .dot { width: 9px; height: 9px; border-radius: 50%; }
.col.done > header { background: var(--ok-bg); } .col.done .dot { background: var(--ok); }
.col.wip > header { background: var(--wip-bg); } .col.wip .dot { background: var(--wip); }
.col.next > header { background: var(--brand-50); } .col.next .dot { background: var(--brand); }
.col ul { list-style: none; margin: 0; padding: 6px; }
.col li { display: flex; gap: 9px; align-items: flex-start; padding: 7px 9px; border-radius: var(--radius-sm); font-size: 13px; }
.col li:hover { background: var(--panel-2); }
.col li .tick { color: var(--text-mut); flex: 0 0 auto; margin-top: 1px; }
.col.done li .tick { color: var(--ok); }
.col.wip li .tick { color: var(--wip); }
.col li small { color: var(--text-mut); display: block; }

/* phase timeline */
.timeline { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 10px; }
.phase { background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--idle);
  border-radius: var(--radius-sm); padding: 12px 13px; box-shadow: var(--shadow); }
.phase.done { border-left-color: var(--ok); }
.phase.in-progress { border-left-color: var(--wip); }
.phase .ph-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.phase .ph-n { font: 600 11px var(--mono); color: var(--text-mut); }
.phase h3 { font-size: 13.5px; margin-bottom: 5px; }
.phase p { margin: 0; color: var(--text-dim); font-size: 12px; }

/* coverage matrix */
.cov-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.cov-group { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.cov-group > header { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border-bottom: 1px solid var(--border); }
.cov-group > header .g-name { font-weight: 650; font-size: 13.5px; flex: 1; }
.cov-group > header .g-frac { font: 600 12px var(--mono); color: var(--text-mut); }
.cov-mini { height: 4px; background: var(--idle-bg); border-radius: 999px; overflow: hidden; margin: 8px 13px 4px; }
.cov-mini > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.cov-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 13px 13px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text-dim); }
.chip .d { width: 7px; height: 7px; border-radius: 50%; background: var(--idle); }
.chip.done { color: var(--text); border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.chip.done .d { background: var(--ok); }
.chip.in-progress .d { background: var(--wip); }
.chip.planned { opacity: .62; }
.chip .soon { font-size: 10px; color: var(--wip); font-weight: 600; }
.chip.plus { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }

/* changelog */
.changelog { border-left: 2px solid var(--border); margin-left: 6px; padding-left: 18px; }
.release { position: relative; padding-bottom: 18px; }
.release::before { content: ""; position: absolute; left: -25px; top: 3px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--brand); border: 2px solid var(--panel); box-shadow: 0 0 0 2px var(--brand-50); }
.release .ver { display: flex; align-items: baseline; gap: 10px; }
.release .ver b { font-size: 15px; }
.release .ver time { color: var(--text-mut); font: 500 12px var(--mono); }
.release ul { margin: 8px 0 0; padding-left: 0; list-style: none; }
.release li { font-size: 13px; color: var(--text-dim); padding: 2px 0 2px 18px; position: relative; }
.release li::before { content: "+"; position: absolute; left: 2px; color: var(--ok); font-weight: 700; }

/* footer */
footer { border-top: 1px solid var(--border); background: var(--panel); padding: 22px 0; margin-top: 8px; }
footer .wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
footer .foot-logo { display: inline-flex; align-items: center; }
footer .foot-logo img { height: 26px; width: auto; display: block; }
/* Status defaults to dark → white logo; swap to the colored logo in light theme. */
footer .foot-logo .logo-dark { display: none; }
[data-theme="light"] footer .foot-logo .logo-light { display: none; }
[data-theme="light"] footer .foot-logo .logo-dark { display: block; }
footer .dev { color: var(--text-dim); font-size: 13px; }
footer .dev b { color: var(--text); }
footer .spacer { flex: 1; }
footer .meta { color: var(--text-mut); font: 500 12px var(--mono); }

.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; font-size: 12px; color: var(--text-dim); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; }

@media (max-width: 820px) {
  .cols3 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .topbar nav { display: none; }
}
