/* ═══════════════════════════════════════════════════
   Hostwell Careers — Main Stylesheet
   Font: Syne (headings) + DM Sans (body)
═══════════════════════════════════════════════════ */

/* ── CSS Variables ───────────────────────────────── */
:root {
  --ff-head: 'Syne', sans-serif;
  --ff-body: 'DM Sans', sans-serif;
  --radius: 18px;
  --radius-sm: 10px;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 8px 32px rgba(0,0,0,0.18);
  --shadow-hover: 0 16px 48px rgba(0,0,0,0.28);
}

[data-theme="dark"] {
  --bg: #0a0a0b;
  --bg2: #111114;
  --bg3: #18181c;
  --surface: #1e1e24;
  --surface2: #26262e;
  --border: rgba(255,255,255,0.08);
  --text: #f0f0f2;
  --text2: #9898a8;
  --text3: #5e5e6e;
  --accent: #7c6dfa;
  --accent2: #9d91fb;
  --accent-bg: rgba(124,109,250,0.12);
  --green: #22d4a0;
  --red: #ff5e7a;
  --yellow: #f5c842;
  --card-bg: #16161a;
  --input-bg: #13131a;
}

[data-theme="light"] {
  --bg: #f6f6f8;
  --bg2: #efeff3;
  --bg3: #e8e8ef;
  --surface: #ffffff;
  --surface2: #f2f2f6;
  --border: rgba(0,0,0,0.09);
  --text: #0e0e14;
  --text2: #5a5a6e;
  --text3: #9898aa;
  --accent: #5b4ef0;
  --accent2: #7c6dfa;
  --accent-bg: rgba(91,78,240,0.08);
  --green: #16b887;
  --red: #e8304d;
  --yellow: #d4a810;
  --card-bg: #ffffff;
  --input-bg: #f4f4f8;
}

/* ── Reset ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}
a { color: var(--accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--ff-body); }

/* ── Navbar ──────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  height: 64px;
  background: rgba(10,10,11,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
[data-theme="light"] .navbar {
  background: rgba(246,246,248,0.85);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); font-family: var(--ff-head); font-size: 18px; font-weight: 600;
}
.nav-brand strong { color: var(--accent); }
.brand-icon { font-size: 22px; color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-link {
  padding: 7px 16px; border-radius: 8px;
  color: var(--text2); font-size: 14px; font-weight: 500;
  transition: all var(--transition);
}
.nav-link:hover { background: var(--surface2); color: var(--text); opacity: 1; }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.theme-toggle:hover { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); }

/* ── Flash Messages ──────────────────────────────── */
.flash {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; margin: 16px 24px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; animation: slideDown 0.3s ease;
}
.flash--success { background: rgba(34,212,160,0.12); border: 1px solid rgba(34,212,160,0.3); color: var(--green); }
.flash--error   { background: rgba(255,94,122,0.12); border: 1px solid rgba(255,94,122,0.3); color: var(--red); }
.flash--info    { background: var(--accent-bg); border: 1px solid rgba(124,109,250,0.3); color: var(--accent2); }
.flash-close { background: none; border: none; color: inherit; font-size: 18px; padding: 0 4px; }

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

/* ── Page Wrapper ────────────────────────────────── */
.page { max-width: 1200px; margin: 0 auto; padding: 40px 24px 80px; }
.page-sm { max-width: 520px; margin: 0 auto; padding: 40px 24px 80px; }
.page-md { max-width: 760px; margin: 0 auto; padding: 40px 24px 80px; }

/* ── Typography ──────────────────────────────────── */
.page-title {
  font-family: var(--ff-head); font-size: clamp(26px, 4vw, 36px);
  font-weight: 700; color: var(--text); margin-bottom: 8px; letter-spacing: -0.5px;
}
.page-subtitle { color: var(--text2); font-size: 15px; margin-bottom: 36px; }
.section-title {
  font-family: var(--ff-head); font-size: 18px; font-weight: 700;
  color: var(--text); margin-bottom: 20px; letter-spacing: -0.3px;
}

