/* =============================================
   MyJob — Mobile-First CSS
   ============================================= */
@font-face {
    font-family: 'Golos';
    src: url('../fonts/GolosText-Regular.woff2') format('woff2');
    font-weight: 400; font-display: swap;
}
@font-face {
    font-family: 'Golos';
    src: url('../fonts/GolosText-Medium.woff2') format('woff2');
    font-weight: 500; font-display: swap;
}
@font-face {
    font-family: 'Golos';
    src: url('../fonts/GolosText-SemiBold.woff2') format('woff2');
    font-weight: 600; font-display: swap;
}
@font-face {
    font-family: 'Golos';
    src: url('../fonts/GolosText-Bold.woff2') format('woff2');
    font-weight: 700; font-display: swap;
}

:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #EFF6FF;
    --secondary: #10B981;
    --accent: #F59E0B;
    --danger: #EF4444;
    --text: #111827;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --bg: #F9FAFB;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow: 0 4px 16px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --nav-h: 56px;
    --font: 'Golos', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
svg { max-width: 100%; overflow: hidden; }
button { cursor: pointer; font-family: var(--font); }

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

/* ---- NAV ---- */
.nav {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--shadow-sm);
    height: var(--nav-h);
}
.nav-inner {
    display: flex; align-items: center;
    height: 100%; gap: 12px;
}
.nav-logo {
    font-size: 20px; font-weight: 700;
    color: var(--primary); letter-spacing: -0.5px;
    display: flex; align-items: center; gap: 7px;
    flex-shrink: 0;
}
.nav-logo svg { width: 26px; height: 26px; }
.nav-logo span { color: var(--text); }
.nav-links {
    display: none; /* hidden on mobile */
    align-items: center; gap: 2px; flex: 1;
}
.nav-links a {
    color: var(--text-secondary); font-weight: 500;
    padding: 6px 11px; border-radius: var(--radius-sm);
    font-size: 14px; transition: all 0.2s;
    white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--primary); background: var(--primary-light);
}
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-lang { display: flex; gap: 3px; }
.nav-lang a {
    font-size: 12px; font-weight: 600;
    padding: 4px 7px; border-radius: 6px;
    color: var(--text-secondary);
    border: 1px solid var(--border); transition: all 0.2s;
}
.nav-lang a.active, .nav-lang a:hover {
    background: var(--primary); color: var(--white); border-color: var(--primary);
}
.nav-user {
    display: flex; align-items: center; gap: 7px;
    padding: 6px 12px; background: var(--primary-light);
    border-radius: 50px; color: var(--primary);
    font-weight: 600; font-size: 13px; transition: all 0.2s;
    white-space: nowrap;
}
.nav-user:hover { background: var(--primary); color: var(--white); }
.nav-user .uavatar {
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--primary); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.nav-hamburger {
    display: flex; flex-direction: column; gap: 5px;
    padding: 8px; border-radius: var(--radius-sm);
    border: none; background: none; flex-shrink: 0;
}
.nav-hamburger span {
    display: block; width: 20px; height: 2px;
    background: var(--text); border-radius: 2px; transition: all 0.3s;
}

/* ---- MOBILE DRAWER ---- */
.mobile-menu {
    position: fixed; inset: 0; z-index: 200;
    background: var(--white);
    display: flex; flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: var(--white); z-index: 1;
}
.mobile-menu-head .logo { font-size: 20px; font-weight: 700; color: var(--primary); }
.mobile-close {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--border-light); border: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: var(--text);
}
.mobile-menu nav { padding: 12px; flex: 1; }
.mobile-menu nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: var(--radius-sm);
    font-size: 16px; font-weight: 500; color: var(--text);
    border-bottom: 1px solid var(--border-light);
}
.mobile-menu nav a:hover { background: var(--primary-light); color: var(--primary); }
.mobile-menu-lang {
    padding: 16px; display: flex; gap: 8px;
    border-top: 1px solid var(--border);
}
.mobile-menu-lang a {
    flex: 1; text-align: center; padding: 11px;
    border: 1px solid var(--border); border-radius: 10px;
    font-weight: 600; font-size: 15px; color: var(--text);
}
.mobile-menu-lang a.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ---- HERO ---- */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
    padding: 36px 0 32px;
    position: relative; overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='0.04'%3E%3Cpath d='M20 20h20v20H20zm-20 0h20v20H0z'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; text-align: center; color: var(--white); }
