body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: linear-gradient(180deg, #eef4ff 0%, #f8fafc 42%, #f3f6fb 100%);
    color: #1f2937;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 28px 22px;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #ffffff;
    border-right: 1px solid rgba(148, 163, 184, 0.16);
}

.sidebar-top {
    display: grid;
    gap: 14px;
}

.brand {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 20px;
}

.brand-sidebar {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
}

.sidebar-subtitle {
    margin: 0;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.5;
}

.sidebar-nav {
    display: grid;
    gap: 10px;
    align-content: start;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 50px;
    padding: 0 16px;
    border-radius: 14px;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.1);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.2);
    transform: translateY(-1px);
}

.nav-link.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(59, 130, 246, 0.75));
    border-color: rgba(96, 165, 250, 0.45);
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.24);
}

.content-shell {
    min-width: 0;
    padding: 32px;
}

.content-container {
    width: min(1120px, 100%);
}

.public-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.public-container {
    width: min(460px, 100%);
}

.hero {
    padding: 0 0 18px;
}

.hero-compact h1 {
    margin: 8px 0 10px;
    font-size: 36px;
    line-height: 1.1;
}

.hero-compact p {
    max-width: 760px;
    margin: 0;
    color: #475569;
    font-size: 16px;
    line-height: 1.7;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
}

.auth-card {
    max-width: 420px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card strong {
    display: block;
    margin: 8px 0 10px;
    font-size: 24px;
}

.stat-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

.stat-label {
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

form {
    display: grid;
    gap: 16px;
}

.inline-form {
    display: inline-flex;
    align-items: center;
}

.upload-form {
    width: min(440px, 100%);
}

label {
    display: grid;
    gap: 8px;
    font-weight: 600;
}

input {
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
}

input[type="file"] {
    padding: 10px 12px;
    background: #f8fafc;
}

button {
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.logout-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logout {
    margin-top: 12px;
}

.sidebar-label {
    color: #94a3b8;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-user {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.user-badge {
    font-size: 14px;
    color: #cbd5e1;
}

.ghost-button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: none;
}

.sidebar-card {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(148, 163, 184, 0.14);
    box-shadow: none;
}

.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 10px;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

ul {
    padding-left: 20px;
}

.action-card p {
    margin-bottom: 16px;
    color: #64748b;
    line-height: 1.7;
}

.actions-row {
    display: flex;
    gap: 12px;
}

.primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.hero-actions {
    margin-top: 24px;
}

.download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 0 26px;
    border-radius: 18px;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #60a5fa 100%);
    color: #ffffff;
    text-decoration: none;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.01em;
    box-shadow: 0 20px 44px rgba(37, 99, 235, 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.download-button:hover {
    transform: translateY(-2px) scale(1.01);
    filter: brightness(1.05);
    box-shadow: 0 24px 52px rgba(37, 99, 235, 0.4);
}

.download-button:active {
    transform: translateY(0);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.jobs-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
}

.jobs-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.jobs-table th,
.jobs-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.jobs-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    background: #f8fafc;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: #dbeafe;
    color: #1d4ed8;
}

.table-link {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}

.table-link:hover {
    text-decoration: underline;
}

.empty-state {
    color: #6b7280;
}

.job-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.details-grid dt {
    margin-bottom: 6px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.details-grid dd {
    margin: 0;
    color: #0f172a;
    line-height: 1.6;
    word-break: break-word;
}

.details-span-2 {
    grid-column: span 2;
}

.timeline-list {
    display: grid;
    gap: 14px;
}

.timeline-item {
    padding: 16px 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: #f8fafc;
}

.timeline-stage {
    color: #2563eb;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-meta {
    margin-top: 6px;
    color: #64748b;
    font-size: 14px;
}

.timeline-item p {
    margin: 10px 0 0;
    color: #334155;
}

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

pre {
    margin: 10px 0 0;
    padding: 16px;
    border-radius: 16px;
    background: #0f172a;
    color: #e2e8f0;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

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

.pagination-link {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.pagination-link:hover {
    background: #dbeafe;
}

.pagination-link.disabled {
    background: #f1f5f9;
    color: #94a3b8;
    pointer-events: none;
}

.pagination-info {
    color: #64748b;
    font-size: 14px;
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        gap: 24px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .jobs-toolbar,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }
}
