/* ═══════════════════════════════════════════════════════════════
   PLANET EPOCH — Dashboard & Auth Pages
   Inherits the marketing aesthetic: dark bg, cyan accent, Orbitron headings.
   ═══════════════════════════════════════════════════════════════ */

:root {
    --bg: #050810;
    --bg-card: #0a0f1a;
    --bg-elevated: #0f1525;
    --text: #d0d8e8;
    --text-dim: #5a6a88;
    --accent: #00d4ff;
    --accent-dim: rgba(0, 212, 255, 0.15);
    --amber: #ffb700;
    --green: #00ff88;
    --red: #ff3355;
    --border: rgba(0, 212, 255, 0.12);
    --glow: 0 0 30px rgba(0, 212, 255, 0.15);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Exo 2', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

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

h1, h2, h3 { font-family: 'Orbitron', sans-serif; letter-spacing: 0.05em; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.3rem; font-weight: 600; color: var(--accent); margin-bottom: 1rem; }
h3 { font-size: 1rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.75rem; }

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* ─── Auth page (login, register, reset password) ─── */
.auth-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(ellipse at top, rgba(0,212,255,0.08), transparent 60%),
        radial-gradient(ellipse at bottom, rgba(255,51,85,0.04), transparent 60%),
        var(--bg);
}
.auth-card {
    width: 100%; max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2.5rem 2rem;
    box-shadow: var(--glow);
}
.auth-logo {
    text-align: center; margin-bottom: 2rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700; letter-spacing: 0.15em;
    color: var(--text); font-size: 1.25rem;
}
.auth-logo span { color: var(--accent); }
.auth-title { text-align: center; margin-bottom: 1.5rem; font-family: 'Orbitron'; letter-spacing: 0.1em; text-transform: uppercase; font-size: 1.1rem; color: var(--accent); }
.auth-sub  { text-align: center; color: var(--text-dim); margin-bottom: 1.5rem; font-size: 0.9rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: 0.85rem; color: var(--text-dim); }

/* ─── Forms ─── */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.4rem; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field select, .field textarea {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.7rem 0.85rem;
    border-radius: 4px;
    font-family: inherit; font-size: 0.95rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0,212,255,0.15);
}
.field .hint { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.3rem; }
.field-row { display: flex; gap: 0.75rem; }
.field-row .field { flex: 1; }
.checkbox-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-dim); margin: 0.75rem 0; }