.hero h1 { font-size: 24px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.3px; line-height: 1.3; }
.hero p { font-size: 15px; opacity: 0.85; margin-bottom: 24px; }
.hero-stats {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 12px; margin-top: 28px;
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 22px; font-weight: 700; }
.hero-stat span { font-size: 12px; opacity: 0.75; }

/* ---- SEARCH BOX ---- */
.search-box {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 8px;
    display: flex; flex-direction: column; gap: 6px;
    max-width: 700px; margin: 0 auto;
}
.search-box input, .search-box select {
    border: 1.5px solid var(--border); outline: none;
    font-family: var(--font); font-size: 15px; color: var(--text);
    background: var(--white); padding: 11px 14px;
    border-radius: var(--radius-sm); width: 100%;
}
.search-box input:focus, .search-box select:focus { border-color: var(--primary); }
.search-box .search-btn {
    background: var(--primary); color: var(--white);
    border: none; border-radius: var(--radius-sm);
    padding: 13px; font-size: 15px; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background 0.2s; font-family: var(--font);
    width: 100%;
}
.search-box .search-btn:hover { background: var(--primary-dark); }
.search-box .search-btn svg { width: 18px; height: 18px; }

/* ---- SECTION ---- */
.section { padding: 36px 0; }
.section-title {
    font-size: 20px; font-weight: 700;
    margin-bottom: 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.section-title a { font-size: 13px; font-weight: 500; color: var(--primary); white-space: nowrap; }

/* ---- CATEGORIES ---- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.category-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 10px;
    text-align: center; transition: all 0.2s; display: block;
}
.category-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.category-icon {
    width: 42px; height: 42px; background: var(--primary-light);
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px; color: var(--primary);
}
.category-icon svg { width: 20px; height: 20px; }
.category-name { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.3; }
.category-count { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ---- JOB CARD ---- */
.jobs-list { display: flex; flex-direction: column; gap: 10px; }
.job-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px;
    display: flex; gap: 12px; align-items: flex-start;
    transition: all 0.2s; position: relative;
}
.job-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.job-card.featured { border-left: 3px solid var(--accent); }
.job-logo {
    width: 46px; height: 46px; border-radius: 10px;
    border: 1px solid var(--border); flex-shrink: 0;
    background: var(--primary-light); display: flex;
    align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px; color: var(--primary); overflow: hidden;
}
.job-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.job-info { flex: 1; min-width: 0; }
.job-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.job-card:hover .job-title { color: var(--primary); }
.job-company { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.job-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.job-bottom {
    display: flex; align-items: center;
    justify-content: space-between; margin-top: 10px; gap: 8px;
}
.job-salary { font-size: 15px; font-weight: 700; }
.job-salary.neg { font-size: 13px; font-weight: 400; color: var(--text-secondary); }
.job-meta {
    display: flex; flex-direction: column;
    align-items: flex-end; gap: 6px; flex-shrink: 0;
}
.job-meta-row { display: flex; align-items: center; gap: 8px; }
.job-time { font-size: 12px; color: var(--text-muted); }
.badge-urgent {
    position: absolute; top: 12px; right: 12px;
    background: var(--danger); color: white;
    font-size: 10px; font-weight: 700;
    padding: 2px 7px; border-radius: 50px;
    text-transform: uppercase; letter-spacing: 0.5px;
}

/* ---- TAG ---- */
.tag {
    font-size: 11px; padding: 3px 9px; border-radius: 50px;
    background: var(--border-light); color: var(--text-secondary); font-weight: 500;
    white-space: nowrap;
}
.tag.primary { background: var(--primary-light); color: var(--primary); }
.tag.success { background: #D1FAE5; color: #065F46; }
.tag.warning { background: #FEF3C7; color: #92400E; }
.tag.danger  { background: #FEE2E2; color: #991B1B; }

/* ---- SAVE BUTTON ---- */
.btn-save {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--border); background: none;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); transition: all 0.2s; flex-shrink: 0;
}
.btn-save:hover, .btn-save.saved { border-color: var(--danger); color: var(--danger); background: #FEF2F2; }
.btn-save svg { width: 15px; height: 15px; }

/* ---- RESUME CARDS ---- */
.resumes-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.resume-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px;
    transition: all 0.2s; display: block; color: var(--text);
}
.resume-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.resume-header { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.resume-avatar {
    width: 46px; height: 46px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #60A5FA);
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 18px; flex-shrink: 0; overflow: hidden;
}
.resume-avatar img { width: 100%; height: 100%; object-fit: cover; }
.resume-name { font-weight: 600; font-size: 15px; }
.resume-pos { color: var(--primary); font-size: 13px; margin-top: 2px; }
.resume-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.resume-salary { font-weight: 700; font-size: 15px; margin-top: 10px; }
.resume-info { font-size: 12px; color: var(--text-secondary); margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 18px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600;
    border: 2px solid transparent; transition: all 0.2s;
    font-family: var(--font); line-height: 1; white-space: nowrap;
    text-decoration: none; cursor: pointer;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: white; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-secondary { background: var(--border-light); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-success { background: var(--secondary); color: white; border-color: var(--secondary); }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-size: 15px; font-family: var(--font); color: var(--text);
    background: var(--white); transition: border-color 0.2s; outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 0; }

/* ---- CARD ---- */
.card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
}
.card-header {
    border-bottom: 1px solid var(--border); padding-bottom: 14px;
    margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 17px; font-weight: 700; }

/* ---- ALERT ---- */
.alert {
    padding: 12px 14px; border-radius: var(--radius-sm);
    font-size: 14px; margin-bottom: 14px;
    display: flex; align-items: flex-start; gap: 8px;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-error   { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.alert-info    { background: var(--primary-light); color: #1E40AF; border: 1px solid #BFDBFE; }
.alert-warning { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }

/* ---- AUTH ---- */
.auth-wrap {
    min-height: calc(100vh - var(--nav-h));
    display: flex; align-items: center; justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, var(--primary-light), var(--bg));
}
.auth-card {
    background: var(--white); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); padding: 28px 20px;
    width: 100%; max-width: 420px;
}
.auth-logo { text-align: center; font-size: 26px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.auth-subtitle { text-align: center; color: var(--text-secondary); font-size: 13px; margin-bottom: 24px; }
.auth-tabs {
    display: flex; background: var(--border-light);
    border-radius: 10px; padding: 4px; margin-bottom: 22px;
}
.auth-tab {
    flex: 1; text-align: center; padding: 10px;
    border-radius: 8px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.2s; color: var(--text-secondary);
    border: none; background: none; font-family: var(--font);
}
.auth-tab.active { background: var(--white); color: var(--primary); box-shadow: var(--shadow-sm); }
.otp-inputs { display: flex; gap: 8px; justify-content: center; margin: 18px 0; }
.otp-input {
    width: 46px; height: 54px; text-align: center;
    font-size: 22px; font-weight: 700;
    border: 2px solid var(--border); border-radius: 10px;
    outline: none; font-family: var(--font); transition: border-color 0.2s;
}
.otp-input:focus { border-color: var(--primary); }
.otp-timer { text-align: center; font-size: 13px; color: var(--text-secondary); margin-top: 10px; }
.otp-timer strong { color: var(--primary); }

/* ---- PAGE LAYOUT ---- */
.page-header { background: var(--white); border-bottom: 1px solid var(--border); padding: 20px 0; }
.page-header h1 { font-size: 22px; font-weight: 700; }
.page-header p { color: var(--text-secondary); margin-top: 4px; font-size: 14px; }

/* Mobile: filters on top, list below */
.page-layout { display: flex; flex-direction: column; gap: 16px; padding: 16px 0; }
.sidebar { display: flex; flex-direction: column; gap: 14px; }
.sidebar .card { padding: 16px; }
.filter-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); margin-bottom: 10px; }
.filter-section { margin-bottom: 16px; }
.filter-section:last-child { margin-bottom: 0; }

/* Collapsible filter on mobile */
.filter-toggle {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; background: var(--white);
    border: 1px solid var(--border); border-radius: var(--radius);
    font-weight: 600; cursor: pointer; margin-bottom: 10px;
}
.filter-toggle svg { width: 18px; height: 18px; transition: transform 0.2s; }
.filter-toggle.open svg { transform: rotate(180deg); }
.filter-body { display: none; }
.filter-body.open { display: block; }

.checkbox-group { display: flex; flex-direction: column; gap: 8px; }
.checkbox-item { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.checkbox-item input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; flex-shrink: 0; }

/* ---- DASHBOARD ---- */
.dashboard-grid { display: flex; flex-direction: column; gap: 16px; padding: 16px 0; }
.sidebar-nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 14px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; color: var(--text-secondary);
    transition: all 0.2s;
}
.sidebar-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-nav a:hover, .sidebar-nav a.active { background: var(--primary-light); color: var(--primary); }

/* Dashboard nav on mobile: horizontal scroll */
.dashboard-mobile-nav {
    display: flex; overflow-x: auto; gap: 8px;
    padding-bottom: 4px; margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}
.dashboard-mobile-nav::-webkit-scrollbar { display: none; }
.dashboard-mobile-nav a {
    display: flex; align-items: center; gap: 6px;
    padding: 9px 14px; border-radius: 50px;
    border: 1px solid var(--border); background: var(--white);
    font-size: 13px; font-weight: 600; color: var(--text-secondary);
    white-space: nowrap; flex-shrink: 0;
}
.dashboard-mobile-nav a.active { background: var(--primary); color: white; border-color: var(--primary); }

.stat-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
.stat-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px;
}
.stat-card .num { font-size: 26px; font-weight: 700; color: var(--primary); }
.stat-card .label { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }

/* ---- TABLE ---- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
thead th {
    text-align: left; padding: 10px 12px;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--text-secondary);
    background: var(--border-light); border-bottom: 1px solid var(--border);
}
tbody td {
    padding: 12px; border-bottom: 1px solid var(--border-light);
    font-size: 14px; vertical-align: middle;
}
tbody tr:hover { background: var(--border-light); }
tbody tr:last-child td { border-bottom: none; }

/* ---- PAGINATION ---- */
.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 24px; flex-wrap: wrap; }
.pagination a, .pagination span {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); font-size: 14px; font-weight: 500;
    color: var(--text); background: var(--white); transition: all 0.2s;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active { background: var(--primary); border-color: var(--primary); color: white; }

