:root {
  --bg: #0c0f14;
  --panel: #141a24;
  --border: #243044;
  --text: #e8eef8;
  --muted: #8b9bb4;
  --accent: #ffb347;
  --accent2: #5eead4;
  --danger: #f87171;
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 179, 71, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(94, 234, 212, 0.08), transparent),
    var(--bg);
}

.hidden { display: none !important; }

.security-alert {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(248, 113, 113, 0.12);
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
}
.security-alert.warn {
  background: rgba(255, 179, 71, 0.12);
  border-color: rgba(255, 179, 71, 0.35);
}
.security-alert.ok {
  background: rgba(94, 234, 212, 0.08);
  border-color: rgba(94, 234, 212, 0.25);
}

#app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.login-panel {
  max-width: 400px;
  margin: 4rem auto;
}

.brand { text-align: center; margin-bottom: 1.5rem; }
.brand-icon { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }
.brand h1 { margin: 0; font-size: 1.5rem; letter-spacing: 0.02em; }
.subtitle { color: var(--muted); margin: 0.35rem 0 0; }

label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0a0e13;
  color: var(--text);
  font-size: 1rem;
}

input:focus {
  outline: 2px solid rgba(255, 179, 71, 0.45);
  border-color: var(--accent);
}

.btn {
  border: 1px solid var(--border);
  background: #1a2230;
  color: var(--text);
  padding: 0.55rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn:hover { border-color: var(--muted); }
.btn.primary {
  width: 100%;
  margin-top: 0.5rem;
  background: linear-gradient(135deg, #ffb347, #ff8c42);
  border: none;
  color: #1a1208;
  font-weight: 600;
}
.btn.ghost { background: transparent; }

.error { color: var(--danger); font-size: 0.9rem; margin: 0.5rem 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.brand-inline { display: flex; align-items: center; gap: 0.75rem; }
.brand-inline .brand-icon { font-size: 1.75rem; margin: 0; }
.muted { color: var(--muted); font-size: 0.9rem; }

.hero-card {
  background: linear-gradient(135deg, rgba(255, 179, 71, 0.15), rgba(94, 234, 212, 0.1));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}

.hero-label { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.hero-value { font-size: clamp(2rem, 6vw, 3rem); font-weight: 700; margin: 0.35rem 0; color: var(--accent2); }
.hero-meta { font-size: 0.85rem; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.fee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.fee-table th,
.fee-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.fee-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fee-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.fee-table .num { font-variant-numeric: tabular-nums; text-align: right; }
.fee-table .center { text-align: center; }

.coin-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.12);
  color: var(--accent2);
  font-weight: 600;
  font-size: 0.8rem;
}

.coin-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 9rem;
}

.coin-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
}

.coin-logo--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent2);
}

.coin-labels {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.2;
}

.coin-name {
  font-weight: 600;
}

.coin-symbol {
  font-size: 0.78rem;
}

.footnote { margin-top: 1rem; font-size: 0.82rem; line-height: 1.5; max-width: 720px; }

.dash-section {
  margin-bottom: 2.5rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.section-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.section-head .section-title {
  margin-bottom: 0;
}

.section-desc {
  margin: -0.35rem 0 1rem;
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 820px;
}

.section-desc code {
  color: var(--text);
  font-size: 0.85em;
}

.subsection-title {
  margin: 1.5rem 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.stat-card--metric .stat-value {
  color: var(--text);
  font-size: 1.15rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-hint {
  font-size: 0.75rem;
  margin-top: 0.2rem;
}

.stat-ok { color: var(--accent2); }
.stat-warn { color: var(--accent); }
.stat-bad { color: var(--danger); }

.firewall-note {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 1rem 1.25rem;
}

.firewall-note code {
  color: var(--text);
  font-size: 0.85em;
}

.firewall-events-wrap {
  margin-top: 0.5rem;
}

.security-table .detail {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}

.security-table .nowrap {
  white-space: nowrap;
  font-size: 0.85rem;
}

.security-table .mono {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
}

.pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.pill-ban {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
}

.pill-scan {
  background: rgba(255, 179, 71, 0.15);
  color: var(--accent);
}

.pill-admin {
  background: rgba(139, 155, 180, 0.2);
  color: var(--muted);
}

.pill-ok {
  background: rgba(94, 234, 212, 0.12);
  color: var(--accent2);
}

.threat-paths {
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 360px;
}

.threat-path code {
  font-size: 0.78rem;
  color: var(--text);
}

.threat-path + .threat-path {
  margin-top: 0.25rem;
}

@media (max-width: 640px) {
  .fee-table th:nth-child(3),
  .fee-table td:nth-child(3) { display: none; }
}
