/* ── Base Typography ────────────────────────────────────────────────────── */

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Tabular numbers for prices/quantities */
.font-tabular {
    font-variant-numeric: tabular-nums;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Custom Scrollbar (Webkit) ─────────────────────────────────────────── */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ── PDF Viewer ────────────────────────────────────────────────────────── */

.pdf-viewer {
    width: 100%;
    height: calc(100vh - 200px);
    min-height: 500px;
    border: none;
}

.pdf-viewer-container {
    position: sticky;
    top: 70px;
}

/* ── Drag and Drop ─────────────────────────────────────────────────────── */

.drop-zone-active {
    border-color: #6366f1 !important;
    background-color: rgba(99, 102, 241, 0.05) !important;
}

.dark .drop-zone-active {
    background-color: rgba(99, 102, 241, 0.15) !important;
}

/* ── Skeleton Loading ──────────────────────────────────────────────────── */

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 0.375rem;
}

.dark .skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
}

/* ── Progress Bar ──────────────────────────────────────────────────────── */

.progress-bar {
    transition: width 0.5s ease-in-out;
}

/* ── Print Styles ──────────────────────────────────────────────────────── */

@media print {
    nav, .no-print, #toast-container {
        display: none !important;
    }

    main {
        padding: 0 !important;
        max-width: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}

/* ── Match Score Badges ────────────────────────────────────────────────── */

.match-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem 0.35rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    line-height: 1.4;
}

.match-high {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.dark .match-high {
    background-color: rgba(21, 128, 61, 0.25);
    color: #86efac;
    border-color: rgba(21, 128, 61, 0.4);
}

.match-med {
    background-color: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde047;
}

.dark .match-med {
    background-color: rgba(161, 98, 7, 0.25);
    color: #fde047;
    border-color: rgba(161, 98, 7, 0.4);
}

.match-low {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.dark .match-low {
    background-color: rgba(153, 27, 27, 0.25);
    color: #fca5a5;
    border-color: rgba(153, 27, 27, 0.4);
}

.match-none {
    background-color: #f1f5f9;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
}

.dark .match-none {
    background-color: rgba(51, 65, 85, 0.4);
    color: #64748b;
    border-color: rgba(51, 65, 85, 0.6);
}

/* ── Line Row Improvements ─────────────────────────────────────────────── */

.line-row {
    transition: background-color 150ms ease;
}

.line-row:hover {
    background-color: rgba(238, 242, 255, 0.5);
}

.dark .line-row:hover {
    background-color: rgba(99, 102, 241, 0.06);
}

.line-row:focus-within {
    background-color: rgba(238, 242, 255, 0.8);
    outline: none;
}

.dark .line-row:focus-within {
    background-color: rgba(99, 102, 241, 0.1);
}

/* ── Action Select ─────────────────────────────────────────────────────── */

.action-select {
    min-width: 5.5rem;
    cursor: pointer;
}

/* ── Dashboard job rows ────────────────────────────────────────────────── */

.job-row {
    transition: background-color 100ms ease;
}

/* ── Focus Ring (Indigo Theme) ─────────────────────────────────────────── */

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5);
}

/* ── Smooth Dark Mode Transitions ──────────────────────────────────────── */

* {
    transition-property: color, background-color, border-color;
    transition-duration: 150ms;
}

a, button {
    transition-duration: 200ms;
}
