/* Digital-helix theme (C7 / K7 DO-side prototype). CSS custom-property tokens so the same palette
   can later move into the DNA kit theme. Dark operator console aesthetic. */
:root {
    --helix-bg: #0b1020;
    --helix-surface: #131a2e;
    --helix-surface-2: #1b2440;
    --helix-border: #283355;
    --helix-text: #e7ecf6;
    --helix-muted: #94a0bd;
    --helix-teal: #28e0c8;
    --helix-indigo: #6c7cff;
    --intent-success: #28e08a;
    --intent-info: #6c7cff;
    --intent-warning: #f4b740;
    --intent-danger: #ff5d6c;
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: radial-gradient(1200px 600px at 80% -10%, rgba(108, 124, 255, 0.18), transparent),
                var(--helix-bg);
    color: var(--helix-text);
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.shell { min-height: 100vh; display: flex; flex-direction: column; }

.shell__topbar {
    display: flex; align-items: center; gap: 2rem;
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid var(--helix-border);
    background: rgba(19, 26, 46, 0.8);
    backdrop-filter: blur(6px);
}
.shell__brand { display: flex; align-items: center; gap: 0.6rem; font-size: 1.05rem; }
.shell__brand strong { color: var(--helix-teal); }
.shell__helix {
    width: 18px; height: 18px; border-radius: 50%;
    background: conic-gradient(from 0deg, var(--helix-teal), var(--helix-indigo), var(--helix-teal));
}
.shell__nav { display: flex; gap: 1.1rem; }
.shell__nav a { color: var(--helix-muted); padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.shell__nav a:hover { color: var(--helix-text); border-bottom-color: var(--helix-teal); }

.shell__main { flex: 1; padding: 1.75rem; max-width: 1100px; width: 100%; margin: 0 auto; }
.shell__footer { padding: 1rem 1.5rem; color: var(--helix-muted); font-size: 0.85rem; border-top: 1px solid var(--helix-border); }

.page__header { margin-bottom: 1.4rem; }
.page__header h1 { margin: 0 0 0.25rem; font-size: 1.6rem; }
.page__header p { margin: 0; color: var(--helix-muted); }
.page__header--row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.page__footer { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 1.25rem; color: var(--helix-muted); font-size: 0.85rem; }

.portal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.portal-tile {
    display: block; padding: 1.2rem; border-radius: var(--radius);
    background: var(--helix-surface); border: 1px solid var(--helix-border);
    border-left: 4px solid var(--intent-info); transition: transform 0.12s, border-color 0.12s;
}
.portal-tile:hover { transform: translateY(-2px); border-color: var(--helix-indigo); }
.portal-tile h2 { margin: 0.4rem 0 0.3rem; font-size: 1.15rem; }
.portal-tile p { margin: 0; color: var(--helix-muted); font-size: 0.92rem; }
.portal-tile__status { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--helix-muted); }
.portal-tile--success { border-left-color: var(--intent-success); }
.portal-tile--warning { border-left-color: var(--intent-warning); }
.portal-tile--danger { border-left-color: var(--intent-danger); }

.card {
    background: var(--helix-surface); border: 1px solid var(--helix-border);
    border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 1.1rem;
    border-top: 3px solid var(--intent-info);
}
.card--success { border-top-color: var(--intent-success); }
.card--warning { border-top-color: var(--intent-warning); }
.card--danger { border-top-color: var(--intent-danger); }
.card__title { margin: 0; font-size: 1.1rem; }
.card__subtitle { margin: 0.15rem 0 0; color: var(--helix-muted); font-size: 0.88rem; }
.card__body { margin-top: 0.9rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0.75rem; margin: 0 0 1rem; }
.kpi-grid div { background: var(--helix-surface-2); border-radius: 8px; padding: 0.7rem 0.8rem; }
.kpi-grid dt { color: var(--helix-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
.kpi-grid dd { margin: 0.2rem 0 0; font-size: 1.5rem; font-weight: 600; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table th { text-align: left; color: var(--helix-muted); font-weight: 500; border-bottom: 1px solid var(--helix-border); padding: 0.5rem 0.6rem; }
.data-table td { border-bottom: 1px solid var(--helix-border); padding: 0.55rem 0.6rem; vertical-align: top; }
.sub { color: var(--helix-muted); font-size: 0.82rem; }
.gap { color: var(--helix-muted); font-style: italic; }
code { background: var(--helix-surface-2); padding: 0.05rem 0.3rem; border-radius: 4px; font-size: 0.85em; }

.pill { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--helix-surface-2); font-size: 0.85rem; }
.pill__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--intent-info); }
.pill--success .pill__dot { background: var(--intent-success); }
.pill--warning .pill__dot { background: var(--intent-warning); }
.pill--danger .pill__dot { background: var(--intent-danger); }

.shell__signout { margin-left: auto; }
.btn {
    cursor: pointer; font: inherit; border: none; border-radius: 8px;
    padding: 0.5rem 1rem; color: #07121f; font-weight: 600;
    background: linear-gradient(120deg, var(--helix-teal), var(--helix-indigo));
}
.btn:hover { filter: brightness(1.08); }
.btn--ghost { background: var(--helix-surface-2); color: var(--helix-text); border: 1px solid var(--helix-border); }
.page--narrow { max-width: 460px; }
.delta-up { color: var(--intent-success); } .delta-down { color: var(--intent-danger); }
.plain-list { margin: 0; padding-left: 1.1rem; } .plain-list li { margin: 0.2rem 0; }
.bracket { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.bracket__round-name { margin: 0 0 0.5rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--helix-muted); }
.bracket__match { background: var(--helix-surface-2); border-radius: 8px; padding: 0.5rem 0.7rem; margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.5rem; }
.bracket__vs { color: var(--helix-muted); font-size: 0.78rem; }
.bracket__win { color: var(--intent-success); font-weight: 600; }
