/* ----------------------------------------------
   1. Root Variables & Base Styles
----------------------------------------------- */
:root {
    /* Typography */
    --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;

    /* Refined blue palette */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;

    /* Header gradient */
    --header-start: #1e3a8a;
    --header-mid: #3b82f6;
    --header-end: #2563eb;

    --body-bg: #f8fafc;

    --accent-color: #3b82f6;
    --accent-color-hover: #2563eb;
    --accent-color-light: #eff6ff;
    --text-color: #1e293b;
    --text-color-secondary: #64748b;
    --text-color-muted: #94a3b8;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --border-color-light: #f1f5f9;

    /* Status colors */
    --success-color: #22c55e;
    --success-bg: #f0fdf4;
    --warning-color: #f59e0b;
    --warning-bg: #fffbeb;
    --danger-color: #ef4444;
    --danger-bg: #fef2f2;

    /* Enhanced shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 10px 20px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --border-radius: 0.75rem;
    --border-radius-sm: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.25rem;

    --transition-speed: 0.2s;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --container-max-width: 1400px;
}

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

/* Body & Container */
body {
    font-family: var(--font-body);
    background: var(--body-bg);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    width: 95%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ----------------------------------------------
   2. Header
----------------------------------------------- */
header {
    background: linear-gradient(135deg, var(--header-start) 0%, var(--header-mid) 50%, var(--header-end) 100%);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    color: #fff;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
    pointer-events: none;
}

.header-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
    white-space: nowrap;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}


/* Filter toggle button */
.filter-toggle {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-smooth);
}

.filter-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.filter-toggle:active {
    transform: translateY(0);
}

.filter-toggle-icon {
    font-size: 1rem;
    opacity: 0.9;
}

.filter-count {
    background: #fff;
    color: var(--primary-700);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 2rem;
    min-width: 1.25rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Header responsive */
@media (max-width: 600px) {
    header {
        padding: 1.25rem;
        border-radius: var(--border-radius);
    }

    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    header h1 {
        text-align: center;
        font-size: 1.5rem;
    }

    .filter-toggle {
        justify-content: center;
    }
}

/* ----------------------------------------------
   3. Filter Panel (Collapsible)
----------------------------------------------- */
.filter-panel {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color-light);
    animation: slideDown 0.3s var(--transition-smooth);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group-wide {
    grid-column: span 2;
}

.filter-group-actions {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-color);
    user-select: none;
    transition: color var(--transition-speed);
}

.checkbox-label:hover {
    color: var(--accent-color);
}

.checkbox-label input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
    accent-color: var(--accent-color);
    border-radius: 4px;
}

.btn-clear-filters {
    padding: 0.625rem 1rem;
    background: transparent;
    color: var(--text-color-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-smooth);
    white-space: nowrap;
}

.btn-clear-filters:hover {
    background: var(--danger-bg);
    border-color: #fecaca;
    color: #b91c1c;
}

.btn-clear-filters[hidden] {
    display: none;
}

@media (max-width: 600px) {
    .filter-group-wide {
        grid-column: span 1;
    }
}

.filter-group label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-color-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group select,
.filter-group input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    background: white;
    color: var(--text-color);
    transition: all var(--transition-speed) var(--transition-smooth);
    box-shadow: var(--shadow-xs);
}

.filter-group select:hover,
.filter-group input:hover {
    border-color: var(--primary-200);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper input {
    width: 100%;
    padding-right: 2.5rem;
}

.search-clear {
    position: absolute;
    right: 0.625rem;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: none;
    background: var(--border-color);
    color: var(--text-color-secondary);
    border-radius: 50%;
    font-size: 0.875rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed) var(--transition-smooth);
}

.search-clear:hover {
    background: var(--text-color-secondary);
    color: white;
}

.search-clear[hidden] {
    display: none;
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color-light);
}

.btn-apply {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-color-hover) 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-apply:active {
    transform: translateY(0);
}

.btn-clear {
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--text-color-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-smooth);
}

.btn-clear:hover {
    background: var(--border-color-light);
    color: var(--text-color);
    border-color: var(--border-color);
}

/* Filter Results Indicator */
.filter-results {
    margin-top: 1.25rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%);
    border: 1px solid var(--primary-200);
    border-radius: var(--border-radius-sm);
    color: var(--primary-700);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
}

.filter-results[hidden] {
    display: none;
}

/* ----------------------------------------------
   4. Main Content
----------------------------------------------- */
main {
    flex: 1;
    width: 100%;
}

