/* ============================================================
   Bright Smile — capsule design system
   Shared by the patient app (body.patient) and admin (body.admin).
   Class contract matches what app.js / admin.js emit.
   ============================================================ */
:root {
  --navy: #12313f;
  --navy2: #174252;
  --sky1: #61b7e8;
  --sky2: #2583cf;
  --sky3: #176bb0;
  --brand: #0f766e;
  --ink: #16232e;
  --muted: #697887;
  --line: #e3e9ef;
  --chip: #eef3f5;
  --bg: #f6f8fb;
  --card: #ffffff;
  --gold: #e7a12d;
  --ok: #12a870;
  --warn: #b45309;
  --danger: #f2545b;
  /* lively accents */
  --g1: #2bb8a8;
  --g2: #2583cf;
  --accent: #6d5bd0;
  --coral: #ff6b6b;
  --mint: #e9f7f3;
  --grad: linear-gradient(135deg, #0f766e 0%, #2583cf 100%);
  --grad-warm: linear-gradient(135deg, #ff8a5b 0%, #ff5b7f 100%);
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 18px 40px rgba(20, 55, 90, 0.10), 0 4px 12px rgba(20, 55, 90, 0.05);
  --shadow-sm: 0 8px 20px rgba(20, 55, 90, 0.07);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fbfcfd 0%, var(--bg) 44%, #eef4f2 100%);
  background-attachment: fixed;
}
/* ---------- native-app feel ---------- */
/* hide scrollbars everywhere but keep scrolling */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
html, body { overscroll-behavior-y: none; }
body {
  -webkit-touch-callout: none;
  -webkit-user-select: none; user-select: none;
  min-height: 100vh; min-height: 100dvh;
}
/* very small phones (e.g. iPhone SE / 320–360px) — tighten to fit */
@media (max-width: 360px) {
  .card { padding: 15px; }
  .greet .acts { gap: 8px; }
  .icon-btn { width: 42px; height: 42px; min-width: 42px; }
}
/* text stays selectable inside real inputs */
input, textarea, select { -webkit-user-select: auto; user-select: auto; }
/* smooth, seamless view changes when switching tabs/screens */
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
section[id^="tab-"]:not(.hidden) { animation: viewIn 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
@media (prefers-reduced-motion: reduce) { section[id^="tab-"]:not(.hidden) { animation: none; } }

a { color: var(--sky3); text-decoration: none; }
h1 { font-size: clamp(21px, 5.6vw, 26px); margin: 0 0 4px; letter-spacing: 0; }
h2 { font-size: clamp(16px, 4.4vw, 18px); margin: 0 0 12px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 720px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr 1fr; } }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; padding-top: calc(14px + env(safe-area-inset-top));
  background: transparent; position: sticky; top: 0; z-index: 20;
}
body.admin .topbar { background: var(--card); border-bottom: 1px solid var(--line); gap: 10px; flex-wrap: nowrap; }
body.admin .brand { white-space: nowrap; }
@media (max-width: 640px) {
  body.admin .brand { font-size: 15px; }
  body.admin .brand .muted { display: none; } /* hide the "Admin" subtitle */
  body.admin #userName { display: none; }
  body.admin .tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  body.admin .tab { white-space: nowrap; }
}
body.patient .topbar { background: rgba(244, 248, 253, 0.82); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
body.patient #userName { display: none; }
.brand { font-weight: 800; display: flex; align-items: center; gap: 9px; font-size: 17px; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px; color: #fff; display: grid; place-items: center; font-size: 16px;
  background: linear-gradient(140deg, var(--sky1), var(--sky3));
}

/* ---------- layout ---------- */
.container { max-width: 1040px; margin: 0 auto; padding: 16px 18px 40px; }
/* Patient app scales fluidly to any phone: full-width on small screens,
   centered and capped on large ones, with safe-area-aware side padding. */
body.patient .container {
  width: 100%;
  max-width: 500px;
  padding-top: 14px;
  padding-left: max(clamp(14px, 4.2vw, 20px), env(safe-area-inset-left));
  padding-right: max(clamp(14px, 4.2vw, 20px), env(safe-area-inset-right));
  padding-bottom: calc(138px + env(safe-area-inset-bottom));
}
@media (min-width: 760px) {
  body.patient .container {
    max-width: 980px;
    padding: 18px 28px 48px;
  }
}

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px;
}
.card + .card { margin-top: 14px; }

/* ---------- forms ---------- */
label { display: block; font-size: 13px; font-weight: 700; margin: 12px 0 5px; }
input, select, textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; font-size: 16px; /* 16px stops iOS zoom-on-focus */
  background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(59, 166, 221, 0.3); border-color: var(--sky2); }