/* ─── Buttons ─── */
.btn {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    font-family: inherit; font-weight: 600; font-size: 0.9rem;
    border-radius: 4px;
    letter-spacing: 0.08em; text-transform: uppercase;
    cursor: pointer; transition: all 0.2s;
    text-decoration: none;
}
.btn:hover { background: var(--accent-dim); text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-glow {
    background: var(--accent); color: var(--bg);
    box-shadow: 0 0 20px rgba(0,212,255,0.3);
}
.btn-glow:hover { background: #33e0ff; box-shadow: 0 0 30px rgba(0,212,255,0.5); }
.btn-ghost { background: transparent; }
.btn-danger { border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: rgba(255,51,85,0.1); }
.btn-full { width: 100%; display: block; text-align: center; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

/* ─── Alerts / toasts ─── */
.alert {
    padding: 0.75rem 1rem; margin-bottom: 1rem;
    border-radius: 4px; border-left: 3px solid;
    font-size: 0.9rem;
}
.alert-success { background: rgba(0,255,136,0.06); border-color: var(--green); color: #a0ffcb; }
.alert-error   { background: rgba(255,51,85,0.08); border-color: var(--red);   color: #ffc5d0; }
.alert-info    { background: rgba(0,212,255,0.08); border-color: var(--accent); color: #c7f0ff; }

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.dash { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
    background: var(--bg-elevated);
    border-right: 1px solid var(--border);
    padding: 1.5rem 0;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-logo {
    padding: 0 1.5rem 1.5rem;
    font-family: 'Orbitron'; font-weight: 700;
    letter-spacing: 0.15em; color: var(--text); font-size: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}
.sidebar-logo span { color: var(--accent); }
.sidebar-section { padding: 0 1rem; margin-top: 1rem; font-size: 0.7rem; color: var(--text-dim); letter-spacing: 0.15em; text-transform: uppercase; }
.sidebar nav a {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.65rem 1.5rem;
    color: var(--text-dim); font-size: 0.9rem;
    border-left: 2px solid transparent;
    transition: all 0.15s;
}
.sidebar nav a:hover { color: var(--text); background: var(--accent-dim); text-decoration: none; }
.sidebar nav a.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-dim); }
.main { padding: 2rem 2.5rem; max-width: 1400px; }
.main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.main-header h1 { margin: 0; }

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.card h2 { margin-bottom: 1rem; }
.card .key { font-family: 'JetBrains Mono'; color: var(--accent); font-size: 1.2rem; letter-spacing: 0.1em; padding: 0.75rem; background: var(--bg-elevated); border-radius: 4px; text-align: center; margin: 0.5rem 0; }
.plan-badge { display: inline-block; padding: 0.25rem 0.7rem; border-radius: 3px; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }
.plan-cadet     { background: rgba(90,106,136,0.2); color: var(--text-dim); }
.plan-private   { background: rgba(0,255,136,0.15); color: var(--green); }
.plan-commander { background: rgba(0,212,255,0.15); color: var(--accent); }
.plan-admiral   { background: rgba(255,183,0,0.15); color: var(--amber); }
.status-pill { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 3px; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; }
.status-active   { background: rgba(0,255,136,0.15); color: var(--green); }
.status-paused   { background: rgba(255,183,0,0.15); color: var(--amber); }
.status-full     { background: rgba(255,51,85,0.15); color: var(--red); }
.status-offline  { background: rgba(90,106,136,0.15); color: var(--text-dim); }
.status-invite-pending {
    background: rgba(255,51,85,0.18); color: var(--red);
    font-weight: 600; letter-spacing: 0.1em;
    box-shadow: 0 0 0 1px rgba(255,51,85,0.5) inset;
}
/* Invited card gets a faint red rail on the left so the row is
   skimmable as "you have an invite here" even before reading. */
.galaxy-card.invited { border-color: rgba(255,51,85,0.45); }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--text-dim); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; }
tbody tr:hover { background: rgba(0,212,255,0.04); }

/* Galaxy row */
.galaxy-row {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
    padding: 1.25rem 1.5rem; margin-bottom: 1rem;
    display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center;
}
.galaxy-row .gname { font-family: 'Orbitron'; letter-spacing: 0.08em; font-size: 1rem; margin-bottom: 0.25rem; }
.galaxy-row .meta { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 0.4rem; }
.galaxy-row .desc { font-size: 0.9rem; margin-bottom: 0.75rem; }
.galaxy-row .bar { height: 6px; border-radius: 3px; background: var(--bg-elevated); overflow: hidden; margin-top: 0.5rem; }
.galaxy-row .bar-fill { height: 100%; background: var(--accent); transition: width 0.3s; }
.galaxy-row.full .bar-fill { background: var(--red); }
.galaxy-row.nearly .bar-fill { background: var(--amber); }
.galaxy-row .count { font-size: 0.85rem; color: var(--text-dim); margin-top: 0.3rem; }
.galaxy-actions { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-end; }

/* Galaxy card (server browser) — sibling of .galaxy-row used on
   admiral page. Card form so a long server list reads as a grid
   instead of one wide stretched row each. */
.galaxy-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}
.galaxy-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 0; /* allow long names to truncate inside grid track */
}
.galaxy-card .gname {
    font-family: 'Orbitron'; letter-spacing: 0.08em; font-size: 1rem;
    display: flex; align-items: center; gap: 0.5rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.galaxy-card .gname-text { overflow: hidden; text-overflow: ellipsis; }
.galaxy-card .creator { font-size: 0.8rem; color: var(--text-dim); }
.galaxy-card .creator b { color: var(--text); font-weight: 500; }
.galaxy-card .meta { color: var(--text-dim); font-size: 0.8rem; }
.galaxy-card .desc {
    font-size: 0.88rem; color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
}
.galaxy-card .bar { height: 6px; border-radius: 3px; background: var(--bg-elevated); overflow: hidden; }
.galaxy-card .bar-fill { height: 100%; background: var(--accent); transition: width 0.3s; }
.galaxy-card.full .bar-fill { background: var(--red); }
.galaxy-card.nearly .bar-fill { background: var(--amber); }
.galaxy-card .count { font-size: 0.8rem; color: var(--text-dim); }
.galaxy-card .galaxy-actions { flex-direction: row; align-items: stretch; margin-top: auto; }
.galaxy-card .galaxy-actions .btn { flex: 1; }

/* Pricing grid */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.plan-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; display: flex; flex-direction: column; }
.plan-card.current { border-color: var(--accent); box-shadow: var(--glow); }
.plan-card h3 { color: var(--accent); font-size: 0.9rem; margin-bottom: 0.4rem; }
.plan-card .price { font-family: 'Orbitron'; font-size: 1.5rem; margin-bottom: 1rem; }
.plan-card ul { list-style: none; margin-bottom: 1.5rem; }
.plan-card li { padding: 0.25rem 0; font-size: 0.85rem; color: var(--text-dim); }
.plan-card li::before { content: '✓ '; color: var(--accent); }
.plan-card .btn { margin-top: auto; }

/* Tabs */
.tabs { display: flex; gap: 1rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.tabs a { padding: 0.75rem 0; color: var(--text-dim); text-decoration: none; border-bottom: 2px solid transparent; font-size: 0.9rem; }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ─── Galaxy Dashboard ───────────────────────────────────────── */

/* Owner pill on server browser cards. Reads as a status flag, not as
   an action, so it sits next to the status pill rather than replacing
   it. Amber matches the Admiral plan badge. */
.status-pill.status-owner {
    background: rgba(255,183,0,0.18);
    color: var(--amber);
    box-shadow: 0 0 0 1px rgba(255,183,0,0.45) inset;
    font-weight: 600;
}
.status-pill.status-public,
.status-pill.status-private {
    background: rgba(0,212,255,0.10);
    color: var(--accent);
}

/* Hero header — ridge above the dashboard. Uses a soft radial wash so
   it reads as a "page banner" without competing with the KPI grid
   colour-wise. */
.galaxy-hero {
    position: relative;
    background:
        radial-gradient(ellipse at top right, rgba(255,183,0,0.08), transparent 55%),
        radial-gradient(ellipse at bottom left, rgba(0,212,255,0.08), transparent 60%),
        var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem 1.75rem 1.75rem;
    margin-bottom: 1.5rem;
}
.galaxy-hero .hero-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.75rem; flex-wrap: wrap; gap: 0.75rem;
}
.galaxy-hero .hero-back {
    color: var(--text-dim); font-size: 0.85rem;
    letter-spacing: 0.08em; text-transform: uppercase;
}
.galaxy-hero .hero-back:hover { color: var(--accent); text-decoration: none; }
.galaxy-hero .hero-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.galaxy-hero .hero-name {
    font-size: 2.1rem; line-height: 1.1; margin-bottom: 0.6rem;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.galaxy-hero .hero-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.galaxy-hero .hero-desc { color: var(--text); margin-bottom: 0.75rem; max-width: 60ch; }
.galaxy-hero .hero-meta {
    display: flex; gap: 0.6rem; flex-wrap: wrap;
    color: var(--text-dim); font-size: 0.85rem;
}
.galaxy-hero .hero-meta .mono { color: var(--accent); }

.online-dot {
    display: inline-block; width: 0.45rem; height: 0.45rem; border-radius: 50%;
    margin-right: 0.4rem; vertical-align: middle;
}
.online-dot.online {
    background: var(--green); box-shadow: 0 0 8px rgba(0,255,136,0.7);
    animation: live-pulse 2s ease-in-out infinite;
}
.online-dot.offline { background: var(--text-dim); }
@keyframes live-pulse {
    0%,100% { box-shadow: 0 0 6px rgba(0,255,136,0.5); }
    50%     { box-shadow: 0 0 14px rgba(0,255,136,0.9); }
}

/* Card heading row with a trailing meta string */
.card-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 1rem; gap: 1rem;
}
.card-head h2 { margin-bottom: 0; }
.muted { color: var(--text-dim); font-size: 0.85rem; }
.muted-empty { color: var(--text-dim); padding: 1.25rem 0; text-align: center; font-size: 0.9rem; }
.muted-foot  { color: var(--text-dim); margin-top: 0.75rem; font-size: 0.8rem; text-align: right; }

/* KPI tile grid — chunky stat cards with a numeric headline */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.kpi {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.1rem 1.1rem;
    display: flex; flex-direction: column; gap: 0.5rem;
    position: relative; overflow: hidden;
}
.kpi::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0,212,255,0.45), transparent);
}
.kpi.full::before  { background: linear-gradient(90deg, transparent, rgba(255,51,85,0.6), transparent); }
.kpi.nearly::before { background: linear-gradient(90deg, transparent, rgba(255,183,0,0.6), transparent); }
.kpi-label {
    font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text-dim);
}
.kpi-value {
    font-family: 'Orbitron', sans-serif; font-weight: 700;
    font-size: 2rem; line-height: 1; color: var(--text);
}
.kpi-value .kpi-sub {
    font-size: 1rem; font-weight: 400; color: var(--text-dim);
    margin-left: 0.3rem; letter-spacing: 0;
}
.kpi-foot {
    color: var(--text-dim); font-size: 0.78rem;
    display: flex; flex-direction: column; gap: 0.4rem;
}
.kpi .bar { height: 4px; border-radius: 2px; background: var(--bg-elevated); overflow: hidden; }
.kpi .bar-fill { height: 100%; background: var(--accent); }
.kpi.full .bar-fill { background: var(--red); }
.kpi.nearly .bar-fill { background: var(--amber); }

