/* ============================================================
   KIH AsIK — app.css  |  Master Design System
   Medical-first · Mobile-first · Friendly for all users
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Medical Blue — primary trust color */
  --c-blue:         #0284C7;
  --c-blue-dark:    #0369A1;
  --c-blue-darker:  #075985;
  --c-blue-light:   #E0F2FE;
  --c-blue-muted:   #BAE6FD;

  /* Teal — health & care accent */
  --c-teal:         #0D9488;
  --c-teal-dark:    #0F766E;
  --c-teal-light:   #CCFBF1;

  /* Semantics */
  --c-green:        #16A34A;
  --c-green-dark:   #15803D;
  --c-green-light:  #DCFCE7;

  --c-warning:      #D97706;
  --c-warning-light:#FEF3C7;

  --c-red:          #DC2626;
  --c-red-dark:     #B91C1C;
  --c-red-light:    #FEE2E2;

  /* Pink (kehamilan) */
  --c-pink:         #DB2777;
  --c-pink-dark:    #BE185D;
  --c-pink-light:   #FCE7F3;

  /* Neutral grays */
  --c-gray-50:  #F8FAFC;
  --c-gray-100: #F1F5F9;
  --c-gray-200: #E2E8F0;
  --c-gray-300: #CBD5E1;
  --c-gray-400: #94A3B8;
  --c-gray-500: #64748B;
  --c-gray-600: #475569;
  --c-gray-700: #334155;
  --c-gray-800: #1E293B;
  --c-gray-900: #0F172A;

  /* Page surfaces */
  --bg:          #F0F9FF;
  --surface:     #FFFFFF;
  --surface-2:   #F8FAFC;

  /* Text */
  --txt:        #0C1A2A;
  --txt-2:      #374151;
  --txt-muted:  #6B7280;

  /* Border */
  --border:       #BAE6FD;
  --border-input: #CBD5E1;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(2,132,199,.07), 0 1px 2px rgba(2,132,199,.04);
  --shadow-md:   0 4px 14px rgba(2,132,199,.10), 0 2px 4px rgba(2,132,199,.06);
  --shadow-lg:   0 10px 28px rgba(2,132,199,.12), 0 4px 8px rgba(2,132,199,.07);
  --shadow-card: 0 2px 8px rgba(0,0,0,.055);

  /* Radii */
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   14px;
  --r-xl:   18px;
  --r-2xl:  24px;
  --r-full: 9999px;

  /* Font */
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Motion */
  --ease: 200ms cubic-bezier(.4,0,.2,1);
  --ease-fast: 150ms cubic-bezier(.4,0,.2,1);

  /* Layout */
  --header-h:     64px;
  --bnav-h:       68px;
  --page-max:     1200px;
  --form-max:     580px;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--txt);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font: inherit; border: none; background: none; }
input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }
p { max-width: 65ch; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,h2,h3,h4,h5,h6 { font-family: var(--font); font-weight: 700; line-height: 1.25; color: var(--txt); }
h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }
h5 { font-size: 1rem; }

@media (max-width: 639px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.125rem; }
}

*:focus-visible { outline: 3px solid var(--c-blue); outline-offset: 2px; border-radius: var(--r-sm); }
::selection { background: rgba(2,132,199,.15); }

/* ============================================================
   APP PAGE LAYOUT
   ============================================================ */
body.app-page {
  /* reserve space for mobile topbar and bottom nav */
  padding-top: 60px;
  padding-bottom: var(--bnav-h);
}
@media (min-width: 768px) {
  body.app-page {
    padding-top: var(--header-h);
    padding-bottom: 0;
  }
}

.page-wrap {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 16px;
}
@media (min-width: 768px) {
  .page-wrap { padding: 32px 24px; }
}

/* ============================================================
   LOGO
   ============================================================ */
