/* Design Tokens - JobLeads/Stripe-inspired Theme */
:root {
    --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

    /* Primary (purple) */
    --primary-600: #4E3CBB;
    --primary-700: #4333A6;
    --primary-800: #372A8B;
    --primary-soft: #F0EEFF;

    /* Links */
    --link-600: #2563EB;
    --link-700: #1D4ED8;

    /* Neutrals */
    --bg: #F7F4EF;
    --bg-subtle: #F8FAFC;
    --card: #FFFFFF;

    --border: #E2E8F0;
    --border-strong: #CBD5E1;

    /* Text */
    --text: #0F172A;
    --text-2: #475569;
    --text-3: #64748B;
    --text-disabled: #94A3B8;
    --input-gray: #94A3B8;

    /* Status */
    --success: #16A34A;
    --warning: #F59E0B;
    --error: #DC2626;
    --info: #0EA5E9;

    /* Radius: more square like JobLeads/Stripe */
    --radius-btn: 8px;
    --radius-input: 8px;
    --radius-card: 6px;
    --radius-pill: 999px;

    /* Shadows: very subtle */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.08);
}

/* Dark Mode Tokens */
body.dark-mode {
    --bg: #0F172A;
    --bg-subtle: #1E293B;
    --card: #1E293B;

    --border: #334155;
    --border-strong: #475569;

    --text: #F1F5F9;
    --text-2: #CBD5E1;
    --text-3: #94A3B8;
    --text-disabled: #64748B;

    --primary-soft: rgba(78, 60, 187, 0.15);
    
    /* Links - lighter blue for dark mode */
    --link-600: #60A5FA;
    --link-700: #93C5FD;
}

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

/* Normalize input/select styling */
input, select {
    opacity: 1;
}