/* Two-column responsive layout */
.two-col {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
    margin-bottom: 0;
}
.two-col > .card { margin-bottom: 1.5rem; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* Generic data table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left; font-size: 0.88rem;
}
.data-table th {
    color: var(--text-dim); font-size: 0.7rem;
    letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500;
}
.data-table th.num, .data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table td.rank {
    color: var(--text-dim); font-family: 'Orbitron'; font-weight: 600;
    width: 2rem;
}
.data-table tbody tr:hover { background: rgba(0,212,255,0.04); }
.data-table .player-name { color: var(--text); font-weight: 500; }
.data-table .muted { font-size: 0.78rem; }

.race-chip {
    display: inline-block; padding: 0.1rem 0.55rem;
    border-radius: 999px; font-size: 0.75rem; letter-spacing: 0.05em;
    font-weight: 600;
}

/* Joins-by-day SVG bar chart */
.chart-wrap { position: relative; padding-left: 2.25rem; padding-bottom: 0.25rem; }
.chart {
    width: 100%; height: 12rem; display: block;
    overflow: visible;
}
.chart .chart-bar rect {
    fill: rgba(0,212,255,0.55);
    transition: fill 0.15s;
}
.chart .chart-bar:hover rect { fill: var(--accent); }
.chart .chart-bar.peak rect { fill: var(--accent); filter: drop-shadow(0 0 4px rgba(0,212,255,0.7)); }
.chart .chart-axis  { stroke: var(--border); stroke-width: 0.3; }
.chart .chart-tick  { fill: var(--text-dim); font-size: 2.4px; text-anchor: middle; font-family: 'JetBrains Mono', monospace; }
.chart-axis-y {
    position: absolute; top: 0; bottom: 1.5rem; left: 0; width: 2rem;
    display: flex; flex-direction: column; justify-content: space-between;
    color: var(--text-dim); font-size: 0.7rem; font-family: 'JetBrains Mono', monospace;
    text-align: right; padding-right: 0.5rem;
}

