:root {
    --paper: #f6efe6;
    --paper-deep: #efe4d6;
    --ink: #1c1916;
    --muted: #6b5d52;
    --accent: #e07a2f;
    --accent-strong: #0f766e;
    --accent-soft: #f2b37b;
    --card: #fffaf3;
    --border: rgba(28, 25, 22, 0.12);
    --shadow: 0 26px 60px rgba(28, 25, 22, 0.18);
    --danger: #b42318;
    --success: #0f7a4a;
}

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

body {
    font-family: "Space Grotesk", sans-serif;
    color: var(--ink);
    min-height: 100vh;
    background:
        radial-gradient(1000px 600px at 8% -10%, #f4cfa3 0%, rgba(244, 207, 163, 0) 60%),
        radial-gradient(900px 520px at 96% 0%, #b7dfd4 0%, rgba(183, 223, 212, 0) 55%),
        linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(28, 25, 22, 0.08) 1px, transparent 0);
    background-size: 18px 18px;
    opacity: 0.2;
    pointer-events: none;
}

.page {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
    padding: 48px 24px 64px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 32px;
}

.intro {
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: float-in 0.8s ease both;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-strong);
}

h1 {
    font-family: "Fraunces", serif;
    font-size: clamp(2.2rem, 3.6vw, 3.4rem);
    line-height: 1.05;
}

.lead {
    font-size: 1.05rem;
    color: var(--muted);
    line-height: 1.6;
}

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

.info-card {
    background: rgba(255, 250, 243, 0.82);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(28, 25, 22, 0.08);
    backdrop-filter: blur(6px);
    animation: float-in 0.7s ease both;
}

.info-card:nth-child(1) {
    animation-delay: 0.12s;
}

.info-card:nth-child(2) {
    animation-delay: 0.2s;
}

.info-card h3 {
    font-size: 1rem;
    margin-bottom: 10px;
}

.list {
    list-style: none;
    display: grid;
    gap: 10px;
    color: var(--muted);
    font-size: 0.95rem;
}

.list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.list li::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 999px;
    background: var(--accent);
    flex-shrink: 0;
}

.output-note {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.95rem;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 250, 243, 0.7);
}

.output-note span {
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.output-note strong {
    font-size: 1.05rem;
}

.panel {
    background: var(--card);
    border-radius: 28px;
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: float-in 0.8s ease both;
    animation-delay: 0.12s;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.panel-head h2 {
    font-size: 1.4rem;
    margin-bottom: 6px;
}

.panel-head p {
    color: var(--muted);
    font-size: 0.95rem;
}

.badge {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.12);
    color: var(--accent-strong);
    font-weight: 600;
}

.drop-zone {
    border: 2px dashed rgba(28, 25, 22, 0.2);
    border-radius: 22px;
    padding: 24px;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 250, 243, 0.9));
}

.drop-zone input {
    display: none;
}

.drop-zone:focus-within {
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}

.drop-zone.dragover {
    border-color: var(--accent);
    box-shadow: 0 12px 28px rgba(224, 122, 47, 0.25);
    transform: translateY(-2px);
}

.drop-zone.has-file {
    border-style: solid;
}

.drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.drop-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: var(--accent-strong);
    background: rgba(15, 118, 110, 0.12);
}

.drop-icon svg {
    width: 28px;
    height: 28px;
}

.drop-title {
    font-size: 1.05rem;
    font-weight: 600;
}

.drop-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
}

.file-meta {
    font-size: 0.9rem;
    color: var(--muted);
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 250, 243, 0.6);
}

.file-meta.has-file {
    color: var(--ink);
    border-color: rgba(224, 122, 47, 0.4);
    background: rgba(224, 122, 47, 0.08);
}

.status-card {
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 16px;
    background: rgba(255, 250, 243, 0.9);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.status-label {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.65rem;
    color: var(--muted);
}

.status-text {
    display: block;
    font-weight: 600;
    color: var(--accent-strong);
}

.status-text.is-error {
    color: var(--danger);
}

.status-text.is-success {
    color: var(--success);
}

.progress-percent {
    font-weight: 600;
    color: var(--accent-strong);
}

.progress-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(28, 25, 22, 0.1);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    transition: width 0.3s ease;
}

.logs {
    max-height: 150px;
    overflow-y: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.78rem;
    color: var(--muted);
    background: rgba(28, 25, 22, 0.05);
    border-radius: 12px;
    padding: 10px;
}

.logs div {
    margin-bottom: 4px;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-secondary {
    border: 1px solid var(--accent-strong);
    background: transparent;
    color: var(--accent-strong);
    padding: 12px 16px;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-secondary:hover {
    background: var(--accent-strong);
    color: #fefaf4;
    transform: translateY(-1px);
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.report-status {
    font-size: 0.85rem;
    color: var(--muted);
}

.report-status.is-error {
    color: var(--danger);
}

.report-status.is-success {
    color: var(--success);
}

.hidden {
    display: none;
}

@keyframes float-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .page {
        grid-template-columns: 1fr;
    }

    .panel {
        order: -1;
    }
}

@media (max-width: 600px) {
    .page {
        padding: 32px 18px 48px;
    }

    .panel {
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