input:not(:disabled), select:not(:disabled) {
    filter: none;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .header {
    background-color: #2a2a2a;
    border-bottom-color: #3a3a3a;
}

body.dark-mode .header-utility {
    border-bottom-color: #3a3a3a;
}

body.dark-mode .search-section {
    background-color: #2a2a2a;
    border-bottom-color: #3a3a3a;
}

body.dark-mode .search-input,
body.dark-mode .sort-select,
body.dark-mode .utility-dropdown {
    background-color: transparent;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .search-input-wrapper,
body.dark-mode .location-combo-wrapper {
    background-color: #333;
    box-shadow: 0 0 0 1px #444, 0 1px 2px rgba(15, 23, 42, 0.06);
}

body.dark-mode .search-input-wrapper:hover,
body.dark-mode .location-combo-wrapper:hover {
    box-shadow: 0 0 0 1px #555, 0 2px 6px rgba(15, 23, 42, 0.08);
}

body.dark-mode .search-select {
    background-color: transparent;
    color: #e0e0e0;
}

body.dark-mode .search-select option {
    background-color: #333;
    color: #e0e0e0;
}

body.dark-mode .country-selector-segment {
    background-color: #2a2a2a;
}

body.dark-mode .country-selector-segment:hover {
    background-color: #333;
}

body.dark-mode .country-select {
    color: #e0e0e0;
}

body.dark-mode .country-select option {
    background-color: #333;
    color: #e0e0e0;
}

body.dark-mode .location-divider {
    background-color: #555;
}

body.dark-mode .search-select-icon {
    color: #94A3B8;
}

body.dark-mode .location-input-segment .search-input {
    color: #e0e0e0;
}

body.dark-mode .country-selector-segment i {
    color: #94A3B8;
}

body.dark-mode .filter-btn {
    background-color: #333;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .filter-btn:hover {
    background-color: #3a3a3a;
}

body.dark-mode .filter-menu {
    background-color: #333;
    border-color: #444;
}

body.dark-mode .filter-menu label:hover {
    background-color: #3a3a3a;
}

body.dark-mode .job-listings,
body.dark-mode .job-details {
    background-color: #2a2a2a;
    border-color: #3a3a3a;
}

body.dark-mode .main-content {
    background-color: #1a1a1a;
}

body.dark-mode .job-details-content {
    background-color: transparent;
}

body.dark-mode .job-details-divider {
    background-color: #3a3a3a;
}

body.dark-mode .job-details-meta {
    color: #94A3B8;
}

body.dark-mode .view-full-link {
    color: #93c5fd;
    border-color: #60a5fa;
}

body.dark-mode .view-full-link:hover {
    color: #bfdbfe;
    border-color: #93c5fd;
    background-color: rgba(96, 165, 250, 0.15);
}

body.dark-mode .view-full-link:focus {
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.35);
}

body.dark-mode .job-additional-info {
    color: var(--text);
}

body.dark-mode .job-additional-info h3 {
    color: var(--text);
}

body.dark-mode .job-card {
    background-color: #2a2a2a;
    border-bottom-color: #3a3a3a;
}

body.dark-mode .job-card:hover {
    background-color: #333;
}

body.dark-mode .job-card.selected {
    background-color: #3a2a20;
    border-left-color: #ff6b35;
}

body.dark-mode .tag,
body.dark-mode .rec-tag {
    background-color: #3a3a3a;
    color: #b0b0b0;
}

body.dark-mode .tag-with-icon {
    background-color: #3a3a3a;
    color: #b0b0b0;
}

body.dark-mode .modal-content,
body.dark-mode .saved-jobs-panel {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
    background-color: #333;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .saved-job-item {
    background-color: #333;
    border-color: #444;
}

body.dark-mode .recommended-job-card {
    background-color: #333;
    border-color: #444;
}

body.dark-mode .recommended-job-card:hover {
    border-color: #ff6b35;
    background-color: #3a3a3a;
}

body.dark-mode .job-card:hover {
    background-color: #333;
}

/* Admin Portal Styles */
.admin-toggle {
    background: none;
    border: none;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.admin-toggle:hover {
    background-color: #f5f5f5;
    color: #4a90e2;
}

.admin-toggle i {
    font-size: 16px;
}

body.dark-mode .admin-toggle {
    color: #e0e0e0;
}

body.dark-mode .admin-toggle:hover {
    background-color: #3a3a3a;
    color: #4a90e2;
}

.admin-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-overlay.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

.admin-panel {
    background-color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.admin-overlay.active .admin-panel {
    transform: scale(1);
    animation: slideUp 0.3s ease;
}

body.dark-mode .admin-panel {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
}

body.dark-mode .admin-header {
    border-bottom-color: #3a3a3a;
}

.admin-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark-mode .admin-header h2 {
    color: #e0e0e0;
}

.close-admin {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.close-admin:hover {
    color: #333;
}

body.dark-mode .close-admin {
    color: #b0b0b0;
}

body.dark-mode .close-admin:hover {
    color: #e0e0e0;
}

.admin-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.admin-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

body.dark-mode .admin-section h3 {
    color: #e0e0e0;
}

.admin-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
}

body.dark-mode .admin-description {
    color: #b0b0b0;
}

.feed-list {
    margin-bottom: 24px;
    max-height: 300px;
    overflow-y: auto;
}

.feed-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 8px;
    background-color: #f9f9f9;
}

body.dark-mode .feed-item {
    background-color: #333;
    border-color: #444;
}

.feed-url {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.feed-url i {
    color: #ff6b35;
}

.feed-url-text {
    font-size: 14px;
    color: #333;
    word-break: break-all;
}

body.dark-mode .feed-url-text {
    color: #e0e0e0;
}

.feed-actions {
    display: flex;
    gap: 8px;
}

.edit-feed-btn,
.delete-feed-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 14px;
}

.edit-feed-btn:hover {
    background-color: #e3f2fd;
    color: #4a90e2;
}

.delete-feed-btn:hover {
    background-color: #ffebee;
    color: #f44336;
}

body.dark-mode .edit-feed-btn:hover {
    background-color: #3a3a3a;
}

body.dark-mode .delete-feed-btn:hover {
    background-color: #3a3a3a;
}

.add-feed-form {
    margin-bottom: 24px;
}

.add-feed-form .form-group {
    display: flex;
    gap: 8px;
}

.feed-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

body.dark-mode .feed-input {
    background-color: #333;
    border-color: #444;
    color: #e0e0e0;
}

.add-feed-btn {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
}

.add-feed-btn:hover {
    background-color: #218838;
}

.admin-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.test-feeds-btn,
.save-feeds-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.test-feeds-btn {
    background-color: #4a90e2;
    color: white;
}

.test-feeds-btn:hover {
    background-color: #357abd;
}

.save-feeds-btn {
    background-color: #ff6b35;
    color: white;
}

.save-feeds-btn:hover {
    background-color: #e55a2b;
}

.feed-status {
    margin-top: 16px;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
}

.status-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

body.dark-mode .status-success {
    background-color: #1e4620;
    color: #81c784;
    border-color: #2e7d32;
}

body.dark-mode .status-error {
    background-color: #4a1f1f;
    color: #e57373;
    border-color: #c62828;
}

.test-result {
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    border: 1px solid;
}

.test-result.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.test-result.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

body.dark-mode .test-result.success {
    background-color: #1e4620;
    border-color: #2e7d32;
    color: #81c784;
}

body.dark-mode .test-result.error {
    background-color: #4a1f1f;
    border-color: #c62828;
    color: #e57373;
}

.test-url {
    font-weight: 600;
    margin-bottom: 4px;
    word-break: break-all;
}

.test-message {
    font-size: 13px;
}

.no-feeds {
    text-align: center;
    color: #999;
    padding: 20px;
    font-style: italic;
}

body.dark-mode .no-feeds {
    color: #666;
}

body.dark-mode .results-count,
body.dark-mode .sort-controls label {
    color: #b0b0b0;
}

body.dark-mode .company-description {
    color: #d0d0d0;
}

body.dark-mode .company-description h2,
body.dark-mode .company-description h3,
body.dark-mode .company-description h4 {
    color: #e0e0e0;
}

body.dark-mode .company-description a {
    color: var(--link-600);
}

body.dark-mode .company-description a:hover {
    color: var(--link-700);
}

body.dark-mode .job-details-title,
body.dark-mode .job-card-title,
body.dark-mode .rec-job-title {
    color: #e0e0e0;
}

body.dark-mode .job-card-company,
body.dark-mode .rec-job-company {
    color: #b0b0b0;
}

body.dark-mode .pagination-btn {
    background-color: #333;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .pagination-btn:hover:not(:disabled) {
    background-color: #3a3a3a;
}

body.dark-mode .pagination-btn.active {
    background-color: #ff6b35;
    border-color: #ff6b35;
}

/* Header Styles */
.header {
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
}

.header-utility {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 24px;
    border-bottom: 1px solid var(--border);
}

.utility-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    color: #666;
    font-size: 14px;
}

.utility-dropdown {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}

.publish-btn {
    padding: 6px 16px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    color: #666;
    font-size: 16px;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

/* Logo switching for dark mode */
.logo img.logo-light {
    display: block;
}

.logo img.logo-dark {
    display: none;
}

body.dark-mode .logo img.logo-light {
    display: none;
}

body.dark-mode .logo img.logo-dark {
    display: block;
}

.nav-menu {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-item:hover {
    color: var(--text);
}

.nav-item i {
    font-size: 16px;
}

.theme-toggle {
    background: none;
    border: none;
    color: #333;
    font-size: 18px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background-color: #f5f5f5;
    color: #ff6b35;
}

body.dark-mode .theme-toggle {
    color: #e0e0e0;
}

body.dark-mode .theme-toggle:hover {
    background-color: #3a3a3a;
    color: #ff6b35;
}

.saved-count {
    background-color: var(--primary-600);
    color: #FFFFFF;
    border-radius: var(--radius-pill);
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 4px;
    min-width: 18px;
    display: inline-block;
    text-align: center;
}

.saved-count:empty {
    display: none;
}

/* Search Section */
.search-section {
    background-color: #FFFFFF;
    padding-top: 12px;
    padding-bottom: 12px;
    padding-left: 12px;
    padding-right: 12px;
    margin-top: 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    width: 100%;
}

.search-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 12px;
}

.search-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1 1 auto;
    height: 44px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 44px;
    padding-left: 0;
    padding-right: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 16px;
    font-weight: 400;
    color: #0F172A;
    font-family: var(--font-sans);
    width: 100%;
    min-width: 0;
    opacity: 1;
    vertical-align: middle;
}

.search-input::placeholder,
input.search-input::placeholder,
.search-input-wrapper input::placeholder {
    color: var(--input-gray) !important;
    opacity: 1 !important;
    line-height: 44px;
}

/* Generic input classes for easy customization */
.input,
.select,
.searchField {
    border: 1px solid var(--input-gray);
}

.input::placeholder,
.select::placeholder,
.searchField::placeholder {
    color: var(--input-gray);
}

.search-input:focus {
    outline: none;
}

.search-input:not(:disabled) {
    filter: none;
}

.filters-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    transition: all 0.2s;
    position: relative;
    height: 44px;
}