.app-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-badge {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--c-blue), var(--c-teal));
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-badge i { color: #fff; font-size: 1.125rem; }
.logo-title  { font-size: 1rem; font-weight: 800; color: var(--c-blue); line-height: 1.1; }
.logo-sub    { font-size: 0.6875rem; color: var(--txt-muted); line-height: 1.1; }

/* ============================================================
   DESKTOP APP HEADER
   ============================================================ */
.app-header {
  background: var(--surface);
  border-bottom: 2px solid var(--c-blue-light);
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 200;
  display: none;
  align-items: center;
}
@media (min-width: 768px) { .app-header { display: flex; } }

.header-inner {
  width: 100%; max-width: var(--page-max);
  margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
}

/* Header user pill */
.header-user {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.header-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--c-blue-muted);
}
.header-uname  { font-size: 0.875rem; font-weight: 600; line-height: 1.2; }
.header-urole  { font-size: 0.6875rem; color: var(--txt-muted); }

/* ============================================================
   MOBILE TOP BAR
   ============================================================ */
.mobile-topbar {
  background: var(--surface);
  border-bottom: 2px solid var(--c-blue-light);
  height: 60px;
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 500;
}
@media (min-width: 768px) { .mobile-topbar { display: none; } }

/* ============================================================
   DESKTOP NAV LINKS
   ============================================================ */
.nav-desk {
  display: none;
}
@media (min-width: 768px) {
  .nav-desk {
    display: flex; align-items: center; gap: 2px;
  }
}
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: var(--r-md);
  font-size: 0.875rem; font-weight: 600;
  color: var(--txt-2);
  transition: all var(--ease-fast);
  white-space: nowrap;
}
.nav-link:hover { background: var(--c-blue-light); color: var(--c-blue); }
.nav-link.is-active { background: var(--c-blue-light); color: var(--c-blue); }
.nav-link.logout { color: var(--c-red); }
.nav-link.logout:hover { background: var(--c-red-light); }

/* ============================================================
   MOBILE BOTTOM NAV
   ============================================================ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bnav-h);
  background: var(--surface);
  border-top: 2px solid var(--c-blue-light);
  display: flex; align-items: stretch;
  z-index: 200;
  box-shadow: 0 -4px 16px rgba(2,132,199,.08);
}
@media (min-width: 768px) { .bottom-nav { display: none; } }

.bnav-item {
  flex: 1; display: flex;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--txt-muted);
  font-size: 0.6875rem; font-weight: 600;
  text-decoration: none; padding-bottom: 4px;
  position: relative; transition: color var(--ease-fast);
}
.bnav-item:hover { color: var(--c-blue); }
.bnav-item.is-active { color: var(--c-blue); }
.bnav-item.is-active::before {
  content: '';
  position: absolute; top: 0; left: 15%; right: 15%;
  height: 3px; background: var(--c-blue);
  border-radius: 0 0 4px 4px;
}
.bnav-i { font-size: 1.375rem; line-height: 1; }
.bnav-lbl { line-height: 1; }

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(var(--bnav-h) + env(safe-area-inset-bottom));
  }
  body.app-page { padding-bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom)); }
}

/* ============================================================
   AUTH LAYOUT (Login / Register)
   ============================================================ */
body.auth-page { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }

.auth-split { display: flex; min-height: 100vh; }

