/**
 * Main Stylesheet - parachutes.work
 * Homepage and job listing styles
 */

/* ==========================================================================
   CSS Variables / Theme
   ========================================================================== */

:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1e40af;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

    /* Light mode colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --hover-bg: #f3f4f6;
}

[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #2563eb;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Dark mode colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --hover-bg: #334155;

    /* Dark mode gray scale overrides */
    --gray-50: #1e293b;
    --gray-100: #334155;
    --gray-200: #475569;
    --gray-300: #64748b;
    --gray-400: #94a3b8;
    --gray-500: #cbd5e1;
    --gray-600: #e2e8f0;
    --gray-700: #f1f5f9;
    --gray-800: #f8fafc;
    --gray-900: #ffffff;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

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

html {
    background: var(--bg-primary);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s, color 0.3s;
}

/* Base link styles - prevent browser defaults */
a {
    color: inherit;
    text-decoration: none;
}

a:visited {
    color: inherit;
}

/* Prevent white flash on scroll in dark mode */
.main-content, .container {
    background: var(--bg-primary);
}

/* ==========================================================================
   Header
   ========================================================================== */

.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px var(--shadow-color);
    transition: background-color 0.3s, border-color 0.3s;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
    margin: 0;
    padding: 0;
    height: 52px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0;
    height: 100%;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.25rem;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-right: 1px solid var(--border-color);
}

[data-theme="dark"] .brand {
    background: linear-gradient(135deg, #020617 0%, #0f172a 100%);
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: -0.03em;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

.logo:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #22d3ee 50%, #34d399 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.tagline {
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0 1rem;
    height: 100%;
}

.header-nav a {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.header-nav a:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
}

.header-nav a svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.header-nav a:hover svg {
    opacity: 1;
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 0.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-right: 1rem;
    height: 100%;
}

/* ==========================================================================
   Search
   ========================================================================== */

.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-form button {
    padding: 0.45rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.15s ease;
}

.search-form button:hover {
    background: var(--primary-dark);
}

.search-input-wrapper {
    position: relative;
    width: 280px;
}

.search-input-wrapper input[type="text"] {
    width: 100%;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px var(--shadow-color);
}

.search-suggestions.active {
    display: block;
}

.search-suggestion {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.search-suggestion:hover,
.search-suggestion.selected {
    background: var(--bg-tertiary);
}

.search-suggestion-tag {
    color: var(--primary);
    font-weight: 500;
}

.search-suggestion-hint {
    color: var(--text-secondary);
    font-size: 11px;
    margin-left: 0.5rem;
}

/* ==========================================================================
   Filters
   ========================================================================== */

.filters {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.filter-label {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.filters select {
    padding: 0.25rem 0.4rem;
    font-size: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s;
    cursor: pointer;
}

.filters select:hover {
    border-color: var(--primary);
}

.filters select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.filters label,
.filter-checkbox {
    font-size: 11px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.filters label:hover {
    background: var(--hover-bg);
    border-color: var(--primary);
}

.filters input[type="checkbox"] {
    cursor: pointer;
}

/* ==========================================================================
   Dark Mode Toggle
   ========================================================================== */

.dark-mode-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 12px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.dark-mode-toggle:hover {
    background: var(--bg-primary);
    border-color: var(--primary);
}

.dark-mode-toggle svg {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   Stats Bar
   ========================================================================== */

.stats-bar {
    background: var(--bg-secondary);
    padding: 0.4rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: background-color 0.3s, border-color 0.3s;
}

.stat { display: flex; gap: 0.25rem; align-items: center; }
.stat-value { font-weight: 600; color: var(--text-primary); }

.copy-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}

.copy-link-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.copy-link-btn.copied {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.top-companies {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
}

.top-companies-label {
    color: var(--text-secondary);
    font-size: 11px;
}

.company-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 11px;
    text-decoration: none;
    transition: all 0.15s;
}

.company-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.chip-count {
    background: var(--bg-primary);
    padding: 0 0.3rem;
    border-radius: 8px;
    font-size: 10px;
    color: var(--text-secondary);
}

/* ==========================================================================
   Advanced Filters Bar
   ========================================================================== */

.advanced-filters-bar {
    background: var(--bg-tertiary);
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12px;
}

.advanced-filter {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.advanced-filter label {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
}

.advanced-filter select,
.advanced-filter input {
    padding: 0.25rem 0.4rem;
    font-size: 11px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.clear-filters {
    margin-left: auto;
    color: var(--primary);
    text-decoration: none;
    font-size: 11px;
    padding: 0.25rem 0.6rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s;
}

.clear-filters:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    text-decoration: none;
}

/* ==========================================================================
   Container
   ========================================================================== */

.container {
    padding: 0.5rem;
}

/* ==========================================================================
   Table Styles
   ========================================================================== */

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-secondary);
    box-shadow: 0 1px 3px var(--shadow-color);
    font-size: 12px;
}

th {
    background: var(--bg-tertiary);
    border-bottom: 2px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    position: sticky;
    top: 52px;
    z-index: 10;
}

/* Rounded corners on header */
th:first-child { border-top-left-radius: 8px; }
th:last-child { border-top-right-radius: 8px; }

th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}
th .sort-icon { margin-left: 4px; opacity: 0.3; }
th.sorted .sort-icon { opacity: 1; }

td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    color: var(--text-primary);
}

/* Zebra striping */
tbody tr:nth-child(odd) {
    background: var(--bg-secondary);
}

tbody tr:nth-child(even) {
    background: var(--bg-primary);
}

tbody tr {
    transition: background-color 0.1s ease;
}

tbody tr:hover {
    background: var(--hover-bg);
    cursor: pointer;
}

/* Rounded corners on last row */
tbody tr:last-child td:first-child { border-bottom-left-radius: 8px; }
tbody tr:last-child td:last-child { border-bottom-right-radius: 8px; }

/* Subtle left accent on hover */
tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--primary);
}