.filter-btn:hover {
    background-color: var(--bg-subtle);
    border-color: var(--border-strong);
}

.filter-btn.active {
    background-color: var(--primary-soft);
    border-color: rgba(78, 60, 187, 0.35);
}

.filter-btn:hover {
    background-color: #f9f9f9;
    border-color: #bbb;
}

.filter-btn i {
    font-size: 12px;
    color: #666;
    transition: transform 0.2s;
}

.filter-btn.active i {
    transform: rotate(180deg);
}

.filter-dropdown {
    position: relative;
}

.filter-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-md);
    min-width: 180px;
    z-index: 100;
    padding: 8px;
    margin-top: 4px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.filter-menu.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    animation: slideDown 0.3s ease;
}

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

.filter-menu label {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    font-family: var(--font-sans);
    color: var(--text);
    transition: background-color 0.2s;
    border-radius: var(--radius-btn);
}

.filter-menu label:hover {
    background-color: var(--bg-subtle);
}

.filter-menu input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.filter-label {
    flex: 1;
}

.clear-filters {
    color: var(--link-600);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-left: auto;
    transition: color 0.2s;
}

.clear-filters:hover {
    color: var(--link-700);
    text-decoration: underline;
}

.search-btn {
    padding: 0 16px;
    height: 40px;
    background-color: var(--primary-600);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-sans);
    transition: background-color 0.2s;
    box-shadow: var(--shadow-sm);
}

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

.search-btn:active {
    background-color: var(--primary-800);
}