/* ── Cards ───────────────────────────────────────── */
.card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; transition: all var(--transition);
}
.card:hover { border-color: rgba(124,109,250,0.25); box-shadow: var(--shadow); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 20px; }

/* ── Forms ───────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--text2); margin-bottom: 7px; letter-spacing: 0.3px;
}
.form-label span { color: var(--red); margin-left: 2px; }
.form-control {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--input-bg); border: 1px solid var(--border);
  color: var(--text); font-family: var(--ff-body); font-size: 14px;
  transition: all var(--transition); outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.form-control::placeholder { color: var(--text3); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239898a8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
textarea.form-control { resize: vertical; min-height: 90px; }

.form-hint { font-size: 12px; color: var(--text3); margin-top: 5px; }

/* File Upload */
.file-upload {
  border: 2px dashed var(--border); border-radius: var(--radius-sm);
  padding: 24px; text-align: center; cursor: pointer;
  transition: all var(--transition); position: relative;
}
.file-upload:hover { border-color: var(--accent); background: var(--accent-bg); }
.file-upload input[type="file"] { position: absolute; inset:0; opacity:0; cursor:pointer; }
.file-upload-icon { font-size: 28px; margin-bottom: 8px; }
.file-upload-text { font-size: 13px; color: var(--text2); }
.file-upload-text strong { color: var(--accent); }

/* Checkbox / Radio groups */
.options-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 10px; }
.option-item { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.option-item input { accent-color: var(--accent); width: 16px; height: 16px; }
.option-item span { font-size: 14px; color: var(--text2); }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: var(--radius-sm); border: none;
  font-family: var(--ff-head); font-size: 14px; font-weight: 600; letter-spacing: 0.3px;
  transition: all var(--transition); cursor: pointer;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 16px rgba(124,109,250,0.35);
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(124,109,250,0.45); }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); }
.btn-success { background: var(--green); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ── Badges ──────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.badge-pending  { background: rgba(245,200,66,0.15); color: var(--yellow); }
.badge-approved { background: rgba(34,212,160,0.15); color: var(--green); }
.badge-rejected { background: rgba(255,94,122,0.15); color: var(--red); }

/* ── Tables ──────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { background: var(--surface2); color: var(--text2); font-size: 12px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; padding: 12px 16px; text-align: left; }
td { padding: 13px 16px; border-top: 1px solid var(--border); color: var(--text); vertical-align: middle; }
tr:hover td { background: var(--surface2); }

/* ── Stats ───────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px;
}
.stat-num { font-family: var(--ff-head); font-size: 32px; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 13px; color: var(--text2); margin-top: 4px; }

/* ── Auth Card ───────────────────────────────────── */
.auth-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px;
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo-icon { font-size: 36px; color: var(--accent); display: block; }
.auth-title { font-family: var(--ff-head); font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 6px; }
.auth-sub { text-align: center; font-size: 13px; color: var(--text2); margin-bottom: 28px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text2); }