/* ----------------------------------------------
   5. Stats Container
----------------------------------------------- */
.stats-container {
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--card-bg);
    padding: 0.875rem 1.25rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color-light);
    transition: all var(--transition-speed) var(--transition-smooth);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-color);
    letter-spacing: -0.02em;
}

.stat-label {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-color-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ----------------------------------------------
   6. Job List View
----------------------------------------------- */
.job-list {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color-light);
    overflow: hidden;
}

/* Classification Section Headers */
.classification-section {
    margin-bottom: 1.5rem;
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color-light);
    overflow: hidden;
    transition: box-shadow var(--transition-speed) var(--transition-smooth);
}

.classification-section:hover {
    box-shadow: var(--shadow-md);
}

.classification-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--accent-color) 100%);
    color: white;
    cursor: pointer;
    user-select: none;
    transition: all var(--transition-speed) var(--transition-smooth);
}

.classification-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    flex-grow: 1;
    letter-spacing: -0.01em;
}

.classification-count {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.875rem;
    border-radius: 2rem;
    margin-left: auto;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .classification-header {
        align-items: flex-start;
    }

    .classification-count {
        align-self: flex-start;
        margin-top: 0.1rem;
    }
}

/* Collapse/Expand Controls */
.classification-controls {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0.5rem 0;
}

.btn-collapse-all,
.btn-expand-all {
    padding: 0.625rem 1.25rem;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-smooth);
}

.btn-collapse-all {
    background: white;
    color: var(--accent-color);
}

.btn-expand-all {
    background: var(--accent-color);
    color: white;
}

.btn-collapse-all:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-1px);
}

.btn-expand-all:hover {
    background: var(--accent-color-hover);
    transform: translateY(-1px);
}

/* Collapsible Classification Sections */
.classification-header:hover {
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--accent-color-hover) 100%);
}

.collapse-icon {
    margin-right: 0.5rem;
    font-size: 0.7rem;
    opacity: 0.8;
    transition: transform var(--transition-speed) var(--transition-smooth);
}

.classification-section.collapsed .classification-content {
    display: none;
}

/* Show all jobs button */
.show-all-container {
    padding: 1.25rem;
    text-align: center;
    background: var(--border-color-light);
    border-top: 1px solid var(--border-color);
}

.btn-show-all-jobs {
    padding: 0.625rem 1.75rem;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-color);
    background: white;
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-smooth);
    box-shadow: var(--shadow-xs);
}

.btn-show-all-jobs:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* List Header - sortable columns */
.job-list-header {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 0.8fr 1fr 1fr;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: var(--border-color-light);
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-color-secondary);
}

.job-list-header-cell {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    user-select: none;
    transition: color var(--transition-speed);
}

.job-list-header-cell:hover {
    color: var(--accent-color);
}

/* List Body */
.job-list-body {
    display: flex;
    flex-direction: column;
}

/* Job Row */
.job-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 0.8fr 1fr 1fr;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color-light);
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-smooth);
    align-items: center;
}

.job-row:last-child {
    border-bottom: none;
}

.job-row:hover {
    background: var(--primary-50);
}

.job-row.expanded {
    background: var(--primary-100);
    border-left: 3px solid var(--accent-color);
    padding-left: calc(1.25rem - 3px);
}

.job-row-cell {
    font-size: 0.875rem;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.job-row-title {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-color);
}

.job-row-employer {
    color: var(--accent-color);
    font-weight: 500;
}

.job-row-location {
    color: var(--text-color-secondary);
}

.job-row-salary {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--success-color);
}

.job-row-closing .closing-urgent {
    color: var(--danger-color);
    font-weight: 600;
}

.job-row-closing .closing-soon {
    color: var(--warning-color);
    font-weight: 500;
}

.job-row-closing .closing-closed {
    color: var(--text-color-muted);
    font-style: italic;
}

/* Mobile meta row - hidden on desktop */
.job-row-meta {
    display: none;
}

/* Job Detail Panel */
.job-detail {
    padding: 1.75rem;
    background: linear-gradient(180deg, var(--primary-50) 0%, white 100%);
    border-bottom: 3px solid var(--accent-color);
    animation: slideDown 0.25s var(--transition-smooth);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-meta-item {
    font-size: 0.875rem;
    color: var(--text-color-secondary);
}

.detail-meta-item strong {
    color: var(--text-color);
    font-weight: 600;
}

.detail-description {
    margin-bottom: 1.75rem;
}

.detail-description h4 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.625rem;
}

.detail-description p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-color-secondary);
    white-space: pre-wrap;
}

.detail-actions {
    display: flex;
    gap: 0.875rem;
    flex-wrap: wrap;
}

