/* ====================================================================
   Jobzo - Main Stylesheet
   Mobile-first, Modern, Clean Professional Design
   ==================================================================== */

/* ===== CSS Variables ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #dbeafe;
    --accent: #10b981;
    --accent-dark: #047857;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --gray-900: #0f172a;
    --gray-700: #334155;
    --gray-500: #64748b;
    --gray-300: #cbd5e1;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --gray-50: #f8fafc;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.10), 0 4px 10px -2px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans Gujarati', 'Noto Sans Devanagari', Oxygen, Ubuntu, sans-serif;
    color: var(--gray-900);
    background: var(--gray-50);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

/* ===== Layout ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

main { flex: 1; padding: 24px 0; }

/* ===== Header / Navbar ===== */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.brand-logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 900;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-menu a {
    color: var(--gray-700);
    padding: 8px 14px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 14px;
}

.nav-menu a:hover { background: var(--gray-100); color: var(--primary); }

.lang-switcher {
    display: flex;
    gap: 4px;
    background: var(--gray-100);
    padding: 4px;
    border-radius: var(--radius);
    margin-left: 8px;
}

.lang-switcher a {
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    border-radius: 6px;
}

.lang-switcher a.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-700);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); color: var(--white); transform: translateY(-1px); }

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

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

.btn-secondary { background: var(--gray-100); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-200); }

.btn-block { width: 100%; }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: var(--white);
    padding: 60px 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero p {
    font-size: 17px;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .btn { padding: 14px 28px; font-size: 16px; }
.hero .btn-primary { background: var(--white); color: var(--primary); }
.hero .btn-primary:hover { background: var(--gray-100); }
.hero .btn-accent { background: var(--accent); color: var(--white); }

/* ===== Cards ===== */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 40px 0;
}

@media (min-width: 768px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .cards-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.card-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
}

.card-icon.accent { background: #d1fae5; color: var(--accent-dark); }
.card-icon.warning { background: #fef3c7; color: #b45309; }

.card h3 { font-size: 19px; margin-bottom: 8px; color: var(--gray-900); }
.card p { color: var(--gray-500); font-size: 14px; line-height: 1.6; }

/* ===== Section ===== */
.section { padding: 40px 0; }
.section-title { text-align: center; font-size: 28px; font-weight: 800; margin-bottom: 8px; color: var(--gray-900); }
.section-subtitle { text-align: center; color: var(--gray-500); margin-bottom: 32px; font-size: 16px; }

/* ===== Forms ===== */
.auth-wrap {
    max-width: 480px;
    margin: 40px auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 32px 28px;
    border: 1px solid var(--gray-200);
}

.auth-wrap.wide { max-width: 580px; }

.auth-header { text-align: center; margin-bottom: 24px; }
.auth-header h1 { font-size: 24px; margin-bottom: 6px; color: var(--gray-900); }
.auth-header p { color: var(--gray-500); font-size: 14px; }

.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .form-row.cols-2 { grid-template-columns: 1fr 1fr; } }

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-700);
}

.form-group label .req { color: var(--danger); }

.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 15px;
    transition: var(--transition);
    background: var(--white);
    color: var(--gray-900);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control::placeholder { color: var(--gray-300); }

textarea.form-control { resize: vertical; min-height: 80px; }

.form-help { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

.input-prefix {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}
.input-prefix:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.input-prefix span { background: var(--gray-100); padding: 11px 12px; color: var(--gray-500); font-size: 14px; border-right: 1px solid var(--gray-300); }
.input-prefix .form-control { border: none; box-shadow: none !important; }

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0;
    padding: 14px;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.checkbox-group input[type=checkbox] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-group label { font-size: 13px; line-height: 1.5; color: var(--gray-700); cursor: pointer; flex: 1; }
.checkbox-group label a { font-weight: 600; }

.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--gray-500); }
.auth-footer a { font-weight: 600; }

.auth-tabs {
    display: flex;
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 24px;
}

