/* ==================== CSS VARIABLES ==================== */
:root {
  --primary: #0066cc;
  --primary-dark: #004499;
  --primary-light: #e6f0ff;
  --accent: #ff6600;
  --accent-light: #fff3e6;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  --bg-main: #f0f4f8;
  --bg-card: #ffffff;
  --bg-header: #ffffff;
  --bg-footer: #1a1a2e;
  --bg-hero: linear-gradient(135deg, #0066cc 0%, #004499 50%, #002266 100%);
  --bg-input: #ffffff;
  --bg-hover: #f8fafc;

  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-white: #ffffff;
  --text-on-primary: #ffffff;
  --text-link: #0066cc;

  --border: #e2e8f0;
  --border-focus: #0066cc;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-ar: 'Tajawal', 'Cairo', 'Segoe UI', sans-serif;
  --font-en: 'Inter', 'Segoe UI', sans-serif;
  --transition: all 0.3s ease;
}

/* ==================== DARK MODE ==================== */
[data-theme="dark"] {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-header: #1e293b;
  --bg-input: #334155;
  --bg-hover: #334155;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-link: #60a5fa;
  --border: #334155;
  --border-focus: #60a5fa;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.3);
  --primary-light: #1e3a5f;
}

/* ==================== RESET & BASE ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-ar);
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.7;
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  transition: var(--transition);
}

body[dir="ltr"] {
  font-family: var(--font-en);
  direction: ltr;
  text-align: left;
}

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

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

ul, ol { list-style: none; }

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
}

/* ==================== UTILITIES ==================== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.text-start { text-align: right; }
body[dir="ltr"] .text-start { text-align: left; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.flex { display: flex; } .flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; } .gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.grid { display: grid; }
.hidden { display: none !important; }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: #d1fae5; color: #059669; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-danger { background: #fee2e2; color: #dc2626; }
.badge-info { background: #dbeafe; color: #2563eb; }

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn i { font-size: 1rem; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--primary); color: var(--text-on-primary); }
.btn-primary:hover { background: var(--primary-dark); color: var(--text-on-primary); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: #e55a00; color: white; }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-full); }

/* ==================== FORMS ==================== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; color: var(--text-secondary); }
.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
}
.form-control:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(0,102,204,0.1); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; appearance: auto; }
textarea.form-control { min-height: 120px; resize: vertical; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* ==================== CARDS ==================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-body { padding: 20px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 1.05rem; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--border); background: var(--bg-hover); }

/* ==================== HEADER ==================== */
.site-header {
  background: var(--bg-header);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}
.header-top {
  background: var(--primary);
  padding: 6px 0;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.9);
}
.header-top a { color: rgba(255,255,255,0.9); }
.header-top a:hover { color: white; }
.header-top .container { display: flex; justify-content: space-between; align-items: center; }
.header-top-controls { display: flex; align-items: center; gap: 12px; }
.header-top-controls button {
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}
.header-top-controls button:hover { background: rgba(255,255,255,0.25); }
.header-top-controls button i { font-size: 0.85rem; }

.header-main { padding: 12px 0; }
.header-main .container { display: flex; justify-content: space-between; align-items: center; gap: 20px; }

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo-icon {
  width: 48px; height: 48px;
  background: var(--bg-hero);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: white;
}
.logo-text h1 { font-size: 1.2rem; font-weight: 800; color: var(--primary); line-height: 1.2; }
.logo-text span { font-size: 0.72rem; color: var(--text-muted); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}
.main-nav a:hover, .main-nav a.active { background: var(--primary-light); color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
}

/* ==================== HERO SECTION ==================== */
.hero {
  background: var(--bg-hero);
  padding: 60px 0 70px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}
.hero-content { position: relative; z-index: 1; text-align: center; color: white; }
.hero h2 { font-size: 2.5rem; font-weight: 800; margin-bottom: 12px; text-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.hero p { font-size: 1.15rem; opacity: 0.9; margin-bottom: 32px; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 36px;
}
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 2rem; font-weight: 800; display: block; }
.hero-stat .label { font-size: 0.85rem; opacity: 0.8; }

