@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple: #50248F;
  --teal: #199A73;
  --purple-light: #6B3AAD;
  --purple-dark: #3D1A70;
  --teal-light: #22B98A;
  --bg: #F7F5FB;
  --bg-alt: #EDE9F5;
  --card: #fff;
  --text: #1A1A2E;
  --text-secondary: #374151;
  --muted: #6B7280;
  --border: #E5E7EB;
  --error: #DC2626;
  --success: #16A34A;
  --warning: #D97706;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 4px rgba(80,36,143,0.06);
  --shadow-md: 0 2px 12px rgba(80,36,143,0.08);
  --shadow-lg: 0 4px 24px rgba(80,36,143,0.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1 { font-size: 28px; font-weight: 700; line-height: 1.2; }
h2 { font-size: 22px; font-weight: 700; line-height: 1.3; }
h3 { font-size: 18px; font-weight: 600; }
h4 { font-size: 16px; font-weight: 600; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--muted); }
.text-purple { color: var(--purple); }
.text-teal { color: var(--teal); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* ── Nav ── */
.portal-nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img {
  height: 32px;
  width: auto;
  object-fit: contain;
}
.ob-logo img {
}
.nav-logo-fallback {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--purple), var(--teal));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: 700; flex-shrink: 0;
}
.logo-text { font-size: 20px; font-weight: 700; color: var(--purple); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  font-size: 14px; font-weight: 500; color: var(--muted);
  text-decoration: none; padding: 7px 14px; border-radius: var(--radius-sm);
  transition: all 0.2s; white-space: nowrap;
}
.nav-link:hover { background: var(--bg); color: var(--purple); }
.nav-link.active { color: var(--purple); font-weight: 600; }
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-email {
  font-size: 13px; color: var(--muted);
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-bell {
  position: relative;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  text-decoration: none; color: var(--muted);
  transition: all 0.2s;
  border: none; background: none; cursor: pointer; padding: 0; flex-shrink: 0;
}
.nav-bell:hover { background: var(--bg); color: var(--purple); }
.nav-bell svg { width: 20px; height: 20px; pointer-events: none; }
.nav-bell-badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 16px; height: 16px;
  background: var(--error);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--card);
}
.nav-btn-logout {
  font-size: 13px; font-weight: 500; color: var(--muted);
  text-decoration: none; padding: 7px 14px; border-radius: var(--radius-sm);
  transition: all 0.2s; cursor: pointer; border: none; background: none;
  font-family: inherit;
}
.nav-btn-logout:hover { background: #FEF2F2; color: var(--error); }

/* ── Main layout ── */
.portal-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}
.portal-main-wide { max-width: 1100px; }
.portal-main-narrow { max-width: 680px; }

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 20px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--purple); }

/* ── Cards ── */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(80,36,143,0.06);
  animation: fadeInUp 0.25s ease both;
}
.card-sm { padding: 16px; border-radius: var(--radius-md); }
.card-lg { padding: 32px; }