.auth-tabs a {
    flex: 1;
    text-align: center;
    padding: 10px;
    color: var(--gray-500);
    font-weight: 600;
    font-size: 14px;
    border-radius: 6px;
}

.auth-tabs a.active { background: var(--white); color: var(--primary); box-shadow: var(--shadow-sm); }

/* ===== Flash Messages ===== */
.flash-container {
    position: fixed;
    top: 80px;
    right: 16px;
    z-index: 1000;
    max-width: 380px;
    width: calc(100% - 32px);
}

.flash {
    background: var(--white);
    padding: 14px 16px;
    margin-bottom: 10px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-left: 4px solid;
    animation: slideIn 0.3s ease-out;
}

.flash-success { border-color: var(--accent); color: var(--accent-dark); }
.flash-error { border-color: var(--danger); color: #991b1b; }
.flash-warning { border-color: var(--warning); color: #92400e; }
.flash-info { border-color: var(--primary); color: var(--primary-dark); }

.flash-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--gray-500);
    line-height: 1;
    padding: 0 4px;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== Modal ===== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    animation: fadeIn 0.2s;
}

.modal-backdrop.show { display: flex; }

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

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 480px;
    width: 100%;
    padding: 28px;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.2s;
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-icon {
    width: 64px; height: 64px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
}

.modal h2 { text-align: center; margin-bottom: 8px; font-size: 22px; }
.modal p { text-align: center; color: var(--gray-500); margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: var(--gray-300);
    padding: 32px 16px 20px;
    margin-top: 60px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .footer-inner { grid-template-columns: 2fr 1fr 1fr; }
}

.footer h4 { color: var(--white); font-size: 15px; margin-bottom: 12px; }
.footer p { font-size: 14px; line-height: 1.7; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 6px; font-size: 14px; }
.footer a { color: var(--gray-300); }
.footer a:hover { color: var(--white); }

.footer-bottom {
    max-width: 1200px;
    margin: 24px auto 0;
    padding-top: 16px;
    border-top: 1px solid #334155;
    text-align: center;
    font-size: 13px;
    color: var(--gray-500);
}

.helpline-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16,185,129,0.15);
    color: #6ee7b7;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
}

/* ===== Terms Page ===== */
.terms-wrap {
    max-width: 800px;
    margin: 20px auto;
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.terms-wrap h1 { font-size: 28px; margin-bottom: 8px; color: var(--gray-900); }
.terms-wrap .updated { color: var(--gray-500); font-size: 13px; margin-bottom: 24px; }
.terms-wrap h2 { font-size: 18px; margin: 24px 0 10px; color: var(--gray-900); }
.terms-wrap p, .terms-wrap li { color: var(--gray-700); font-size: 15px; line-height: 1.7; margin-bottom: 10px; }
.terms-wrap ul, .terms-wrap ol { padding-left: 22px; margin-bottom: 12px; }

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    .hamburger { display: block; }
    .nav-menu {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--white);
        flex-direction: column;
        padding: 12px;
        gap: 4px;
        box-shadow: var(--shadow);
        display: none;
        align-items: stretch;
    }
    .nav-menu.show { display: flex; }
    .nav-menu a { padding: 12px; }
    .lang-switcher { margin: 8px 0 0; align-self: center; }
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 15px; }
    .section-title { font-size: 24px; }
    .auth-wrap { margin: 16px; padding: 24px 20px; }
    .terms-wrap { padding: 20px 16px; margin: 12px; }
}

/* Smooth show animation */
.fade-in { animation: fadeUp 0.4s ease-out; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ====================================================================
   Phase 2: Stepper, Tag Input, Profile, Upload
   ==================================================================== */

/* ===== Stepper ===== */
.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    position: relative;
    padding: 0 8px;
}
.stepper::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 28px; right: 28px;
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
}
.step-item {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}
.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--gray-300);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--gray-500);
    transition: var(--transition);
}
.step-item.done .step-circle { background: var(--accent); border-color: var(--accent); color: white; }
.step-item.active .step-circle { background: var(--primary); border-color: var(--primary); color: white; box-shadow: 0 0 0 4px var(--primary-light); }
.step-label {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-align: center;
}
.step-item.active .step-label, .step-item.done .step-label { color: var(--gray-900); }
@media (max-width: 640px) {
    .step-label { font-size: 10px; }
    .stepper::before { left: 20px; right: 20px; }
}

