:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --surface: #ffffff;
  --bg: #f1f5f9;
  --text: #0f172a;
  --text-secondary: #475569;
  --muted: #94a3b8;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 16px rgba(15,23,42,0.07), 0 1px 4px rgba(15,23,42,0.04);
  --shadow-lg: 0 20px 48px rgba(15,23,42,0.10), 0 4px 12px rgba(15,23,42,0.05);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }

/* ─── Layout ─── */
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.page-wrapper { min-height: 100vh; display: flex; flex-direction: column; }

/* ─── Typography ─── */
.display-4 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.15; }
.display-5 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 800; line-height: 1.2; }
.display-6 { font-size: 1.5rem; font-weight: 700; }
.h3 { font-size: 1.3rem; font-weight: 700; }
.h4 { font-size: 1.15rem; font-weight: 700; }
.h5 { font-size: 1rem; font-weight: 600; }
.text-muted { color: var(--text-secondary); }
.text-faint { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.small { font-size: 0.875rem; }
.xs { font-size: 0.78rem; }

/* ─── Spacing ─── */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 40px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.p-3 { padding: 16px; }
.p-4 { padding: 24px; }

/* ─── Flex / Grid utilities ─── */
.d-flex { display: flex; }
.d-grid { display: grid; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.gap-4 { gap: 24px; }
.w-100 { width: 100%; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  padding: 11px 22px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37,99,235,0.32);
}
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 6px 20px rgba(37,99,235,0.38); }
.btn-secondary { background: var(--primary-light); color: var(--primary-dark); }
.btn-secondary:hover { background: #dbeafe; }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-outline-primary { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline-primary:hover { background: var(--primary-light); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--border); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 7px 16px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-icon { padding: 10px; border-radius: 50%; }

/* ─── Tags / Badges ─── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.tag-success { background: #d1fae5; color: #065f46; }
.tag-warning { background: #fef3c7; color: #92400e; }
.tag-danger { background: #fee2e2; color: #991b1b; }
.tag-muted { background: #f1f5f9; color: #475569; }

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.card-sm { border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}
.section-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

/* ─── Topbar (shared nav for inner pages) ─── */
.topbar {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--primary-dark);
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(37,99,235,0.30);
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav-links a {
  padding: 7px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--primary); background: var(--primary-light); }
.nav-links a.active { color: var(--primary); background: var(--primary-light); }

/* ─── Mobile menu ─── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0 16px;
  border-top: 1px solid var(--border);
  width: 100%;
}
.mobile-menu a {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.mobile-menu a:hover { background: var(--primary-light); color: var(--primary); }
.mobile-menu.open { display: flex; }

/* ─── Auth pages ─── */
.auth-bg {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-panel {
  display: grid;
  place-items: center;
  padding: 40px 32px;
}
.auth-side {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #3b82f6 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 56px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.auth-side::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}
.auth-side::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.auth-card {
  width: min(460px, 100%);
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 8px;
  font-size: 1.1rem;
}
.input-group {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}
.input-group label { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.input-group input,
.input-group select,
.input-group textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-note { font-size: 0.9rem; color: var(--muted); }
.form-error { font-size: 0.9rem; color: var(--danger); margin-top: 10px; }

/* ─── Dashboard layout ─── */
.dash-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 70px);
}
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.sidebar-link:hover { background: var(--bg); color: var(--text); }
.sidebar-link.active {
  background: var(--primary-light);
  color: var(--primary);
}
.sidebar-link .icon { font-size: 1.1rem; width: 20px; text-align: center; }
.sidebar-section { padding: 8px 14px 4px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 12px; }
.main-content { padding: 28px 32px; overflow-y: auto; }

/* ─── Stat cards ─── */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-card { padding: 22px 24px; border-radius: var(--radius-lg); color: #fff; position: relative; overflow: hidden; }
.stat-card::after { content: ''; position: absolute; top: -20px; right: -20px; width: 100px; height: 100px; border-radius: 50%; background: rgba(255,255,255,0.1); }
.stat-card.success { background: linear-gradient(135deg, #059669, #10b981); }
.stat-card.info { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.stat-card.primary { background: linear-gradient(135deg, var(--primary), #3b82f6); }
.stat-card.warning { background: linear-gradient(135deg, #d97706, #f59e0b); }
.stat-num { font-size: 2rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: 0.85rem; opacity: 0.88; margin-top: 4px; }
.stat-sub { font-size: 0.78rem; opacity: 0.75; margin-top: 10px; }

/* ─── Job cards ─── */
.job-list { display: grid; gap: 12px; }
.job-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.job-item:hover { border-color: #bfdbfe; box-shadow: 0 4px 20px rgba(37,99,235,0.08); }
.job-item-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.job-item-meta { color: var(--text-secondary); font-size: 0.88rem; margin-top: 4px; }
.job-item-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.job-item-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ─── Forms ─── */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.88rem; color: var(--text); }
.field input,
.field select,
.field textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.10);
}
.field-full { grid-column: 1 / -1; }

/* ─── Metric tiles ─── */
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.metric {
  border-radius: var(--radius);
  padding: 18px 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.metric::after { content: ''; position: absolute; top: -20px; right: -20px; width: 90px; height: 90px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.metric.blue { background: linear-gradient(135deg, var(--primary), #60a5fa); }
.metric.green { background: linear-gradient(135deg, #059669, #34d399); }
.metric.orange { background: linear-gradient(135deg, #d97706, #fbbf24); }
.metric.purple { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.metric-num { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.metric-label { font-size: 0.82rem; opacity: 0.85; margin-top: 4px; }

/* ─── Avatar ─── */
.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 800;
  flex-shrink: 0;
}
.avatar-sm { width: 40px; height: 40px; font-size: 1rem; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #60a5fa); color: #fff; display: grid; place-items: center; font-weight: 800; }

/* ─── Status badges ─── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}
.status-new { background: #dbeafe; color: #1e40af; }
.status-accepted { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-active { background: #d1fae5; color: #065f46; }

/* ─── Messages / list items ─── */
.list-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.list-item:last-child { border-bottom: none; }

/* ─── Toast ─── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
  padding: 14px 18px;
  min-width: 240px;
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  animation: slideUp 0.3s ease;
}
.toast.success { background: #065f46; }
.toast.error { background: #991b1b; }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Footer ─── */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 32px 0; color: var(--text-secondary); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { font-size: 0.9rem; transition: color 0.15s; }
.footer-links a:hover { color: var(--primary); }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .auth-bg { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .metric-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .dash-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { padding: 20px 16px; }
}
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: 1fr; }
  .hamburger { display: flex; }
  .nav-links { display: none; }
  .topbar-actions { display: none; }
}
