:root {
    --bg: #0b0d10;
    --panel: #0f131a;
    --card: #12161c;
    --border: #1f2935;
    --border-strong: #263241;
    --text: #e7edf3;
    --muted: #9db0c2;
    --accent: #4aa3ff;
    --accent-2: #6ae3ff;
    --good: #35c759;
    --warn: #ff9f0a;
    --bad: #ff453a;
    --shadow: 0 12px 48px rgba(0,0,0,0.35);
    --radius: 14px;
    --radius-lg: 18px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: radial-gradient(1100px 800px at 12% -10%, rgba(74,163,255,0.14), transparent 38%),
                radial-gradient(900px 900px at 88% 0%, rgba(106,227,255,0.12), transparent 32%),
                var(--bg);
    color: var(--text);
    line-height: 1.5;
}

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

.page {
    max-width: 1180px;
    margin: 0 auto 64px;
    padding: 26px 20px 48px;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.brand {
    display: flex;
    align-items: center;
}

.brand .logo {
    height: 44px;
    width: auto;
}

.nav-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, background 120ms ease;
    cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
    background: linear-gradient(120deg, #7c3aed, #5a3af0, #22d3ee);
    color: #fff;
    box-shadow: 0 12px 36px rgba(124, 58, 237, 0.35);
}
.btn.ghost {
    background: rgba(255,255,255,0.04);
    border-color: transparent;
    color: #fff;
}

.container {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.page-header .eyebrow {
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.35px;
    color: #c7d2fe;
    margin: 0 0 6px;
}
.page-header h1 {
    margin: 0 0 10px;
    font-size: 32px;
    letter-spacing: -0.5px;
}
.page-header .lede {
    margin: 0;
    color: var(--muted);
    max-width: 820px;
}

.card {
    background: linear-gradient(180deg, var(--card), var(--panel));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
}
.card.inset {
    background: radial-gradient(circle at 32% 28%, rgba(74,163,255,0.08), rgba(18,22,28,0.9));
    border: 1px solid rgba(74,163,255,0.25);
}

h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}
.grid.two {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.col label {
    display: block;
    font-size: 0.95rem;
    color: var(--muted);
    margin-bottom: 6px;
}
.col input,
.col select {
    width: 100%;
    background: #0a0f14;
    color: var(--text);
    border: 1px solid #1e2835;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    outline: none;
}
.col input:focus,
.col select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(74,163,255,0.16);
}

.help {
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 4px;
}

.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.kpi {
    background: #0a0f14;
    border: 1px solid #1e2835;
    border-radius: var(--radius-sm);
    padding: 12px;
}
.kpi .label {
    color: var(--muted);
    font-size: 0.88rem;
}
.kpi .value {
    font-weight: 700;
    font-size: 1.12rem;
    margin-top: 4px;
}

.out {
    background: #0a0f14;
    border: 1px dashed #223046;
    padding: 12px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.pill {
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid #2a3650;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.82rem;
}
.small { font-size: 0.88rem; color: var(--muted); }

canvas {
    width: 100%;
    height: 260px;
    background: #0a0f14;
    border: 1px solid #1e2835;
    border-radius: var(--radius-sm);
}

.btnbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid #1e2835;
    border-radius: var(--radius-sm);
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 10px 12px;
    border-bottom: 1px solid #1e2835;
    font-size: 0.95rem;
}
th {
    color: #c8d7e6;
    text-align: left;
    background: #0f131a;
}
tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

.footnotes {
    color: var(--muted);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .nav { padding: 12px 14px; }
    .page-header h1 { font-size: 26px; }
}

