:root {
  --bg: #07110e;
  --sidebar: #081612;
  --card: #10241c;
  --card-2: #0d1e18;
  --line: #1c3d30;
  --line-strong: #2a5a45;
  --text: #e8f6ef;
  --muted: #8eaea0;
  --faint: #6d8c7e;
  --accent: #1f9d62;
  --accent-2: #2fce86;
  --accent-soft: rgba(47, 206, 134, 0.14);
  --warn: #e6b325;
  --warn-bg: rgba(230, 179, 37, 0.12);
  --bad: #ef6b6b;
  --bad-bg: rgba(239, 107, 107, 0.12);
  --good: #3dce86;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --radius: 16px;
  --sidebar-w: 248px;
  font-family: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body { min-height: 100vh; }
a { color: var(--accent-2); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }

.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: linear-gradient(180deg, #0c1c16 0%, #081410 100%);
  border-right: 1px solid #123026;
  padding: 18px 12px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.brand { display: flex; gap: 10px; align-items: center; color: var(--text); padding: 4px 8px 16px; }
.brand strong { display: block; font-size: 15px; letter-spacing: 0.01em; }
.brand small, .who small { display: block; color: var(--muted); font-size: 12px; }
.brand-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  object-fit: cover;
  display: block;
  background: #fff;
  border-radius: 10px;
}
.site-nav .brand-logo { width: 64px; height: 64px; flex-basis: 64px; }
.brand.solo { flex-direction: column; align-items: center; text-align: center; }
.brand.solo .brand-logo { width: 96px; height: 96px; flex-basis: 96px; }
.mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #1fa971, #0e6b45);
  color: white; font-weight: 700;
}
.collapse, .menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 8px;
}
nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  margin: 16px 10px 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
nav a, .nav-settings {
  display: flex; align-items: center; gap: 10px;
  color: #c9e6d8;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 14px;
}
nav a:hover, .nav-settings:hover { background: rgba(255,255,255,0.04); }
nav a.active { background: #1a6b45; color: white; }
.nav-group { display: flex; flex-direction: column; }
.sidebar .nav-parent {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  appearance: none;
  background: transparent;
  background-color: transparent;
  border: 0;
  box-shadow: none;
  color: #c9e6d8;
  padding: 8px 10px;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}
.nav-parent:hover { background: rgba(255,255,255,0.04); }
.nav-group.open > .nav-parent { color: white; }
.chev { width: 14px; height: 14px; margin-left: auto; flex: 0 0 14px; transition: transform 0.15s ease; }
.nav-group.open .chev { transform: rotate(180deg); }
.nav-sub { display: none; flex-direction: column; gap: 2px; margin: 2px 0 6px 12px; }
.nav-group.open .nav-sub { display: flex; }
.nav-sub a { font-size: 13.5px; }
.nav-badge {
  margin-left: auto;
  background: #c4552a;
  color: white;
  font-style: normal;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 5px;
}
.nav-settings { margin-top: auto; }
.ico { width: 16px; height: 16px; flex: 0 0 16px; }

.main { flex: 1; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  position: sticky; top: 0; z-index: 5;
  background: rgba(7, 17, 14, 0.9);
  backdrop-filter: blur(10px);
}
.top-title { font-size: 16px; margin: 0; font-weight: 600; }
.top-search { margin-left: auto; }
.top-search input, .field input, .field select, .field textarea, label input, label select, label textarea {
  background: #0c1c17;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  outline: none;
  width: 100%;
}
.top-search input { width: 260px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
.who { display: flex; align-items: center; gap: 10px; }
.who strong { display: block; font-size: 14px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: #146b48; font-weight: 600;
}
.logout { color: var(--muted); font-size: 13px; }
.content { padding: 22px 28px 48px; max-width: 1180px; }

.hero {
  display: flex; justify-content: space-between; gap: 18px; align-items: center;
  background: radial-gradient(1200px 180px at 10% 0%, rgba(47, 206, 134, 0.16), transparent 50%), linear-gradient(180deg, #12382c, #0e241c);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.hero h2 { margin: 4px 0 6px; font-size: 28px; font-weight: 600; }
.hero h2 em { font-style: normal; color: #b7ffd8; }
.hero p { margin: 0; color: #c7e6d8; }
.kicker, .hero-date { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.live {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 8px; color: var(--good); font-size: 13px;
}
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(61,206,134,0.15); }
.hero-actions, .row-actions, .btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(180deg, #2fce86, #1c9a5e);
  color: #042216; font-weight: 600;
  border: 0; border-radius: 11px;
  padding: 10px 14px; cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn.soft { background: var(--accent-soft); color: #b7ffd8; }
.btn.danger { background: #6e2430; color: #ffd5d8; }
.btn.sm { padding: 6px 10px; border-radius: 9px; font-size: 13px; }
.sig { font-weight: 600; }
.sig.good, .sig.ok { color: #3dce86; }
.sig.warn { color: #e6b325; }
.sig.bad { color: #ef6b6b; }
.sig.muted { color: var(--muted); font-weight: 400; }
.row-actions form { display: inline; }
.btn:hover { filter: brightness(1.05); }

.alert-bar {
  margin-top: 14px;
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  background: #2a2612;
  border: 1px solid #6d5a1d;
  color: #f3e2a8;
  border-radius: 12px;
  padding: 10px 12px 10px 16px;
}
.stats {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.stat, .panel {
  background: linear-gradient(180deg, rgba(16, 36, 28, 0.96), rgba(10, 26, 21, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.stat-kicker { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.stat-value { font-size: 28px; font-weight: 600; margin: 8px 0 6px; }
.stat-sub { color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--faint); }
.dot.good { background: var(--good); }
.dot.ok { background: #7dcea0; }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }

.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; margin-top: 12px; align-items: start; }
.dash-charts { display: grid; grid-template-columns: 1.5fr 0.9fr; gap: 12px; margin-top: 12px; align-items: stretch; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.chart-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.chart-head .ico { width: 18px; height: 18px; color: var(--accent-2); }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--faint); }
.swatch.rev, .swatch.active { background: var(--accent-2); }
.swatch.unpaid { background: var(--warn); }
.swatch.suspended { background: var(--bad); }
.settings-grid { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 14px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.panel h2, .panel h3 { margin: 0 0 12px; font-size: 16px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono, pre, code { font-family: "IBM Plex Mono", ui-monospace, monospace; }
pre.script {
  background: #07140f;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  overflow: auto;
  max-height: 480px;
  color: #d5f5e4;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre;
}

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--faint); font-weight: 500; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
th, td { padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
tr:hover td { background: rgba(255,255,255,0.02); }
.pill {
  display: inline-flex; align-items: center;
  border-radius: 999px; padding: 2px 8px;
  font-size: 12px; text-transform: capitalize;
  background: #163028; color: #b7d7c8;
}
.pill.good { background: rgba(47, 206, 134, 0.15); color: #8dface; }
.pill.warn { background: var(--warn-bg); color: #f0d48a; }
.pill.bad { background: var(--bad-bg); color: #ffb4b4; }
.pill.muted { background: #1a2420; color: var(--muted); }

.filters, .form-grid { display: grid; gap: 12px; align-content: start; align-items: start; }
.filters { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 14px; align-items: end; }
.filters.slim { grid-template-columns: minmax(220px, 1.6fr) minmax(160px, 0.7fr) auto; }
.check { display: flex; align-items: center; gap: 8px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-grid > h3 { grid-column: 1 / -1; margin-bottom: 0; }
.form-grid.three { grid-template-columns: 1fr 1fr 1fr; }
label, .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
label input[type="checkbox"] { width: auto; }
summary { cursor: pointer; }
.span-2 { grid-column: span 2; }
textarea { min-height: 90px; resize: vertical; }

.flash { border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.flash.ok { background: rgba(47, 206, 134, 0.12); color: #b7ffd8; }
.flash.bad { background: var(--bad-bg); color: #ffc9c9; }
.flash.warn { background: var(--warn-bg); color: #f3e2a8; }

.split { display: grid; grid-template-columns: 280px 1fr; gap: 14px; align-items: start; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form input, .inline-form select { width: auto; min-width: 0; }
.token { display: block; margin-top: 4px; word-break: break-all; font-size: 12px; color: #d5f5e4; }
.empty { padding: 8px 0 2px; }
.side-card { position: sticky; top: 84px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 10px; font-size: 14px; }
.kv span { color: var(--muted); }

.ports, .odb-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.port, .odb-port {
  min-width: 86px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: #0c1c17;
  font-size: 12px;
}
.port strong, .odb-port strong { display: block; font-size: 13px; }
.odb-port.free { opacity: 0.7; }
.odb-port.good { border-color: #1f9d62; }
.odb-port.warn { border-color: #a78420; }
.odb-port.bad { border-color: #a14b4b; }

.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs a { color: var(--muted); padding: 6px 10px; border-radius: 999px; border: 1px solid transparent; }
.tabs a.on { color: var(--text); border-color: var(--line); background: #10241c; }

.callout {
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  color: #cfe7db;
  background: rgba(31, 157, 98, 0.08);
  border-radius: 0 10px 10px 0;
  margin: 0 0 12px;
}
.sample { font-size: 11px; color: #d6b15e; letter-spacing: 0.04em; text-transform: uppercase; }

.uptime { display: flex; gap: 3px; align-items: flex-end; height: 28px; }
.uptime i { width: 7px; height: 100%; border-radius: 2px; display: block; background: #234; }
.uptime i.on { background: var(--accent-2); }
.uptime i.off { background: var(--bad); height: 60%; }

.map-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.zone-col h3 { margin-top: 0; }

.login-body { display: grid; place-items: center; min-height: 100vh; background:
  radial-gradient(800px 300px at 50% 0%, rgba(47,206,134,0.16), transparent 60%), var(--bg); }
.login-card {
  width: min(440px, calc(100% - 32px));
  background: #0e221b;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow);
}
.login-card h1 { margin: 8px 0 0; }
.hint { color: var(--faint); font-size: 13px; }
.brand.solo { padding: 0; }

@media (max-width: 1100px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .grid-2, .split, .filters, .form-grid.three, .settings-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; z-index: 20; transform: translateX(-105%); transition: transform .2s ease; }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; padding: 8px 10px; }
  .main { width: 100%; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .hero, .alert-bar, .grid-2, .dash-charts, .split, .filters, .form-grid.two, .form-grid.three, .settings-grid { display: flex; flex-direction: column; }
  .top-search, .top-search input { width: 100%; }
  .topbar { flex-wrap: wrap; }
  .who { margin-left: auto; }
  .site-hero, .site-how { grid-template-columns: 1fr; }
  .site-nav { flex-wrap: wrap; }
}

.site {
  min-height: 100vh;
  color: #f4fff8;
  background-color: #0b3a2c;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px),
    radial-gradient(880px 460px at 72% 8%, rgba(120, 230, 170, 0.38), transparent 58%),
    linear-gradient(165deg, #1a8f62 0%, #0c4a36 42%, #071910 100%);
  background-size: 52px 52px, 52px 52px, auto, auto;
}
.site-nav {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 7vw;
}
.site-links { display: flex; align-items: center; gap: 18px; }
.site-links a { color: #e7f6ee; font-weight: 500; }
.site-links .btn { color: #042216; }
.site-hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 36px; align-items: center;
  padding: 18px 7vw 28px;
}
.site-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(0,0,0,0.22); border-radius: 999px; padding: 6px 12px;
}
.site-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: #7dffc0; }
.site-copy h1 { font-size: clamp(36px, 4.6vw, 58px); line-height: 1.05; margin: 16px 0; letter-spacing: -0.03em; }
.site-copy p { font-size: 18px; line-height: 1.45; color: #d7f3e6; max-width: 540px; }
.site-cta { display: flex; gap: 12px; margin: 22px 0; flex-wrap: wrap; }
.btn.light { background: #f4fff8; color: #0c2418; }
.btn.ghost.light { background: transparent; color: #f4fff8; border-color: rgba(255,255,255,0.45); }
.site-points { list-style: none; padding: 0; margin: 0; color: #d7f3e6; }
.site-points li { margin: 6px 0; }
.site-points li::before { content: "✓  "; color: #9dffc8; }
.preview {
  background: #0d1b16; border: 1px solid #234838; border-radius: 22px;
  padding: 16px 16px 8px; box-shadow: 0 24px 60px rgba(0,0,0,0.28);
}
.preview-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.dots i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3d6454; margin-right: 5px; }
.preview-live { color: #9dffc8; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.preview-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.preview-stats div { background: #12261e; border: 1px solid #234838; border-radius: 12px; padding: 10px; }
.preview-stats strong { display: block; font-size: 22px; }
.preview-stats small, .preview-stats em { display: block; color: #8eaea0; font-style: normal; font-size: 12px; }
.preview-stats .warn { border-color: #c9a24a; }
.preview-stats .warn strong, .preview-stats .warn em { color: #f0d48a; }
.preview-bars { display: flex; align-items: flex-end; gap: 4px; height: 40px; margin: 14px 0; }
.preview-bars i { width: 10px; border-radius: 3px 3px 0 0; background: #2fce86; display: block; }
.preview table { width: 100%; border-collapse: collapse; font-size: 13px; }
.preview th { text-align: left; color: #8eaea0; font-size: 11px; letter-spacing: 0.08em; font-weight: 500; padding-bottom: 6px; }
.preview td { padding: 8px 0; border-top: 1px solid #1c3d30; }
.site-how {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px;
  padding: 10px 7vw 48px;
}
.site-how article {
  background: rgba(8, 24, 18, 0.45); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 16px 18px;
}
.site-how h2 { margin: 0 0 8px; font-size: 18px; }
.site-how p { margin: 0; color: #d7f3e6; }
.cli-log { position: fixed; inset: 0; z-index: 40; display: none; align-items: center; justify-content: center; background: rgba(6, 16, 12, 0.55); padding: 16px; }
.cli-log.open { display: flex; }
.cli-log-card { width: min(760px, 100%); background: #0d1b16; color: #d7f3e6; border: 1px solid #234838; border-radius: 16px; padding: 14px 16px 16px; }
.cli-log-card header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cli-log-card pre { margin: 0; max-height: 62vh; overflow: auto; white-space: pre-wrap; font-family: ui-monospace, Consolas, monospace; font-size: 13px; line-height: 1.45; }
.svc-read { margin: 0 0 18px; padding-bottom: 8px; border-bottom: 1px solid #1c3d30; }
.svc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.svc-head h3 { margin: 0; }
.lan-row { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 14px; }
.lan-row label { display: flex; align-items: center; gap: 6px; }
.isp-actions { position: relative; display: inline-block; }
.isp-menu {
  position: fixed;
  z-index: 50;
  min-width: 248px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow);
}
.isp-menu[hidden] { display: none; }
.isp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--text);
  text-align: left;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
}
.isp-item:hover { background: var(--accent-soft); }
.isp-item svg { width: 18px; height: 18px; flex: 0 0 18px; }
.isp-grace { display: flex; align-items: center; }
.isp-grace .isp-item { flex: 1; width: auto; cursor: default; }
.isp-grace .isp-item:hover { background: transparent; }
.isp-days {
  width: 62px;
  background: #0c1c17;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--text);
}
.isp-go {
  margin: 0 6px 0 6px;
  background: transparent;
  border: 0;
  color: var(--accent-2);
  cursor: pointer;
  font-size: 13px;
  padding: 6px;
}
