/* =============================================================
   DEMAND HUB — styles.css (v3)
   Stripe / Airbnb style · Mobile-first · Inter font
   ============================================================= */

/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
  --primary:        #6C47FF;
  --primary-dark:   #5535E0;
  --primary-light:  #F0ECFF;
  --accent:         #FF6B35;
  --accent-light:   #FFF0EB;
  --success:        #22C55E;
  --success-light:  #DCF7E9;
  --warning:        #F59E0B;
  --warning-light:  #FEF3C7;
  --error:          #EF4444;
  --error-light:    #FEE2E2;

  --bg:             #FFFFFF;
  --surface:        #F8F7FF;
  --surface-gray:   #F5F5F5;
  --border:         #E8E4F0;
  --border-light:   #F0EEF8;

  --text:           #111827;
  --text-secondary: #6B7280;
  --text-muted:     #9CA3AF;

  --radius:         14px;
  --radius-sm:      10px;
  --radius-lg:      20px;
  --radius-pill:    999px;
  --shadow-sm:      0 1px 4px rgba(108,71,255,0.07);
  --shadow-md:      0 4px 20px rgba(108,71,255,0.10);
  --shadow-lg:      0 8px 40px rgba(108,71,255,0.13);
  --max-w:          480px;
  --nav-h:          64px;
  --top-nav-h:      56px;
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #F3F4F8;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── APP SHELL ──────────────────────────────────────────── */
#app {
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}

/* ─── LOADING SCREEN ─────────────────────────────────────── */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 20px;
  background: var(--bg);
}
.loading-logo { font-size: 48px; }
.spinner-lg {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
}

/* ─── PAGE ───────────────────────────────────────────────── */
.page { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ─── TOP NAV ────────────────────────────────────────────── */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: var(--top-nav-h);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}
.nav-action {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: none;
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.nav-action:hover { opacity: 0.8; }
.back-btn {
  background: var(--surface-gray);
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  transition: background 0.15s;
}
.back-btn:hover { background: var(--border); }

/* ─── BOTTOM NAV ─────────────────────────────────────────── */
.bottom-nav {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  background: var(--bg);
  border-top: 1px solid var(--border-light);
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  z-index: 100;
  padding: 0 8px;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  color: var(--text-muted);
}
.nav-item.active { color: var(--primary); }
.nav-item:hover { background: var(--primary-light); color: var(--primary); }
.nav-icon { font-size: 22px; line-height: 1; }
.nav-label { font-size: 10px; font-weight: 600; letter-spacing: 0.2px; }

/* ─── HERO / LANDING ─────────────────────────────────────── */
.hero-section {
  background: linear-gradient(160deg, #F0ECFF 0%, #FFFFFF 60%);
  padding: 52px 24px 36px;
  text-align: center;
}
.home-logo {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #6C47FF, #9B7BFF);
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(108,71,255,0.25);
}
.hero-headline {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 12px;
}
.hero-headline em { font-style: normal; color: var(--primary); }
.hero-subheadline {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 320px;
  margin: 0 auto;
  font-weight: 400;
}

/* Use-case pills row */
.use-case-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 20px 24px 0;
  scrollbar-width: none;
}
.use-case-row::-webkit-scrollbar { display: none; }
.use-case-tag {
  flex-shrink: 0;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ─── AUTH CARD ──────────────────────────────────────────── */
.auth-section {
  padding: 28px 20px 40px;
}
.auth-card {
  background: var(--bg);
  border-radius: 20px;
  padding: 24px;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-md);
}
.auth-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
  text-align: center;
  letter-spacing: -0.2px;
}

/* Google button */
.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  background: var(--bg);
  border: 1.5px solid #E5E7EB;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: all 0.15s;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}
