/* ================================================================
 * css/style.css — Job Portal UI/UX Redesign
 * ================================================================ */

/* === TOKENS === */
:root {
  /* Primary */
  --color-primary:       #2563EB;
  --color-primary-dark:  #1D4ED8;
  --color-primary-light: #EFF6FF;
  --color-primary-mid:   #3B82F6;
  /* Semantic */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-danger:  #EF4444;
  /* Neutral scale */
  --color-neutral-50:  #f8fafc;
  --color-neutral-100: #f1f5f9;
  --color-neutral-200: #e2e8f0;
  --color-neutral-300: #cbd5e1;
  --color-neutral-400: #94a3b8;
  --color-neutral-500: #64748b;
  --color-neutral-600: #475569;
  --color-neutral-700: #334155;
  --color-neutral-800: #1e293b;
  --color-neutral-900: #0f172a;
  --color-neutral-950: #0f172a;
  --color-surface: #ffffff;
  /* Spacing */
  --space-xs: 4px;  --space-sm: 8px;   --space-md: 16px;
  --space-lg: 24px; --space-xl: 32px;  --space-2xl: 48px; --space-3xl: 64px;
  /* Typography scale */
  --text-xs: 11px; --text-sm: 13px; --text-base: 15px; --text-lg: 18px;
  --text-xl: 20px; --text-2xl: 24px; --text-3xl: 30px; --text-4xl: 36px; --text-5xl: 48px;
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  /* Border-radius scale */
  --rounded-sm: 4px; --rounded: 6px; --rounded-md: 8px; --rounded-lg: 12px;
  --rounded-xl: 16px; --rounded-2xl: 20px; --rounded-full: 9999px;
}

/* === TYPOGRAPHY === */
body { font-family: 'Inter', 'Noto Sans Ethiopic', system-ui, -apple-system, sans-serif; font-size: var(--text-base); line-height: 1.6; color: var(--color-neutral-800); }
h1 { font-size: var(--text-4xl); font-weight: 700; line-height: 1.2; color: var(--color-neutral-950); }
h2 { font-size: var(--text-2xl); font-weight: 600; line-height: 1.3; color: var(--color-neutral-800); }
h3 { font-size: var(--text-lg); font-weight: 600; line-height: 1.4; }
h4 { font-size: var(--text-base); font-weight: 600; }
.text-caption { font-size: var(--text-xs); color: var(--color-neutral-400); font-weight: 500; }

