:root {
  --bg0: #0c1118;
  --bg1: #121a24;
  --ink: #e8eef6;
  --muted: #8b9bb0;
  --line: rgba(232, 238, 246, 0.12);
  --accent: #3d9b8f;
  --accent-2: #c4a574;
  --danger: #d4655a;
  --ok: #6bbf8a;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg0);
  min-height: 100%;
}

.atmosphere {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(61, 155, 143, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(196, 165, 116, 0.12), transparent 50%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  pointer-events: none;
  z-index: -1;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.top nav { display: flex; gap: 1.25rem; }
.top nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.top nav a:hover { color: var(--ink); }

.hero {
  max-width: 40rem;
  padding: 18vh 2rem 4rem;
  animation: rise 700ms ease-out both;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.75rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.5rem, 9vw, 5.5rem);
  line-height: 0.95;
  margin: 0 0 1rem;
}
.lede {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.55;
  margin: 0 0 1.75rem;
  max-width: 32rem;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 560;
  font-size: 0.92rem;
  background: rgba(255,255,255,0.03);
  transition: background 160ms ease, border-color 160ms ease;
}
.btn:hover { background: rgba(255,255,255,0.07); border-color: rgba(232,238,246,0.28); }
.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: #06110f;
}
.btn.primary:hover { filter: brightness(1.06); }

.shell {
  display: grid;
  grid-template-columns: 16rem 1fr 18rem;
  height: calc(100vh - 4rem);
}
.panel {
  border-right: 1px solid var(--line);
  padding: 1rem;
  overflow: auto;
}
.panel:last-child { border-right: none; border-left: 1px solid var(--line); }
.panel h2 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 0.85rem;
  font-weight: 600;
}

.field { margin-bottom: 0.85rem; }
.field label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.field input, .field select {
  width: 100%;
  background: rgba(0,0,0,0.28);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.55rem 0.65rem;
  border-radius: 2px;
  font: inherit;
}

.channel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  margin-bottom: 0.25rem;
}
.channel:hover { background: rgba(255,255,255,0.04); }
.channel.active {
  border-color: rgba(61, 155, 143, 0.45);
  background: rgba(61, 155, 143, 0.12);
}
.channel .name { font-weight: 600; font-size: 0.92rem; }
.channel .meta { font-size: 0.75rem; color: var(--muted); }

.ptt {
  width: 100%;
  margin-top: 1rem;
  padding: 1rem;
  border: none;
  border-radius: 2px;
  background: #243040;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  user-select: none;
}
.ptt.hot { background: var(--danger); }

.unit {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.unit .tx { color: var(--danger); font-weight: 700; font-size: 0.7rem; letter-spacing: 0.08em; }
.status {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.75rem;
}
.status.ok { color: var(--ok); }
.status.bad { color: var(--danger); }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.table th, .table td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--line);
}
.table th { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; }
.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge.active { background: rgba(107, 191, 138, 0.18); color: var(--ok); }
.badge.cancelled, .badge.suspended, .badge.past_due {
  background: rgba(212, 101, 90, 0.18);
  color: var(--danger);
}

.admin-wrap { padding: 1.5rem 2rem 3rem; max-width: 56rem; }
.admin-wrap h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.4rem;
  margin: 0 0 0.35rem;
}
.admin-wrap .sub { color: var(--muted); margin: 0 0 1.5rem; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; height: auto; }
  .panel { border-right: none; border-bottom: 1px solid var(--line); }
}
