/* ── Variables ──────────────────────────────────────────────── */
:root {
  --bg:           #f0f2f5;
  --surface:      #ffffff;
  --surface-2:    #f9fafb;
  --surface-3:    #f3f4f6;
  --border:       #e5e7eb;
  --text:         #111827;
  --text-muted:   #6b7280;
  --accent:       #f97316;
  --accent-dark:  #c2590d;
  --accent-glow:  rgba(249,115,22,0.1);
  --danger:       #dc2626;
  --danger-bg:    rgba(220,38,38,0.08);
  --success:      #16a34a;
  --success-bg:   rgba(22,163,74,0.08);
  --blood:        #dc2626;
  --blood-bg:     rgba(220,38,38,0.08);
  --radius:       12px;
  --radius-sm:    8px;
  --radius-xs:    4px;
  --shadow:       0 2px 16px rgba(0,0,0,0.08);
  --shadow-sm:    0 1px 4px rgba(0,0,0,0.06);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
input, select, button, textarea { font: inherit; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Rajdhani', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
}
.accent { color: var(--accent); }

/* ── Layout helpers ─────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Nav ────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.nav-brand svg { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
  text-decoration: none;
}
.nav-link:hover { color: var(--text); text-decoration: none; }
.logout-form { display: inline; }

/* Hamburger button */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-xs);
}
.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
  transform-origin: center;
}
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile dropdown */
.nav-mobile[hidden] { display: none; }
.nav-mobile {
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.98);
  padding: 0.5rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.nav-mobile-link {
  display: block;
  padding: 0.7rem 0.5rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.nav-mobile-link:last-child { border-bottom: none; }
.nav-mobile-link:hover { color: var(--accent); text-decoration: none; }
.nav-mobile-cta { color: var(--accent); font-weight: 700; }
.nav-mobile-logout { color: var(--danger); }

@media (max-width: 600px) {
  .nav-links--desktop { display: none; }
  .nav-hamburger { display: flex; }
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); background: var(--surface-3); }
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline:hover { background: var(--accent-glow); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; }
.btn-lg { padding: 0.8rem 1.75rem; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-google {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-google:hover { background: var(--surface-3); color: var(--text); }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(239,68,68,0.25); }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(34,197,94,0.25); }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.label-hint {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}
input[type=text], input[type=email], input[type=password], input[type=tel], select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.65rem 0.85rem;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
select option { background: var(--surface); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

.input-with-prefix {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-with-prefix:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.input-prefix {
  background: var(--surface-3);
  color: var(--text-muted);
  padding: 0.65rem 0.75rem;
  font-size: 0.85rem;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}
.input-with-prefix input {
  border: none;
  border-radius: 0;
  flex: 1;
  box-shadow: none !important;
}

.section-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Auth pages ─────────────────────────────────────────────── */
.auth-body { background: var(--bg); }
.auth-page {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.auth-header { text-align: center; margin-bottom: 1.75rem; }
.auth-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.auth-header h1 { font-size: 1.75rem; margin-bottom: 0.35rem; }
.auth-header p { color: var(--text-muted); font-size: 0.9rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-footer-text {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding: 4rem 1.25rem 5rem;
  max-width: 1100px;
  margin: 0 auto;
}
@media (min-width: 768px) { .hero { grid-template-columns: 1fr 1fr; align-items: center; padding: 5rem 1.25rem 7rem; } }
.hero-badge {
  display: inline-block;
  background: rgba(249,115,22,0.1);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(249,115,22,0.25);
}
.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.hero-sub { color: var(--text-muted); font-size: 1.05rem; line-height: 1.65; margin-bottom: 2rem; max-width: 440px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-graphic { display: flex; justify-content: center; align-items: center; }
.card-preview {
  width: 260px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0,0,0,0.12), 0 0 0 1px rgba(249,115,22,0.08);
  transform: rotate(-2deg);
}
.card-preview-banner {
  height: 80px;
  background: linear-gradient(135deg, #1a1f35 0%, #f97316 100%);
}
.card-preview-body { padding: 1rem; }
.card-preview-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 3px solid var(--surface);
  margin-top: -28px;
  margin-bottom: 0.6rem;
}
.card-preview-lines { display: flex; flex-direction: column; gap: 6px; margin-bottom: 0.75rem; }
.card-preview-line { height: 10px; border-radius: 5px; background: var(--surface-3); }
.card-preview-line.wide { width: 70%; }
.card-preview-line.narrow { width: 45%; }
.card-preview-badges { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.card-preview-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.card-preview-badge.blood { background: var(--blood-bg); color: var(--blood); }
.card-preview-badge.country { background: var(--surface-3); color: var(--text-muted); }
.card-preview-qr {
  width: 54px; height: 54px;
  background: white;
  border-radius: 6px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6,1fr);
  gap: 2px;
  padding: 6px;
}

/* ── Features ───────────────────────────────────────────────── */
.features { padding: 4rem 1.25rem; }
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  text-align: center;
  margin-bottom: 2.5rem;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.feature-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.9rem; color: var(--text-muted); }

/* ── CTA Section ────────────────────────────────────────────── */
.cta-section {
  padding: 4rem 1.25rem;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-inner { text-align: center; }
.cta-inner h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 0.5rem; }
.cta-inner p { color: var(--text-muted); margin-bottom: 1.75rem; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer { padding: 2rem 1.25rem; border-top: 1px solid var(--border); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer p { color: var(--text-muted); font-size: 0.875rem; }
.footer-links { display: flex; gap: 1rem; }
.footer-link { color: var(--text-muted); font-size: 0.875rem; text-decoration: none; }
.footer-link:hover { color: var(--accent); text-decoration: none; }
.muted-link { color: var(--text-muted); font-size: 0.82rem; }
.muted-link:hover { color: var(--accent); }

/* ── Privacy Policy ──────────────────────────────────────────── */
.privacy-page { padding: 3rem 0 5rem; }
.privacy-card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}
.privacy-header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.privacy-header h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); margin-bottom: 0.35rem; }
.privacy-updated { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1rem; }
.privacy-intro { color: var(--text-muted); font-size: 0.95rem; line-height: 1.65; }
.privacy-section { margin-bottom: 2rem; }
.privacy-section h2 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.privacy-section p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; margin-bottom: 0.6rem; }
.privacy-section ul { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; padding-left: 1.25rem; }
.privacy-section ul li { margin-bottom: 0.35rem; }
.privacy-section a { color: var(--accent); }
.privacy-note {
  background: var(--accent-glow);
  border: 1px solid rgba(249,115,22,0.2);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  font-size: 0.85rem !important;
  color: var(--text) !important;
}
.privacy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 0.75rem 0;
}
.privacy-table th {
  background: var(--surface-3);
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.privacy-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}
.privacy-table tr:last-child td { border-bottom: none; }
@media (max-width: 600px) {
  .privacy-card { padding: 1.5rem; }
  .privacy-table { font-size: 0.78rem; }
}