/* ===== Progress Bar ===== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.4s ease;
    border-radius: 4px;
}

/* ===== Form sections in profile ===== */
.profile-form {
    max-width: 720px;
    margin: 24px auto;
    background: var(--white);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.profile-form h2 { font-size: 20px; margin-bottom: 4px; }
.profile-form .step-sub { color: var(--gray-500); font-size: 14px; margin-bottom: 20px; }
.step-actions {
    margin-top: 24px;
    display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}

/* ===== Photo Upload Preview ===== */
.photo-upload {
    display: flex; align-items: center; gap: 16px;
}
.photo-preview {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex; align-items: center; justify-content: center;
    font-size: 32px;
    color: var(--gray-300);
    overflow: hidden;
    border: 2px dashed var(--gray-300);
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview.has-image { border-style: solid; border-color: var(--primary); }
.upload-btn {
    display: inline-block;
    padding: 8px 14px;
    border: 1px dashed var(--primary);
    color: var(--primary);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}
.upload-btn:hover { background: var(--primary-light); }
.upload-btn input { display: none; }

/* ===== Logo Upload (square) ===== */
.logo-preview {
    width: 90px; height: 90px;
    border-radius: 8px;
    background: var(--gray-100);
    display: flex; align-items: center; justify-content: center;
    font-size: 32px;
    color: var(--gray-300);
    overflow: hidden;
    border: 2px dashed var(--gray-300);
}
.logo-preview img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.logo-preview.has-image { border-style: solid; border-color: var(--accent); }

/* ===== Tag Input (for skills, languages) ===== */
.tag-input-wrap {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 6px 8px;
    background: var(--white);
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    min-height: 42px;
    transition: var(--transition);
}
.tag-input-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.tag-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
}
.tag-chip .x {
    cursor: pointer;
    background: rgba(0,0,0,0.1);
    border-radius: 50%;
    width: 16px; height: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px;
    line-height: 1;
}
.tag-chip .x:hover { background: rgba(0,0,0,0.2); }
.tag-input-wrap input {
    border: none; outline: none; flex: 1; min-width: 120px;
    padding: 6px 4px; font-size: 14px; font-family: inherit; background: transparent;
}

/* ===== Multi-select Cities ===== */
.multi-select-row {
    display: flex; gap: 8px; margin-bottom: 8px;
}
.multi-select-row .form-control { flex: 1; }

/* ===== Resume / File Display ===== */
.file-display {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    margin-top: 8px;
}
.file-display .icon { font-size: 22px; }
.file-display .name { flex: 1; font-size: 13px; color: var(--gray-700); word-break: break-all; }
.file-display .link { font-size: 12px; font-weight: 600; }

/* ===== Review Card (Company Step 3) ===== */
.review-card {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}
.review-card h4 { font-size: 14px; color: var(--primary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.3px; }
.review-card .row {
    display: grid; grid-template-columns: 140px 1fr; gap: 8px;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--gray-200);
}
.review-card .row:last-child { border-bottom: none; }
.review-card .row .label { color: var(--gray-500); font-weight: 600; }
.review-card .row .value { color: var(--gray-900); }
@media (max-width: 640px) {
    .review-card .row { grid-template-columns: 1fr; gap: 2px; }
    .review-card .row .label { font-size: 11px; text-transform: uppercase; }
}

/* ===== Dashboard Profile Status ===== */
.profile-status-card {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}
.profile-status-card.green { background: linear-gradient(135deg, var(--accent), #059669); }
.profile-status-card h3 { font-size: 16px; margin-bottom: 4px; }
.profile-status-card p { opacity: 0.92; font-size: 13px; margin-bottom: 10px; }
.profile-status-card .progress-bar { background: rgba(255,255,255,0.25); }
.profile-status-card .progress-fill { background: white; }
.profile-status-card .percent { font-size: 28px; font-weight: 800; }

/* ===== Action Card Grid ===== */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.action-card {
    display: block;
    background: white;
    padding: 18px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}
.action-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary); color: inherit; }
.action-card .icon { font-size: 28px; margin-bottom: 8px; }
.action-card h4 { font-size: 15px; margin-bottom: 4px; }
.action-card p { font-size: 12px; color: var(--gray-500); }

/* ===== Job List Table ===== */
.job-row {
    background: white;
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}
.job-row h4 { font-size: 15px; margin-bottom: 4px; }
.job-row .meta { font-size: 12px; color: var(--gray-500); display: flex; gap: 12px; flex-wrap: wrap; }
.job-row .meta span { display: inline-flex; align-items: center; gap: 4px; }
.badge {
    display: inline-block; padding: 2px 8px; border-radius: 10px;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
}
.badge-active { background: #d1fae5; color: var(--accent-dark); }
.badge-closed { background: #fee2e2; color: #991b1b; }
.badge-draft { background: #fef3c7; color: #92400e; }
.job-actions { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 640px) {
    .job-row { grid-template-columns: 1fr; }
    .job-actions { justify-content: flex-start; }
}

/* ===== Radio / Checkbox button groups ===== */
.btn-group {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.btn-group label {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
    user-select: none;
}
.btn-group label:hover { border-color: var(--primary); }
.btn-group input[type=radio], .btn-group input[type=checkbox] { display: none; }
.btn-group input:checked + span,
.btn-group label:has(input:checked) { color: var(--primary-dark); }
.btn-group label:has(input:checked) { border-color: var(--primary); background: var(--primary-light); font-weight: 600; }

/* Fallback when :has() is not supported */
.btn-group label.checked { border-color: var(--primary); background: var(--primary-light); font-weight: 600; color: var(--primary-dark); }

/* ====================================================================
   Phase 4: Search, Lock, Helpline Modal, Application Cards
   ==================================================================== */

/* ===== Two-column search layout ===== */
.search-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    margin: 20px 0;
}
@media (max-width: 900px) {
    .search-layout { grid-template-columns: 1fr; }
    .filter-sidebar { position: static; }
}

.filter-sidebar {
    background: var(--white);
    padding: 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    position: sticky;
    top: 80px;
    align-self: flex-start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}
.filter-sidebar h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 12px;
    color: var(--gray-700);
}
.filter-group {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gray-100);
}
.filter-group:last-of-type { border-bottom: none; }
.filter-group label.head {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--gray-500);
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}
.filter-group .form-control { font-size: 13px; padding: 7px 10px; }
.filter-group .chk-row {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; padding: 3px 0;
    cursor: pointer;
}
.filter-actions {
    display: flex; gap: 8px; margin-top: 8px;
}
.filter-actions .btn { flex: 1; font-size: 13px; padding: 8px 10px; }

/* Mobile: collapsible filters */
.filter-toggle-mobile {
    display: none;
    margin: 0 0 10px;
}
@media (max-width: 900px) {
    .filter-toggle-mobile { display: flex; }
    .filter-sidebar { display: none; }
    .filter-sidebar.show { display: block; }
}

/* ===== Result list ===== */
.result-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px; flex-wrap: wrap; gap: 8px;
}
.result-count { font-size: 13px; color: var(--gray-600); }
.sort-select { font-size: 13px; padding: 6px 10px; }