.refresh-feeds-btn {
    padding: 0 16px;
    height: 44px;
    background-color: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.refresh-feeds-btn:hover:not(:disabled) {
    background-color: var(--bg-subtle);
    border-color: var(--border-strong);
}

.refresh-feeds-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.refresh-feeds-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Main Content */
.main-content {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px;
    gap: 12px;
    align-items: stretch;
}

/* Only apply fixed height when both job-listings and job-details panels exist */
/* This is for the main search page with two-panel layout */
/* Header (~64px) + Search section (~68px) = ~132px, using 140px for safety margin */
.main-content:has(.job-listings):has(.job-details) {
    height: calc(100vh - 140px);
    min-height: 600px;
}

/* Fallback for browsers that don't support :has() - add .has-panels class to main-content on search page */
.main-content.has-panels {
    height: calc(100vh - 140px);
    min-height: 600px;
}

/* For single-page layouts (like job detail page), don't use fixed height */
.main-content:not(:has(.job-listings)),
.main-content.single-page {
    min-height: auto;
    height: auto;
}

/* Job Listings Panel */
.job-listings {
    width: 45%;
    overflow-y: auto;
    background-color: transparent;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}

.results-count {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-3);
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-controls label {
    font-size: 14px;
    color: #666;
}

.sort-select {
    height: 44px;
    padding: 0 12px;
    padding-right: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    background-color: var(--card);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    color: var(--text);
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px rgba(78, 60, 187, 0.18);
}

.job-cards {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 12px 0;
    gap: 20px;
}

.job-card {
    padding: 16px;
    margin: 0;
    background-color: #FFFFFF;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.04);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.job-card:hover {
    background-color: var(--card);
    box-shadow: none;
    border: 2px solid var(--primary-600);
    transform: translateY(-1px);
}

.job-card.selected {
    background-color: #FFFFFF;
    border: 2px solid var(--primary-600);
    box-shadow: none;
}

.job-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.4;
}

.job-card-company {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 8px;
}

.job-card-meta {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-3);
    margin-bottom: 12px;
}

.job-card-info-labels {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    padding: 12px;
    background-color: #F8FAFC;
    border-radius: 4px;
}

.job-card-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.info-label {
    font-weight: 500;
    color: var(--text-2);
    min-width: 110px;
}

.info-value {
    font-weight: 400;
    color: var(--text);
}

.job-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tag {
    display: inline-block;
    padding: 6px 10px;
    background-color: #F1F5F9;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
    color: #334155;
    font-family: var(--font-sans);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.tag.selected {
    background-color: var(--primary-soft);
    box-shadow: 0 0 0 1px rgba(78, 60, 187, 0.35);
}

.job-card-description {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-2);
    line-height: 1.5;
    margin-top: 8px;
}

/* Loading States */
.loading-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 100;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}

body.dark-mode .loading-overlay {
    background-color: rgba(26, 26, 26, 0.9);
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top-color: #ff6b35;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

body.dark-mode .spinner {
    border-color: #3a3a3a;
    border-top-color: #ff6b35;
}

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

.loading-overlay p {
    color: #666;
    font-size: 14px;
}

body.dark-mode .loading-overlay p {
    color: #b0b0b0;
}

/* Enhanced Empty States */
.no-results {
    padding: 60px 20px;
    text-align: center;
}

.empty-state-icon {
    font-size: 64px;
    color: var(--text-disabled);
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.no-results h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

body.dark-mode .no-results h3 {
    color: #e0e0e0;
}

.no-results p {
    color: #666;
    font-size: 16px;
    margin-bottom: 8px;
}

body.dark-mode .no-results p {
    color: #b0b0b0;
}

.empty-state-hint {
    color: #999 !important;
    font-size: 14px !important;
}

body.dark-mode .empty-state-hint {
    color: #888 !important;
}

.clear-filters-btn {
    margin-top: 20px;
    padding: 10px 24px;
    background-color: #ff6b35;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.clear-filters-btn:hover {
    background-color: #e55a2b;
    transform: translateY(-1px);
}

.select-job-message .empty-state-icon {
    font-size: 48px;
}

.select-job-message h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    font-family: var(--font-sans);
}

/* Pagination */
.pagination {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid var(--border);
    background-color: var(--card);
    border-radius: var(--radius-btn);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    color: var(--text);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--bg-subtle);
    border-color: var(--border-strong);
}

.pagination-btn.active {
    background-color: var(--primary-600);
    color: #FFFFFF;
    border-color: var(--primary-600);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: #999;
}

/* Job Details Panel */
.job-details {
    width: 55%;
    overflow-y: auto;
    background-color: var(--card);
    padding: 24px;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    border: none;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.job-details-content {
    max-width: 700px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.select-job-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-3);
    font-size: 16px;
    font-weight: 400;
}

.loading-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-3);
    font-size: 16px;
    font-weight: 400;
}
    font-family: var(--font-sans);
}

.job-details-header {
    padding-bottom: 16px;
    margin-bottom: 0;
}

.job-details-divider {
    height: 1px;
    background-color: #EEF2F7;
    margin-bottom: 24px;
}

.company-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 12px;
}

.company-name a {
    color: var(--link-600);
    text-decoration: none;
    transition: color 0.2s;
}

