:root {
    --bg: #07101f;
    --surface: #101b2f;
    --surface-2: #17243b;
    --surface-3: #1f304c;
    --line: #284667;
    --text: #e8f2ff;
    --muted: #8da1b8;
    --accent: #00d5ff;
    --accent-2: #7c5cff;
    --pass: #24e0a3;
    --fail: #ff5277;
    --warn: #ffc857;
    --shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Barlow, Arial, sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(0, 213, 255, .16), transparent 30%),
        radial-gradient(circle at 80% 10%, rgba(124, 92, 255, .14), transparent 35%),
        linear-gradient(135deg, #07101f, #0a1221 55%, #081827);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(0, 213, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 213, 255, .035) 1px, transparent 1px);
    background-size: 42px 42px;
}

.shell {
    position: relative;
    z-index: 1;
    width: min(1480px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 70px;
}

.hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: end;
    margin-bottom: 28px;
}

.tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(0, 213, 255, .35);
    background: rgba(0, 213, 255, .08);
    color: var(--accent);
    border-radius: 999px;
    padding: 7px 13px;
    font: 700 11px/1 Space Mono, monospace;
    letter-spacing: 2px;
}

h1 {
    margin: 18px 0 12px;
    max-width: 900px;
    font: 900 clamp(42px, 7vw, 88px)/.86 "Barlow Condensed", sans-serif;
    letter-spacing: -1px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff, #b9f3ff 45%, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lead {
    max-width: 850px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.hero-card {
    min-width: 310px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(16, 27, 47, .72);
    box-shadow: var(--shadow);
}

.hero-card strong, .hero-card span { display: block; }
.hero-card span { color: var(--muted); font-size: 13px; margin-top: 4px; }
.status-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--pass); box-shadow: 0 0 28px var(--pass); }

.grid {
    display: grid;
    grid-template-columns: minmax(360px, 520px) 1fr;
    gap: 22px;
    align-items: start;
}

.panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(16, 27, 47, .86);
    box-shadow: var(--shadow);
    padding: 22px;
}

.panel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.panel-head span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(0, 213, 255, .35);
    border-radius: 12px;
    color: var(--accent);
    font: 700 12px Space Mono, monospace;
    background: rgba(0, 213, 255, .08);
}

.panel-head h2 {
    margin: 0;
    font: 800 26px/1 "Barlow Condensed", sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.subhead { margin-top: 24px; }

.requirements {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.requirements div {
    display: grid;
    gap: 4px;
    padding: 13px;
    border-radius: 14px;
    background: rgba(31, 48, 76, .62);
    border: 1px solid rgba(40, 70, 103, .8);
}

.requirements b { color: var(--text); }
.requirements span { color: var(--muted); font-size: 13px; }

.dropzone {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 28px 18px;
    margin-top: 14px;
    border: 2px dashed rgba(0, 213, 255, .34);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(0, 213, 255, .08), rgba(124, 92, 255, .06));
    cursor: pointer;
    transition: .2s ease;
}

.dropzone.compact { padding: 22px 18px; }
.dropzone.dragover, .dropzone:hover { border-color: var(--accent); transform: translateY(-2px); }
.dropzone input { display: none; }
.dropzone h3 { margin: 0; font-size: 20px; }
.dropzone p { margin: 0; color: var(--muted); font-size: 14px; }

.drop-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 20px;
    color: #00131a;
    background: var(--accent);
    font: 900 15px Space Mono, monospace;
    box-shadow: 0 18px 38px rgba(0, 213, 255, .22);
}

button, .primary-btn, .ghost-btn, .report-card a, .report-actions button, .viewer-head a {
    font: 700 12px Space Mono, monospace;
    letter-spacing: .4px;
}

.ghost-btn, .primary-btn {
    border: 0;
    cursor: pointer;
    border-radius: 12px;
    transition: .2s ease;
}

.ghost-btn {
    margin-top: 6px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, .08);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, .12);
}