/* ===== Job Card / Candidate Card ===== */
.search-card {
    background: white;
    padding: 16px;
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.search-card:hover { box-shadow: var(--shadow); border-color: var(--primary-light); }
.search-card .avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--gray-100);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}
.search-card .avatar.square { border-radius: 10px; }
.search-card .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.search-card .main {
    flex: 1; min-width: 0;
}
.search-card h4 {
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--gray-900);
}
.search-card h4 a { color: inherit; text-decoration: none; }
.search-card h4 a:hover { color: var(--primary); }
.search-card .sub { font-size: 13px; color: var(--gray-600); margin-bottom: 6px; }
.search-card .meta {
    display: flex; gap: 12px; flex-wrap: wrap;
    font-size: 12px; color: var(--gray-500); margin-bottom: 6px;
}
.search-card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.search-card .tags {
    display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px;
}
.search-card .tag {
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: var(--gray-700);
    font-weight: 500;
}
.search-card .actions {
    display: flex; gap: 8px; align-items: center;
    flex-direction: column;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .search-card { flex-wrap: wrap; }
    .search-card .actions { flex-direction: row; width: 100%; margin-top: 8px; }
}

/* ===== Lock Button ===== */
.lock-btn {
    display: inline-flex; align-items: center; gap: 5px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #fcd34d;
    padding: 5px 12px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.lock-btn:hover {
    background: linear-gradient(135deg, #fcd34d, #f59e0b);
    transform: translateY(-1px);
}

/* ===== Helpline Modal ===== */
.helpline-modal {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 440px;
    width: 90%;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.helpline-modal .top {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white;
    padding: 24px;
    text-align: center;
}
.helpline-modal .top .icon-big {
    font-size: 48px;
    margin-bottom: 6px;
}
.helpline-modal .top h2 {
    color: white;
    font-size: 20px;
    margin: 0;
}
.helpline-modal .body { padding: 20px 24px; }
.helpline-modal .body p { color: var(--gray-700); font-size: 14px; line-height: 1.6; margin-bottom: 16px; }
.helpline-number-display {
    background: var(--primary-light);
    border: 2px dashed var(--primary);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
    margin: 12px 0;
}
.helpline-number-display .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 4px;
}
.helpline-number-display .num {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: 0.5px;
}
.helpline-number-display .num a { color: inherit; text-decoration: none; }
.helpline-modal .actions {
    display: flex; gap: 8px; padding: 12px 24px 20px;
}
.helpline-modal .actions .btn { flex: 1; }

/* ===== Pagination ===== */
.pager {
    display: flex; gap: 4px; justify-content: center; margin: 20px 0; flex-wrap: wrap;
}
.pager a, .pager span {
    padding: 6px 12px;
    border-radius: var(--radius);
    background: white;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}
.pager a:hover { background: var(--gray-50); border-color: var(--primary-light); }
.pager a.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.pager span { color: var(--gray-400); }

/* ===== Empty state ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--radius-lg);
    border: 2px dashed var(--gray-200);
}
.empty-state .ico { font-size: 56px; margin-bottom: 10px; }
.empty-state h3 { font-size: 18px; margin-bottom: 6px; color: var(--gray-700); }
.empty-state p { color: var(--gray-500); font-size: 14px; }

/* ===== Application status badges (job_applications) ===== */
.app-status {
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.app-status-new { background: #dbeafe; color: #1e40af; }
.app-status-viewed { background: var(--gray-100); color: var(--gray-700); }
.app-status-shortlisted { background: #d1fae5; color: var(--accent-dark); }
.app-status-rejected { background: #fee2e2; color: #991b1b; }

/* ===== Detail view (single job/candidate) ===== */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    margin: 20px 0;
}
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } }
.detail-main {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.detail-side {
    background: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    align-self: flex-start;
}
.detail-main h1 { font-size: 22px; margin-bottom: 6px; }
.detail-main .sub { color: var(--gray-600); margin-bottom: 16px; font-size: 14px; }
.detail-section { margin-bottom: 22px; }
.detail-section h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--primary);
    margin-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 6px;
}
.detail-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px;
}
.detail-grid .item .label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
    margin-bottom: 2px;
}
.detail-grid .item .value { font-size: 14px; color: var(--gray-900); }

/* Shortlist heart toggle */
.heart-btn {
    background: none; border: 1.5px solid var(--gray-300);
    border-radius: 50%;
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition);
    font-size: 16px;
}
.heart-btn:hover { border-color: #ef4444; }
.heart-btn.active { background: #fef2f2; border-color: #ef4444; color: #ef4444; }
