﻿:root {
    --bg: #06141b;
    --panel: rgba(10, 32, 39, 0.78);
    --line: rgba(154, 199, 184, 0.14);
    --text: #f4efe6;
    --muted: #9eb5ae;
    --mint: #7be0b7;
    --gold: #f2b35d;
    --danger: #ff8072;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Segoe UI", "Microsoft JhengHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(87, 175, 139, 0.22), transparent 28%),
        radial-gradient(circle at top right, rgba(255, 169, 88, 0.18), transparent 24%),
        linear-gradient(180deg, #071117 0%, #0a1d24 48%, #06141b 100%);
    color: var(--text);
}

body {
    min-height: 100vh;
}

a {
    color: inherit;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

code {
    color: #ffe1b2;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.1rem 0.35rem;
    border-radius: 0.4rem;
}

.hero-panel,
.panel,
.metric-card,
.focus-card {
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.hero-panel {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 22px;
    padding: 28px;
    background: linear-gradient(145deg, rgba(16, 44, 52, 0.95), rgba(8, 24, 30, 0.88));
    border-radius: 28px;
}

.live-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.status-pill.live {
    color: #06261b;
    background: linear-gradient(90deg, #7be0b7, #d5ffde);
}

.status-pill.static {
    color: #ffefce;
    background: rgba(242, 179, 93, 0.22);
}

.eyebrow {
    color: var(--gold);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.74rem;
    margin-bottom: 0.8rem;
}

.hero-panel h1 {
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.05;
    margin-bottom: 1rem;
    max-width: 12ch;
}

.hero-summary {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 62ch;
}

.hero-focus {
    display: grid;
    gap: 16px;
}

.focus-card,
.metric-card,
.panel {
    background: var(--panel);
    border-radius: 24px;
    padding: 22px;
    backdrop-filter: blur(12px);
}

.focus-card strong,
.metric-card strong {
    display: block;
    font-size: 1.9rem;
    margin: 0.5rem 0;
}

.focus-card.accent,
.metric-card.accent {
    background: linear-gradient(135deg, rgba(123, 224, 183, 0.12), rgba(242, 179, 93, 0.18));
}

.label,
.metric-label,
.muted,
.cell-note,
.panel-note,
.step-list,
.timeline span,
.allocation-row span {
    color: var(--muted);
}

.metrics-grid,
.analysis-grid {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.analysis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-card.alert {
    background: linear-gradient(135deg, rgba(255, 128, 114, 0.18), rgba(43, 10, 18, 0.85));
}

.progress-track {
    margin-top: 1rem;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.progress-value {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--mint), #c1f7d9);
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
    margin-bottom: 1.25rem;
}

.panel-heading h2 {
    margin-bottom: 0;
}

.signal-list,
.step-list {
    margin: 0;
    padding-left: 1.2rem;
    line-height: 1.9;
}

.allocation-list,
.timeline {
    display: grid;
    gap: 14px;
}

.allocation-row,
.timeline-row {
    display: grid;
    gap: 10px;
    align-items: center;
}

.allocation-row {
    grid-template-columns: minmax(0, 220px) 1fr auto;
}

.allocation-row strong,
.timeline-row strong {
    display: block;
}

.allocation-bar {
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.allocation-bar > div {
    height: 100%;
    background: linear-gradient(90deg, #f2b35d, #7be0b7);
}

.table-shell {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.95rem 0.75rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

thead th {
    color: #cfe5dc;
    font-weight: 600;
}

.timeline-row {
    grid-template-columns: 1fr auto;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--line);
}

.loading-state,
.error-state {
    min-height: 50vh;
    display: grid;
    place-items: center;
    text-align: center;
}

#blazor-error-ui {
    color-scheme: light only;
    background: #fff4d0;
    color: #2c2413;
    bottom: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.8rem 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    float: right;
}

.loading-progress {
    position: relative;
    display: block;
    width: 7rem;
    height: 7rem;
    margin: 22vh auto 1rem;
}

.loading-progress circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--mint);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    inset: calc(22vh + 2.75rem) 0 auto 0;
    text-align: center;
    font-weight: 600;
}

.loading-progress-text::after {
    content: var(--blazor-load-percentage-text, "Loading");
}

@media (max-width: 980px) {
    .hero-panel,
    .analysis-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .hero-panel,
    .focus-card,
    .metric-card,
    .panel {
        padding: 18px;
        border-radius: 20px;
    }

    .hero-panel h1 {
        max-width: none;
    }

    .allocation-row,
    .timeline-row {
        grid-template-columns: 1fr;
    }
}