.primary-btn {
    width: 100%;
    margin-top: 16px;
    padding: 16px 18px;
    color: #00131a;
    background: linear-gradient(135deg, var(--accent), #80f0ff);
    box-shadow: 0 18px 34px rgba(0, 213, 255, .2);
}

.primary-btn:hover, .ghost-btn:hover, .report-card a:hover, .report-actions button:hover, .viewer-head a:hover { transform: translateY(-2px); }
.primary-btn:disabled { opacity: .55; cursor: wait; transform: none; }

.file-stack { margin-top: 18px; }
.file-stack h3 { margin: 0 0 10px; font-size: 16px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.empty { color: var(--muted); font-size: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(31, 48, 76, .35); }

.file-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(31, 48, 76, .56);
}

.file-row.obs { border-color: rgba(36, 224, 163, .5); }
.file-row b, .file-row span { display: block; }
.file-row b { font-size: 14px; }
.file-row span { color: var(--muted); font-size: 12px; margin-top: 3px; }
.file-row button { border: 0; background: rgba(255, 82, 119, .14); color: var(--fail); border-radius: 9px; padding: 8px 10px; cursor: pointer; }

.progress-log {
    max-height: 190px;
    overflow: auto;
    margin-top: 14px;
    border-radius: 14px;
    background: #07101f;
    border: 1px solid var(--line);
    padding: 10px;
    color: var(--muted);
    font: 12px/1.55 Space Mono, monospace;
}

.progress-log:empty { display: none; }
.progress-log .success { color: var(--pass); }
.progress-log .error { color: var(--fail); }

.score-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.score-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(31, 48, 76, .62);
}

.score-card small, .score-card span { display: block; color: var(--muted); }
.score-card small { font: 700 10px Space Mono, monospace; letter-spacing: 1px; text-transform: uppercase; }
.score-card strong { display: block; margin: 8px 0 2px; color: var(--accent); font: 900 38px/1 "Barlow Condensed", sans-serif; }
.score-card.pass strong { color: var(--pass); }
.score-card.fail strong { color: var(--fail); }
.score-card.muted strong { color: var(--muted); font-size: 28px; }

.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
}

table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 13px 12px; border-bottom: 1px solid rgba(40, 70, 103, .65); text-align: left; }
th { color: var(--accent); background: rgba(7, 16, 31, .72); font: 700 11px Space Mono, monospace; text-transform: uppercase; letter-spacing: 1px; }
td { color: var(--text); }
td small { display: block; margin-top: 4px; color: var(--muted); }
.empty-cell { text-align: center; color: var(--muted); padding: 34px; }

.pill {
    display: inline-flex;
    justify-content: center;
    min-width: 58px;
    border-radius: 999px;
    padding: 6px 9px;
    font: 700 11px Space Mono, monospace;
    background: rgba(141, 161, 184, .14);
    color: var(--muted);
}

.pill.pass { background: rgba(36, 224, 163, .16); color: var(--pass); }
.pill.fail { background: rgba(255, 82, 119, .16); color: var(--fail); }
.pill.n\/a, .pill.na { background: rgba(141, 161, 184, .14); color: var(--muted); }

.reports {
    display: grid;
    gap: 10px;
}

.report-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(31, 48, 76, .56);
}

.report-card strong, .report-card span { display: block; }
.report-card span { color: var(--muted); font-size: 12px; margin-top: 4px; }
.report-card a, .report-actions button, .viewer-head a { color: #00131a; background: var(--accent); border: 0; border-radius: 10px; padding: 10px 12px; text-decoration: none; white-space: nowrap; cursor: pointer; transition: .2s ease; }

.report-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.report-actions button {
    color: var(--text);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
}

.report-viewer {
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(7, 16, 31, .48);
    padding: 14px;
}

.viewer-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
}

.viewer-head strong, .viewer-head span { display: block; }
.viewer-head strong { font-size: 20px; }
.viewer-head span { margin-top: 4px; color: var(--muted); font-size: 13px; }

.day-grid {
    display: grid;
    gap: 12px;
}

.day-card {
    border: 1px solid rgba(40, 70, 103, .8);
    border-radius: 16px;
    background: rgba(31, 48, 76, .42);
    padding: 14px;
}

.day-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.day-title strong { font-size: 18px; }
.day-title span { color: var(--muted); font-size: 13px; }

.day-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.day-metrics span {
    display: grid;
    gap: 5px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(7, 16, 31, .46);
    border: 1px solid rgba(40, 70, 103, .72);
}

.day-metrics b { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.day-metrics em { font-style: normal; }
.day-metrics small { color: var(--muted); }
.table-wrap.mini table { min-width: 900px; }

@media (max-width: 1080px) {
    .hero, .grid { grid-template-columns: 1fr; }
    .hero-card { min-width: 0; }
}

@media (max-width: 760px) {
    .shell { width: min(100% - 20px, 1480px); padding-top: 20px; }
    .panel { padding: 16px; border-radius: 18px; }
    .score-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-card, .report-card, .file-row, .viewer-head, .day-title { align-items: flex-start; flex-direction: column; }
    .report-card a, .report-actions, .report-actions button, .viewer-head a { width: 100%; text-align: center; }
    .day-metrics { grid-template-columns: repeat(2, 1fr); }
}