/* ── Gradient hero card ── */
.hero-card {
  background: linear-gradient(135deg, var(--purple) 0%, #3A1E7A 50%, var(--teal) 100%);
  border-radius: var(--radius-xl);
  padding: 28px 28px 24px;
  color: #fff;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.3s ease both;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,0.07);
  border-radius: 50%;
}
.hero-card::after {
  content: '';
  position: absolute;
  bottom: -30px; left: 40px;
  width: 100px; height: 100px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

/* ── Stat cards ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  animation: fadeInUp 0.25s ease both;
}
.stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}
.stat-icon-purple { background: rgba(80,36,143,0.1); }
.stat-icon-teal { background: rgba(25,154,115,0.1); }
.stat-icon-amber { background: rgba(217,119,6,0.1); }
.stat-label { font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.4px; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--text); }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── Section header ── */
.section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-hdr h4 { font-size: 15px; font-weight: 600; color: var(--text); }
.see-all {
  font-size: 13px; color: var(--purple);
  text-decoration: none; font-weight: 500;
}
.see-all:hover { text-decoration: underline; }

/* ── Shift cards ── */
.shifts-grid { display: grid; gap: 14px; }
.shift-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
  animation: fadeInUp 0.2s ease both;
}
.shift-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: rgba(80,36,143,0.15);
}
.shift-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.shift-title { font-size: 15px; font-weight: 600; }
.shift-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.shift-meta span { display: flex; align-items: center; gap: 4px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--purple-light); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover:not(:disabled) { background: var(--teal-light); }
.btn-secondary { background: var(--bg); color: var(--text); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-alt); }
.btn-ghost { background: transparent; color: var(--purple); border: 1.5px solid var(--purple); }
.btn-ghost:hover:not(:disabled) { background: rgba(80,36,143,0.06); }
.btn-danger { background: #FEF2F2; color: var(--error); border: 1px solid #FECACA; }
.btn-danger:hover:not(:disabled) { background: #FEE2E2; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-full { width: 100%; }

/* ── Forms ── */
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
label .req { color: var(--error); margin-left: 2px; }
input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(80,36,143,0.08);
}
input::placeholder, textarea::placeholder { color: #9CA3AF; }
input:disabled, select:disabled { background: var(--bg); color: var(--muted); cursor: not-allowed; }
textarea { resize: vertical; min-height: 90px; }
.field-error { font-size: 12px; color: var(--error); margin-top: 5px; }

/* ── Toggles ── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--bg-alt);
}
.toggle-row:last-of-type { border-bottom: none; }
.toggle-label { font-size: 14px; font-weight: 500; }
.toggle-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { display: none; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--border); border-radius: var(--radius-full);
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--teal); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Status chips ── */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.chip-available { background: rgba(25,154,115,0.12); color: #0E7A5A; }
.chip-booked { background: rgba(25,154,115,0.12); color: #0E7A5A; }
.chip-confirmed { background: rgba(25,154,115,0.12); color: #0E7A5A; }
.chip-in_progress { background: rgba(80,36,143,0.12); color: var(--purple); }
.chip-completed { background: #F3F4F6; color: #374151; }
.chip-cancelled { background: #FEF2F2; color: #991B1B; }
.chip-pending_confirmation { background: #FEF9C3; color: #92400E; }
.chip-no_show { background: #FEF2F2; color: #991B1B; }
.chip-pending { background: #FEF9C3; color: #92400E; }
.chip-approved { background: rgba(25,154,115,0.12); color: #0E7A5A; }
.chip-rejected { background: #FEF2F2; color: #991B1B; }
.chip-request-type { background: #199A73; color: #fff; border: none; }
.chip-open-visible { background: rgba(25,154,115,0.12); color: #0E7A5A; }
.chip-selective { background: rgba(245,158,11,0.12); color: #B45309; border: 1px solid rgba(245,158,11,0.25); }
.chip-payment-pending { background: #FEF9C3; color: #92400E; }

/* ── Tier badges ── */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.tier-elite { background: rgba(25,154,115,0.15); color: #0E7A5A; border: 1px solid rgba(25,154,115,0.25); }
.tier-reliable { background: rgba(80,36,143,0.12); color: var(--purple); border: 1px solid rgba(80,36,143,0.2); }
.tier-standard { background: #FEF9C3; color: #92400E; border: 1px solid #FDE68A; }
.tier-emerging { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

/* ── Reliability bar ── */
.reliability-bar { height: 5px; background: var(--border); border-radius: var(--radius-full); overflow: hidden; margin: 6px 0; }
.reliability-fill { height: 100%; border-radius: var(--radius-full); transition: width 0.4s ease; }
.fill-elite { background: var(--teal); }
.fill-reliable { background: var(--purple); }
.fill-standard { background: var(--warning); }
.fill-emerging { background: var(--error); }

/* ── Worker card ── */
.worker-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--teal));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 700;
  flex-shrink: 0;
}

/* ── Skeleton loaders ── */
@keyframes shimmer {
  0% { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #E5E7EB 25%, #F3F4F6 50%, #E5E7EB 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text-sm { height: 11px; margin-bottom: 6px; }
.skeleton-title { height: 20px; width: 60%; margin-bottom: 12px; }
.skeleton-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

/* ── Alerts ── */
.alert {
  display: none;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid;
}
.alert.show { display: flex; align-items: flex-start; gap: 8px; }
.alert-error { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.alert-success { background: #F0FDF4; border-color: #BBF7D0; color: #166534; }
.alert-info { background: #EFF6FF; border-color: #BFDBFE; color: #1D4ED8; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
}
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 16px; opacity: 0.4; }
.empty-state .empty-title { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state .empty-sub { font-size: 14px; }

/* ── Spinner ── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  border: 3px solid var(--border);
  border-top-color: var(--purple);
  border-radius: 50%;
  width: 32px; height: 32px;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}
.spinner-sm {
  border-width: 2px;
  width: 18px; height: 18px;
  margin: 0;
}
.spinner-inline { display: inline-block; vertical-align: middle; }
.btn-spinner {
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  width: 16px; height: 16px;
  animation: spin 0.7s linear infinite;
  display: none;
}

/* ── Tabs ── */
.tab-bar {
  display: flex;
  gap: 4px;
  background: var(--card);
  padding: 4px;
  border-radius: var(--radius-md);
  width: fit-content;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.tab-btn {
  padding: 8px 18px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s;
  font-family: inherit;
}
.tab-btn.active { background: var(--purple); color: #fff; }

/* ── Section card ── */
.section-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(80,36,143,0.06);
  overflow: hidden;
  animation: fadeInUp 0.25s ease both;
}
.section-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-card-title { font-size: 15px; font-weight: 600; }
.section-count {
  font-size: 12px; color: var(--muted);
  background: var(--bg);
  padding: 2px 10px; border-radius: var(--radius-full);
}
.list-item {
  padding: 16px 24px;
  border-bottom: 1px solid var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background 0.15s;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: #FAFAFA; }

/* ── Modals ── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { transform: translateY(12px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.modal-actions { display: flex; gap: 10px; margin-top: 24px; }

/* ── Step indicator ── */
.step-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}
.step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  transition: all 0.3s;
  border: 2px solid var(--border);
  color: var(--muted);
  background: var(--card);
  flex-shrink: 0;
}
.step-dot.active { background: var(--purple); color: #fff; border-color: var(--purple); }
.step-dot.done { background: var(--teal); color: #fff; border-color: var(--teal); }
.step-line { flex: 1; height: 2px; background: var(--border); transition: background 0.3s; }
.step-line.done { background: var(--teal); }
.step-labels { display: flex; margin-bottom: 8px; }
.step-label {
  flex: 1;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  text-align: center;
}
.step-label.active { color: var(--purple); font-weight: 600; }
.step-label.done { color: var(--teal); }

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.animate-in { animation: fadeInUp 0.25s ease both; }

/* ── Hamburger button (mobile only) ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
  flex-shrink: 0;
}
.nav-hamburger:hover { background: var(--bg); }
.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav drawer ── */
.nav-mobile-drawer {
  display: none;
  position: fixed;
  top: 72px; left: 0; right: 0;
  background: var(--card);
  border-bottom: 2px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 99;
  padding: 6px 0 10px;
}
.nav-mobile-drawer.open {
  display: block;
  animation: drawerIn 0.18s ease;
}
.nav-mobile-drawer.closing {
  display: block;
  animation: drawerOut 0.18s ease forwards;
}
@keyframes drawerIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
@keyframes drawerOut {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(-6px); }
}
.nav-drawer-link {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  font-size: 15px; font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
  border-left: 4px solid transparent;
}
.nav-drawer-link:hover { background: var(--bg); }
.nav-drawer-link.active {
  color: var(--purple);
  font-weight: 600;
  background: rgba(80,36,143,0.04);
  border-left-color: var(--purple);
}
.nav-drawer-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 20px;
}
.nav-drawer-signout {
  display: block;
  width: 100%;
  padding: 14px 20px;
  font-size: 15px; font-weight: 500;
  color: var(--error);
  background: none; border: none;
  text-align: left; cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  border-left: 4px solid transparent;
}
.nav-drawer-signout:hover { background: #FEF2F2; }

/* Safe area for bottom tab bar */
body { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0)); }

/* ── Bottom tab bar ── */
.bottom-tab-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(80,36,143,0.08);
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  transition: color 0.2s;
  padding: 6px 4px;
  position: relative;
}
.tab-item svg {
  width: 22px; height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.2s;
}
.tab-item.active { color: var(--purple); }
.tab-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 25%; right: 25%;
  height: 3px;
  background: var(--purple);
  border-radius: 0 0 4px 4px;
}
.tab-item:hover { color: var(--purple-light); }
.tab-icon-wrap {
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.tab-badge {
  position: absolute;
  top: -6px; right: -8px;
  min-width: 16px; height: 16px;
  background: var(--error);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--card);
}

/* ── Notification dropdown panel ── */
.nav-notif-panel {
  position: absolute;
  z-index: 9999;
  width: 340px;
  max-height: 480px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeInDown 0.18s ease both;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.notif-panel-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notif-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.notif-clear-all-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--purple);
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  transition: opacity 0.15s;
}
.notif-clear-all-btn:hover { opacity: 0.7; }
.notif-clear-all-btn:disabled { opacity: 0.4; cursor: default; }
.notif-panel-list {
  overflow-y: auto;
  flex: 1;
}
.notif-panel-loading,
.notif-panel-empty {
  padding: 32px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.notif-item-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
}
.notif-item-wrap:last-child { border-bottom: none; }
.notif-item {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 8px 12px 16px;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border-bottom: none;
}
.notif-item:hover { background: var(--bg); }
.notif-item-unread { background: rgba(80,36,143,0.04); }
.notif-dismiss-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  padding: 0;
}
.notif-item-wrap:hover .notif-dismiss-btn { opacity: 1; }
.notif-dismiss-btn:hover { color: var(--text); }
.notif-dot {
  flex-shrink: 0;
  width: 8px; height: 8px;
  margin-top: 5px;
  border-radius: var(--radius-full);
  background: var(--purple);
}
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-item-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-item-time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
@media (max-width: 480px) {
  .nav-notif-panel { width: calc(100vw - 24px); right: 12px !important; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .portal-nav { padding: 0 16px; }
  .nav-email { display: none; }
  .nav-links { display: none; }
  .nav-btn-logout { display: none; }
  .nav-hamburger { display: flex; }
  .portal-main { padding: 20px 16px 60px; }
  .stats-row { grid-template-columns: 1fr; gap: 12px; }
  .field-row { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
  .hero-card { padding: 20px 18px 18px; border-radius: var(--radius-lg); }
  .section-card-header { padding: 14px 16px; }
  .list-item { padding: 14px 16px; }
  .card { padding: 18px; }
  .stat-value { font-size: 22px; }
}
@media (max-width: 480px) {
  .tab-bar { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tab-btn { flex: 1; text-align: center; white-space: nowrap; }
  .modal-card { padding: 22px 18px; border-radius: var(--radius-lg); max-width: 100%; }
  .modal-overlay { padding: 12px; }
  h1 { font-size: 20px; }
  h2 { font-size: 18px; }

  /* Layout */
  .portal-main { padding: 14px 14px 80px; }

  /* Cards & sections */
  .card { padding: 16px; }
  .card-lg { padding: 20px; }
  .hero-card { padding: 18px 16px 16px; }
  .section-card-header { padding: 12px 14px; }
  .list-item { padding: 12px 14px; gap: 8px; }

  /* Stats */
  .stat-value { font-size: 20px; }
  .stats-row { gap: 10px; }

  /* Shift meta */
  .shift-meta { gap: 8px; font-size: 13px; }
  .shift-card { padding: 14px 16px; }

  /* Page header */
  .page-header { margin-bottom: 18px; gap: 8px; }
  .page-header h1 { font-size: 20px; }

  /* Buttons */
  .btn-lg { padding: 12px 20px; font-size: 14px; }

  /* Section card header actions: stack vertically if needed */
  .section-card-header { flex-wrap: wrap; }

  /* Step bar: shrink dots on very small screens */
  .step-dot { width: 26px; height: 26px; font-size: 11px; }

  /* Prevent long text from causing horizontal scroll */
  .shift-title, .section-card-title, .list-item, .stat-label, .stat-sub { overflow-wrap: break-word; word-break: break-word; }
  .shift-card-header, .worker-card-body { min-width: 0; }
}

/* ── Site nav (auth & onboarding pages) ── */
.site-nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid #E5E7EB;
}
.site-nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 68px; display: flex; align-items: center; gap: 24px;
}
.site-nav-logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.site-nav-logo img { height: 44px; width: auto; max-width: 220px; object-fit: contain; }
.site-nav-links { display: flex; align-items: center; gap: 2px; flex: 1; }
.site-nav-link {
  font-size: 14px; font-weight: 500; color: #6B7280;
  padding: 7px 13px; border-radius: 8px; transition: all .18s;
  white-space: nowrap; text-decoration: none;
}
.site-nav-link:hover { color: #50248F; background: #F7F5FB; }
.site-nav-link-bold { font-weight: 700; color: #374151; }
.site-nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.site-nav-btn {
  font-size: 15px; font-weight: 700; color: #fff;
  background: #50248F; padding: 10px 22px; border-radius: 8px;
  border: none; transition: background .18s; white-space: nowrap;
  box-shadow: 0 2px 12px rgba(80,36,143,.28); text-decoration: none; cursor: pointer;
}
.site-nav-btn:hover { background: #6B3AAD; }
@media (max-width: 767px) {
  .site-nav-links { display: none; }
  .site-nav-logo img { height: 36px; max-width: 180px; }
  .site-nav-btn { padding: 8px 14px; font-size: 13px; }
}
@media (max-width: 380px) {
  .site-nav-logo img { height: 32px; max-width: 160px; }
  .site-nav-btn { padding: 7px 10px; font-size: 12px; }
}

/* ── Onboarding pages — mobile responsive ── */
@media (max-width: 600px) {
  /* Title & subtitle */
  .ob-title { font-size: 26px !important; letter-spacing: -0.3px !important; line-height: 1.2 !important; }
  .ob-sub   { font-size: 14px !important; margin-bottom: 20px !important; }
  /* Logo */
  .ob-logo     { margin-bottom: 20px !important; }
  .ob-logo img { height: 36px !important; }
  /* Step label */
  .ob-step-label { margin-bottom: 20px !important; }
  /* Card */
  .ob-card { padding: 24px 20px !important; }
  /* Avatar */
  .ob-avatar-circle { width: 60px !important; height: 60px !important; font-size: 22px !important; }
}

@media (max-width: 400px) {
  /* Title & subtitle */
  .ob-title { font-size: 22px !important; letter-spacing: -0.2px !important; }
  .ob-sub   { font-size: 13px !important; margin-bottom: 16px !important; }
  /* Logo */
  .ob-logo     { margin-bottom: 14px !important; }
  .ob-logo img { height: 32px !important; }
  /* Step label */
  .ob-step-label { margin-bottom: 14px !important; }
  /* Card */
  .ob-card { padding: 18px 14px !important; border-radius: 14px !important; }
  /* Progress dots — no change needed, they're small already */
  /* Button */
  .ob-btn { padding: 15px !important; font-size: 15px !important; }
}

/* ── Onboarding split-screen (desktop ≥900px) ── */
@media (min-width: 900px) {
  .ob-has-split {
    flex-direction: column !important;
    align-items: center !important;
    padding: 40px 24px 80px !important;
    min-height: 100vh !important;
  }
  .ob-panel-right {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .ob-panel-right .ob-wrap { max-width: 520px; width: 100%; }
}
.ob-panel-left { display: none; }