/* Live-galaxy block — visually demarcated so the host can tell the
   "live game data" half from the "host meta" half at a glance. */
.live-block { margin: 0 0 0.5rem; }
.live-banner {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.5rem 0.25rem 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}
.live-banner h2 {
    color: var(--green); font-size: 1.05rem; margin: 0;
    letter-spacing: 0.12em; text-transform: uppercase;
}
.live-dot {
    width: 0.6rem; height: 0.6rem; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 12px rgba(0,255,136,0.85);
    animation: live-pulse 1.5s ease-in-out infinite;
}
.live-offline { border-color: rgba(255,183,0,0.35); }

/* Race breakdown bars */
.race-bars { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.race-bars li {
    display: grid;
    grid-template-columns: 7rem 1fr 3.5rem 3rem;
    align-items: center; gap: 0.75rem;
    font-size: 0.85rem;
}
.race-bar-name { font-weight: 500; }
.race-bar-track {
    height: 0.55rem; background: var(--bg-elevated); border-radius: 4px; overflow: hidden;
}
.race-bar-fill { display: block; height: 100%; transition: width 0.4s ease; }
.race-bar-count { text-align: right; }
.race-bar-pct  { text-align: right; }

/* Race kills/losses paired bars (renderRaceCombat) */
.race-combat-bars li.race-combat-row {
    grid-template-columns: 7rem 1fr;
    align-items: center; gap: 0.75rem;
}
.race-combat-tracks { display: flex; flex-direction: column; gap: 0.3rem; }
.race-combat-track {
    position: relative;
    height: 0.85rem; background: var(--bg-elevated); border-radius: 4px; overflow: hidden;
}
.race-combat-fill { display: block; height: 100%; transition: width 0.4s ease; }
.race-combat-fill.losses { background: rgba(255,80,80,0.55); }
.race-combat-num {
    position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%);
    font-size: 0.7rem; color: var(--text); text-shadow: 0 0 3px rgba(0,0,0,0.7);
}

