:root {
    color-scheme: light;
    --zyntron-primary: 249 115 22;
    --zyntron-secondary: 59 130 246;
    --zyntron-surface: #f8fafc;
    --shadow-soft: 0 12px 32px rgba(15, 23, 42, 0.08);
}

body {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(249, 250, 251, 0.9));
}

.section-card {
    border-radius: 1.5rem;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.15);
    position: relative;
    overflow: visible;
}

.section-card-hero {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.97) 0%, rgba(255, 247, 237, 0.94) 50%, rgba(237, 233, 254, 0.92) 100%);
}

.section-card-hero::before {
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.34), transparent 58%),
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.24), transparent 60%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.28), transparent 62%);
}

.section-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 55%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.14), transparent 60%);
    opacity: 0.9;
}

.section-card::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.65);
    pointer-events: none;
}

.section-card > * {
    position: relative;
    z-index: 1;
}

.section-title {
    letter-spacing: 0.32em;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
}

.action-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.42rem 1.1rem;
    border-radius: 9999px;
    border: 1px solid rgba(59, 130, 246, 0.25);
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    color: #1f2937;
    font-weight: 600;
    transition: all 180ms ease;
}

.action-pill:hover {
    border-color: rgba(249, 115, 22, 0.45);
    color: rgb(249 115 22);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.12);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.35);
    min-width: 7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.status-badge[data-variant="Indexed"] {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    color: #1d4ed8;
}

.status-badge[data-variant="Processing"] {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.35);
    color: #ea580c;
}

.status-badge[data-variant="Queued"] {
    background: rgba(147, 51, 234, 0.12);
    border-color: rgba(147, 51, 234, 0.32);
    color: #7e22ce;
}

.document-row-active {
    border: 1px solid rgba(59, 130, 246, 0.45) !important;
    background: rgba(191, 219, 254, 0.28) !important;
}

#upload-dropzone {
    transition: all 200ms ease;
}

#upload-dropzone.drag-active {
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(191, 219, 254, 0.4);
}

#upload-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    border-radius: 0.9rem;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.05);
}

#upload-list button {
    border-radius: 9999px;
    padding: 0.3rem 0.9rem;
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1f2937;
    background: rgba(59, 130, 246, 0.12);
    transition: all 160ms ease;
}

#upload-list button:hover {
    background: rgba(249, 115, 22, 0.15);
    color: rgb(249 115 22);
}

.folder-panel {
    position: relative;
    border-radius: 1.4rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #ffffff;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.14);
    overflow: hidden;
}

.folder-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 55%),
        radial-gradient(circle at bottom left, rgba(249, 115, 22, 0.12), transparent 60%);
    opacity: 0.85;
}

.folder-panel > * {
    position: relative;
    z-index: 1;
}

.folder-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    border-radius: 9999px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    font-size: 0.75rem;
    font-weight: 600;
    color: #1d4ed8;
    transition: all 150ms ease;
}

.folder-chip:hover,
.folder-chip.active {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.4);
    color: #c2410c;
}

.metadata-panel {
    border-radius: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: var(--shadow-soft);
}

.metadata-panel pre {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.78rem;
    line-height: 1.35rem;
    color: #374151;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 16rem;
    overflow-y: auto;
}

.job-table {
    border-spacing: 0;
    width: 100%;
}

.job-table thead th {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 2;
}

.job-scroll {
    max-height: 18rem;
    overflow-y: auto;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.table-header {
    background: linear-gradient(90deg, rgba(226, 232, 240, 0.55), rgba(241, 245, 249, 0.75));
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.7rem;
    font-weight: 700;
}

.table-row:nth-child(even) {
    background: rgba(248, 250, 252, 0.6);
}

.select-accent {
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background-color: #ffffff;
    color: #0f172a;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    transition: all 180ms ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8.25 9l3.75 3.75L15.75 9' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.select-accent:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}

.support-card {
    border-radius: 1.25rem;
    border: 1px solid rgba(203, 213, 225, 0.55);
    background: linear-gradient(155deg, #ffffff 0%, #f8fafc 100%);
    padding: 1.75rem;
    box-shadow: var(--shadow-soft);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.support-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 40px rgba(15, 23, 42, 0.12);
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 9999px;
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.18);
    color: #1f2937;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-backdrop[data-open="true"] {
    display: flex;
}

.modal-content {
    width: min(960px, 92vw);
    max-height: 90vh;
    background: #ffffff;
    border-radius: 1.5rem;
    border: 1px solid rgba(203, 213, 225, 0.7);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.modal-content {
    position: relative;
    width: min(980px, 92vw);
    max-height: 92vh;
    background: #ffffff;
    border-radius: 1.5rem;
    border: 1px solid rgba(203, 213, 225, 0.7);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.24);
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #ffffff;
    padding: 0.45rem;
    color: #475569;
    transition: border 160ms ease, color 160ms ease;
}

.modal-close:hover {
    border-color: rgba(249, 115, 22, 0.55);
    color: #f97316;
}

.modal-body {
    padding: 2.75rem 2.75rem 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.modal-download {
    align-self: flex-end;
    margin-top: 0.25rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    color: #1d4ed8;
    font-weight: 600;
    padding: 0.5rem 1.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 160ms ease;
}

.modal-download:hover {
    border-color: rgba(37, 99, 235, 0.6);
    color: #2563eb;
}

.modal-pill {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 0.75rem;
    border-radius: 1rem;
    border: 1px solid rgba(203, 213, 225, 0.6);
    background: rgba(248, 250, 252, 0.9);
    padding: 0.55rem 0.9rem;
}

.modal-pill-label {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.65rem;
    color: #0f172a;
    font-weight: 600;
}

.modal-pill-value {
    font-weight: 600;
    color: #0f172a;
    text-align: right;
    justify-self: end;
    word-break: break-word;
    white-space: normal;
}

.modal-text {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    line-height: 1.35rem;
    color: #1f2937;
    background: #f8fafc;
    border: 1px solid rgba(203, 213, 225, 0.7);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    max-height: 7.2rem;
    overflow-y: auto;
    overflow-x: hidden;
    white-space: pre-wrap;
    word-break: break-word;
}

.modal-text::-webkit-scrollbar {
    width: 6px;
}

.modal-text::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.6);
    border-radius: 999px;
}

.modal-preview {
    border-radius: 1.5rem;
    border: 1px solid rgba(203, 213, 225, 0.7);
    background: rgba(226, 232, 240, 0.4);
    padding: 0.75rem;
}

.modal-preview-frame {
    width: 100%;
    min-height: 65vh;
    border: 0;
    border-radius: 1.25rem;
    background: #ffffff;
}

.modal-backdrop[data-open="true"] .modal-content {
    animation: modal-enter 180ms ease-out;
}

@keyframes modal-enter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.legal-document {
    counter-reset: line;
    font-size: 0.95rem;
    color: #1f2937;
    line-height: 1.75rem;
}

.legal-document h2 {
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #0f172a;
}

.legal-document p {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1rem;
    counter-increment: line;
}

.legal-document p::before {
    content: counter(line);
    position: absolute;
    left: 0;
    width: 2.4rem;
    text-align: right;
    color: #94a3b8;
    font-feature-settings: 'tnum';
}

.metric-card {
    border-radius: 1.25rem;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}
.metric-card::before, .metric-card::after {
    display: none;
}

.select-accent-wrap {
    width: auto;
    min-width: 9rem;
    display: inline-block;
}

