@font-face {
    font-family: 'Geist';
    src: url('fonts/Geist-Variable.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: 'Geist';
    src: url('fonts/Geist-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Geist';
    src: url('fonts/Geist-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Geist';
    src: url('fonts/Geist-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'Geist';
    src: url('fonts/Geist-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

:root {
    --color-gray-90: #111315;
    --color-green-100: #2debab;
    --color-gray-30: #959697;
    --color-white: #ffffff;
    --color-error: #f63f45;
    --color-green-hover: #1fc494;
    --color-card-bg: #1a1c1e;
    --color-card-border: #222527;
    --color-header-bg: #191b1d;
}

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

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

body {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--color-gray-90);
    color: var(--color-white);
    min-height: 100vh;
}

.container {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
}

h1 {
    font-size: 2.15rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--color-white);
    margin-bottom: 6px;
}

.subtitle {
    color: var(--color-gray-30);
    font-size: 0.9rem;
    line-height: 1.6;
    letter-spacing: 0.005em;
}

/* ── Header with logo ── */
.site-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding-top: 24px;
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.site-logo {
    height: 34px;
    width: auto;
}

.site-header h1 { margin-bottom: 0; }

.header-divider {
    width: 120px;
    height: 1px;
    border: none;
    background: var(--color-card-border);
    margin-top: 12px;
}

/* ── Position badges ── */
.pos-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.pos-btn { background: rgba(45, 235, 171, 0.15); color: #2debab; }
.pos-co { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.pos-mp { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.pos-ep { background: rgba(239, 68, 68, 0.15);  color: #f87171; }
.pos-sb { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.pos-bb { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

/* ── Buttons ── */
.actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.btn {
    display: inline-flex;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    transition-property: background-color, color;
    transition-duration: 300ms;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--color-green-100);
    color: var(--color-gray-90);
}

.btn-primary:hover {
    background-color: var(--color-green-hover);
}

.btn-primary:disabled {
    color: var(--color-gray-30);
    background-color: #2c2f32;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: var(--color-card-bg);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: var(--color-card-border);
}

.btn-download {
    padding: 14px 36px;
    font-size: 1.05rem;
    color: var(--color-gray-90);
    background: var(--color-green-100);
}

.btn-download:hover {
    background: var(--color-green-hover);
}

/* ── Cards ── */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--color-card-bg);
    border-radius: 10px;
    padding: 16px;
    border-top: 3px solid var(--color-green-100);
}

.stat-card .label {
    color: var(--color-gray-30);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.stat-card .value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-white);
}

/* ── Table ── */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-card-bg);
    min-width: 560px;
}

th {
    background: var(--color-header-bg);
    padding: 10px 14px;
    text-align: center;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-gray-30);
    font-weight: 600;
    white-space: nowrap;
}

th:first-child { text-align: left; }

td {
    padding: 9px 14px;
    text-align: center;
    font-size: 0.88rem;
    border-top: 1px solid var(--color-card-border);
    font-variant-numeric: tabular-nums;
}

td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--color-white);
}

tr:hover td { background: var(--color-header-bg); }

.tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--color-card-bg);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--color-gray-30);
    margin-right: 4px;
}

/* ── Next step callout ── */
.next-step {
    margin-top: 24px;
    padding: 16px 20px;
    background: #0d2420;
    border: 1px solid #1a4a3e;
    border-radius: 10px;
}

.next-step-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-green-100);
    margin-bottom: 6px;
}

.next-step-text {
    font-size: 0.88rem;
    color: #a8e8d8;
    line-height: 1.5;
}

/* ── Upload area ── */
.upload-area {
    border: 2px dashed #2c2f32;
    border-radius: 12px;
    padding: 52px 40px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    background: var(--color-card-bg);
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--color-green-100);
    background: #161a18;
}

.upload-area.has-files {
    border-color: var(--color-green-100);
    border-style: solid;
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.7;
}

.upload-text {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.upload-hint {
    color: var(--color-gray-30);
    font-size: 0.85rem;
    line-height: 1.5;
}

input[type="file"] { display: none; }

/* ── File list ── */
.file-summary {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--color-card-bg);
    border-radius: 8px;
    display: none;
}

.file-summary.visible { display: block; }

.file-summary-text {
    font-size: 0.9rem;
    color: var(--color-white);
}

.file-summary-detail {
    font-size: 0.8rem;
    color: var(--color-gray-30);
    margin-top: 4px;
}

/* ── Mode toggle ── */
.mode-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    justify-content: center;
}

.mode-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #2c2f32;
    background: transparent;
    color: var(--color-gray-30);
    font-size: 1rem;
    transition-property: border, color;
    transition-duration: 300ms;
    cursor: pointer;
}

.mode-btn:hover {
    border-color: #444749;
    color: var(--color-white);
}

.mode-btn.active {
    color: var(--color-green-100);
    border-color: var(--color-green-100);
    background: rgba(45, 235, 171, 0.12);
}

/* ── Progress ── */
.progress-section {
    display: none;
    margin-top: 28px;
}

.progress-section.active { display: block; }

.progress-bar-track {
    height: 6px;
    background: #1e2020;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--color-green-100);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-stages {
    display: flex;
    justify-content: space-between;
}

.stage {
    font-size: 0.8rem;
    color: #444749;
    transition: color 0.2s;
}

.stage.active { color: var(--color-green-100); font-weight: 600; }

.stage.done { color: var(--color-green-100); opacity: 0.6; }

/* ── Error ── */
.error-msg {
    display: none;
    padding: 12px 20px;
    background: #2a1214;
    border: 1px solid var(--color-error);
    border-radius: 8px;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--color-error);
}

.error-msg.visible { display: block; }

/* ── Report section (index inline view) ── */
.report-section { display: none; margin-top: 32px; }

.report-section.active { display: block; }

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.report-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-white);
}