.google-btn:hover {
  border-color: #D1D5DB;
  box-shadow: 0 3px 10px rgba(0,0,0,0.10);
  transform: translateY(-1px);
}
.google-btn:active { transform: none; }
.google-logo { width: 20px; height: 20px; flex-shrink: 0; }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  margin: 16px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Auth tabs */
.auth-tabs {
  display: flex;
  background: var(--surface-gray);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 20px;
  gap: 2px;
}
.auth-tab {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
}
.auth-tab.active {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* ─── ROLE CARDS ─────────────────────────────────────────── */
.role-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.18s;
  background: var(--bg);
  margin-bottom: 12px;
}
.role-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.role-card.buyer { border-color: var(--primary-light); background: var(--primary-light); }
.role-card.buyer:hover { border-color: var(--primary); background: white; }
.role-card.seller:hover { border-color: var(--accent); }
.role-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.role-info { flex: 1; }
.role-name { font-size: 15px; font-weight: 700; letter-spacing: -0.2px; margin-bottom: 3px; }
.role-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.role-arrow { font-size: 20px; color: var(--text-muted); flex-shrink: 0; }

/* ─── HOW IT WORKS ───────────────────────────────────────── */
.how-it-works {
  padding: 36px 24px 48px;
  background: var(--surface);
}
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 20px;
  text-align: center;
}
.steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.step-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
.step-number {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 18px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-content {}
.step-title { font-size: 15px; font-weight: 700; margin-bottom: 3px; letter-spacing: -0.2px; }
.step-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* ─── FORMS ──────────────────────────────────────────────── */
.form-page {
  padding: 20px;
  padding-bottom: calc(var(--nav-h) + 32px);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-secondary);
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,71,255,0.10);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
textarea { min-height: 100px; resize: vertical; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%239CA3AF' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.req { color: var(--error); }
.field-error {
  font-size: 12px;
  color: var(--error);
  font-weight: 500;
}

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #9B7BFF);
  color: white;
  box-shadow: 0 4px 16px rgba(108,71,255,0.30);
}
.btn-primary:hover { box-shadow: 0 6px 24px rgba(108,71,255,0.40); transform: translateY(-1px); }
.btn-secondary {
  background: var(--surface-gray);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }
.btn-accent {
  background: linear-gradient(135deg, var(--accent), #FF8C5A);
  color: white;
  box-shadow: 0 4px 16px rgba(255,107,53,0.25);
}
.btn-accent:hover { box-shadow: 0 6px 24px rgba(255,107,53,0.35); transform: translateY(-1px); }
.btn-success {
  background: var(--success);
  color: white;
  padding: 10px 16px;
  font-size: 13px;
  width: auto;
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  padding: 8px 16px;
  width: auto;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-sm { padding: 9px 14px; font-size: 13px; width: auto; }
.btn-danger { background: var(--error); color: white; box-shadow: none; }
.btn-danger:hover { opacity: 0.9; }

/* ─── FEED / BROWSE ──────────────────────────────────────── */
.feed-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
}
.search-input {
  flex: 1;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 14px;
  background: var(--surface-gray);
  outline: none;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
  color: var(--text);
}
.search-input:focus { background: white; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,71,255,0.08); }
.filter-btn {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.filter-btn.active, .filter-btn:hover { border-color: var(--primary); background: var(--primary-light); }

/* Category pills */
.cat-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  scrollbar-width: none;
}
.cat-pills::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  box-shadow: var(--shadow-sm);
}
.cat-pill:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.cat-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(108,71,255,0.28);
}