.company-name a:hover {
    color: var(--link-700);
    text-decoration: underline;
}

.job-details-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-right: 24px;
}

.job-details-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    font-family: var(--font-sans);
    flex: 1;
    min-width: 0;
    margin: 0;
}

.job-details-meta {
    font-size: 14px;
    font-weight: 500;
    color: #64748B;
    margin-bottom: 16px;
}

.job-details-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
    padding-bottom: 15px;
}

.tag-with-icon {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background-color: #F1F5F9;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
    color: #334155;
    font-family: var(--font-sans);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.tag-with-icon.selected {
    background-color: var(--primary-soft);
    box-shadow: 0 0 0 1px rgba(78, 60, 187, 0.35);
}

.tag-with-icon i {
    font-size: 12px;
}

.job-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.apply-btn {
    padding: 0 16px;
    height: 44px;
    background-color: var(--primary-600);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    flex: 0 0 auto;
}

.apply-btn i {
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.apply-btn:hover {
    background-color: #4333A6;
}

.apply-btn:active {
    background-color: var(--primary-800);
}

.apply-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(78, 60, 187, 0.25);
}

.view-full-link {
    padding: 0 16px;
    height: 44px;
    background-color: transparent;
    color: var(--primary-600);
    border: 1px solid var(--primary-600);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    flex: 0 0 auto;
}

.view-full-link i {
    font-size: 12px;
    line-height: 1;
    flex-shrink: 0;
}

.view-full-link:hover {
    background-color: var(--primary-50);
    border-color: var(--primary-700);
    color: var(--primary-700);
}

.view-full-link:active {
    background-color: var(--primary-100);
    border-color: var(--primary-800);
    color: var(--primary-800);
}

.view-full-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(78, 60, 187, 0.25);
}

.save-btn {
    padding: 0 16px;
    height: 44px;
    background-color: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.save-btn:hover {
    background-color: var(--bg-subtle);
    border-color: var(--border-strong);
}

.save-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.save-btn.saved {
    background-color: var(--primary-soft);
    border-color: rgba(78, 60, 187, 0.35);
    color: var(--primary-700);
}

.save-btn.saved:hover {
    background-color: var(--primary-soft);
    border-color: var(--primary-600);
}

.company-description {
    font-size: 16px;
    font-weight: 400;
    color: #334155;
    line-height: 1.65;
}

.company-description p {
    margin-bottom: 13px;
}

.company-description h2,
.company-description h3,
.company-description h4 {
    font-size: 16px;
    font-weight: 600;
    color: #0F172A;
    margin-top: 24px;
    margin-bottom: 12px;
}

.company-description ul,
.company-description ol {
    margin-left: 20px;
    margin-bottom: 13px;
    line-height: 1.65;
}

.company-description li {
    margin-bottom: 8px;
}

.company-description img {
    display: none !important;
}

/* Additional Information Section */
.job-additional-info {
    margin-top: 32px;
    margin-bottom: 48px;
    padding-top: 24px;
    padding-bottom: 24px;
}

.job-additional-info h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    font-family: var(--font-sans);
}

.job-additional-info dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px 20px;
    margin: 0;
    padding: 0;
}

.job-additional-info dt {
    font-weight: 600;
    color: var(--text-2);
    font-size: 14px;
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
    grid-column: 1;
    white-space: nowrap;
}

.job-additional-info dt::after {
    content: ':';
    margin-right: 8px;
}

.job-additional-info dd {
    margin: 0;
    padding: 0;
    color: var(--text);
    font-size: 14px;
    font-family: var(--font-sans);
    grid-column: 2;
    word-break: break-word;
    overflow-wrap: break-word;
}

.job-additional-info dd a {
    color: var(--link-600);
    text-decoration: none;
}

.job-additional-info dd a:hover {
    color: var(--link-700);
    text-decoration: underline;
}

/* Recommended Jobs Section */
.recommended-jobs-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid #f0f0f0;
}

.recommended-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recommended-title i {
    color: #ff6b35;
}

.recommended-jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.recommended-job-card {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    cursor: pointer;
    transition: all 0.2s;
    background-color: var(--card);
    box-shadow: var(--shadow-sm);
}

.recommended-job-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.rec-job-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.rec-job-company {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 8px;
}

.rec-job-meta {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-3);
    margin-bottom: 12px;
}

.rec-job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rec-tag {
    display: inline-block;
    padding: 6px 10px;
    background-color: #F1F5F9;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
    color: #334155;
    font-family: var(--font-sans);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.rec-tag.selected {
    background-color: var(--primary-soft);
    box-shadow: 0 0 0 1px rgba(78, 60, 187, 0.35);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet: 768px - 1024px */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        height: auto;
        min-height: auto;
        padding: 12px;
    }
    
    .job-listings {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: 50vh;
        margin-bottom: 12px;
    }
    
    .job-details {
        width: 100%;
        max-height: 60vh;
    }
    
    .search-inputs {
        gap: 10px;
    }
    
    .search-input-wrapper,
    .location-combo-wrapper {
        min-width: 140px;
    }
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--card);
    border-radius: var(--radius-card);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    font-family: var(--font-sans);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-3);
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
    font-size: 14px;
    font-family: var(--font-sans);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group input[type="file"],
