:root {
    --ink: #17212b;
    --muted: #667085;
    --line: #d9e0e8;
    --paper: #f7f9fb;
    --panel: #ffffff;
    --teal: #0f766e;
    --teal-dark: #115e59;
    --coral: #b4533a;
    --gold: #b7791f;
    --blue: #2563eb;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* {
    letter-spacing: 0;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: var(--teal);
    text-decoration: none;
}

a:hover {
    color: var(--teal-dark);
}

.app-navbar {
    min-height: 64px;
    background: #17212b;
    color: #fff;
}

.navbar-brand,
.navbar-brand:hover {
    color: #fff;
    font-weight: 700;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #fff;
    background: var(--teal);
}

.upload-shell,
.job-shell,
.admin-shell {
    padding: clamp(20px, 4vw, 42px) 0;
}

.auth-shell {
    min-height: calc(100vh - 64px);
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-panel,
.work-panel,
.viewer-panel,
.process-board,
.table-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.auth-panel {
    width: min(100%, 430px);
    padding: clamp(22px, 4vw, 34px);
}

.work-panel,
.process-board,
.table-panel {
    padding: clamp(18px, 3vw, 28px);
}

.panel-header,
.job-toolbar,
.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.job-toolbar {
    margin-bottom: 22px;
}

.toolbar-actions,
.viewer-controls,
.audio-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--coral);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(1.65rem, 3vw, 2.65rem);
    line-height: 1.1;
    font-weight: 800;
}

h2 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    line-height: 1.25;
    font-weight: 800;
}

p {
    color: var(--muted);
}

.muted {
    color: var(--muted);
}

.status-pill,
.status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #e6f3f1;
    color: var(--teal-dark);
    font-size: 0.82rem;
    font-weight: 800;
}

.drop-zone {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 280px;
    margin-top: 24px;
    padding: 24px;
    border: 2px dashed #9eb4c7;
    border-radius: 8px;
    background: #fbfdff;
    text-align: center;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
    border-color: var(--teal);
    background: #eefaf8;
}

.drop-zone input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.drop-icon {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    margin-bottom: 14px;
    border-radius: 8px;
    color: #fff;
    background: var(--teal);
    font-size: 2.2rem;
}

.drop-title {
    display: block;
    color: var(--ink);
    font-size: 1.15rem;
    font-weight: 800;
}

.drop-meta {
    display: block;
    color: var(--muted);
    font-size: 0.95rem;
}

.progress-block {
    margin-top: 18px;
}

.progress {
    height: 12px;
    background: #e8eef4;
    border-radius: 999px;
}

.progress-bar {
    background: var(--teal);
}

.process-board {
    display: grid;
    align-content: center;
    gap: 18px;
    background: #17212b;
    color: #fff;
}

.process-board p {
    margin: 0;
    color: #cbd5df;
}

.board-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.board-row:last-child {
    border-bottom: 0;
}

.step-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    color: #17212b;
    background: #f2c879;
    font-weight: 900;
}

.viewer-panel {
    overflow: hidden;
}

.viewer-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.viewer-header p {
    margin: 0;
}

.score-canvas {
    min-height: 72vh;
    overflow: auto;
    padding: 22px;
    background: #eef2f6;
}

.score-canvas > div {
    margin: 0 auto;
    background: #fff;
}

.side-stack {
    display: grid;
    gap: 18px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.metric-grid > div {
    min-height: 76px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}

.metric-grid span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.metric-grid strong {
    display: block;
    margin-top: 4px;
    font-size: 1.2rem;
}

.admin-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.report-list {
    display: grid;
    gap: 10px;
}

.report-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.report-item:last-child {
    border-bottom: 0;
}

.report-item strong {
    color: var(--teal-dark);
}

.form-message {
    min-height: 22px;
    margin: 10px 0 0;
    font-size: 0.92rem;
    font-weight: 700;
}

.table-panel {
    padding: 0;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.btn {
    border-radius: 8px;
    font-weight: 750;
}

.btn-primary {
    background: var(--teal);
    border-color: var(--teal);
}

.btn-primary:hover {
    background: var(--teal-dark);
    border-color: var(--teal-dark);
}

.form-control,
.form-select {
    border-radius: 8px;
    border-color: #cbd5df;
}

@media (max-width: 992px) {
    .panel-header,
    .job-toolbar,
    .viewer-header {
        flex-direction: column;
    }

    .toolbar-actions,
    .viewer-controls {
        width: 100%;
    }

    .toolbar-actions .btn {
        flex: 1 1 auto;
    }

    .score-canvas {
        min-height: 55vh;
    }

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

@media (max-width: 576px) {
    .metric-grid,
    .admin-metrics {
        grid-template-columns: 1fr;
    }

    .drop-zone {
        min-height: 230px;
    }
}