/* ── Consent checkbox ───────────────────────────────────────── */
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  line-height: 1.5;
}
.consent-label input[type=checkbox] {
  width: 16px; height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--accent);
}

/* ── Dashboard ──────────────────────────────────────────────── */
.dashboard { padding: 2rem 0 4rem; }
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.dash-header h1 { font-size: clamp(1.5rem, 4vw, 2rem); }

.dash-steps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.dash-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 160px;
}
.dash-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.9rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dash-step-title {
  font-size: 0.85rem; font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.dash-step-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 0.1rem;
}
.dash-step-arrow { color: var(--border); flex-shrink: 0; }
@media (max-width: 600px) { .dash-step-arrow { display: none; } }
.dash-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
@media (min-width: 800px) { .dash-grid { grid-template-columns: 320px 1fr; } }

.dash-images { display: flex; flex-direction: column; gap: 1.25rem; }
@media (max-width: 799px) { .dash-form-wrap { order: -1; } }

.banner-preview {
  position: relative;
  height: 150px;
  border-radius: var(--radius);
  background: var(--surface-2);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder-text { color: var(--text-muted); font-size: 0.875rem; pointer-events: none; }
.upload-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0.75rem;
}
.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid rgba(255,255,255,0.15);
}
.upload-btn:hover { background: rgba(0,0,0,0.85); }