.form-group textarea {
    width: 100%;
    height: 44px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    font-size: 14px;
    font-weight: 400;
    font-family: var(--font-sans);
    background-color: var(--card);
    color: var(--text);
    transition: all 0.2s;
}

.form-group textarea {
    height: auto;
    padding: 10px 14px;
    min-height: 100px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--input-gray);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px rgba(78, 60, 187, 0.18);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-3);
    font-size: 12px;
    font-weight: 400;
}

.form-group textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.btn-cancel,
.btn-submit {
    padding: 0 16px;
    height: 44px;
    border: none;
    border-radius: var(--radius-btn);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel {
    background-color: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-cancel:hover {
    background-color: var(--bg-subtle);
    border-color: var(--border-strong);
}

.btn-cancel:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.btn-submit {
    background-color: var(--primary-600);
    color: #FFFFFF;
    box-shadow: var(--shadow-sm);
}

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

.btn-submit:active {
    background-color: var(--primary-800);
}

.btn-submit:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(78, 60, 187, 0.25);
}

/* Saved Jobs Panel */
.saved-jobs-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.saved-jobs-overlay.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

.saved-jobs-panel {
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.saved-jobs-overlay.active .saved-jobs-panel {
    transform: scale(1);
    animation: slideUp 0.3s ease;
}

.saved-jobs-panel {
    background-color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.saved-jobs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
}

.saved-jobs-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.close-saved {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.close-saved:hover {
    color: #333;
}

.saved-jobs-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.saved-job-item {
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 16px;
    transition: all 0.2s;
}

.saved-job-item:hover {
    border-color: #ff6b35;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.1);
}

.saved-job-item h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.saved-job-item .saved-company {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
}

.saved-job-item .saved-meta {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
}

.saved-job-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.saved-job-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.saved-view-btn {
    background-color: #4a90e2;
    color: white;
}

.saved-view-btn:hover {
    background-color: #357abd;
}

.saved-remove-btn {
    background-color: #f5f5f5;
    color: #666;
}

.saved-remove-btn:hover {
    background-color: #e0e0e0;
}

.empty-saved {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-saved i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Mobile: < 768px */
@media (max-width: 768px) {
    /* Header adjustments */
    .header-main {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }
    
    .header-utility {
        padding: 8px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    /* Search section - stack inputs */
    .search-section {
        padding: 12px 8px;
    }
    
    .search-container {
        padding: 0 8px;
    }
    
    .search-inputs {
        flex-direction: column;
        gap: 8px;
    }
    
    .search-input-wrapper,
    .location-combo-wrapper {
        width: 100%;
        min-width: 100%;
        flex: 1 1 100%;
    }
    
    .search-btn,
    .advanced-filters-btn {
        width: 100%;
        flex: 1 1 100%;
    }
    
    /* Main content - mobile layout */
    .main-content {
        flex-direction: column;
        height: auto;
        min-height: auto;
        padding: 8px;
        gap: 8px;
    }
    
    .job-listings {
        width: 100%;
        max-height: 50vh;
        border-right: none;
        border-bottom: 1px solid var(--border);
        margin-bottom: 0;
    }
    
    .job-details {
        width: 100%;
        max-height: 60vh;
        padding: 16px;
    }
    
    /* Hide job details initially on mobile - show on selection */
    .job-details:not(.has-selection) {
        display: none;
    }
    
    /* Job cards - mobile spacing */
    .job-cards {
        gap: 12px;
        padding: 8px 0;
    }
    
    .job-card {
        padding: 12px;
    }
    
    .job-card-title {
        font-size: 16px;
    }
    
    .job-card-company {
        font-size: 13px;
    }
    
    .job-card-meta {
        font-size: 12px;
    }
    
    /* Results header */
    .results-header {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .sort-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    /* Job details - mobile typography */
    .job-details-title {
        font-size: 24px;
    }
    
    .company-name {
        font-size: 13px;
    }
    
    .job-details-meta {
        font-size: 13px;
    }
    
    .company-description {
        font-size: 15px;
    }
    
    /* Filters drawer - full width on mobile */
    .filters-drawer {
        width: 100%;
        max-width: 100%;
        border-left: none;
        border-right: none;
    }
    
    .drawer-content {
        max-width: 100%;
    }
    
    /* Filters row */
    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .clear-filters {
        margin-left: 0;
    }
    
    /* Modal adjustments */
    .modal-content,
    .saved-jobs-panel {
        width: 95%;
        max-height: 95vh;
        margin: 16px;
    }
    
    .modal-header,
    .modal-body {
        padding: 16px;
    }
    
    /* Pagination - mobile */
    .pagination {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    /* Tags/pills - smaller on mobile */
    .tag,
    .tag-with-icon,
    .rec-tag {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    /* Apply button - full width on mobile in details */
    .job-details-header-top {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .job-details-header-top .apply-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Recommended jobs grid */
    .recommended-jobs-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* New Search UI Styles - Compact Toolbar */
.search-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 44px;
    padding-top: 0;
    padding-bottom: 0;
    background: #FFFFFF;
    border: 0;
    border-radius: 8px;
    padding-left: 12px;
    padding-right: 12px;
    flex: 1;
    min-width: 150px;
    transition: all 0.2s;
    box-shadow: 0 0 0 1px var(--input-gray), 0 1px 2px rgba(15, 23, 42, 0.06);
    position: relative;
}

.search-input-wrapper:hover {
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.08);
}

.search-input-wrapper:focus-within {
    outline: none;
    box-shadow: 0 0 0 1px var(--input-gray), 0 1px 2px rgba(15, 23, 42, 0.06);
}

.input-label {
    display: none; /* Labels removed, using placeholders instead */
}

.input-with-clear {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

.clear-input-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #9A9A9A;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 1;
    font-size: 14px;
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

.clear-input-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text);
    opacity: 1;
}

/* Location Combo Field - Country + Location Input (Segmented) */
.location-combo-wrapper {
    display: flex;
    align-items: center;
    height: 44px;
    background: #FFFFFF;
    border: 0;
    border-radius: 8px;
    flex: 1;
    min-width: 200px;
    transition: all 0.2s;
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--input-gray), 0 1px 2px rgba(15, 23, 42, 0.06);
}

.location-combo-wrapper:hover {
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.08);
}

.location-combo-wrapper:focus-within {
    outline: none;
    box-shadow: 0 0 0 1px var(--input-gray), 0 1px 2px rgba(15, 23, 42, 0.06);
}

.country-selector-segment {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding-left: 12px;
    padding-right: 14px;
    border: 0;
    background: #F2F2F2;
    cursor: pointer;
    flex: 0 0 auto;
    position: relative;
    justify-content: flex-start;
    outline: 0;
    box-shadow: none;
}

.country-selector-segment:hover {
    background: #E8E8E8;
}

.country-flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.country-select {
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    font-weight: 400;
    font-family: var(--font-sans);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
    padding: 0;
    margin: 0;
    width: auto;
    min-width: 18px;
    flex: 0 0 auto;
}

.country-select::-ms-expand {
    display: none;
}

.country-select option {
    color: var(--text);
}

.country-selector-segment i {
    color: #666;
    font-size: 10px;
    pointer-events: none;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-left: 2px;
    position: relative;
    top: 1px;
    opacity: 0.8;
    border: 0;
    outline: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-divider {
    width: 1px;
    height: 60%;
    align-self: center;
    background: #B8B8B8;
    margin-right: 10px;
    flex-shrink: 0;
}

.location-input-segment {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 14px;
    min-width: 0;
}

.search-select {
    height: 44px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 44px;
    width: 100%;
    padding-left: 0;
    padding-right: 32px;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 16px;
    font-weight: 400;
    font-family: var(--font-sans);
    color: #0F172A;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
    opacity: 1;
    vertical-align: middle;
}

.search-select-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 12px;
    color: #64748B;
    z-index: 1;
}

.search-select::-ms-expand {
    display: none;
}

.search-select option:first-child {
    color: var(--input-gray);
}

.search-select:focus,
.search-select:focus-visible {
    outline: none;
}

.search-select:not(:disabled) {
    filter: none;
}

.search-btn {
    padding: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-600);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

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

.search-btn:active {
    background-color: var(--primary-800);
}

.search-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(78, 60, 187, 0.3);
}

.advanced-filters-btn {
    padding: 0;
    width: 44px;
    height: 44px;
    background-color: #fff;
    color: var(--text);
    border: 1px solid var(--text);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    opacity: 0.6;
}

.advanced-filters-btn:hover {
    border-color: var(--text);
    background-color: #F9F9F9;
    opacity: 1;
}

.advanced-filters-btn:focus {
    outline: none;
    border-color: rgba(78, 60, 187, 0.5);
    box-shadow: 0 0 0 2px rgba(78, 60, 187, 0.2);
}

/* Advanced Filters Drawer */
.filters-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
}

.filters-drawer.active {
    pointer-events: all;
}

.drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filters-drawer.active .drawer-overlay {
    opacity: 1;
}

.drawer-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background-color: var(--card);
    box-shadow: var(--shadow-md);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-left: 1px solid var(--border);
}

.filters-drawer.active .drawer-content {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.drawer-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    font-family: var(--font-sans);
}

.drawer-close {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-btn);
    transition: all 0.2s;
}

.drawer-close:hover {
    background-color: var(--bg-subtle);
    color: var(--text);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.filter-section {
    margin-bottom: 32px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    font-family: var(--font-sans);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-btn);
    transition: background-color 0.2s;
}

.radio-label:hover {
    background-color: var(--bg-subtle);
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-600);
}

