:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #64748b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navbar */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
    text-decoration: none;
}

.nav-links a {
    margin-left: 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary);
}

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

.search-form input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    width: 200px;
}

.search-form button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
}

/* Job Cards */
.job-list {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.job-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    border-left: 4px solid transparent; /* Default border */
}

.job-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.job-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.job-header h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.company-badge {
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.location {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

/* Updated Metadata Row */
.job-metadata-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.salary-info {
    background: #ecfdf5;
    color: #047857;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.type-info {
    background: #f3f4f6;
    color: #4b5563;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
}

.quality-score {
    background: #fffbeb;
    color: #b45309;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

/* Date Info */
.job-dates {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.date-posted {
    background: #f8fafc;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin: 0.5rem 0;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.tech-stack {
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.tech-stack code {
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    color: #475569;
    font-family: monospace;
}

.job-footer {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
}

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

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

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* Status specific colors for borders */
.job-card.status-active {
    border-left-color: var(--success);
}

.job-card.status-scouted {
    border-left-color: var(--warning);
}

.job-card.status-rejected {
    border-left-color: var(--danger);
}

/* Responsive adjustments for dense layout */
@media (max-width: 768px) {
    .job-card {
        padding: 1rem;
    }
    
    .company-location {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .job-footer {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Filter Controls Improvements */
.filter-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.filter-controls .label {
    font-weight: 600;
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

.btn-sm {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px; /* Pill shape */
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--background);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.btn-sm:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

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

.btn-sm .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1); /* Subtle dark background on light btn */
    color: inherit;
    border-radius: 9999px;
    padding: 0 0.4rem;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    min-width: 1.25rem;
    height: 1.25rem;
}

.btn-sm.active .badge {
    background: rgba(255, 255, 255, 0.2); /* Subtle light background on active btn */
    color: white;
}

/* Advanced Filter Panel */
.advanced-filters {
    margin-bottom: 1.5rem;
}

.filter-toggle {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.filter-toggle:hover {
    text-decoration: underline;
}

.filter-panel {
    margin-top: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.advanced-filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

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

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.filter-group select,
.filter-group input {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    width: 100%;
}

/* Job Count Display */
.job-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

/* Enhanced Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-bottom: 2rem;
    flex-wrap: wrap;
}

.page-info {
    padding: 0.5rem 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    white-space: nowrap;
}

.btn-page {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--surface);
    transition: all 0.2s ease;
    min-width: 2rem;
    text-align: center;
}

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