/* ── Search Bar ──────────────────────────────────── */
.search-bar { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.search-bar .form-control { flex: 1; min-width: 200px; }

/* ── Candidate Card ──────────────────────────────── */
.candidate-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  transition: all var(--transition);
}
.candidate-card:hover { border-color: rgba(124,109,250,0.3); transform: translateY(-2px); box-shadow: var(--shadow); }
.candidate-name { font-family: var(--ff-head); font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.candidate-role { color: var(--accent); font-size: 13px; font-weight: 500; margin-bottom: 12px; }
.candidate-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag { padding: 3px 10px; border-radius: 999px; font-size: 12px; background: var(--surface2); color: var(--text2); }
.candidate-meta { font-size: 13px; color: var(--text2); display: flex; flex-direction: column; gap: 4px; }
.candidate-meta span::before { margin-right: 6px; }

/* ── Dashboard Sidebar ───────────────────────────── */
.dash-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.sidebar {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; position: sticky; top: 80px;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  color: var(--text2); font-size: 14px; font-weight: 500;
  transition: all var(--transition);
}
.sidebar-link:hover, .sidebar-link.active { background: var(--accent-bg); color: var(--accent); opacity: 1; }
.sidebar-icon { font-size: 16px; }
.sidebar-section { font-size: 11px; font-weight: 700; color: var(--text3); letter-spacing: 1px; text-transform: uppercase; padding: 14px 14px 6px; }

/* ── Footer ──────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border); padding: 24px;
  margin-top: auto;
}
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-brand { font-family: var(--ff-head); font-weight: 700; font-size: 15px; color: var(--accent); }
.footer-copy { font-size: 13px; color: var(--text3); }

/* ── Home Page Specific ──────────────────────────── */
.home-hero {
  min-height: calc(100vh - 64px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 24px;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(124,109,250,0.08) 0%, transparent 70%);
}
[data-theme="light"] .hero-bg {
  background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(91,78,240,0.06) 0%, transparent 70%);
}
.hero-content { position: relative; z-index: 1; text-align: center; max-width: 720px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 999px;
  background: var(--accent-bg); border: 1px solid rgba(124,109,250,0.25);
  font-size: 13px; color: var(--accent2); font-weight: 500; margin-bottom: 28px;
}
.hero-title {
  font-family: var(--ff-head); font-size: clamp(36px, 6vw, 62px);
  font-weight: 800; line-height: 1.1; letter-spacing: -1.5px;
  color: var(--text); margin-bottom: 16px;
}
.hero-title .accent { color: var(--accent); }
.hero-subtitle { font-size: 17px; color: var(--text2); margin-bottom: 52px; max-width: 480px; margin-left: auto; margin-right: auto; }

.choice-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  max-width: 640px; margin: 0 auto;
}
.choice-card {
  background: var(--card-bg); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 36px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  cursor: pointer; transition: all 0.32s cubic-bezier(0.4,0,0.2,1);
  text-decoration: none; color: inherit; position: relative; overflow: hidden;
}
.choice-card::before {
  content: ''; position: absolute; inset: 0; border-radius: 20px; opacity: 0;
  background: radial-gradient(circle at 50% 0%, rgba(124,109,250,0.18) 0%, transparent 70%);
  transition: opacity 0.32s;
}
.choice-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 20px 48px rgba(124,109,250,0.2); opacity: 1; }
.choice-card:hover::before { opacity: 1; }
.choice-icon { font-size: 44px; line-height: 1; }
.choice-title { font-family: var(--ff-head); font-size: 20px; font-weight: 700; text-align: center; }
.choice-desc { font-size: 13px; color: var(--text2); text-align: center; line-height: 1.5; }
.choice-arrow {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent-bg);
  border: 1px solid rgba(124,109,250,0.2); display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 16px; transition: all var(--transition);
}
.choice-card:hover .choice-arrow { background: var(--accent); color: #fff; transform: translateX(2px); }

.home-features {
  display: flex; justify-content: center; gap: 32px; flex-wrap: wrap;
  margin-top: 60px; padding-top: 40px; border-top: 1px solid var(--border); max-width: 640px;
}
.feature-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text2); }
.feature-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ── Step divider ────────────────────────────────── */
.form-step-divider {
  display: flex; align-items: center; gap: 14px; margin: 28px 0 24px;
  font-family: var(--ff-head); font-size: 13px; font-weight: 700;
  color: var(--text3); text-transform: uppercase; letter-spacing: 1px;
}
.form-step-divider::before, .form-step-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Admin Specific ──────────────────────────────── */
.admin-topbar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-title { font-family: var(--ff-head); font-size: 15px; font-weight: 700; }
.tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.tab-btn {
  padding: 10px 20px; border: none; background: none; border-bottom: 2px solid transparent;
  color: var(--text2); font-family: var(--ff-head); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all var(--transition); margin-bottom: -1px;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-btn:hover { color: var(--text); }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .navbar { padding: 0 16px; }
  .nav-link { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: 1fr; max-width: 340px; }
  .dash-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page { padding: 24px 16px 60px; }
  .auth-card { padding: 24px 20px; }
}
@media (max-width: 480px) {
  .hero-title { letter-spacing: -1px; }
  .choice-card { padding: 28px 20px; }
}