/* Ad Placeholders (retained) */
.ad-placeholder { background-color: #e9ecef; border: 2px dashed #ced4da; display: flex; align-items: center; justify-content: center; color: #6c757d; font-weight: 500; border-radius: 8px; margin: 15px 0; }
.ad-placeholder-in-feed { min-height: 120px; width: 100%; }
.ad-placeholder-sidebar { min-height: 250px; width: 100%; }
.ad-placeholder-in-article { min-height: 150px; width: 100%; }

/* === LAYOUT === */
.job-detail-layout { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 1024px) { .job-detail-layout { grid-template-columns: 65% 35%; } }
@media (min-width: 640px) and (max-width: 1023px) { .job-detail-layout { grid-template-columns: 60% 40%; } }
.apply-page-layout { max-width: 680px; margin: auto; padding: 0 16px; }
.hero-gradient { background: linear-gradient(to bottom, #f0f7ff, #ffffff); }
.sticky-bottom-cta { position: fixed; bottom: 0; left: 0; right: 0; width: 100%; height: 56px; box-shadow: 0 -2px 8px rgba(0,0,0,0.08); }

/* === COMPONENTS === */

/* Slider (home page — company logos) */
.slider { height: 70px; margin: auto; overflow: hidden; position: relative; width: 100%; background: transparent; }
.slider::before, .slider::after { background: linear-gradient(to right,rgba(248,250,252,1) 0%,rgba(248,250,252,0) 100%); content:""; height:70px; position:absolute; width:50px; z-index:2; pointer-events:none; }
.slider::after { right:0; top:0; transform:rotateZ(180deg); }
.slider::before { left:0; top:0; }
.slider-track { animation: scroll 30s linear infinite; display: flex; width: calc(200px * 16); }
.slide { height: 70px; width: 200px; display: flex; align-items: center; justify-content: center; padding: 0 20px; }
.slide img { width: 100%; max-height: 40px; object-fit: contain; filter: none !important; opacity: 1; transition: transform 0.3s ease; }
.fade-in { animation: fadeIn 0.3s ease-in-out; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-200px * 8)); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Header */
.header-util-bar a.active { color: var(--color-primary); background-color: var(--color-primary-light); border-radius: var(--rounded); }
.header-search-input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
.notif-dropdown { max-height: 320px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--color-neutral-300) var(--color-neutral-100); }
.post-job-btn { box-shadow: var(--shadow-sm); font-weight: 600; }
.material-symbols-outlined { font-variation-settings: 'FILL' 0,'wght' 400,'GRAD' 0,'opsz' 24; }
.material-symbols-outlined.filled { font-variation-settings: 'FILL' 1; }
#mobile-menu { transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out; max-height: 0; opacity: 0; overflow: hidden; visibility: hidden; }
#mobile-menu.open { max-height: 100vh; opacity: 1; visibility: visible; border-bottom: 1px solid #e2e8f0; }
.animate-fade-in-down { animation: fadeInDown 0.2s ease-out; }

/* Footer */
.footer { background-color: var(--color-neutral-950); color: var(--color-neutral-300); }
.footer-col-heading { font-weight: 600; font-size: 13px; color: var(--color-neutral-100); }
.footer-link { font-size: 13px; color: var(--color-neutral-400); transition: color 0.15s ease; text-decoration: none; }
.footer-link:hover { color: #ffffff; }
.footer-bottom-bar { border-top: 1px solid rgba(255,255,255,0.08); font-size: 12px; color: var(--color-neutral-500); }
.footer-social-icon { width: 36px; height: 36px; border-radius: var(--rounded-full); background: rgba(255,255,255,0.05); transition: background 0.15s ease; }
.footer-social-icon:hover { background: rgba(255,255,255,0.15); }

/* Home Page */
.category-card { border-radius: 10px; border: 1px solid var(--color-neutral-200); transition: all 0.2s ease; }
.category-card:hover { border-color: var(--color-primary); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12); }
.search-tab-active { border-radius: 6px 6px 0 0; background: var(--color-primary); color: #fff; }

/* Listings Page */
.listings-search-bar { border-radius: var(--rounded-lg); border: 1px solid var(--color-neutral-200); box-shadow: 0 2px 8px rgba(0,0,0,0.06); padding: 12px; }
.filter-modal-overlay { backdrop-filter: blur(4px); transition: opacity 0.2s ease; }
.filter-section-heading { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-neutral-400); }
.filter-chip { border-radius: var(--rounded-full); padding: 4px 12px; transition: all 0.2s ease; }
.filter-chip.active { background: var(--color-primary); color: #fff; }
.salary-slider-thumb { width: 16px; height: 16px; background: var(--color-primary); border: 2px solid #ffffff; box-shadow: 0 2px 4px rgba(0,0,0,0.2); border-radius: var(--rounded-full); }
.pagination-btn { width: 36px; height: 36px; border-radius: var(--rounded-md); }
.pagination-btn.active { background: var(--color-primary); color: #fff; }

/* Range Slider */
.range-slider { position: relative; width: 100%; height: 5px; margin-top: 10px; margin-bottom: 30px; }
.range-slider input[type="range"] { position: absolute; left: 0; bottom: 0; width: 100%; -webkit-appearance: none; pointer-events: none; background: none; z-index: 20; }
.range-slider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: all; width: 18px; height: 18px; border-radius: 50%; background: var(--color-primary); cursor: pointer; border: 2px solid white; box-shadow: 0 2px 6px rgba(0,0,0,0.2); margin-top: -7px; }
.slider-range { position: absolute; top: 0; bottom: 0; height: 5px; background: var(--color-primary); border-radius: 5px; z-index: 15; }

/* Job Detail */
.job-detail-logo { width: 72px; height: 72px; border-radius: var(--rounded-lg); }
.job-detail-apply-btn { height: 48px; background: var(--color-primary); border-radius: 10px; font-weight: 700; font-size: 15px; }
.job-detail-sidebar-card { border-radius: var(--rounded-lg); padding: 20px; border: 1px solid var(--color-neutral-200); background: #ffffff; }
.job-detail-urgent-badge { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; border-radius: var(--rounded-full); font-size: 11px; padding: 3px 10px; font-weight: 600; }
@media (max-width: 639px) { .job-detail-apply-btn { position: fixed; bottom: 0; left: 0; right: 0; width: 100%; border-radius: 0; } }

/* Job Card */
.job-card { background: #ffffff; border: 1px solid var(--color-neutral-200); border-radius: var(--rounded-lg); padding: 16px; box-shadow: var(--shadow-sm); transition: all 0.2s ease; }
.job-card:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.10); border-color: #bfdbfe; }
.job-card-logo { border-radius: 10px; border: 1px solid var(--color-neutral-100); background: var(--color-neutral-50); }
.job-card-title { font-size: 15px; font-weight: 600; color: var(--color-neutral-950); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.job-card-meta { font-size: 12px; color: var(--color-neutral-500); gap: 12px; }
.job-card-badge { font-size: 11px; font-weight: 500; border-radius: 4px; padding: 2px 8px; }
.job-card-featured { border-left: 3px solid var(--color-warning); }
.job-card-featured-label { background: var(--color-warning); color: #fff; font-size: 9px; font-weight: 700; border-radius: 0 0 0 6px; }
.job-card-bookmark { width: 32px; height: 32px; border-radius: 50%; }
@media (max-width: 639px) { .job-card-logo { width: 44px; height: 44px; } .job-card .job-description { font-size: 12px; } }

/* Auth */
.auth-card { max-width: 440px; border-radius: 16px; border: 1px solid var(--color-neutral-200); box-shadow: 0 4px 24px rgba(0,0,0,0.08); padding: 40px 32px; }
.auth-label { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.auth-input { height: 44px; border-radius: var(--rounded-md); padding: 0 14px; font-size: 14px; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.auth-input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); outline: none; }
.auth-input.error { border-color: #dc2626; }
.auth-error-msg { font-size: 12px; color: #dc2626; margin-top: 4px; }
.auth-submit-btn { width: 100%; height: 44px; border-radius: var(--rounded-md); font-weight: 600; font-size: 15px; border: none; transition: all 0.2s ease; }
.auth-social-btn { height: 44px; border-radius: var(--rounded-md); }
.auth-role-card:has(input:checked) .auth-role-card-inner { border-color: var(--color-primary); background-color: var(--color-primary-light); }
.auth-role-card:has(input:checked) .auth-role-check-indicator { display: flex; }
.auth-role-check-indicator { display: none; }
.auth-role-card-inner { min-height: 120px; }

/* Apply Page */
.apply-file-zone { border: 2px dashed #d1d5db; border-radius: var(--rounded-lg); padding: 32px; background: var(--color-neutral-50); text-align: center; cursor: pointer; transition: border-color 0.2s ease; }
.apply-file-zone:hover { border-color: var(--color-primary); }
.apply-submit-btn { width: 100%; height: 48px; background: var(--color-primary); border-radius: 10px; font-weight: 700; color: #ffffff; border: none; }

/* Dashboard */
.dashboard-sidebar { background: var(--color-neutral-950); width: 240px; }
.dashboard-nav-item { color: var(--color-neutral-400); border-radius: var(--rounded-md); transition: all 0.15s ease; }
.dashboard-nav-item:hover { color: #ffffff; background: rgba(255,255,255,0.06); }
.dashboard-nav-item.active { background: var(--color-primary); color: #ffffff; }
.dashboard-stat-card { border-radius: var(--rounded-lg); padding: 20px; border: none; background: #ffffff; box-shadow: var(--shadow-sm); }
.dashboard-stat-icon { width: 40px; height: 40px; border-radius: var(--rounded-md); }
.dashboard-table-container { border-radius: var(--rounded-lg); overflow: hidden; }
.dashboard-table tr { height: 48px; }
.dashboard-table tr:nth-child(even) { background-color: var(--color-neutral-50); }
.status-badge { border-radius: var(--rounded-full); font-size: 11px; font-weight: 600; padding: 3px 10px; display: inline-flex; align-items: center; gap: 4px; }

/* Profile */
.profile-section-card { border-radius: var(--rounded-lg); border: 1px solid var(--color-neutral-100); padding: 24px; background: #ffffff; box-shadow: none; }
.profile-section-heading { border-left: 4px solid var(--color-primary); padding-left: 12px; }
.profile-avatar-wrapper { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; position: relative; }
.profile-avatar-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s ease; }
.profile-avatar-wrapper:hover .profile-avatar-overlay { opacity: 1; }
.skill-chip { border-radius: var(--rounded-full); background: var(--color-primary-light); color: var(--color-primary); font-size: 12px; padding: 4px 12px; display: inline-flex; align-items: center; gap: 6px; }
.profile-progress-bar { height: 8px; border-radius: var(--rounded-full); background: var(--color-primary-light); overflow: hidden; }
.profile-progress-fill { height: 100%; background: var(--color-primary); border-radius: var(--rounded-full); }
@media (max-width: 639px) { .profile-save-btn { position: fixed; bottom: 0; left: 0; right: 0; height: 56px; width: 100%; border-radius: 0; } }

/* Pricing */
.pricing-card { border-radius: 16px; border: 1px solid var(--color-neutral-200); padding: 40px 32px; background: #ffffff; display: flex; flex-direction: column; }
.pricing-card-recommended { border: 2px solid var(--color-primary); box-shadow: 0 8px 24px rgba(37, 99, 235, 0.18); }
.pricing-popular-badge { background: var(--color-primary); color: #fff; font-size: 10px; font-weight: 700; border-radius: var(--rounded-full); padding: 3px 12px; }
.pricing-cta-btn { width: 100%; height: 48px; border-radius: 10px; font-weight: 600; }

/* Admin Panel */
.admin-sidebar { background: #1e293b; }
.admin-nav-item { color: var(--color-neutral-400); transition: all 0.15s ease; }
.admin-nav-item.active { background: rgba(37, 99, 235, 0.2); border-left: 3px solid var(--color-primary); color: #ffffff; }
.admin-stat-widget { border-radius: var(--rounded-lg); padding: 20px; border: 1px solid var(--color-neutral-200); background: #ffffff; }
.admin-table th { background: var(--color-neutral-50); position: sticky; top: 0; z-index: 10; }
.admin-table td, .admin-table th { font-size: 13px; line-height: 1.5; }
.admin-table tr { height: 48px; border-bottom: 1px solid var(--color-neutral-100); }
.admin-action-btn { height: 28px; padding: 0 10px; font-size: 11px; font-weight: 600; border-radius: var(--rounded); display: inline-flex; align-items: center; }
.admin-filter-control { height: 36px; border-radius: var(--rounded-md); }

/* Company Profile */
.company-banner-preview { width: 200px; height: 80px; border-radius: var(--rounded-md); overflow: hidden; border: 1px solid var(--color-neutral-200); }
.company-logo-preview { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; border: 2px solid var(--color-neutral-200); }
.social-input-wrapper { position: relative; }
.social-input-wrapper .input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--color-neutral-400); width: 16px; }
.social-input-wrapper input { padding-left: 40px; border-radius: var(--rounded-md); }

/* Job Wizard */
.job-wizard-step { border-radius: var(--rounded-full); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font-weight: 600; transition: all 0.2s ease; }
.job-wizard-step.completed { background: var(--color-success); color: #ffffff; }
.job-wizard-step.active { background: var(--color-primary); color: #ffffff; }
.job-wizard-step.upcoming { background: var(--color-neutral-200); color: var(--color-neutral-400); }
.job-wizard-nav-btn { height: 44px; padding: 0 24px; border-radius: var(--rounded-md); font-weight: 600; }
@media (max-width: 639px) { .job-wizard-nav-btn { position: fixed; bottom: 0; left: 0; right: 0; width: 100%; border-radius: 0; } }

/* === UTILITIES === */
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
@media (max-width: 639px) { button, a, input, select, textarea { min-height: 44px; } }
.container, .max-w-screen-xl, .max-w-7xl { max-width: 100%; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: var(--color-neutral-100); }
.custom-scrollbar::-webkit-scrollbar-thumb { background: var(--color-neutral-300); border-radius: var(--rounded-full); }
@media (max-width: 639px) { .grid-auto-cols { grid-template-columns: 1fr; gap: 12px; } }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* === DARK MODE OVERRIDES === */
.dark {
  --color-neutral-50:  #0f172a;
  --color-neutral-100: #1e293b;
  --color-neutral-200: #334155;
  --color-neutral-300: #475569;
  --color-neutral-400: #64748b;
  --color-neutral-500: #94a3b8;
  --color-neutral-600: #cbd5e1;
  --color-neutral-700: #e2e8f0;
  --color-neutral-800: #f1f5f9;
  --color-neutral-900: #f8fafc;
  --color-neutral-950: #ffffff;
  --color-surface: #1e293b;
  --color-primary-light: rgba(37, 99, 235, 0.15);
}

.dark body {
  background-color: #0F172A; /* main background deep slate */
  color: var(--color-neutral-800);
}

.dark h1, .dark h2, .dark h3, .dark h4 {
  color: var(--color-neutral-950);
}

.dark .job-card,
.dark .dashboard-stat-card,
.dark .profile-section-card,
.dark .job-detail-sidebar-card,
.dark .auth-card {
  background-color: #1E293B; /* cards/surfaces */
  border-color: #334155; /* soften borders */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  color: var(--color-neutral-800);
}

.dark .job-card-title {
  color: var(--color-neutral-950);
}

.dark .job-card-meta {
  color: var(--color-neutral-600);
}

.dark .auth-input,
.dark input,
.dark textarea,
.dark select {
  background-color: #0F172A;
  border-color: #334155;
  color: var(--color-neutral-800);
}

.dark input::placeholder,
.dark textarea::placeholder {
  color: var(--color-neutral-500);
}

.dark .footer {
  background-color: #020617;
}

.dark .header-search-input:focus,
.dark .auth-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.dark .slider::before, .dark .slider::after {
  background: linear-gradient(to right, #0F172A 0%, rgba(15,23,42,0) 100%);
}

/* === BUTTON PRIMARY === */
.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: 600;
  border: none;
  border-radius: var(--rounded-md);
  padding: 0 20px;
  height: 44px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.btn-primary:hover { background-color: var(--color-primary-dark); }
.btn-primary:active { transform: scale(0.98); }

@media (prefers-reduced-motion: reduce) {
  .btn-primary {
    transition: none;
    transform: none;
  }
  .btn-primary:active { transform: none; }
}

/* === JOB CARD — TYPE ACCENT BORDERS === */
.job-card[data-type="full-time"]   { border-left: 3px solid var(--color-primary); }
.job-card[data-type="part-time"]   { border-left: 3px solid var(--color-warning); }
.job-card[data-type="freelance"]   { border-left: 3px solid var(--color-success); }
.job-card[data-type="internship"]  { border-left: 3px solid #7c3aed; }

/* === ORG TYPE BADGE === */
.org-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--rounded-full);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  border: 1px solid var(--color-primary-mid);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}