/* ---- JOB DETAIL ---- */
.job-detail-header {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px;
    margin-bottom: 16px;
}
.job-detail-logo {
    width: 68px; height: 68px; border-radius: 14px;
    border: 1px solid var(--border); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 24px; color: var(--primary);
    background: var(--primary-light); overflow: hidden; margin-bottom: 14px;
}
.job-detail-logo img { width: 100%; height: 100%; object-fit: contain; }
.job-detail-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.job-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---- MODAL ---- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 300; display: flex; align-items: flex-end; /* Bottom sheet on mobile */
    padding: 0; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
    background: var(--white); border-radius: 20px 20px 0 0;
    padding: 24px 20px; width: 100%; max-height: 90vh;
    overflow-y: auto; transform: translateY(100%); transition: transform 0.3s ease;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close {
    width: 34px; height: 34px; border-radius: 50%;
    border: none; background: var(--border-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); font-size: 16px;
}

/* ---- FOOTER ---- */
.footer { background: #111827; color: #9CA3AF; padding: 36px 0 24px; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 28px; margin-bottom: 28px; }
.footer-logo { font-size: 20px; font-weight: 700; color: white; margin-bottom: 8px; }
.footer-desc { font-size: 13px; line-height: 1.7; }
.footer-col h4 {
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; color: white; margin-bottom: 12px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.footer-col ul li a { font-size: 13px; color: #9CA3AF; }
.footer-col ul li a:hover { color: white; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px;
    font-size: 12px; text-align: center;
}
.footer-socials { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.footer-socials a { font-size: 13px; color: #9CA3AF; }

/* ---- EMPTY STATE ---- */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-secondary); }
.empty-state svg { width: 56px; height: 56px; color: var(--border); margin: 0 auto 14px; }
.empty-state h3 { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 6px; }

/* ---- UTILITIES ---- */
.hidden { display: none !important; }
.text-center { text-align: center; }
.fw-bold { font-weight: 700; }
.fs-sm { font-size: 13px; }
.fs-xs { font-size: 12px; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-danger { color: var(--danger); }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8 { gap: 8px; }
.flex-wrap { flex-wrap: wrap; }

/* ---- SPINNER ---- */
.spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.3); border-top-color: white;
    border-radius: 50%; animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- TOAST ---- */
.toast {
    position: fixed; top: calc(var(--nav-h) + 12px); right: 12px; left: 12px;
    z-index: 9999; border-radius: var(--radius-sm);
    animation: slideDown .3s ease;
}
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ============================================
   TABLET — 640px+
   ============================================ */
@media (min-width: 640px) {
    .hero h1 { font-size: 30px; }
    .hero-stats { grid-template-columns: repeat(4, 1fr); gap: 24px; }
    .hero-stat strong { font-size: 26px; }
    .search-box { flex-direction: row; flex-wrap: wrap; }
    .search-box input { flex: 1; min-width: 180px; }
    .search-box select { width: auto; flex: 0 0 auto; }
    .search-box .search-btn { width: auto; }
    .categories-grid { grid-template-columns: repeat(4, 1fr); }
    .resumes-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .modal { border-radius: var(--radius-lg); max-width: 500px; margin: auto; }
    .modal-overlay { align-items: center; padding: 20px; }
    .form-row { grid-template-columns: 1fr 1fr; gap: 16px; }
}

/* ============================================
   DESKTOP — 1024px+
   ============================================ */
@media (min-width: 1024px) {
    :root { --nav-h: 64px; }
    .container { padding: 0 20px; }
    .nav-links { display: flex; }
    .nav-hamburger { display: none; }
    .hero { padding: 60px 0 48px; }
    .hero h1 { font-size: 46px; }
    .hero p { font-size: 17px; }
    .hero-stat strong { font-size: 30px; }
    .search-box { padding: 8px; gap: 8px; flex-wrap: nowrap; }
    .search-box input { flex: 1; border: none; }
    .search-box select { border: none; border-left: 1px solid var(--border); min-width: 170px; }
    .search-box .search-btn { white-space: nowrap; }
    .section { padding: 56px 0; }
    .section-title { font-size: 24px; margin-bottom: 24px; }
    .categories-grid { grid-template-columns: repeat(6, 1fr); }
    .category-card { padding: 20px 14px; }
    .category-icon { width: 48px; height: 48px; }
    .category-name { font-size: 13px; }
    .job-card { padding: 20px 24px; gap: 16px; }
    .job-logo { width: 52px; height: 52px; }
    .job-title { font-size: 16px; }
    .resumes-grid { grid-template-columns: repeat(3, 1fr); }
    .page-layout { flex-direction: row; align-items: flex-start; padding: 28px 0; }
    .page-layout .sidebar { width: 280px; flex-shrink: 0; }
    .page-layout main { flex: 1; min-width: 0; }
    .filter-toggle { display: none; }
    .filter-body { display: block !important; }
    .dashboard-grid { flex-direction: row; align-items: flex-start; padding: 28px 0; }
    .dashboard-grid .sidebar { width: 260px; flex-shrink: 0; }
    .dashboard-grid main { flex: 1; min-width: 0; }
    .dashboard-mobile-nav { display: none; }
    .stat-cards { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
    .footer-bottom { text-align: left; display: flex; justify-content: space-between; align-items: center; }
    .auth-card { padding: 40px; }
    .otp-input { width: 52px; height: 60px; }
    .toast { left: auto; min-width: 300px; max-width: 400px; }
}

/* Nav user name: hide on very small screens */
@media (max-width: 380px) {
    .nav-user-name { display: none; }
    .nav-lang { display: none; } /* shown in mobile menu instead */
}
@media (max-width: 480px) {
    .otp-inputs { gap: 6px; }
    .otp-input { width: 42px; height: 50px; font-size: 20px; }
}

/* ============================================
   DASHBOARD STYLES
   ============================================ */
.dash-sidebar { display: flex; flex-direction: column; gap: 12px; }
.dash-user-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; text-align: center;
}
.dash-avatar {
    width: 64px; height: 64px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #60A5FA);
    color: white; font-size: 24px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px; overflow: hidden; flex-shrink: 0;
}
.dash-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dash-user-name { font-weight: 700; font-size: 16px; }
.dash-user-phone { font-size: 13px; color: var(--text-secondary); margin-top: 3px; }

.dash-mobile-nav {
    display: flex; overflow-x: auto; gap: 8px;
    padding: 12px 0; margin-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.dash-mobile-nav::-webkit-scrollbar { display: none; }
.dash-mobile-nav a {
    display: flex; align-items: center;
    padding: 9px 16px; border-radius: 50px;
    border: 1.5px solid var(--border); background: var(--white);
    font-size: 13px; font-weight: 600; color: var(--text-secondary);
    white-space: nowrap; flex-shrink: 0; transition: all 0.2s;
}
.dash-mobile-nav a.active {
    background: var(--primary); color: white; border-color: var(--primary);
}

/* Avatar upload row */
.form-avatar-row {
    display: flex; gap: 16px; align-items: center; margin-bottom: 20px;
    padding: 16px; background: var(--bg); border-radius: var(--radius);
}
.form-avatar-preview {
    width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
    overflow: hidden; background: var(--primary-light);
    display: flex; align-items: center; justify-content: center;
}
.form-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 700; color: var(--primary);
}

/* 2-column form grid */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}
@media (min-width: 640px) {
    .form-row-2 { grid-template-columns: 1fr 1fr; gap: 0 16px; }
}

/* Hide sidebar on mobile, show mobile nav instead */
@media (max-width: 1023px) {
    .dash-sidebar { display: none; }
    .dashboard-grid { padding: 8px 0; gap: 12px; }
}
@media (min-width: 1024px) {
    .dash-mobile-nav { display: none; }
    .dash-sidebar { display: flex; }
    .dashboard-grid { flex-direction: row; }
    .dashboard-grid .dash-sidebar { width: 256px; }
    .dashboard-grid main { flex: 1; min-width: 0; }
    .stat-cards { grid-template-columns: repeat(3, 1fr); }
}

/* Job detail page responsive */
.job-detail-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 0;
}
@media (min-width: 1024px) {
    .job-detail-wrap { grid-template-columns: 1fr 300px; padding: 28px 0; }
}

/* VIP/TOP badges on job cards */
.badge-vip {
    position: absolute; top: 12px; left: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white; font-size: 10px; font-weight: 700;
    padding: 2px 8px; border-radius: 50px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-top {
    position: absolute; top: 12px; left: 12px;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    color: white; font-size: 10px; font-weight: 700;
    padding: 2px 8px; border-radius: 50px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.job-card.vip { border: 2px solid #f59e0b; box-shadow: 0 2px 12px rgba(245,158,11,.15); }
.job-card.top-job { border-left: 3px solid #2563eb; }
@media (max-width: 768px) {
    .job-detail-wrap { grid-template-columns: 1fr !important; }
}


/* Company listing cards */
.company-card {
    display: flex; gap: 16px; align-items: center;
    padding: 20px; background: var(--white);
    border: 1px solid var(--border); border-radius: var(--radius);
    text-decoration: none; color: inherit;
    transition: all 0.2s; position: relative; overflow: hidden;
}
.company-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.company-logo-box {
    width: 56px; height: 56px; border-radius: 12px;
    background: var(--primary-light); display: flex;
    align-items: center; justify-content: center;
    font-weight: 700; font-size: 22px; color: var(--primary);
    flex-shrink: 0; overflow: hidden; border: 1px solid var(--border);
}
.company-logo-box img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; }
.company-info { min-width: 0; flex: 1; }
.company-name { font-weight: 700; font-size: 15px; margin-bottom: 3px; }
.company-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.company-badge { position: absolute; top: 0; right: 0; color: white; font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 0 var(--radius) 0 8px; }
.company-badge.vip { background: linear-gradient(135deg, #f59e0b, #d97706); }
.company-badge.top { background: linear-gradient(135deg, #2563eb, #60a5fa); }
