/* CoreWHM interface theme. Colours sampled from the Command Center reference screenshot. */
:root {
  --bg: #080d15;          /* page background */
  --surface: #18212e;     /* header, cards, panels */
  --surface-2: #101f28;   /* notice boxes */
  --line: #406e85;        /* card and panel borders */
  --line-soft: #233042;   /* chips, inputs, secondary buttons */
  --accent: #79d2f1;      /* brand cyan */
  --accent-hi: #97e5fc;   /* highlight cyan (focus, featured card) */
  --text: #eaeff6;        /* headings and values */
  --text-2: #c8d2df;      /* secondary values */
  --chip: #97a3b6;        /* links and chip text */
  --muted: #7e8a9d;       /* labels and descriptions */
  --danger: #ff9b9b;
  --danger-bg: rgba(255, 110, 110, .08);
  --ok: #8fe3b0;
  --ok-bg: rgba(143, 227, 176, .08);
  --radius: 14px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--chip); }
a:hover { color: var(--text); }
h1, h2, h3 { color: var(--text); }
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 920px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
  height: 84px;
  display: flex;
  align-items: center;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent); color: var(--bg);
  display: grid; place-items: center;
  font-size: 24px; font-weight: 700;
  box-shadow: 0 0 0 1px rgba(151, 229, 252, .35), 0 0 22px rgba(121, 210, 241, .30);
}
.nav { display: flex; gap: 28px; }
.nav a { text-decoration: none; font-size: 16px; color: var(--chip); }
.nav a:hover { color: var(--text); }
.header-actions { display: flex; gap: 12px; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  background: var(--surface);
  color: var(--text);
  font: inherit; font-weight: 500;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--line); color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.btn-primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: var(--bg); }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; }
.btn-danger-text { color: var(--danger); }

/* ---------- Typography ---------- */
.eyebrow { color: var(--accent-hi); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.page-title { font-size: 34px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin: 8px 0 6px; }
.lede, .muted { color: var(--muted); margin: 0; }
.card h2 { font-size: 21px; font-weight: 600; margin: 0 0 4px; letter-spacing: -.01em; }
.card h2.sub { margin-top: 30px; }

/* ---------- Layout blocks ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-top: 48px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 36px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.section { margin-top: 56px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.card-plain { border-color: var(--line-soft); }

.stat { min-height: 128px; display: flex; flex-direction: column; justify-content: space-between; }
.stat .label { color: var(--muted); font-size: 15px; }
.stat .value { font-size: 36px; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.stat.is-featured {
  border-color: var(--accent-hi);
  box-shadow: 0 0 0 1px var(--accent-hi), 0 0 30px rgba(121, 210, 241, .22);
}

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px;
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--chip); text-decoration: none; font-size: 15px;
}
.chip:hover { color: var(--text); border-color: var(--line); }

.kv { display: grid; grid-template-columns: 130px 1fr; gap: 14px 16px; margin: 22px 0 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text-2); font-weight: 500; }

.notice {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  color: var(--chip);
  font-size: 14.5px;
  margin-top: 22px;
}
.notice strong { color: var(--text-2); }

.site-footer { margin-top: auto; padding: 36px 0 28px; color: var(--muted); font-size: 13px; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--text-2); font-size: 14px; font-weight: 500; }
.field .hint { color: var(--muted); font-size: 13px; }
.input, .select {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  font: inherit;
}
.input::placeholder { color: #55606f; }
.input:focus, .select:focus {
  outline: none; border-color: var(--accent-hi);
  box-shadow: 0 0 0 3px rgba(151, 229, 252, .15);
}
.input.is-invalid { border-color: var(--danger); }
.input-code { letter-spacing: .35em; font-size: 20px; text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; }
.check { display: inline-flex; align-items: center; gap: 10px; color: var(--chip); font-size: 14px; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.error-text { color: var(--danger); font-size: 13px; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 28px; flex-wrap: wrap; }

.alert { border-radius: var(--radius-sm); padding: 14px 18px; margin: 0 0 22px; font-size: 14.5px; border: 1px solid; }
.alert-error { background: var(--danger-bg); border-color: rgba(255, 155, 155, .35); color: var(--danger); }
.alert-error ul { margin: 0; padding-left: 18px; }
.alert-ok { background: var(--ok-bg); border-color: rgba(143, 227, 176, .35); color: var(--ok); }
.alert-info { background: var(--surface-2); border-color: var(--line); color: var(--chip); }

details.more { margin-top: 18px; }
details.more summary { cursor: pointer; color: var(--chip); font-size: 14px; }
details.more summary:hover { color: var(--text); }
details.more[open] summary { margin-bottom: 14px; }

/* ---------- Requirements / table ---------- */
.reqs { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.reqs td { padding: 11px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.reqs td.state { width: 34px; }
.reqs td.detail { color: var(--muted); text-align: right; padding-left: 16px; }
.dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.dot-ok { background: rgba(143, 227, 176, .15); color: var(--ok); }
.dot-fail { background: rgba(255, 155, 155, .15); color: var(--danger); }
.dot-warn { background: rgba(255, 214, 128, .15); color: #ffd680; }

/* ---------- Installer steps ---------- */
.steps { display: flex; gap: 10px; margin: 28px 0 8px; flex-wrap: wrap; }
.step {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line-soft); color: var(--muted); font-size: 14px;
}
.step .num {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--line-soft); font-size: 12px; font-weight: 600;
}
.step.is-done { color: var(--text-2); }
.step.is-done .num { background: var(--ok-bg); border-color: rgba(143, 227, 176, .4); color: var(--ok); }
.step.is-current { color: var(--text); border-color: var(--accent-hi); box-shadow: 0 0 18px rgba(121, 210, 241, .18); }
.step.is-current .num { background: var(--accent); border-color: var(--accent); color: var(--bg); }

.qr-wrap { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.qr { background: #fff; padding: 12px; border-radius: 12px; width: 244px; height: 244px; }
.qr svg { width: 220px; height: 220px; display: block; }
.secret {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 17px; letter-spacing: .08em;
  background: var(--bg); border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 12px 14px; color: var(--text);
  word-break: break-all;
}
.codes {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 22px 0;
  list-style: none; padding: 0;
}
.codes li {
  background: var(--bg); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 12px 16px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 17px; letter-spacing: .08em; color: var(--text);
}

/* ---------- Login ---------- */
.auth-wrap { min-height: calc(100vh - 84px - 90px); display: grid; place-items: center; padding: 48px 0; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card .brand-row { display: flex; justify-content: center; margin-bottom: 26px; }
.auth-card h1 { text-align: center; font-size: 28px; margin: 0 0 6px; font-weight: 600; }
.auth-card .lede { text-align: center; margin-bottom: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .container { padding: 0 18px; }
  .site-header { height: auto; padding: 16px 0; }
  .site-header .container { flex-wrap: wrap; }
  .nav { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .page-title { font-size: 26px; }
  .codes { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; }
}
