/* Zulu Sierra — one stylesheet for the whole app. */

:root {
  --navy:      #0f1b2d;
  --navy-2:    #16263d;
  --navy-3:    #1d3251;
  --line:      #27405f;
  --blue:      #2a78d6;
  --blue-soft: #3d8ce8;
  --green:     #1baf7a;
  --orange:    #eb6834;
  --yellow:    #eda100;
  --ink:       #0b0b0b;
  --paper:     #f7f8fa;
  --text:      #e8eef6;
  --muted:     #93a7c0;
  --muted-2:   #6d82a0;
  --radius:    10px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  background: var(--navy);
  color: var(--text);
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--blue-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); font-weight: 750; }
h2 { font-size: clamp(1.3rem, 3vw, 1.75rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 650; }
p  { margin: 0 0 1rem; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }

/* ------------------------------------------------------------------- header */
header.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 27, 45, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
header.top .inner {
  max-width: 1120px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand svg { display: block; }
.brand .light { font-weight: 400; color: #c3c2b7; }
nav.main { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
nav.main a, nav.main button.navlink {
  padding: 7px 12px; border-radius: 8px; color: var(--muted);
  font-size: .92rem; font-weight: 550; background: none; border: 0;
  font-family: inherit; cursor: pointer;
}
nav.main a:hover, nav.main button.navlink:hover { background: var(--navy-2); color: var(--text); text-decoration: none; }
nav.main a.on { background: var(--navy-3); color: #fff; }

/* -------------------------------------------------------------------- blocks */
.card {
  background: var(--navy-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}
.card.flat { background: transparent; }
.card h3 { margin-bottom: .35rem; }
.card > :last-child { margin-bottom: 0; }

.grid { display: grid; gap: 16px; }
.grid.two   { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid.four  { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.spread { margin-left: auto; }

.muted { color: var(--muted); }
.small { font-size: .86rem; }
.tiny  { font-size: .78rem; }
.mono  { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.mb0 { margin-bottom: 0; }

/* -------------------------------------------------------------------- stats */
.stat { background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-size: 1.9rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; }
.stat .k { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.stat .sub { color: var(--muted-2); font-size: .8rem; }

/* ------------------------------------------------------------------ progress */
.bar { height: 10px; background: var(--navy-3); border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); border-radius: 99px; }
.bar.pic > span { background: linear-gradient(90deg, var(--green), var(--yellow)); }

/* -------------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 99px; font-size: .74rem; font-weight: 650;
  text-transform: uppercase; letter-spacing: .05em;
  background: var(--navy-3); color: var(--muted); border: 1px solid var(--line);
  white-space: nowrap;
}
.badge.ok      { background: rgba(27,175,122,.16); color: #5fd9a9; border-color: rgba(27,175,122,.4); }
.badge.info    { background: rgba(42,120,214,.16); color: #7db4f3; border-color: rgba(42,120,214,.4); }
.badge.warn    { background: rgba(237,161,0,.16);  color: #f1c04e; border-color: rgba(237,161,0,.4); }
.badge.alert   { background: rgba(235,104,52,.16); color: #f59876; border-color: rgba(235,104,52,.4); }
.badge.soon    { background: transparent; color: var(--muted-2); border-style: dashed; }
.chip {
  display: inline-block; padding: 3px 9px; border-radius: 7px; font-size: .8rem;
  background: var(--navy-3); color: #cfe0f3; border: 1px solid var(--line);
  margin: 0 4px 4px 0; font-weight: 550;
}

/* ------------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: 8px; border: 1px solid transparent;
  font-family: inherit; font-size: .93rem; font-weight: 650; cursor: pointer;
  background: var(--blue); color: #fff; text-decoration: none; line-height: 1.3;
}
.btn:hover { background: var(--blue-soft); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { background: var(--navy-3); }
.btn.go { background: var(--green); }
.btn.go:hover { background: #22c78b; }
.btn.danger { background: transparent; border-color: rgba(235,104,52,.5); color: #f59876; }
.btn.danger:hover { background: rgba(235,104,52,.14); }
.btn.sm { padding: 5px 11px; font-size: .83rem; }
.btn.block { width: 100%; }

/* --------------------------------------------------------------------- forms */
label { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
input, select, textarea {
  width: 100%; padding: 9px 11px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--navy); color: var(--text);
  font-family: inherit; font-size: .95rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: var(--blue); }
textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: 12px; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.check { display: flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--text); font-weight: 500; }
.check input { width: auto; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0 0 16px; }
legend { padding: 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* -------------------------------------------------------------------- tables */
.tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; white-space: nowrap; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: rgba(42,120,214,.07); }
table.compact th, table.compact td { padding: 6px 8px; }

/* -------------------------------------------------------------------- notice */
.notice {
  border-left: 3px solid var(--yellow); background: rgba(237,161,0,.09);
  padding: 11px 14px; border-radius: 0 8px 8px 0; font-size: .88rem; margin-bottom: 16px;
}
.notice.blue  { border-color: var(--blue);  background: rgba(42,120,214,.1); }
.notice.green { border-color: var(--green); background: rgba(27,175,122,.1); }
.notice.red   { border-color: var(--orange);background: rgba(235,104,52,.1); }
.notice strong { color: #fff; }

.err { color: #f59876; font-size: .88rem; min-height: 1.2em; }
.ok  { color: #5fd9a9; font-size: .88rem; min-height: 1.2em; }

/* ---------------------------------------------------------------------- chat */
.thread { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; padding: 4px; }
.msg { max-width: 78%; padding: 8px 12px; border-radius: 12px; background: var(--navy-3); font-size: .9rem; }
.msg.me { align-self: flex-end; background: rgba(42,120,214,.28); }
.msg .who { font-size: .72rem; color: var(--muted); display: block; }

/* -------------------------------------------------------------------- panels */
.tabpanel[hidden] { display: none; }
.empty { color: var(--muted-2); font-size: .9rem; padding: 14px 0; }
.loading { color: var(--muted-2); font-size: .9rem; }

hr.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ------------------------------------------------------------------- landing */
.hero { padding: 64px 0 40px; }
.hero h1 { max-width: 20ch; }
.hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 54ch; }
.pillar { background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.pillar h3 { display: flex; align-items: center; gap: 8px; }
.pillar p { color: var(--muted); font-size: .92rem; margin: 0; }
footer.foot { border-top: 1px solid var(--line); margin-top: 48px; padding: 24px 0 40px; color: var(--muted-2); font-size: .85rem; }

@media (max-width: 640px) {
  .hero { padding: 40px 0 24px; }
  nav.main { width: 100%; margin-left: 0; overflow-x: auto; }
  .card { padding: 14px; }
}