.radio-label span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text);
    font-family: var(--font-sans);
}

.radius-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radius-select {
    height: 44px;
    padding: 0 14px;
    padding-right: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    font-size: 14px;
    font-weight: 400;
    font-family: var(--font-sans);
    background-color: var(--card);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.radius-select:focus {
    outline: none;
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px rgba(78, 60, 187, 0.18);
}

.selected-city {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 12px;
    background-color: var(--primary-soft);
    border: 1px solid rgba(78, 60, 187, 0.25);
    border-radius: var(--radius-btn);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-btn);
    transition: background-color 0.2s;
}

.checkbox-label:hover {
    background-color: var(--bg-subtle);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-600);
}

.checkbox-label span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text);
    font-family: var(--font-sans);
}

.checkbox-label .disabled-text {
    color: var(--text-disabled);
    text-decoration: line-through;
}

.city-search-wrapper {
    position: relative;
}

.city-search-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    font-size: 14px;
    font-weight: 400;
    font-family: var(--font-sans);
    background-color: var(--card);
    color: var(--text);
    transition: all 0.2s;
}

.city-search-input::placeholder {
    color: var(--input-gray);
}

.city-search-input:focus {
    outline: none;
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px rgba(78, 60, 187, 0.18);
}

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

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

.city-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    color: var(--text);
    font-family: var(--font-sans);
    transition: background-color 0.2s;
}