.avatar-preview-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--surface-3);
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.upload-label { cursor: pointer; }
.upload-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.4rem; }

/* ── Upload progress bar ─────────────────────────────────────── */
.upload-progress-wrap {
  margin-top: 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
}
.pbar-track {
  height: 6px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}
.pbar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.15s ease;
}
.pbar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.pbar-pct { font-weight: 600; color: var(--accent); }

.dash-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.profile-form { display: flex; flex-direction: column; gap: 1.75rem; }
.form-section { display: flex; flex-direction: column; gap: 1rem; }
.form-section-title {
  font-size: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.form-section-title svg { color: var(--accent); }

/* ── QR Section ─────────────────────────────────────────────── */
.qr-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.qr-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 640px) { .qr-inner { flex-direction: row; align-items: flex-start; } }
.qr-info { flex: 1; }
.qr-info h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.qr-info p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.qr-url { font-size: 0.85rem !important; }
.qr-url span { color: var(--text-muted); margin-right: 0.4rem; }
.qr-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.qr-display {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.qr-svg-wrap {
  background: #fff;
  padding: 12px;
  border-radius: var(--radius-sm);
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-svg-wrap svg { width: 100% !important; height: 100% !important; }

/* ── Error page ─────────────────────────────────────────────── */
.error-page {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.error-card { text-align: center; }
.error-code {
  font-family: 'Rajdhani', sans-serif;
  font-size: 6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.error-card h1 { font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--text-muted); }

/* ── Dashboard sticker thumbnail ───────────────────────────── */
.dash-sticker-thumb {
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  font-family: 'Rajdhani', 'Inter', sans-serif;
}
.dst-header {
  height: 70px;
  background: #1b1b1b;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,255,255,0.03) 3px, rgba(255,255,255,0.03) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(255,255,255,0.03) 3px, rgba(255,255,255,0.03) 4px);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 0 10px 8px;
  border-bottom: 2px solid var(--accent);
}
.dst-header-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.dst-header-bg::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,0.22);
}
.dst-header-content {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 8px;
}
.dst-avatar {
  width: 32px; height: 32px;
  border-radius: 50%; overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.7);
  flex-shrink: 0;
}
.dst-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dst-mc-icon { flex-shrink: 0; }
.dst-name {
  color: #fff;
  font-size: 1rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dst-qr {
  background: #fff;
  padding: 8px 8px 0;
  line-height: 0;
}
.dst-qr svg { width: 100% !important; height: auto !important; display: block; }
.dst-cta {
  background: #fff;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-dark);
  padding: 7px 0 3px;
}
.dst-footer {
  background: #f5f5f5;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.58rem; letter-spacing: 0.06em;
  color: #555;
  padding: 4px 0 6px;
}
.dash-sticker-actions {
  display: flex; flex-direction: column;
  gap: 0.5rem; margin-top: 0.75rem;
}

/* ── Public Rider Card ──────────────────────────────────────── */
.ridercard-body {
  background: #e8eaed;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 0;
}
.ridercard {
  width: 100%;
  max-width: 480px;
  background: #f4f5f7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
@media (min-width: 520px) {
  .ridercard-body { padding: 2rem 1rem; }
  .ridercard { border-radius: 16px; min-height: auto; box-shadow: 0 8px 40px rgba(0,0,0,0.18); overflow: hidden; }
}

/* Banner */
.ridercard-banner {
  height: 160px;
  background: linear-gradient(135deg, #1a1f35 0%, #f97316 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  flex-shrink: 0;
}
.ridercard-brand {
  position: absolute;
  top: 0.875rem; left: 1rem;
  display: flex; align-items: center; gap: 0.4rem;
  color: rgba(255,255,255,0.9);
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
  background: rgba(0,0,0,0.25);
  padding: 0.3rem 0.65rem; border-radius: 999px;
}

/* Identity block — white card */
.ridercard-identity {
  background: #fff;
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}
.ridercard-avatar-wrap {
  display: flex; align-items: center; gap: 1rem;
  margin-top: -50px; margin-bottom: 0.75rem;
  position: relative; z-index: 2;
}
.ridercard-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: #e5e7eb;
  border: 3px solid #fff;
  overflow: hidden; flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.ridercard-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ridercard-avatar-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #9ca3af;
}
.blood-type-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: #fff1f1; color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 0.3rem 0.75rem; border-radius: 999px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem; font-weight: 700; letter-spacing: 0.04em;
}
.ridercard-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.75rem; font-weight: 700; line-height: 1.1;
  color: #111; margin-bottom: 0.25rem;
}
.ridercard-meta {
  display: flex; align-items: center; gap: 0.4rem;
  flex-wrap: wrap;
}
.ridercard-username { color: #6b7280; font-size: 0.82rem; }
.ridercard-sep { color: #d1d5db; font-size: 0.8rem; }
.ridercard-country {
  display: inline-flex; align-items: center; gap: 0.25rem;
  color: #6b7280; font-size: 0.82rem;
}

/* Emergency section */
.rc-section {
  padding: 1.25rem 1.25rem 0.5rem;
}
.rc-section-header {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem; font-weight: 700; letter-spacing: 0.1em;
  color: #111; text-transform: uppercase;
  margin-bottom: 0.875rem;
}
.rc-section-header svg { color: #dc2626; flex-shrink: 0; }
.rc-empty {
  color: #9ca3af; font-size: 0.875rem;
  padding: 0.75rem 0 0.5rem;
}

/* Individual contact card */
.ec-card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.ec-card-header {
  background: #dc2626;
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
}
.ec-card-body { padding: 0.875rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.ec-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.35rem; font-weight: 700; color: #111; line-height: 1.1;
}
.ec-row {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.9rem; color: #374151;
}
.ec-row svg { color: #9ca3af; flex-shrink: 0; }
.em-reveal-btn {
  background: #f9fafb; border: 1px solid #e5e7eb;
  color: #374151; border-radius: 6px;
  padding: 5px 14px; font-size: 0.82rem;
  cursor: pointer; transition: background 0.15s;
}
.em-reveal-btn:hover { background: #f3f4f6; }
.em-phone-link {
  color: #dc2626; font-size: 0.95rem; font-weight: 700;
  text-decoration: none;
}
.em-phone-link:hover { text-decoration: underline; }
.em-action-btns {
  display: flex; gap: 0.625rem; padding-top: 0.25rem;
}
.em-action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%; border: none;
  cursor: pointer; text-decoration: none;
  transition: transform 0.15s, opacity 0.15s;
  overflow: hidden; padding: 0; background: transparent;
}
.em-action-btn:hover { transform: scale(1.08); opacity: 0.9; text-decoration: none; }
.em-action-btn img { width: 42px; height: 42px; display: block; object-fit: contain; }

/* Blood + QR bottom row */
.rc-bottom {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0.5rem 1.25rem 1.25rem;
  background: #fff;
  border-radius: 10px; border: 1px solid #e5e7eb;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.rc-blood-block { display: flex; flex-direction: column; gap: 0.1rem; }
.rc-blood-label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: #9ca3af;
}
.rc-blood-value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 2rem; font-weight: 700; color: #b91c1c; line-height: 1;
}
.rc-qr-block { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.rc-qr-svg {
  width: 90px; height: 90px;
  display: flex; align-items: center; justify-content: center;
}
.rc-qr-svg svg { width: 100% !important; height: 100% !important; display: block; }
.rc-qr-label {
  font-size: 0.65rem; color: #9ca3af;
  text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600;
}

/* Footer */
.ridercard-footer {
  margin-top: auto; padding: 1rem 1.25rem;
  border-top: 1px solid #e5e7eb;
  display: flex; justify-content: center;
}
.ridercard-footer-brand {
  display: flex; align-items: center; gap: 0.4rem;
  color: #9ca3af; font-size: 0.78rem;
  text-decoration: none; font-weight: 600;
  transition: color 0.15s;
}
.ridercard-footer-brand:hover { color: #f97316; text-decoration: none; }
.ridercard-footer-brand svg { color: #f97316; }