/* --- Brand Panel (desktop only) --- */
.auth-brand {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 44px;
  background: linear-gradient(160deg, var(--c-blue-darker) 0%, var(--c-blue) 50%, var(--c-teal) 100%);
  color: #fff;
  position: relative; overflow: hidden;
}
@media (min-width: 768px) {
  .auth-brand { display: flex; width: 44%; min-width: 360px; flex-shrink: 0; }
}
.auth-brand-deco {
  position: absolute; inset: 0; pointer-events: none;
}
.auth-brand-deco::before {
  content: ''; position: absolute;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(255,255,255,.09) 0%, transparent 70%);
  top: -120px; right: -120px; border-radius: 50%;
}
.auth-brand-deco::after {
  content: ''; position: absolute;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,.06) 0%, transparent 70%);
  bottom: -60px; left: -60px; border-radius: 50%;
}
.brand-logo-row {
  display: flex; align-items: center; gap: 12px;
  position: relative; z-index: 1;
}
.brand-logo-icon {
  width: 46px; height: 46px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,.25);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
}
.brand-logo-icon i { color: #fff; font-size: 1.25rem; }
.brand-name { font-size: 1.125rem; font-weight: 800; color: #fff; }
.brand-tagline { font-size: 0.75rem; color: rgba(255,255,255,.65); }

.auth-brand-body { position: relative; z-index: 1; }
.auth-eyebrow {
  display: inline-block; padding: 4px 12px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--r-full);
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: .7px; text-transform: uppercase;
  margin-bottom: 14px;
}
.auth-brand-title { font-size: 2rem; font-weight: 800; line-height: 1.2; color: #fff; margin-bottom: 12px; }
.auth-brand-desc { color: rgba(255,255,255,.8); font-size: .9375rem; line-height: 1.7; margin-bottom: 28px; max-width: 100%; }

.auth-feature-list { display: flex; flex-direction: column; gap: 14px; }
.auth-feature-item { display: flex; align-items: flex-start; gap: 12px; }
.auth-feature-icon {
  width: 38px; height: 38px;
  background: rgba(255,255,255,.12);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1rem;
}
.auth-feature-icon i { color: rgba(255,255,255,.9); }
.auth-feature-h { font-size: .9375rem; font-weight: 700; color: #fff; margin-bottom: 2px; }
.auth-feature-p { font-size: .8125rem; color: rgba(255,255,255,.7); max-width: 100%; line-height: 1.5; }
.auth-brand-foot { font-size: .8125rem; color: rgba(255,255,255,.45); position: relative; z-index: 1; }

/* --- Form Panel --- */
.auth-form-side {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 20px;
  background: var(--surface);
  overflow-y: auto;
}
@media (min-width: 768px) {
  .auth-form-side { padding: 48px 52px; }
}

.auth-card { width: 100%; max-width: var(--form-max); }

/* Mobile-only logo inside form */
.auth-mobile-logo {
  display: flex; align-items: center; gap: 10px; margin-bottom: 28px;
}
@media (min-width: 768px) { .auth-mobile-logo { display: none; } }

.auth-heading { font-size: 1.625rem; font-weight: 800; margin-bottom: 6px; }
.auth-subheading { color: var(--txt-muted); font-size: .9375rem; margin-bottom: 28px; max-width: 100%; }

/* ============================================================
   FORM COMPONENTS
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: .9375rem; font-weight: 600; color: var(--txt-2);
  display: flex; align-items: center; gap: 6px;
}
.form-req { color: var(--c-red); }
.form-hint { font-size: .8125rem; color: var(--txt-muted); line-height: 1.5; margin-top: 4px; }

/* Input with icon wrapper */
.input-box { position: relative; display: flex; align-items: center; }
.input-box .i-left {
  position: absolute; left: 15px; color: var(--c-gray-400);
  font-size: .9375rem; pointer-events: none; z-index: 1;
}
.input-box .i-right {
  position: absolute; right: 4px; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-md); color: var(--c-gray-400);
  cursor: pointer; transition: color var(--ease-fast);
}
.input-box .i-right:hover { color: var(--txt-2); }

/* The actual input */
.form-input {
  width: 100%; height: 52px; padding: 0 16px;
  background: var(--surface);
  border: 2px solid var(--border-input);
  border-radius: var(--r-lg);
  font-size: 1rem; font-weight: 500; color: var(--txt);
  transition: border-color var(--ease), box-shadow var(--ease);
  appearance: none; -webkit-appearance: none;
}
.form-input::placeholder { color: var(--c-gray-400); font-weight: 400; }
.form-input:focus { outline: none; border-color: var(--c-blue); box-shadow: 0 0 0 4px rgba(2,132,199,.12); }
.form-input:disabled { background: var(--c-gray-100); color: var(--txt-muted); cursor: not-allowed; }
.form-input.with-left  { padding-left: 44px; }
.form-input.with-right { padding-right: 44px; }

/* Textarea */
.form-textarea {
  width: 100%; min-height: 108px; padding: 14px 16px;
  background: var(--surface); border: 2px solid var(--border-input);
  border-radius: var(--r-lg); font-size: 1rem; font-weight: 500; color: var(--txt);
  transition: border-color var(--ease), box-shadow var(--ease);
  resize: vertical; line-height: 1.6;
}
.form-textarea::placeholder { color: var(--c-gray-400); font-weight: 400; }
.form-textarea:focus { outline: none; border-color: var(--c-blue); box-shadow: 0 0 0 4px rgba(2,132,199,.12); }

/* Select */
.form-select {
  width: 100%; height: 52px; padding: 0 40px 0 16px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236B7280'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 12px center;
  background-size: 20px;
  border: 2px solid var(--border-input); border-radius: var(--r-lg);
  font-size: 1rem; font-weight: 500; color: var(--txt);
  appearance: none; -webkit-appearance: none; cursor: pointer;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.form-select:focus { outline: none; border-color: var(--c-blue); box-shadow: 0 0 0 4px rgba(2,132,199,.12); }

/* Grid helpers */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 580px) { .form-grid.g2 { grid-template-columns: 1fr 1fr; } }
.col-span-2 { grid-column: 1 / -1; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 28px; border-radius: var(--r-lg);
  font-size: 1rem; font-weight: 700; font-family: var(--font);
  border: 2px solid transparent; cursor: pointer;
  text-decoration: none; transition: all var(--ease);
  white-space: nowrap; min-width: 52px;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: not-allowed; pointer-events: none; }

.btn-w   { width: 100%; }
.btn-sm  { height: 42px; padding: 0 18px; font-size: .875rem; border-radius: var(--r-md); gap: 6px; }

/* Variants */
.btn-primary {
  background: var(--c-blue); color: #fff; border-color: var(--c-blue);
  box-shadow: 0 4px 12px rgba(2,132,199,.28);
}
.btn-primary:hover { background: var(--c-blue-dark); border-color: var(--c-blue-dark); box-shadow: 0 6px 18px rgba(2,132,199,.38); transform: translateY(-1px); }

.btn-teal {
  background: var(--c-teal); color: #fff; border-color: var(--c-teal);
  box-shadow: 0 4px 12px rgba(13,148,136,.28);
}
.btn-teal:hover { background: var(--c-teal-dark); border-color: var(--c-teal-dark); transform: translateY(-1px); }

.btn-outline { background: transparent; color: var(--c-blue); border-color: var(--c-blue); }
.btn-outline:hover { background: var(--c-blue-light); }

.btn-ghost { background: transparent; color: var(--txt-2); border-color: var(--c-gray-300); }
.btn-ghost:hover { background: var(--c-gray-100); color: var(--txt); }

.btn-danger { background: var(--c-red); color: #fff; border-color: var(--c-red); }
.btn-danger:hover { background: var(--c-red-dark); }

.btn-success { background: var(--c-green); color: #fff; border-color: var(--c-green); }
.btn-success:hover { background: var(--c-green-dark); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: var(--r-lg);
  border: 2px solid transparent; font-size: .9375rem;
}
.alert-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: 1px; }
.alert-title { font-weight: 700; margin-bottom: 4px; font-size: .9375rem; }

.alert-success { background: var(--c-green-light); border-color: var(--c-green); color: var(--c-green-dark); }
.alert-error   { background: var(--c-red-light);   border-color: var(--c-red);   color: var(--c-red-dark);   }
.alert-info    { background: var(--c-blue-light);  border-color: var(--c-blue);  color: var(--c-blue-darker); }
.alert-warning { background: var(--c-warning-light); border-color: var(--c-warning); color: #92400E; }

/* ============================================================
   CARD
   ============================================================ */
.card {
  background: var(--surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 28px;
  transition: box-shadow var(--ease);
}
@media (max-width: 639px) { .card { padding: 20px 16px; border-radius: var(--r-lg); } }

.card-hdr {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 16px; margin-bottom: 20px;
  border-bottom: 2px solid var(--c-blue-light);
}
.card-hdr-icon {
  width: 44px; height: 44px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem; flex-shrink: 0;
}
.hdr-blue   { background: var(--c-blue-light);   color: var(--c-blue); }
.hdr-teal   { background: var(--c-teal-light);   color: var(--c-teal); }
.hdr-green  { background: var(--c-green-light);  color: var(--c-green); }
.hdr-red    { background: var(--c-red-light);    color: var(--c-red); }
.hdr-yellow { background: var(--c-warning-light);color: var(--c-warning); }
.hdr-pink   { background: var(--c-pink-light);   color: var(--c-pink); }
.hdr-gray   { background: var(--c-gray-100);     color: var(--c-gray-600); }

.card-hdr-title { font-size: 1.0625rem; font-weight: 700; margin-bottom: 2px; }
.card-hdr-sub   { font-size: .8125rem; color: var(--txt-muted); max-width: 100%; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: var(--r-full);
  font-size: .8125rem; font-weight: 600; line-height: 1;
}
.badge-blue   { background: var(--c-blue-light);    color: var(--c-blue-dark); }
.badge-teal   { background: var(--c-teal-light);    color: var(--c-teal-dark); }
.badge-green  { background: var(--c-green-light);   color: var(--c-green-dark); }
.badge-red    { background: var(--c-red-light);     color: var(--c-red-dark); }
.badge-yellow { background: var(--c-warning-light); color: #92400E; }
.badge-pink   { background: var(--c-pink-light);    color: var(--c-pink-dark); }
.badge-gray   { background: var(--c-gray-100);      color: var(--c-gray-600); }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
  border-radius: var(--r-xl); padding: 20px;
  color: #fff; position: relative; overflow: hidden;
}
.stat-card-bg-icon {
  position: absolute; right: -8px; bottom: -14px;
  font-size: 5rem; opacity: .1; pointer-events: none; line-height: 1;
}
.stat-card-lbl { font-size: .75rem; font-weight: 700; opacity: .85; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.stat-card-val { font-size: 2.5rem; font-weight: 800; line-height: 1; margin-bottom: 2px; }
.stat-card-unit { font-size: .875rem; opacity: .8; }
.stat-card-icon { font-size: 1.375rem; margin-bottom: 8px; opacity: .9; }

.sc-blue   { background: linear-gradient(135deg, #0369A1, #0284C7); }
.sc-teal   { background: linear-gradient(135deg, #0F766E, #0D9488); }
.sc-pink   { background: linear-gradient(135deg, #9D174D, #DB2777); }
.sc-purple { background: linear-gradient(135deg, #6D28D9, #7C3AED); }
.sc-green  { background: linear-gradient(135deg, #15803D, #16A34A); }
.sc-orange { background: linear-gradient(135deg, #C2410C, #EA580C); }

/* ============================================================
   GRADIENT BANNERS
   ============================================================ */
.gradient-banner {
  background: linear-gradient(135deg, var(--c-blue-darker), var(--c-blue), var(--c-teal));
  border-radius: var(--r-xl); padding: 24px 20px;
  color: #fff; position: relative; overflow: hidden;
}
@media (min-width: 768px) { .gradient-banner { padding: 28px 32px; } }
.gradient-banner-bg {
  position: absolute; right: -16px; bottom: -16px;
  font-size: 7rem; opacity: .07; pointer-events: none; line-height: 1;
}
.gradient-banner-content { position: relative; z-index: 1; }
.gradient-banner h2 { color: #fff; margin-bottom: 6px; font-size: 1.375rem; }
.gradient-banner p  { color: rgba(255,255,255,.85); font-size: .9375rem; max-width: 100%; }

/* Onboarding version */
.onboard-banner {
  background: linear-gradient(135deg, var(--c-blue-darker), var(--c-blue) 55%, var(--c-teal));
  border-radius: var(--r-xl); padding: 22px 20px;
  color: #fff; position: relative; overflow: hidden;
  margin-bottom: 24px;
}
.onboard-banner h2 { color: #fff; font-size: 1.25rem; margin-bottom: 8px; }
.onboard-banner p  { color: rgba(255,255,255,.85); font-size: .9rem; max-width: 100%; }
.onboard-banner-bg {
  position: absolute; right: -12px; bottom: -16px;
  font-size: 7rem; opacity: .07; pointer-events: none;
}

/* ============================================================
   MULTI-STEP STEPPER
   ============================================================ */
.stepper {
  display: flex; align-items: flex-start;
  margin-bottom: 28px; position: relative;
}
.stepper-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; position: relative;
}
/* Connecting line */
.stepper-item:not(:last-child)::after {
  content: '';
  position: absolute; top: 19px;
  left: calc(50% + 22px); right: calc(-50% + 22px);
  height: 2px; background: var(--c-gray-200); z-index: 0;
  transition: background var(--ease);
}
.stepper-item.s-done:not(:last-child)::after { background: var(--c-blue-muted); }
.stepper-item.s-active:not(:last-child)::after { background: var(--c-blue-muted); }

.stepper-dot {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--c-gray-200); color: var(--txt-muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9375rem;
  position: relative; z-index: 1;
  transition: all var(--ease);
}
.stepper-item.s-active .stepper-dot {
  background: var(--c-blue); color: #fff;
  box-shadow: 0 0 0 5px var(--c-blue-light);
}
.stepper-item.s-done .stepper-dot {
  background: var(--c-blue-light); color: var(--c-blue);
}
.stepper-lbl {
  font-size: .6875rem; font-weight: 600; color: var(--txt-muted);
  margin-top: 6px; text-align: center; line-height: 1.3;
}
.stepper-item.s-active .stepper-lbl { color: var(--c-blue); }
.stepper-item.s-done   .stepper-lbl { color: var(--c-blue-dark); }

/* ============================================================
   SPECIAL WIDGETS
   ============================================================ */
/* Pregnancy week widget */
.preg-widget {
  background: var(--c-pink-light);
  border: 2px solid rgba(219,39,119,.2);
  border-radius: var(--r-lg); padding: 14px 16px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
}
.preg-widget-left { display: flex; align-items: center; gap: 12px; }
.preg-widget-icon {
  width: 44px; height: 44px;
  background: rgba(219,39,119,.12); border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
}
.preg-widget-h { font-size: .9375rem; font-weight: 700; color: #831843; margin-bottom: 1px; }
.preg-widget-p { font-size: .8125rem; color: #BE185D; max-width: 100%; }
.preg-widget-val { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.preg-week-num {
  width: 62px; height: 44px;
  border: 2px solid rgba(219,39,119,.3); border-radius: var(--r-md);
  background: #fff; text-align: center;
  font-size: 1.25rem; font-weight: 800; color: #BE185D;
  appearance: none;
}
.preg-week-num:focus { outline: none; border-color: var(--c-pink); box-shadow: 0 0 0 3px rgba(219,39,119,.15); }
.preg-week-lbl { font-size: .875rem; font-weight: 700; color: #BE185D; }

/* BMI widget */
.bmi-widget {
  background: var(--c-gray-50); border: 2px solid var(--c-gray-200);
  border-radius: var(--r-lg); padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; transition: all var(--ease);
}
.bmi-widget.bmi-visible { background: var(--c-teal-light); border-color: var(--c-teal); }
.bmi-info h4 { font-size: .9375rem; font-weight: 700; margin-bottom: 2px; }
.bmi-info p  { font-size: .8125rem; color: var(--txt-muted); max-width: 100%; }
.bmi-val { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.bmi-num { font-size: 1.75rem; font-weight: 800; color: var(--c-teal); }

/* ============================================================
   FORM NAV BUTTONS
   ============================================================ */
.form-nav {
  display: flex; gap: 12px;
  padding-top: 20px; margin-top: 24px;
  border-top: 2px solid var(--c-blue-light);
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-hdr {
  display: flex; flex-direction: column; gap: 4px;
  margin-bottom: 24px;
}
@media (min-width: 640px) {
  .page-hdr { flex-direction: row; align-items: center; justify-content: space-between; }
}
.page-title { font-size: 1.5rem; font-weight: 800; }
.page-sub   { color: var(--txt-muted); font-size: .9375rem; max-width: 100%; }

/* ============================================================
   INFO BOX
   ============================================================ */
.info-box {
  background: var(--c-blue-light);
  border-radius: var(--r-lg); padding: 12px 14px;
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .875rem; color: var(--c-blue-darker);
}
.info-box i { flex-shrink: 0; margin-top: 2px; }

/* ============================================================
   DIVIDER
   ============================================================ */
.divider { height: 2px; background: var(--c-blue-light); margin: 20px 0; border: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.app-footer {
  text-align: center; padding: 20px;
  color: var(--txt-muted); font-size: .8125rem;
  border-top: 1px solid var(--border); margin-top: auto;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.hidden  { display: none !important; }
.sr-only { position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap; }

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--txt-muted); }
.text-sm     { font-size: .875rem; }
.text-xs     { font-size: .8125rem; }
.text-error  { color: var(--c-red); }
.text-blue   { color: var(--c-blue); }
.text-teal   { color: var(--c-teal); }
.font-bold   { font-weight: 700; }
.font-semi   { font-weight: 600; }

.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1  { gap: 4px; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.gap-6  { gap: 24px; }
.flex-1 { flex: 1; }
.shrink-0 { flex-shrink: 0; }
.w-full { width: 100%; }

.mt-1  { margin-top: 4px; }
.mt-2  { margin-top: 8px; }
.mt-3  { margin-top: 12px; }
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mt-8  { margin-top: 32px; }
.mb-2  { margin-bottom: 8px; }
.mb-4  { margin-bottom: 16px; }
.mb-6  { margin-bottom: 24px; }
.mb-8  { margin-bottom: 32px; }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 580px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3,1fr); } }
.col-full { grid-column: 1 / -1; }

.space-y-4 > * + * { margin-top: 16px; }
.space-y-6 > * + * { margin-top: 24px; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.anim-in   { animation: fadeInUp 380ms ease-out both; }
.anim-fade { animation: fadeIn 300ms ease-out both; }

/* ============================================================
   MODALS & MOBILE DRAWER OVERLAYS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.modal-overlay.m-visible {
  opacity: 1;
  pointer-events: auto;
}
.modal-card {
  background: #ffffff;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2xl);
  max-width: 540px;
  width: 100%;
  padding: 24px;
  transform: scale(0.95);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.m-visible .modal-card {
  transform: scale(1);
}

/* Mobile Drawer Overlay customization */
.mobile-drawer-overlay {
  justify-content: flex-end;
  padding: 0;
}
.mobile-drawer-card {
  max-width: 300px;
  width: 100%;
  height: 100%;
  border-radius: 0 !important;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.m-visible .mobile-drawer-card {
  transform: translateX(0);
}

@media (min-width: 768px) {
  .mobile-drawer-overlay {
    display: none !important;
  }
}