/* Filter panel */
.filter-panel {
  display: none;
  padding: 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  gap: 10px;
  animation: slideDown 0.15s ease;
}
.filter-panel.open { display: flex; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.filter-row { display: flex; gap: 10px; }
.filter-row .field { flex: 1; margin-bottom: 0; }

/* ─── REQUEST CARDS ──────────────────────────────────────── */
.feed-list {
  padding: 12px 12px;
  padding-bottom: calc(var(--nav-h) + 12px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.request-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: var(--shadow-sm);
}
.request-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.request-card.today-urgency { border-left: 3px solid var(--accent); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.card-title { font-size: 15px; font-weight: 700; letter-spacing: -0.2px; line-height: 1.3; flex: 1; }
.card-budget { font-size: 18px; font-weight: 800; color: var(--primary); white-space: nowrap; letter-spacing: -0.5px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: 12px; }
.offer-count { font-weight: 600; color: var(--text-secondary); }
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--surface-gray);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-weight: 500;
}
.meta-chip .icon { font-size: 12px; }

/* ─── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.badge-today    { background: #FFF0EB; color: #D95F0B; }
.badge-week     { background: #EEF2FF; color: #4F46E5; }
.badge-flexible { background: var(--surface-gray); color: var(--text-muted); }
.badge-open     { background: var(--success-light); color: #16A34A; }
.badge-closed   { background: var(--surface-gray); color: var(--text-muted); }
.badge-pending  { background: #FEF3C7; color: #B45309; }
.badge-accepted { background: var(--success-light); color: #16A34A; }
.badge-rejected { background: var(--error-light); color: var(--error); }

/* ─── URGENCY SELECTOR ───────────────────────────────────── */
.urgency-group {
  display: flex;
  gap: 8px;
}
.urgency-btn {
  flex: 1;
  padding: 12px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background: var(--bg);
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
  color: var(--text-secondary);
}
.urgency-btn:hover { border-color: var(--primary); color: var(--primary); }
.urgency-btn.active { background: var(--primary); border-color: var(--primary); color: white; box-shadow: 0 2px 8px rgba(108,71,255,0.25); }
.urgency-btn.today.active { background: var(--accent); border-color: var(--accent); box-shadow: 0 2px 8px rgba(255,107,53,0.25); }

/* ─── REQUEST DETAIL ─────────────────────────────────────── */
.detail-page {
  padding-bottom: 120px;
}
.detail-body { padding: 20px; }
.detail-price {
  font-size: 36px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -1px;
  margin: 16px 0 4px;
}
.detail-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.25;
  margin-bottom: 12px;
}
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.detail-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.detail-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  white-space: pre-wrap;
}
.detail-divider { height: 1px; background: var(--border-light); margin: 20px 0; }

/* Offer cards */
.offer-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.offer-card.accepted { border-color: var(--success); background: var(--success-light); }
.offer-card.rejected { opacity: 0.5; }
.offer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.offer-seller { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.offer-price { font-size: 20px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.offer-delivery { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.offer-msg { font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 10px; }
.offer-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Offer form */
.offer-form {
  margin: 0 20px 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.offer-form-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; letter-spacing: -0.2px; }

/* ─── DASHBOARD ──────────────────────────────────────────── */
.dash-section { padding: 16px 16px 4px; }
.dash-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.dash-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}
.dash-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.dash-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.dash-card-title { font-size: 14px; font-weight: 700; flex: 1; line-height: 1.3; }
.dash-card-meta { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ─── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 6px; letter-spacing: -0.3px; }
.empty-desc { font-size: 14px; line-height: 1.6; }

/* ─── AVATAR ─────────────────────────────────────────────── */
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.avatar-placeholder {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #9B7BFF);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

/* ─── MODALS / ALERTS ────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}
.modal {
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  padding: 24px 20px 40px;
  width: 100%;
  max-width: var(--max-w);
  animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-handle { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 20px; }
.modal-title { font-size: 18px; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 16px; text-align: center; }

/* ─── TOAST ──────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 440px;
  pointer-events: none;
}
.toast {
  background: var(--text);
  color: white;
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  animation: toastIn 0.25s ease, toastOut 0.3s ease 2.8s forwards;
  text-align: center;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--error); }
.toast.info    { background: var(--primary); }
@keyframes toastIn  { from { opacity: 0; transform: translateY(-12px) scale(0.95); } to { opacity: 1; transform: none scale(1); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-8px); } }

/* ─── ROLE SELECT PAGE ───────────────────────────────────── */
.role-select-page {
  padding: 40px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.role-select-logo { text-align: center; font-size: 48px; margin-bottom: 8px; }
.role-select-title { font-size: 24px; font-weight: 800; text-align: center; margin-bottom: 6px; letter-spacing: -0.5px; }
.role-select-sub { font-size: 15px; color: var(--text-secondary); text-align: center; margin-bottom: 32px; line-height: 1.6; }

/* ─── UTILITIES ──────────────────────────────────────────── */
.text-muted   { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.fw-700       { font-weight: 700; }
.mt-8         { margin-top: 8px; }
.mt-16        { margin-top: 16px; }
.mt-20        { margin-top: 20px; }
.flex-center  { display: flex; align-items: center; justify-content: center; gap: 8px; }
.text-center  { text-align: center; }
.sr-only      { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