/* ==================== SEARCH BOX ==================== */
.search-box {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 850px;
  margin: 0 auto;
  box-shadow: var(--shadow-xl);
  border: 2px solid rgba(255,255,255,0.2);
}
.search-box .search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-left: 1px solid var(--border);
  min-width: 0;
}
body[dir="ltr"] .search-box .search-field { border-left: none; border-right: 1px solid var(--border); }
.search-box .search-field:first-child { border: none; }
.search-box .search-field i { color: var(--text-muted); font-size: 1.1rem; flex-shrink: 0; }
.search-box .search-field input,
.search-box .search-field select {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.95rem;
  width: 100%;
  padding: 0;
}
.search-box .search-field input::placeholder { color: var(--text-muted); }
.search-box .btn-search {
  background: var(--accent);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.search-box .btn-search:hover { background: #e55a00; transform: scale(1.02); }

/* ==================== SECTIONS ==================== */
.section { padding: 50px 0; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.section-header h2 { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); }
.section-header a { color: var(--primary); font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 4px; }

/* ==================== JOB CARDS ==================== */
.jobs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 20px; }

.job-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}
.job-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--primary); }
.job-card.featured { border-color: var(--accent); }
.job-card.featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #ff9900);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.job-card-header { display: flex; gap: 14px; margin-bottom: 14px; }
.job-card-logo {
  width: 56px; height: 56px;
  background: var(--primary-light);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--primary);
  flex-shrink: 0;
  overflow: hidden;
}
.job-card-logo img { width: 100%; height: 100%; object-fit: cover; }
.job-card-info { flex: 1; min-width: 0; }
.job-card-info h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-card-info .company-name { font-size: 0.88rem; color: var(--primary); font-weight: 600; }

.job-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.job-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  background: var(--bg-hover);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.job-tag i { font-size: 0.72rem; }

.job-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.job-salary { font-weight: 700; color: var(--success); font-size: 0.95rem; }
.job-date { font-size: 0.8rem; color: var(--text-muted); }

.job-card-actions { display: flex; gap: 6px; position: absolute; top: 16px; left: 16px; }
body[dir="ltr"] .job-card-actions { left: auto; right: 16px; }
.job-card-actions button {
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: var(--transition);
}
.job-card-actions button:hover { color: var(--danger); border-color: var(--danger); }
.job-card-actions button.saved { color: var(--danger); border-color: var(--danger); }

/* ==================== CATEGORIES GRID ==================== */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

.category-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}
.category-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--primary); }
.category-card .cat-icon {
  width: 60px; height: 60px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.5rem;
}
.category-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.category-card .count { font-size: 0.82rem; color: var(--text-muted); }

/* ==================== COMPANIES ==================== */
.companies-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.company-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.company-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.company-card .company-logo {
  width: 80px; height: 80px;
  border-radius: var(--radius-lg);
  margin: 0 auto 14px;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--primary);
  overflow: hidden;
}
.company-card .company-logo img { width: 100%; height: 100%; object-fit: cover; }
.company-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.company-card .industry { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 10px; }
.company-card .jobs-count { font-size: 0.82rem; color: var(--primary); font-weight: 600; }

/* ==================== FOOTER ==================== */
.site-footer { background: var(--bg-footer); color: rgba(255,255,255,0.8); padding: 50px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 40px; }
.footer-col h3 { color: white; font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; position: relative; padding-bottom: 10px; }
.footer-col h3::after { content: ''; position: absolute; bottom: 0; right: 0; width: 40px; height: 3px; background: var(--accent); border-radius: 2px; }
body[dir="ltr"] .footer-col h3::after { right: auto; left: 0; }
.footer-col p { font-size: 0.9rem; line-height: 1.8; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,0.7); font-size: 0.9rem; transition: var(--transition); display: flex; align-items: center; gap: 6px; }
.footer-col ul li a:hover { color: white; padding-right: 6px; }
body[dir="ltr"] .footer-col ul li a:hover { padding-right: 0; padding-left: 6px; }
.footer-col ul li a i { font-size: 0.7rem; color: var(--accent); }