/* Job title turns blue on row hover */
tbody tr:hover .job-title {
    color: var(--primary);
}

tbody tr:hover .company a {
    color: var(--text-primary);
}

tbody tr:hover .company a:hover {
    color: var(--primary);
}

/* Table column widths */
.col-title { min-width: 250px; max-width: 350px; }
.col-company { min-width: 120px; max-width: 180px; }
.col-location { min-width: 100px; max-width: 150px; }
.col-salary { min-width: 100px; }
.col-score { width: 50px; text-align: center; }
.col-source { width: 80px; }
.col-date { width: 80px; }
.col-actions { width: 80px; }

/* Constrain content within columns */
.col-title .job-title {
    display: block;
    max-width: 340px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.col-company .company {
    display: flex;
    align-items: center;
    max-width: 170px;
    overflow: hidden;
}

.col-company .company a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.col-location .location {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================================
   Job Listing Styles
   ========================================================================== */

.job-title {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.job-title:hover {
    color: var(--primary);
}

.company { color: var(--text-primary); }
.company a,
.company a:visited {
    color: var(--text-primary);
    text-decoration: none;
}
.company a:hover {
    color: var(--primary);
}

.link-plain {
    color: inherit;
    text-decoration: none;
}
.link-plain:hover {
    color: var(--primary);
}

.location { color: var(--text-secondary); font-size: 11px; }

/* New today highlight */
.job-row.new-today {
    border-left: 3px solid var(--primary);
}

.job-card.new-today {
    border-left: 3px solid var(--primary);
}

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.badge-remote {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .badge-remote {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-light);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Freshness badges */
.freshness-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.freshness-fresh {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.freshness-recent {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.freshness-stale {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.freshness-unknown {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .freshness-fresh {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .freshness-recent {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .freshness-stale {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Quality badges */
.badge-no-salary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-size: 9px;
    padding: 1px 5px;
}

.badge-red-flag {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-size: 9px;
    padding: 1px 5px;
}

[data-theme="dark"] .badge-red-flag {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.badge-direct {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-size: 9px;
    padding: 1px 5px;
}

[data-theme="dark"] .badge-direct {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

.badge-agency {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
    font-size: 9px;
    padding: 1px 5px;
}

[data-theme="dark"] .badge-agency {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
}

.quality-badges {
    display: inline-flex;
    gap: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.badge-source {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    font-size: 11px;
    font-weight: 400;
    padding: 0;
    text-transform: lowercase;
}

/* ==========================================================================
   Company Logo
   ========================================================================== */

.company-logo {
    width: 14px;
    height: 14px;
    object-fit: contain;
    margin-right: 5px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ==========================================================================
   Salary Styles
   ========================================================================== */

.salary {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-primary);
}

.salary-estimated {
    color: var(--text-secondary);
    font-style: italic;
}

.salary-estimate {
    color: #dc2626;
    font-style: italic;
    font-size: 11px;
}

[data-theme="dark"] .salary-estimate {
    color: #f87171;
}

.salary-raw {
    font-size: 10px;
    color: var(--text-secondary);
}

.salary-none {
    color: var(--gray-400);
}

.salary-hidden {
    color: #dc2626;
    font-size: 11px;
    font-weight: 500;
}

[data-theme="dark"] .salary-hidden {
    color: #f87171;
}

/* Salary slider */
.salary-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.salary-filter label {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.salary-filter input[type="range"] {
    -webkit-appearance: none;
    width: 150px;
    height: 2px;
    background: var(--gray-400);
    outline: none;
    cursor: pointer;
}

.salary-filter input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.salary-filter input[type="range"]::-webkit-slider-track {
    background: var(--gray-400);
    height: 2px;
}

.salary-filter input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
}

.salary-filter input[type="range"]::-moz-range-track {
    background: var(--gray-400);
    height: 2px;
    border: none;
}

.salary-value {
    font-size: 11px;
    color: var(--text-primary);
    font-weight: 500;
    min-width: 45px;
}

/* ==========================================================================
   Score Badges
   ========================================================================== */

.score {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 10px;
    border: 1px solid transparent;
}

.score-high {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .score-high {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

.score-medium {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .score-medium {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
}

.score-low {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    padding: 3px 8px;
    border: none;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.15s;
}

.btn-primary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

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

.btn-success { background: var(--success); color: white; }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); }

/* ==========================================================================
   Keywords
   ========================================================================== */

.keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: 2px;
}

.keyword {
    background: var(--bg-tertiary);
    padding: 0 3px;
    border-radius: 2px;
    font-size: 9px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.keyword-flag {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

[data-theme="dark"] .keyword-flag {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

.keyword-direct {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
}

[data-theme="dark"] .keyword-direct {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.keyword-clearance {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

[data-theme="dark"] .keyword-clearance {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

/* ==========================================================================
   Mobile Filter Toggle
   ========================================================================== */

.filter-toggle {
    display: none;
    width: calc(100% - 1rem);
    margin: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
}

.filter-toggle svg {
    width: 14px;
    height: 14px;
}

.filter-toggle .chevron {
    transition: transform 0.2s;
}

.filter-toggle.active .chevron {
    transform: rotate(180deg);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    padding: 1rem;
}

.pagination a, .pagination span {
    padding: 0.4rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 12px;
}

.pagination a:hover { background: var(--bg-tertiary); }
.pagination .active { background: var(--primary); color: white; border-color: var(--primary); }

/* ==========================================================================
   Misc Styles
   ========================================================================== */

.private-badge {
    background: var(--warning);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-highlight {
    background: #fef08a;
    padding: 0 2px;
    border-radius: 2px;
}

/* ==========================================================================
   Advertisement Banner
   ========================================================================== */

.ad-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 1rem;
    text-align: center;
    font-size: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.ad-banner a {
    color: white;
    text-decoration: underline;
    font-weight: 500;
}

.ad-banner a:hover { text-decoration: none; }

/* ==========================================================================
   Jobs Card View (Mobile)
   ========================================================================== */

.jobs-cards {
    display: none;
}

.job-card {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem;
    transition: background-color 0.3s, border-color 0.3s;
}

.job-card:hover {
    background: var(--bg-tertiary);
}

.job-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    transition: color 0.15s;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.job-card-title:hover {
    color: var(--primary);
}

.job-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    gap: 0.5rem;
}

.job-card-company {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.job-card-location {
    color: var(--text-secondary);
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 2rem 1rem;
    margin-top: auto;
    font-size: 12px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
}

.footer-section p {
    line-height: 1.6;
    color: var(--text-secondary);
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.15s;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 11px;
}

.footer-bottom a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--primary);
}

/* ==========================================================================
   Quick Links Bar
   ========================================================================== */

.quick-links-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.quick-links-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-right: 0.25rem;
    flex-shrink: 0;
}

.quick-link {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.quick-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px var(--shadow-color);
}

/* ==========================================================================
   Main Content
   ========================================================================== */

.main-content {
    flex: 1;
}

/* ==========================================================================
   Responsive - Tablet
   ========================================================================== */

@media (max-width: 1200px) {
    .col-keywords { display: none; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .col-date { display: none; }
    th, td {
        padding: 0.5rem;
        font-size: 13px;
    }
    .col-title { max-width: 250px; }
    .col-company { max-width: 150px; }
}

@media (max-width: 1024px) {
    .header-row {
        grid-template-columns: 180px 1fr auto;
        gap: 1rem;
    }
}

/* ==========================================================================
   Responsive - Mobile
   ========================================================================== */

@media (max-width: 768px) {
    body { font-size: 13px; }

    /* Header - Mobile */
    .header { padding: 0; }

    .header-row {
        flex-direction: column;
        height: auto;
        gap: 0;
    }

    .header-left {
        width: 100%;
        flex-direction: column;
        gap: 0;
    }

    .brand {
        width: 100%;
        justify-content: center;
        padding: 0.5rem 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .logo {
        font-size: 1.1rem;
    }

    .tagline {
        display: none;
    }

    .header-nav {
        width: 100%;
        justify-content: center;
        padding: 0.4rem 0.5rem;
        border-bottom: 1px solid var(--border-color);
        gap: 0.5rem;
    }

    .header-nav a {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }

    .nav-divider {
        display: none;
    }

    .header-right {
        width: 100%;
        flex-direction: column;
        padding: 0.5rem;
        gap: 0.5rem;
    }

    /* Search - Mobile */
    .search-form {
        width: 100%;
    }

    .search-input-wrapper {
        width: 100%;
        flex: 1;
    }

    .search-input-wrapper input[type="text"] {
        font-size: 14px;
        padding: 0.5rem 0.6rem;
    }

    .search-form button {
        padding: 0.5rem 1rem;
    }

    .search-suggestions {
        max-height: 150px;
    }

    /* Collapsible filters on mobile */
    .filter-toggle {
        display: flex;
    }

    /* Hide filters by default on mobile */
    .header-right > .filters {
        display: none;
    }

    .advanced-filters-bar {
        display: none;
    }

    /* Show filters when toggle is active */
    body.filters-open .header-right > .filters {
        display: flex;
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0.5rem;
        border-top: 1px solid var(--border-color);
    }

    body.filters-open .advanced-filters-bar {
        display: flex;
    }

    /* Filters - Mobile */
    .filters {
        flex-wrap: wrap;
        gap: 0.4rem;
        width: 100%;
        justify-content: center;
    }

    .filter-group {
        padding: 0.3rem 0.5rem;
    }

    .filter-label {
        font-size: 10px;
    }

    .filters label {
        font-size: 11px;
        padding: 0.3rem 0.5rem;
    }

    .filters select {
        font-size: 11px;
        padding: 0.25rem 0.3rem;
    }

    .filters input[type="checkbox"] {
        width: 14px;
        height: 14px;
    }

    .dark-mode-toggle {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
    }

    /* Stats bar */
    .stats-bar {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding: 0.4rem 0.6rem;
        font-size: 11px;
        gap: 1rem;
    }

    /* Advanced filters */
    .advanced-filters-bar {
        padding: 0.5rem 0.6rem;
        gap: 0.6rem;
        font-size: 11px;
    }

    .advanced-filter {
        min-width: 140px !important;
    }

    .advanced-filter label {
        font-size: 9px;
    }

    .advanced-filter select,
    .advanced-filter input[type="text"] {
        font-size: 10px;
        padding: 0.25rem 0.3rem;
    }

    .advanced-filter input[type="range"] {
        padding: 0;
        height: 3px;
    }

    .advanced-filter input[type="range"]::-webkit-slider-thumb {
        width: 12px;
        height: 12px;
    }

    .advanced-filter input[type="range"]::-moz-range-thumb {
        width: 12px;
        height: 12px;
    }

    .clear-filters {
        font-size: 10px;
        padding: 0.25rem 0.5rem;
    }

    /* Ad banner */
    .ad-banner {
        padding: 0.5rem 0.6rem;
        font-size: 11px;
    }

    /* Hide table, show cards */
    table {
        display: none;
    }

    .jobs-cards {
        display: block;
        padding: 0 0.6rem;
    }

    .container {
        padding: 0;
    }

    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        gap: 0.3rem;
        padding: 0.6rem;
    }

    .pagination a, .pagination span {
        padding: 0.3rem 0.5rem;
        font-size: 12px;
    }

    /* Buttons */
    .btn {
        padding: 0.3rem 0.6rem;
        font-size: 12px;
    }

    .badge {
        font-size: 9px;
        padding: 2px 4px;
    }

    /* Tighter keywords on mobile */
    .keywords {
        gap: 2px;
        margin-top: 2px;
    }

    .keyword {
        font-size: 8px;
        padding: 0 2px;
    }

    .score {
        font-size: 10px;
        padding: 2px 5px;
    }

    /* Footer */
    .footer {
        padding: 1.5rem 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .tagline {
        font-size: 0.65rem;
    }

    /* Quick links */
    .quick-links-bar {
        padding: 0.4rem 0.6rem;
        gap: 0.4rem;
    }

    .quick-links-label {
        font-size: 10px;
    }

    .quick-link {
        padding: 0.25rem 0.5rem;
        font-size: 10px;
    }
}

/* ==========================================================================
   Responsive - Small Mobile
   ========================================================================== */

@media (max-width: 480px) {
    .logo { font-size: 0.85rem; }
    .tagline { display: none; }

    .search-input-wrapper input[type="text"] {
        font-size: 13px;
    }

    .job-card {
        padding: 0.4rem;
    }

    .job-card-title {
        font-size: 12px;
    }

    .job-card-company {
        font-size: 11px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