.city-suggestion-item:hover {
    background-color: var(--bg-subtle);
}

.selected-city {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 12px;
    background-color: var(--primary-soft);
    border: 1px solid rgba(4, 102, 69, 0.25);
    border-radius: var(--radius-sm);
}

.selected-city span {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-700);
    font-family: var(--font-sans);
}

.remove-city-btn {
    background: none;
    border: none;
    color: var(--primary-700);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.remove-city-btn:hover {
    background-color: rgba(78, 60, 187, 0.1);
}

/* Category Search Styles (similar to city search) */
.category-search-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.category-input {
    flex: 1;
    padding-right: 40px !important;
}

.category-input[readonly] {
    cursor: pointer;
    background-color: var(--card);
}

.clear-category-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    z-index: 10;
}

.clear-category-btn:hover {
    background-color: var(--bg-subtle);
    color: var(--text);
}

.category-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 300px;
    width: max-content;
    max-width: min(500px, calc(100vw - 40px));
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-top: 4px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    display: none;
}

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

.category-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    color: var(--text);
    font-family: var(--font-sans);
    transition: background-color 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.category-suggestion-item:hover {
    background-color: var(--bg-subtle);
}

.category-suggestion-item .category-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-suggestion-item .category-count {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}


.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background-color: var(--card);
}

.reset-filters-btn {
    background: none;
    border: none;
    color: var(--link-600);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius-btn);
    transition: all 0.2s;
    text-decoration: none;
}

.reset-filters-btn:hover {
    color: var(--link-700);
    background-color: var(--bg-subtle);
    text-decoration: underline;
}

.apply-filters-btn {
    padding: 0 20px;
    height: 44px;
    background-color: var(--primary-600);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-btn);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    transition: background-color 0.2s;
    box-shadow: var(--shadow-sm);
}

.apply-filters-btn:hover {
    background-color: var(--primary-700);
}

.apply-filters-btn:active {
    background-color: var(--primary-800);
}

.apply-filters-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(78, 60, 187, 0.25);
}

/* Small Mobile: < 480px */
@media (max-width: 480px) {
    /* Even tighter spacing */
    .header-main {
        padding: 10px 12px;
    }
    
    .header-utility {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .logo {
        font-size: 16px;
    }
    
    .nav-menu {
        gap: 12px;
    }
    
    .nav-item {
        font-size: 13px;
    }
    
    /* Search section */
    .search-section {
        padding: 10px 6px;
    }
    
    .search-container {
        padding: 0 6px;
    }
    
    .search-inputs {
        gap: 6px;
    }
    
    /* Job cards - even more compact */
    .job-card {
        padding: 10px;
    }
    
    .job-card-title {
        font-size: 15px;
        line-height: 1.3;
    }
    
    .job-card-company {
        font-size: 12px;
    }
    
    .job-card-meta {
        font-size: 11px;
    }
    
    /* Job details */
    .job-details {
        padding: 12px;
    }
    
    .job-details-title {
        font-size: 20px;
    }
    
    .company-description {
        font-size: 14px;
    }
    
    /* Results header */
    .results-header {
        padding: 10px 12px;
    }
    
    .results-count {
        font-size: 12px;
    }
    
    /* Buttons - ensure touch targets */
    .search-btn,
    .advanced-filters-btn,
    .apply-btn,
    .pagination-btn {
        min-height: 44px; /* iOS/Android touch target minimum */
    }
    
    /* Modal */
    .modal-content {
        width: 98%;
        margin: 8px;
    }
    
    .modal-header,
    .modal-body {
        padding: 12px;
    }
    
    /* Form inputs */
    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}