.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input {
  flex: 1;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 0.9rem;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-form button {
  padding: 10px 20px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.newsletter-form button:hover { background: #e55a00; }

.app-download { margin-top: 20px; }
.app-buttons { display: flex; gap: 10px; margin-top: 10px; }
.app-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  color: white;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  font-size: 0.82rem;
}
.app-btn:hover { background: rgba(255,255,255,0.2); color: white; }
.app-btn i { font-size: 1.3rem; }
.app-btn .app-btn-text { line-height: 1.3; }
.app-btn .app-btn-text small { display: block; font-size: 0.7rem; opacity: 0.7; }
.app-btn .app-btn-text strong { font-size: 0.88rem; }

.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 1.1rem;
  transition: var(--transition);
}
.footer-social a:hover { background: var(--primary); transform: translateY(-2px); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* ==================== PAGE: JOB DETAIL ==================== */
.page-header { background: var(--primary); padding: 30px 0; color: white; }
.page-header h2 { font-size: 1.6rem; font-weight: 800; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; margin-top: 8px; }
.breadcrumb a { color: rgba(255,255,255,0.8); }
.breadcrumb span { color: rgba(255,255,255,0.5); }

.job-detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; padding: 30px 0; }
.job-detail-main .card { margin-bottom: 20px; }
.job-detail-sidebar .card { margin-bottom: 20px; }

.job-detail-header { display: flex; gap: 20px; align-items: flex-start; }
.job-detail-header .company-logo {
  width: 80px; height: 80px;
  border-radius: var(--radius-lg);
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--primary);
}
.job-detail-header h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; }
.job-detail-header .company { color: var(--primary); font-weight: 600; margin-bottom: 4px; }
.job-detail-header .meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.88rem; color: var(--text-secondary); }
.job-detail-header .meta span { display: flex; align-items: center; gap: 4px; }

.job-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.job-info-item { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg-hover); border-radius: var(--radius); }
.job-info-item i { font-size: 1.2rem; color: var(--primary); width: 20px; text-align: center; }
.job-info-item .info-label { font-size: 0.8rem; color: var(--text-muted); }
.job-info-item .info-value { font-weight: 700; font-size: 0.92rem; }

/* ==================== AUTH PAGES ==================== */
.auth-page { min-height: calc(100vh - 200px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { background: var(--bg-card); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); padding: 40px; width: 100%; max-width: 480px; border: 1px solid var(--border); }
.auth-card h2 { text-align: center; margin-bottom: 8px; font-size: 1.5rem; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 24px; font-size: 0.9rem; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.auth-tab {
  flex: 1; padding: 10px; text-align: center; border-radius: var(--radius);
  background: var(--bg-hover); color: var(--text-secondary); cursor: pointer;
  font-weight: 600; transition: var(--transition); border: 2px solid transparent;
}
.auth-tab.active { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { color: var(--text-muted); font-size: 0.85rem; }

/* ==================== PROFILE ==================== */
.profile-layout { display: grid; grid-template-columns: 300px 1fr; gap: 24px; padding: 30px 0; }
.profile-sidebar { position: sticky; top: 100px; }
.profile-avatar {
  width: 120px; height: 120px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--primary);
  margin: 0 auto 16px;
  overflow: hidden;
  border: 4px solid var(--primary);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-nav { margin-top: 20px; }
.profile-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: 600;
  transition: var(--transition);
  margin-bottom: 4px;
}
.profile-nav a:hover, .profile-nav a.active { background: var(--primary-light); color: var(--primary); }
.profile-nav a i { width: 20px; text-align: center; }

/* ==================== FILTERS SIDEBAR ==================== */
.filters-sidebar {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
}
.filter-group { margin-bottom: 20px; }
.filter-group h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 10px; color: var(--text-primary); }
.filter-option { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; font-size: 0.9rem; color: var(--text-secondary); }
.filter-option:hover { color: var(--primary); }
.filter-option input[type="checkbox"], .filter-option input[type="radio"] { accent-color: var(--primary); }

/* ==================== JOBS LIST LAYOUT ==================== */
.jobs-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; padding: 30px 0; }
.jobs-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.jobs-header h2 { font-size: 1.3rem; }
.jobs-header .results-count { color: var(--text-muted); font-size: 0.9rem; }
.jobs-sort { display: flex; align-items: center; gap: 8px; }
.jobs-sort select { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); color: var(--text-primary); font-size: 0.85rem; }