.btn-apply {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-color-hover) 100%);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition-speed) var(--transition-smooth);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-apply:active {
    transform: translateY(0);
}

.btn-close-detail {
    padding: 0.875rem 1.5rem;
    background: white;
    color: var(--text-color-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-smooth);
}

.btn-close-detail:hover {
    background: var(--border-color-light);
    color: var(--text-color);
    border-color: var(--border-color);
}

.btn-secondary {
    display: inline-block;
    padding: 0.875rem 1.5rem;
    background: white;
    color: var(--accent-color);
    text-decoration: none;
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition-speed) var(--transition-smooth);
}

.btn-secondary:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.btn-expired,
.btn-disabled {
    display: inline-block;
    padding: 0.875rem 1.5rem;
    background: var(--border-color-light);
    color: var(--text-color-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: not-allowed;
    opacity: 0.7;
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-expired {
    background: var(--danger-bg);
    color: #b91c1c;
    border-color: #fecaca;
}

/* Detail Sections */
.detail-section {
    margin-bottom: 1.75rem;
}

.detail-section:last-of-type {
    margin-bottom: 1.25rem;
}

.detail-section h4 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.875rem;
    padding-bottom: 0.625rem;
    border-bottom: 2px solid var(--primary-100);
}

.detail-section h5 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.detail-subsection {
    margin-bottom: 1.25rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

.detail-grid dt {
    font-weight: 500;
    color: var(--text-color-secondary);
}

.detail-grid dd {
    color: var(--text-color);
    margin: 0;
}

.detail-grid dd a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.detail-grid dd a:hover {
    text-decoration: underline;
}

.detail-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-color);
    white-space: pre-wrap;
}

/* No jobs message */
.no-jobs {
    text-align: center;
    padding: 4rem 1.5rem;
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color-light);
}

.no-jobs h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.625rem;
    color: var(--text-color);
}

.no-jobs p {
    color: var(--text-color-secondary);
}

/* Mobile List View */
@media (max-width: 768px) {
    .job-list-header {
        display: none;
    }

    .job-row {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem 1.25rem;
        align-items: flex-start;
    }

    .job-row.expanded {
        padding-left: calc(1.25rem - 3px);
    }

    .job-row-cell {
        white-space: normal;
    }

    .job-row-title {
        font-size: 1rem;
        width: 100%;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.4;
    }

    /* Hide individual cells on mobile */
    .job-row-employer,
    .job-row-location,
    .job-row-hours,
    .job-row-salary,
    .job-row-closing {
        display: none;
    }

    /* Show combined meta row on mobile */
    .job-row-meta {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.85rem;
        width: 100%;
    }

    .job-row-meta .meta-employer {
        color: var(--accent-color);
        font-weight: 600;
    }

    .job-row-meta .meta-details {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
        color: var(--text-color-secondary);
    }

    .job-row-meta .meta-item {
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }

    .job-row-meta .meta-icon {
        font-size: 0.75rem;
        opacity: 0.7;
    }

    .job-row-meta .meta-salary {
        color: var(--success-color);
        font-weight: 600;
    }

    .job-row-meta .meta-closing {
        font-size: 0.8rem;
        color: var(--text-color-secondary);
        padding-top: 0.375rem;
        border-top: 1px solid var(--border-color-light);
    }

    .job-row-meta .meta-closing.closing-urgent {
        color: var(--danger-color);
        font-weight: 600;
    }

    .job-row-meta .meta-closing.closing-soon {
        color: var(--warning-color);
        font-weight: 500;
    }

    .job-row-meta .meta-closing.closing-closed {
        color: var(--text-color-muted);
        font-style: italic;
    }

    .job-detail {
        padding: 1.25rem;
    }

    .detail-meta {
        flex-direction: column;
        gap: 0.625rem;
    }

    .detail-actions {
        flex-direction: column;
    }

    .btn-apply,
    .btn-close-detail {
        width: 100%;
        text-align: center;
    }
}

/* ----------------------------------------------
   8. Pagination
----------------------------------------------- */
.pagination-container {
    margin-top: 2rem;
}

.result-count {
    text-align: center;
    color: var(--text-color-secondary);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.75rem 0;
}

.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pagination-info {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-color-secondary);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
    justify-content: center;
}

.page-btn {
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.625rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-smooth);
}

.page-btn:hover:not(.active):not(:disabled) {
    background: var(--primary-50);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-color-hover) 100%);
    border-color: var(--accent-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--border-color-light);
}

/* ----------------------------------------------
   9. Loading & Error States
----------------------------------------------- */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    gap: 1.25rem;
}