/* Map ownership donut (renderDonut) */
.donut-wrap {
    display: grid; grid-template-columns: minmax(140px, 200px) 1fr;
    gap: 1.25rem; align-items: center;
}
@media (max-width: 720px) { .donut-wrap { grid-template-columns: 1fr; } }
.donut { width: 100%; max-width: 200px; height: auto; }
.donut path { transition: opacity 0.2s; }
.donut path:hover { opacity: 0.8; cursor: default; }
.donut-legend {
    list-style: none; display: flex; flex-direction: column; gap: 0.35rem;
    font-size: 0.85rem;
}
.donut-legend li {
    display: grid;
    grid-template-columns: 0.85rem 1fr 3rem 4rem;
    align-items: center; gap: 0.55rem;
}
.donut-swatch {
    display: inline-block; width: 0.85rem; height: 0.85rem; border-radius: 3px;
}
.donut-label { color: var(--text); font-weight: 500; }
.donut-pct  { text-align: right; color: var(--text); }
.donut-count { text-align: right; }

/* News list */
.news-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.news-list li {
    display: grid; grid-template-columns: 3.6rem 1fr; align-items: center;
    gap: 0.75rem; padding: 0.55rem 0; border-bottom: 1px solid var(--border);
}
.news-list li:last-child { border-bottom: none; }
.news-station {
    text-align: center; padding: 0.18rem 0; border-radius: 3px;
    font-family: 'Orbitron'; font-size: 0.7rem; letter-spacing: 0.12em;
    background: var(--bg-elevated); color: var(--text);
}
.news-station-FTL   { color: var(--accent); border: 1px solid rgba(0,212,255,0.4); }
.news-station-WOLFE { color: var(--red);    border: 1px solid rgba(255,51,85,0.4); }
.news-station-GNN   { color: var(--green);  border: 1px solid rgba(0,255,136,0.4); }
.news-station-ANT   { color: var(--amber);  border: 1px solid rgba(255,183,0,0.4); }
.news-body { display: flex; flex-direction: column; gap: 0.15rem; }
.news-headline { font-weight: 500; }
.news-meta { font-size: 0.75rem; }

/* Settings KV grid */
.settings-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem 1.5rem;
}
.settings-grid > div { display: flex; flex-direction: column; gap: 0.2rem; }
.settings-grid > div.wide { grid-column: 1 / -1; }
.settings-grid dt {
    font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--text-dim);
}
.settings-grid dd { color: var(--text); font-size: 0.95rem; }

/* Activity log */
.event-log { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.event-log li { display: flex; align-items: center; gap: 0.75rem; }
.event-dot {
    width: 0.55rem; height: 0.55rem; border-radius: 50%;
    background: rgba(0,212,255,0.5); flex-shrink: 0;
}
.event-body {
    display: flex; justify-content: space-between; flex: 1; gap: 1rem;
    padding: 0.4rem 0; border-bottom: 1px solid var(--border);
}
.event-log li:last-child .event-body { border-bottom: none; }
.event-label { font-size: 0.88rem; text-transform: capitalize; }
.event-time  { font-size: 0.78rem; color: var(--text-dim); }

/* Owned-galaxy card subtle highlight in server browser */
.galaxy-card.owned {
    border-color: rgba(255,183,0,0.35);
    box-shadow: 0 0 0 1px rgba(255,183,0,0.08) inset;
}

/* ─── Modal ─── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(2, 5, 12, 0.75);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    animation: modal-fade 0.15s ease-out;
}
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    max-width: 28rem; width: 100%;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(0, 212, 255, 0.08);
    animation: modal-rise 0.2s ease-out;
}
.modal-title {
    font-family: 'Orbitron', sans-serif;
    color: var(--red);
    font-size: 1.05rem; letter-spacing: 0.1em; text-transform: uppercase;
    margin: 0 0 0.85rem;
}
.modal-body { font-size: 0.92rem; color: var(--text); margin-bottom: 1.1rem; line-height: 1.45; }
.modal-body strong { color: var(--accent); font-weight: 600; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 0.4rem; }
.modal-err { margin-bottom: 0.8rem; }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Responsive */
@media (max-width: 800px) {
    .dash { grid-template-columns: 1fr; }
    .sidebar { display: none; position: fixed; z-index: 100; width: 240px; }
    .sidebar.open { display: block; }
    .main { padding: 1rem; }
    .galaxy-row { grid-template-columns: 1fr; }
    .galaxy-actions { align-items: stretch; }
    .galaxy-hero .hero-name { font-size: 1.5rem; }
    .race-bars li { grid-template-columns: 5rem 1fr 2.5rem 2.5rem; }
    .news-list li { grid-template-columns: 3rem 1fr; }
}