/* ==================== PAGINATION ==================== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 30px; }
.pagination button, .pagination a {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}
.pagination button:hover, .pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination button.active, .pagination a.active { background: var(--primary); color: white; border-color: var(--primary); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ==================== MODAL ==================== */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: var(--transition);
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.9);
  transition: var(--transition);
}
.modal-overlay.active .modal { transform: scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 1.2rem; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; padding: 4px; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ==================== ALERTS / TOAST ==================== */
.toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 3000; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 14px 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  animation: slideDown 0.3s ease;
  min-width: 300px;
  border-right: 4px solid var(--primary);
}
body[dir="ltr"] .toast { border-right: none; border-left: 4px solid var(--primary); }
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }

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

/* ==================== LOADING ==================== */
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; }
.spinner { width: 40px; height: 40px; border: 4px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== ADMIN PANEL ==================== */
.admin-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }

.admin-sidebar {
  background: #1e293b;
  color: white;
  padding: 20px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-sidebar .logo { padding: 0 20px; margin-bottom: 30px; }
.admin-sidebar .logo h2 { color: white; font-size: 1.1rem; }
.admin-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  border-right: 3px solid transparent;
}
body[dir="ltr"] .admin-nav a { border-right: none; border-left: 3px solid transparent; }
.admin-nav a:hover { background: rgba(255,255,255,0.05); color: white; }
.admin-nav a.active { background: rgba(255,255,255,0.1); color: white; border-color: var(--accent); }
.admin-nav a i { width: 20px; text-align: center; }
.admin-nav .nav-section { padding: 8px 24px; font-size: 0.72rem; text-transform: uppercase; color: rgba(255,255,255,0.4); font-weight: 700; margin-top: 12px; letter-spacing: 1px; }

.admin-main { padding: 24px; background: var(--bg-main); }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-header h2 { font-size: 1.4rem; font-weight: 800; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex; align-items: center; gap: 16px;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card .stat-icon {
  width: 50px; height: 50px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.stat-card .stat-info .number { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.stat-card .stat-info .label { font-size: 0.82rem; color: var(--text-muted); }

/* Admin table */
.admin-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.admin-table th { padding: 14px 16px; background: var(--bg-hover); text-align: right; font-weight: 700; font-size: 0.85rem; color: var(--text-secondary); border-bottom: 2px solid var(--border); }
body[dir="ltr"] .admin-table th { text-align: left; }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.admin-table tr:hover { background: var(--bg-hover); }
.admin-table .actions { display: flex; gap: 6px; }
.admin-table .actions button { padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-card); cursor: pointer; font-size: 0.8rem; transition: var(--transition); }
.admin-table .actions button:hover { border-color: var(--primary); color: var(--primary); }
.admin-table .actions button.delete:hover { border-color: var(--danger); color: var(--danger); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .jobs-layout { grid-template-columns: 1fr; }
  .filters-sidebar { display: none; }
  .filters-sidebar.mobile-open { display: block; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1500; overflow-y: auto; }
  .job-detail-layout { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-sidebar.mobile-open { display: block; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1500; }
}

@media (max-width: 768px) {
  .hero h2 { font-size: 1.6rem; }
  .hero p { font-size: 0.95rem; }
  .search-box { flex-direction: column; border-radius: var(--radius-lg); }
  .search-box .search-field { border-left: none; border-bottom: 1px solid var(--border); width: 100%; }
  body[dir="ltr"] .search-box .search-field { border-right: none; }
  .search-box .btn-search { width: 100%; justify-content: center; border-radius: var(--radius); }
  .hero-stats { gap: 20px; }
  .hero-stat .num { font-size: 1.4rem; }
  .jobs-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .main-nav.mobile-open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-header);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--border);
    z-index: 999;
  }
  .mobile-toggle { display: block; }
  .header-actions .btn span { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; gap: 10px; align-items: flex-start; }
  .job-info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero { padding: 40px 0 50px; }
  .hero h2 { font-size: 1.3rem; }
  .hero-stats { flex-wrap: wrap; }
  .section { padding: 30px 0; }
  .auth-card { padding: 24px; }
  .app-buttons { flex-direction: column; }
}

/* ==================== GOOGLE FONTS FALLBACK ==================== */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&family=Inter:wght@300;400;500;600;700;800;900&display=swap');