.loading[hidden] {
    display: none;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--primary-100);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    color: var(--text-color-secondary);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
}

.error-message {
    background: var(--danger-bg);
    color: #b91c1c;
    padding: 1.25rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    text-align: center;
    border-left: 4px solid var(--danger-color);
    font-family: var(--font-display);
    font-weight: 500;
}

.error-message[hidden] {
    display: none;
}

/* ----------------------------------------------
   10. Footer
----------------------------------------------- */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2.5rem;
    font-size: 0.85rem;
    color: var(--text-color-secondary);
    border-top: 1px solid var(--border-color-light);
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-speed);
}

footer a:hover {
    color: var(--accent-color-hover);
    text-decoration: underline;
}

.footer-note {
    margin-top: 0.375rem;
    font-size: 0.8rem;
    color: var(--text-color-muted);
}

/* ----------------------------------------------
   11. Ask Component
----------------------------------------------- */
.ask-section {
    margin-top: 1.25rem;
}

.ask-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: white;
    transition: all var(--transition-speed) var(--transition-smooth);
    text-align: left;
}

.ask-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.ask-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: white;
    color: var(--primary-700);
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ask-toggle-text {
    flex: 1;
    font-weight: 600;
}

.ask-toggle-arrow {
    color: rgba(255, 255, 255, 0.7);
    transition: transform var(--transition-speed) var(--transition-smooth);
    font-size: 0.75rem;
}

.ask-panel {
    margin-top: 0.75rem;
    padding: 1.25rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.ask-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.ask-input-wrapper {
    display: flex;
    gap: 0.625rem;
}

.ask-input-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.ask-input {
    flex: 1;
    padding: 0.875rem 2.75rem 0.875rem 1.125rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-color);
    transition: all var(--transition-speed) var(--transition-smooth);
    box-shadow: var(--shadow-xs);
}

.ask-clear {
    position: absolute;
    right: 0.625rem;
    background: none;
    border: none;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    color: var(--text-color-muted);
    font-size: 1rem;
    line-height: 1;
    border-radius: 50%;
    transition: all var(--transition-speed) var(--transition-smooth);
}

.ask-clear:hover {
    color: var(--text-color-secondary);
    background-color: var(--border-color-light);
}

.ask-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.ask-input:disabled {
    background: var(--border-color-light);
    cursor: not-allowed;
}

.ask-submit {
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-color-hover) 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition-speed) var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.ask-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ask-submit:active:not(:disabled) {
    transform: translateY(0);
}

.ask-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ask-hints {
    font-size: 0.8rem;
    color: var(--text-color-muted);
}

.ask-result {
    margin-top: 1.25rem;
    padding: 1.25rem;
    background: linear-gradient(180deg, var(--primary-50) 0%, white 100%);
    border-radius: var(--border-radius);
    border: 1px solid var(--primary-100);
}

.ask-answer {
    color: var(--text-color);
    line-height: 1.7;
}

.ask-citations {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.citations-label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-color-secondary);
    margin-bottom: 0.625rem;
}

.citation {
    font-size: 0.85rem;
    color: var(--text-color-secondary);
    margin-bottom: 0.375rem;
}

.citation a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.citation a:hover {
    text-decoration: underline;
}

.ask-loading {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1.25rem;
    color: var(--text-color-secondary);
    font-family: var(--font-display);
    font-weight: 500;
}

.ask-loading[hidden] {
    display: none;
}

.ask-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid var(--primary-100);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.ask-error {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--danger-bg);
    color: #b91c1c;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 500;
}

.ask-error[hidden],
.ask-result[hidden] {
    display: none;
}

/* Streaming indicator */
.streaming-indicator {
    color: var(--text-muted);
    font-style: italic;
}

.streaming-indicator::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Ask component responsive */
@media (max-width: 600px) {
    .ask-input-wrapper {
        flex-direction: column;
    }

    .ask-submit {
        width: 100%;
    }

    .ask-toggle {
        padding: 0.75rem 1rem;
    }

    .ask-toggle-text {
        font-size: 0.85rem;
    }

    .ask-toggle-icon {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.85rem;
    }

    .ask-panel {
        padding: 1rem;
    }
}

/* ----------------------------------------------
   12. Print Styles
----------------------------------------------- */
@media print {
    header,
    .filter-panel,
    .pagination-container,
    footer,
    .ask-section {
        display: none;
    }

    .container {
        width: 100%;
        padding: 0;
    }

    .job-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ----------------------------------------------
   13. Reduced Motion
----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ----------------------------------------------
   14. Focus Styles
----------------------------------------------- */
:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}
