:root {
    color-scheme: light;
    --ink: #17211b;
    --muted: #66736b;
    --paper: #f4f1e9;
    --card: #fffdf8;
    --line: #d8d5cb;
    --green: #176b4a;
    --green-dark: #0e4d35;
    --amber: #d98f28;
    --red: #a43a3a;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 0%, rgba(217, 143, 40, .14), transparent 30rem),
        var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.page { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0; }
.hero { max-width: 760px; margin-bottom: 32px; }
.hero h1 { margin: 6px 0 12px; font-size: clamp(36px, 6vw, 68px); line-height: .98; letter-spacing: -.045em; }
.hero p:last-child { color: var(--muted); font-size: 18px; line-height: 1.6; }
.eyebrow { margin: 0; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.card { margin-top: 24px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: 0 18px 55px rgba(41, 46, 42, .06); }
.upload-card form { display: grid; gap: 12px; align-items: stretch; }
.drop-zone { display: flex; min-height: 118px; padding: 24px; border: 2px dashed #a8b1aa; border-radius: 14px; cursor: pointer; flex-direction: column; justify-content: center; transition: .2s ease; }
.drop-zone:hover { border-color: var(--green); background: #f3f8f4; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-title { font-size: 20px; font-weight: 750; }
.drop-help, .selected-file { color: var(--muted); }
.selected-file { font-size: 14px; }
select {
    width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line);
    border-radius: 10px; color: var(--ink); background: white; font: inherit;
}
button, .button {
    border: 0; border-radius: 12px; padding: 0 24px; background: var(--green); color: white;
    font: inherit; font-weight: 750; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
.upload-card button { min-height: 52px; }
button:hover, .button:hover { background: var(--green-dark); }
button:disabled { cursor: wait; opacity: .55; }
.button.secondary { min-height: 42px; padding: 0 15px; color: var(--green); background: #e8f1eb; }
.progress-panel { margin-top: 24px; }
.progress-meta { display: flex; justify-content: space-between; gap: 20px; }
.progress-track { height: 12px; margin-top: 10px; border-radius: 99px; overflow: hidden; background: #e3e2dc; }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #56a575); transition: width .35s ease; }
#progress-message { color: var(--muted); }
.hidden { display: none; }
.error-box { margin-top: 20px; padding: 15px 18px; border: 1px solid #e8b5b5; border-radius: 10px; color: #792626; background: #fff0f0; }
.section-heading { display: flex; gap: 20px; justify-content: space-between; align-items: end; margin-bottom: 22px; }
.section-heading h2 { margin: 5px 0 0; font-size: 28px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions a { color: var(--green); font-weight: 700; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.summary div { padding: 18px; border-radius: 12px; background: #f0f3ef; }
.summary span { display: block; color: var(--muted); font-size: 13px; }
.summary strong { display: block; margin-top: 6px; font-size: 22px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
td img { width: 180px; aspect-ratio: 16 / 9; border-radius: 8px; object-fit: cover; }
.time { font-variant-numeric: tabular-nums; font-weight: 750; }
.status { display: inline-block; padding: 5px 9px; border-radius: 99px; background: #ecece8; font-size: 12px; font-weight: 800; }
.status-done { color: var(--green-dark); background: #dcecdf; }
.status-failed { color: #822c2c; background: #f5dddd; }
.status-processing, .status-queued { color: #7b4c0e; background: #f6e7cb; }
.empty { padding: 30px; color: var(--muted); text-align: center; }

@media (max-width: 720px) {
    .page { width: min(100% - 20px, 1180px); padding: 34px 0; }
    .card { padding: 18px; border-radius: 15px; }
    .upload-card form { grid-template-columns: 1fr; }
    button { min-height: 52px; }
    .summary { grid-template-columns: 1fr; }
    .section-heading { align-items: flex-start; flex-direction: column; }
}