textarea { min-height: 80px; resize: vertical; }

/* ---------- buttons (capsule) ---------- */
button {
  font: inherit; font-weight: 700; cursor: pointer; border: 1px solid transparent;
  border-radius: 999px; padding: 13px 20px; color: #fff;
  background: var(--grad); background-size: 140% 140%;
  box-shadow: 0 12px 26px rgba(24, 120, 230, 0.30);
  transition: transform 0.08s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
button:hover { filter: brightness(1.04); }
button:active { transform: translateY(1px) scale(0.996); }
button.secondary { background: var(--chip); color: var(--ink); box-shadow: none; }
button.ghost { background: #fff; color: var(--brand); border-color: var(--line); box-shadow: none; }
button.danger { background: var(--grad-warm); box-shadow: 0 12px 26px rgba(255, 91, 127, 0.30); }
button.small { padding: 8px 14px; font-size: 13px; box-shadow: none; }
button:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

/* round icon button */
.icon-btn {
  width: 46px; height: 46px; min-width: 46px; padding: 0; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
}

/* avatar */
.avatar {
  border-radius: 999px; display: grid; place-items: center; color: #fff; font-weight: 800;
  background: linear-gradient(140deg, var(--sky1), var(--sky3)); flex: 0 0 auto;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35);
}

/* ---------- avatar edit row (profile & settings) ---------- */
.avatar-edit { display: flex; align-items: center; gap: 16px; margin: 4px 0 6px; }
.avatar-edit-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.avatar.lg { width: 84px; height: 84px; font-size: 26px; }

/* ---------- greeting header (patient home) ---------- */
.greet { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.greet .avatar { width: 48px; height: 48px; font-size: 16px; }
.greet .who b { font-size: 17px; }
.greet .who div { color: var(--muted); font-size: 13px; }
.greet .acts { margin-left: auto; display: flex; gap: 10px; }
.notif-wrap { position: relative; }
.notif-wrap .pill-dot { position: absolute; top: 9px; right: 10px; margin: 0; }

/* ---------- stat tiles ---------- */
.stat { text-align: center; }
.stat .n { font-size: 28px; font-weight: 800; }
.stat .k { color: var(--muted); font-size: 12px; }

/* ---------- badges / pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.booked { background: #e7f0fb; color: #0d5aa8; }
.badge.confirmed { background: #e3f6ec; color: var(--ok); }
.badge.completed { background: #eceff3; color: #475467; }
.badge.cancelled { background: #fbe9e7; color: var(--danger); }
.badge.no_show { background: #fdf0d5; color: var(--warn); }

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

/* ---------- tables (admin) ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-weight: 700; }

/* ---------- availability slots (capsule) ---------- */
.slot-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.slot {
  padding: 12px 16px; text-align: center; border: 1px solid transparent;
  border-radius: 999px; background: #f4f7fa; font-weight: 700; font-size: 13px; cursor: pointer;
}
.slot.taken { opacity: 0.4; cursor: not-allowed; }
.slot.sel { background: var(--grad); color: #fff; box-shadow: 0 8px 18px rgba(24,120,230,.30); }

/* ---------- date selector ---------- */
.days { display: flex; gap: 9px; overflow-x: auto; padding-bottom: 4px; }
.days::-webkit-scrollbar { display: none; }
.day { flex: 0 0 auto; width: 56px; text-align: center; padding: 12px 0; border-radius: 18px; background: #f4f7fa; cursor: pointer; border: 1px solid transparent; }
.day span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.day b { display: block; font-size: 17px; margin-top: 3px; }
.day.sel { background: var(--grad); color: #fff; }
.day.sel span { color: rgba(255, 255, 255, 0.8); }

/* ---------- top pill tabs (admin) ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  padding: 10px 18px; cursor: pointer; border: 1px solid var(--line); background: #fff;
  color: #5b6b78; font-weight: 700; border-radius: 999px; box-shadow: none;
}
.tab.active { background: var(--grad); color: #fff; border-color: transparent; }

/* ---------- floating bottom nav (patient) ---------- */
.bottomnav {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40;
  background: #fff; border-radius: 999px; padding: 9px 12px; display: flex; gap: 6px; margin: 0;
  box-shadow: 0 16px 34px rgba(14, 44, 71, 0.20); border: 1px solid var(--line); flex-wrap: nowrap;
}
.bottomnav { max-width: min(440px, calc(100vw - 24px)); }
.bottomnav .tab {
  width: clamp(46px, 13.5vw, 54px); height: clamp(46px, 13.5vw, 54px);
  padding: 0; border: none; background: none; color: #93a1ae;
  display: grid; place-items: center; border-radius: 999px;
}
.bottomnav .tab .label { display: none; }
.bottomnav .tab.active { background: var(--grad); color: #fff; box-shadow: 0 8px 18px rgba(24,120,230,.35); }
.bottomnav .tab svg { width: clamp(19px, 5.6vw, 22px); height: clamp(19px, 5.6vw, 22px); }
@media (min-width: 760px) {
  .bottomnav {
    position: sticky;
    left: auto;
    bottom: auto;
    top: 76px;
    transform: none;
    max-width: none;
    justify-content: center;
    border-radius: 8px;
    padding: 8px;
    margin: 0 0 18px;
  }
  .bottomnav .tab {
    width: auto;
    min-width: 118px;
    height: 44px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
  }
  .bottomnav .tab .label {
    display: inline;
    font-size: 13px;
    font-weight: 800;
  }
}

/* ---------- auth (patient gradient) ---------- */
body.patient #authView {
  max-width: none; padding: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(120% 70% at 80% 0%, rgba(255, 255, 255, 0.28), transparent 55%),
    linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 50%, var(--sky3) 100%);
}
.auth-wrap { width: 100%; max-width: 400px; margin: 24px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; margin-bottom: 14px; }
.auth-brand .auth-logo { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; background: var(--grad); box-shadow: 0 10px 22px rgba(24,120,230,.3); }
/* tactile press feedback */
.tab:active, .concern-chip:active, .slot:active, .day:active, .seg-btn:active, .icon-btn:active { transform: scale(0.95); }
.dcard, .card { transition: transform 0.12s ease; }
body.patient .auth-wrap .card { border-radius: var(--radius-lg); box-shadow: 0 30px 60px rgba(9, 40, 64, 0.25); border: none; padding: 24px; }
body.patient #authView h1 { font-size: 26px; }

/* ---------- misc ---------- */
.pill-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); vertical-align: middle; box-shadow: 0 0 0 2px #fff; }
.toast {
  position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 999px;
  box-shadow: var(--shadow); opacity: 0; transition: opacity 0.2s; z-index: 100; font-weight: 600;
}
@media (min-width: 760px) { .toast { bottom: 28px; } }
.toast.show { opacity: 1; }
.toast.err { background: var(--coral); }

/* ---------- loading / launch screen ---------- */
#splash {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(255,255,255,0.28), transparent 55%),
    linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 55%, var(--sky3) 100%);
  transition: opacity 0.45s ease, visibility 0.45s;
}
#splash.gone { opacity: 0; visibility: hidden; }
.splash-inner { text-align: center; color: #fff; }
.splash-logo {
  width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 28px;
  background: rgba(255,255,255,0.92); display: grid; place-items: center; font-size: 52px;
  box-shadow: 0 24px 60px rgba(9,40,64,0.35);
  animation: splashPop 0.6s cubic-bezier(0.2,0.8,0.2,1) both, splashFloat 2.4s ease-in-out infinite 0.6s;
}
.splash-name { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.splash-bar { width: 140px; height: 4px; border-radius: 999px; background: rgba(255,255,255,0.35); margin: 20px auto 0; overflow: hidden; }
.splash-bar span { display: block; height: 100%; width: 40%; border-radius: 999px; background: #fff; animation: splashBar 1.1s ease-in-out infinite; }
@keyframes splashPop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes splashFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes splashBar { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }

/* ---------- intro / welcome carousel ---------- */
#intro {
  position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column;
  background:
    radial-gradient(120% 55% at 82% 0%, #e7f5ff, transparent),
    radial-gradient(100% 50% at 0% 100%, #eafbf5, transparent),
    linear-gradient(180deg, #f6fbff, #eef4fb);
  padding: calc(10px + env(safe-area-inset-top)) 0 calc(14px + env(safe-area-inset-bottom));
  animation: viewIn 0.35s ease;
}
#intro.gone { opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0.4s; }
.intro-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 20px 6px; }
.intro-brand { display: flex; align-items: center; gap: 9px; font-weight: 800; }
.intro-brand .auth-logo { width: 30px; height: 30px; font-size: 16px; border-radius: 9px; box-shadow: none; }
.intro-skip { background: rgba(255,255,255,0.75); color: var(--muted); box-shadow: none; padding: 8px 16px; font-weight: 700; border: 1px solid var(--line); }
.intro-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; }
.intro-slide { min-width: 100%; scroll-snap-align: center; display: flex; flex-direction: column; justify-content: center; padding: 6px 26px 16px; gap: 14px; }
.intro-slide h1 { font-size: 30px; line-height: 1.1; }
.intro-slide > p { color: var(--muted); font-size: 15px; margin: 0; }
.intro-badge { align-self: flex-start; background: #fff; border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; box-shadow: var(--shadow-sm); }

.intro-hero-art { position: relative; height: 250px; display: grid; place-items: center; margin-bottom: 4px; }
.intro-blob { position: absolute; width: 210px; height: 210px; border-radius: 44% 56% 62% 38% / 48% 42% 58% 52%; background: linear-gradient(140deg, var(--g1), var(--g2)); opacity: 0.92; animation: blobSpin 14s linear infinite; }
.intro-mascot { position: relative; font-size: 116px; filter: drop-shadow(0 20px 30px rgba(9,40,64,0.25)); animation: splashFloat 3s ease-in-out infinite; }
.intro-float { position: absolute; font-size: 24px; background: #fff; width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.intro-float.a { top: 18px; left: 26px; animation: splashFloat 3.4s ease-in-out infinite; }
.intro-float.b { top: 54px; right: 22px; animation: splashFloat 2.8s ease-in-out infinite 0.3s; }
.intro-float.c { bottom: 22px; left: 54px; animation: splashFloat 3.2s ease-in-out infinite 0.5s; }
@keyframes blobSpin { to { transform: rotate(360deg); } }

.intro-cards { display: flex; flex-direction: column; gap: 12px; }
.intro-card { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 13px; box-shadow: var(--shadow-sm); }
.intro-card > span { font-size: 24px; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--mint); flex: 0 0 auto; }
.intro-card b { display: block; } .intro-card p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.intro-qa { display: flex; flex-direction: column; gap: 10px; }
.intro-qa details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 13px 16px; box-shadow: var(--shadow-sm); }
.intro-qa summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.intro-qa summary::-webkit-details-marker { display: none; }
.intro-qa summary::after { content: '+'; color: var(--g2); font-size: 20px; font-weight: 700; }
.intro-qa details[open] summary::after { content: '–'; }
.intro-qa p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.intro-tile { border-radius: 20px; padding: 16px; color: #fff; font-weight: 800; display: flex; flex-direction: column; gap: 6px; min-height: 100px; justify-content: flex-end; }
.intro-tile span { font-size: 28px; }
.intro-tile.s1 { background: linear-gradient(140deg, #3fc1c9, #2a91e0); }
.intro-tile.s2 { background: linear-gradient(140deg, #7c5cff, #4f7be0); }
.intro-tile.s3 { background: linear-gradient(140deg, #ff8a5b, #ff5b7f); }
.intro-tile.s4 { background: linear-gradient(140deg, #12a870, #2a91e0); }

.intro-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 22px 2px; gap: 14px; }
.intro-dots { display: flex; gap: 7px; }
.intro-dots i { width: 8px; height: 8px; border-radius: 999px; background: var(--line); transition: all 0.25s; }
.intro-dots i.on { width: 22px; background: var(--g2); }
#introNext { padding: 14px 26px; }

/* ---------- welcome / landing front page ---------- */
#welcome {
  position: fixed; inset: 0; z-index: 950; display: flex; flex-direction: column; color: #fff;
  background:
    radial-gradient(120% 55% at 82% -8%, rgba(255,255,255,0.30), transparent 55%),
    linear-gradient(165deg, #3a95f0 0%, #1878e6 46%, #0f57c8 100%);
  padding: calc(14px + env(safe-area-inset-top)) 0 calc(20px + env(safe-area-inset-bottom));
  animation: viewIn 0.4s ease;
}
#welcome.gone { opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0.4s; }
.wel-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 22px; }
.wel-top .intro-brand { color: #fff; }
.wel-top .intro-brand .auth-logo { background: rgba(255,255,255,0.22); box-shadow: none; }
.wel-skip { background: rgba(255,255,255,0.18); color: #fff; box-shadow: none; padding: 8px 16px; font-weight: 700; border: 1px solid rgba(255,255,255,0.25); }
.wel-hero { flex: 1; display: grid; place-items: center; position: relative; }
.wel-ring {
  position: absolute; width: 256px; height: 256px; border-radius: 50%;
  background: conic-gradient(from 0deg, #22d3ee, #7c5cff, #ff6b6b, #ffd166, #34d399, #22d3ee);
  -webkit-mask: radial-gradient(closest-side, transparent 62%, #000 65%);
  mask: radial-gradient(closest-side, transparent 62%, #000 65%);
  filter: blur(1px) saturate(1.15); opacity: 0.92; animation: welSpin 9s linear infinite;
}
.wel-glow { position: absolute; width: 235px; height: 235px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,0.38), transparent); }
.wel-tooth { position: relative; font-size: 132px; filter: drop-shadow(0 24px 42px rgba(0,20,60,0.45)); animation: splashFloat 3.4s ease-in-out infinite; }
@keyframes welSpin { to { transform: rotate(360deg); } }
.wel-copy { padding: 0 28px; }
.wel-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.28); color: #fff; padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; margin-bottom: 14px; }
.wel-copy h1 { font-size: 34px; line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 10px; }
.wel-copy p { opacity: 0.9; margin: 0; font-size: 15px; max-width: 320px; }
.wel-cta { padding: 22px 24px 6px; }
.wel-cta button { width: 100%; background: #fff; color: var(--navy); box-shadow: 0 16px 30px rgba(0,20,60,0.3); }
.wel-hint { text-align: center; opacity: 0.85; font-size: 12px; margin-top: 12px; }

/* ---------- bottom-sheet modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1100; background: rgba(10, 25, 45, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity 0.22s; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.modal-backdrop.show { opacity: 1; }
.modal {
  background: var(--card); width: 100%; max-width: 460px; border-radius: 24px 24px 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(10, 25, 45, 0.22);
  transform: translateY(24px); transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-height: 86vh; overflow-y: auto;
}
.modal-backdrop.show .modal { transform: none; }
.modal h2 { margin: 0 0 6px; font-size: 20px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions button { flex: 1; }
@media (min-width: 620px) { .modal-backdrop { align-items: center; } .modal { border-radius: 24px; margin: 20px; } }

/* ---------- segmented control (role toggle) ---------- */
.seg { display: flex; gap: 6px; background: var(--chip); padding: 5px; border-radius: 999px; margin: 4px 0 8px; }
.seg-btn { flex: 1; border: none; background: transparent; color: var(--muted); font-weight: 700; padding: 11px 10px; border-radius: 999px; box-shadow: none; cursor: pointer; }
.seg-btn.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

/* verification badge */
.badge.pending { background: #fef3d6; color: #a15c07; }
.badge.approved { background: #e3f6ec; color: var(--ok); }
.badge.rejected { background: #fbe9e7; color: var(--danger); }

/* ---------- tooth-problem picker ---------- */
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.concern-chip {
  font: inherit; font-weight: 600; font-size: 13px; cursor: pointer;
  padding: 9px 13px; border-radius: 999px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); box-shadow: none;
  transition: transform .06s ease;
}
.concern-chip:hover { border-color: var(--g2); filter: none; }
.concern-chip.sel { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(24,120,230,.30); }
.concern-desc {
  margin-top: 10px; padding: 12px 14px; border-radius: 14px;
  background: var(--mint); color: #0f4c99; font-size: 13.5px; line-height: 1.5;
  border: 1px solid #cfe3ff;
}
.desc-emoji { font-size: 15px; }
.tag-concern {
  display: inline-block; margin-top: 4px; padding: 3px 10px; border-radius: 999px;
  background: #eef4ff; color: #2f6bd6; font-size: 12px; font-weight: 700;
}

/* ---------- dentist info panel (profession + specialties) ---------- */
.info-panel:empty { display: none; }
.info-panel {
  margin: 10px 0 4px; padding: 14px; border-radius: 16px;
  background: linear-gradient(135deg, #f3fbff, #eef4ff); border: 1px solid #e2ecfa;
}
.info-head { font-weight: 800; font-size: 14px; margin-bottom: 2px; }
.spec-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.spec-item {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px;
  border-left: 3px solid var(--g1);
}
.spec-item b { display: block; font-size: 13px; }
.spec-item span { color: var(--muted); font-size: 12.5px; }

/* ---------- doctor specialties editor (admin) ---------- */
.spec-toggle {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 8px 12px; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); font-size: 13px; font-weight: 600; user-select: none;
}
.spec-toggle.on { background: var(--grad); color: #fff; border-color: transparent; }
.spec-toggle small { display: block; }
