/* HealSom customer app — v0.0.1 */
:root {
  --primary: #1151AB;
  --primary-600: #0D4290;
  --primary-700: #0A3577;
  --primary-50: #EAF1FB;
  --primary-100: #D3E2F7;
  --teal: #14b8a6;
  --teal-600: #0d9488;
  --teal-50: #f0fdfa;
  --amber: #f59e0b;
  --amber-600: #d97706;
  --amber-50: #fffbeb;
  --rose: #f43f5e;
  --rose-600: #e11d48;
  --rose-50: #fff1f2;
  --emerald: #10b981;
  --emerald-600: #059669;
  --emerald-50: #ecfdf5;
  --sky: #0ea5e9;
  --sky-600: #0284c7;
  --sky-50: #f0f9ff;
  --violet: #8b5cf6;
  --violet-600: #7c3aed;
  --violet-50: #f5f3ff;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --body: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f6f7fb;
  --card: #ffffff;
  --accent: var(--primary);
  --accent-600: var(--primary-600);
  --accent-50: var(--primary-50);
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 20px;
  --r-xl: 26px;
  --sh-1: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px -2px rgba(15, 23, 42, .06);
  --sh-2: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px -12px rgba(15, 23, 42, .16);
  --sh-3: 0 20px 50px -20px rgba(15, 23, 42, .35);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --bar-h: 56px;
  --tab-h: 64px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: #e9ebf3;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--accent-600); text-decoration: none; }
img { max-width: 100%; display: block; }
svg.i { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
svg.i.fill { fill: currentColor; stroke: none; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Shell ---------- */
#app {
  position: relative;
  max-width: 480px;
  height: 100%;
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  isolation: isolate;
}
@media (min-width: 520px) {
  body { background: radial-gradient(1200px 600px at 20% 0%, #D3E2F7 0%, transparent 60%), radial-gradient(900px 500px at 100% 100%, #ccfbf1 0%, transparent 55%), #eef0f7; }
  #app { box-shadow: 0 30px 80px -30px rgba(15, 23, 42, .35); }
}
#screens { position: absolute; inset: 0; }
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  will-change: transform, opacity;
}
.screen.has-tabs .scroll { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 20px); }
.screen.is-hidden { visibility: hidden; pointer-events: none; }
.screen.enter-push { animation: pushIn .32s cubic-bezier(.2, .8, .2, 1) both; z-index: 2; }
.screen.leave-pop { animation: popOut .26s cubic-bezier(.4, 0, .6, 1) both; z-index: 3; }
.screen.reveal { animation: revealIn .3s cubic-bezier(.2, .8, .2, 1) both; }
.screen.enter-fade { animation: fadeIn .22s ease both; }
@keyframes pushIn { from { transform: translateX(42%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes popOut { from { transform: none; opacity: 1; } to { transform: translateX(45%); opacity: 0; } }
@keyframes revealIn { from { transform: translateX(-12%); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.scroll {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 4px 16px 28px;
  padding-left: calc(16px + var(--safe-l));
  padding-right: calc(16px + var(--safe-r));
}
.scroll.flush { padding-left: 0; padding-right: 0; }
.scroll.no-pad { padding: 0; }

/* ---------- App bar ---------- */
.bar {
  flex: none;
  display: flex; align-items: center; gap: 6px;
  min-height: calc(var(--bar-h) + var(--safe-t));
  padding: var(--safe-t) calc(8px + var(--safe-r)) 0 calc(8px + var(--safe-l));
  background: rgba(246, 247, 251, .86);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  position: relative; z-index: 5;
}
.bar.scrolled { box-shadow: 0 1px 0 var(--border); }
.bar-title { flex: 1; min-width: 0; font-weight: 700; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 4px; }
.bar-title small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.bar.big { padding-top: calc(var(--safe-t) + 4px); padding-left: calc(16px + var(--safe-l)); padding-right: calc(12px + var(--safe-r)); }
.bar.big .bar-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; padding-left: 0; }
.bar.transparent { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transition: background .2s; }
.bar.transparent .bar-title { opacity: 0; transition: opacity .2s; text-align: center; }
.bar.transparent.scrolled { background: rgba(246, 247, 251, .9); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); }
.bar.transparent.scrolled .bar-title { opacity: 1; }
.bar.transparent.scrolled .icon-btn.solid { box-shadow: none; background: transparent; }
.icon-btn {
  width: 42px; height: 42px; flex: none;
  display: inline-grid; place-items: center;
  border-radius: 14px; color: var(--ink);
  position: relative;
  transition: background .15s, transform .1s;
}
.icon-btn:active { transform: scale(.94); background: rgba(15, 23, 42, .06); }
.icon-btn.solid { background: #fff; box-shadow: var(--sh-1); }
.icon-btn .dot-badge {
  position: absolute; top: 6px; right: 6px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--rose); color: #fff;
  font-size: 10px; font-weight: 800; display: grid; place-items: center;
  border: 2px solid var(--bg);
}

/* ---------- Tab bar ---------- */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: space-around; align-items: stretch;
  height: calc(var(--tab-h) + var(--safe-b));
  padding: 6px calc(6px + var(--safe-r)) var(--safe-b) calc(6px + var(--safe-l));
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.8) blur(18px);
  -webkit-backdrop-filter: saturate(1.8) blur(18px);
  border-top: 1px solid rgba(226, 232, 240, .8);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .2s;
}
.tabbar.off { transform: translateY(110%); opacity: 0; pointer-events: none; }
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--slate-400); position: relative;
  transition: color .2s;
}
.tab .tab-ic { width: 46px; height: 30px; border-radius: 15px; display: grid; place-items: center; transition: background .25s, transform .2s; position: relative; }
.tab.on { color: var(--primary-600); }
.tab.on .tab-ic { background: var(--primary-50); }
.tab:active .tab-ic { transform: scale(.92); }
.tab .tab-badge { position: absolute; top: -3px; right: 2px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--rose); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { margin: 0; letter-spacing: -.015em; }
.h1 { font-size: 26px; font-weight: 800; letter-spacing: -.025em; line-height: 1.2; }
.h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.h3 { font-size: 16px; font-weight: 700; }
.h4 { font-size: 14.5px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.bold { font-weight: 700; }
.xbold { font-weight: 800; }
.ink { color: var(--ink); }
.center { text-align: center; }
.right { text-align: right; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pre { white-space: pre-wrap; word-break: break-word; }
.strike { text-decoration: line-through; color: var(--slate-400); }
.c-primary { color: var(--primary-600); } .c-teal { color: var(--teal-600); } .c-amber { color: var(--amber-600); }
.c-rose { color: var(--rose-600); } .c-emerald { color: var(--emerald-600); } .c-sky { color: var(--sky-600); } .c-violet { color: var(--violet-600); }
.c-accent { color: var(--accent-600); }

/* ---------- Layout helpers ---------- */
.row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row.top { align-items: flex-start; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.row.gap-sm { gap: 8px; }
.row.gap-xs { gap: 4px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.mt-xs { margin-top: 4px; } .mt-sm { margin-top: 8px; } .mt { margin-top: 14px; } .mt-lg { margin-top: 22px; } .mt-xl { margin-top: 30px; }
.mb-sm { margin-bottom: 8px; } .mb { margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 24px 0 12px; }
.sec-head h3 { font-size: 17px; font-weight: 800; letter-spacing: -.015em; }
.sec-head .link { font-size: 13px; font-weight: 700; color: var(--accent-600); display: inline-flex; align-items: center; gap: 2px; }
.sec-head .link .i { width: 16px; height: 16px; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; align-items: stretch; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }

/* ---------- Cards ---------- */
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-1); border: 1px solid rgba(226, 232, 240, .7); }
.card.pad { padding: 16px; }
.card.pad-lg { padding: 20px; }
.card + .card { margin-top: 12px; }
.hscroll > .card, .grid2 > .card, .grid3 > .card, .grid4 > .card, .action-grid > .card { margin-top: 0 !important; }
.card.tap { transition: transform .12s, box-shadow .2s; cursor: pointer; }
.card.tap:active { transform: scale(.985); }
.card-title { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.card-title .i { width: 16px; height: 16px; }

.list { background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-1); border: 1px solid rgba(226, 232, 240, .7); overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; position: relative; min-height: 56px; width: 100%; text-align: left; color: var(--ink); }
.li + .li::before { content: ""; position: absolute; top: 0; left: 64px; right: 0; height: 1px; background: var(--slate-100); }
.li.no-ic + .li::before, .li.no-ic::before { left: 16px; }
button.li:active, a.li:active { background: var(--slate-50); }
.li .li-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--accent-50); color: var(--accent-600); }
.li .li-ic .i { width: 20px; height: 20px; }
.li .li-main { flex: 1; min-width: 0; }
.li .li-t { font-weight: 650; font-size: 15px; }
.li .li-s { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.li .chev { color: var(--slate-300); width: 18px; height: 18px; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; }
.kv > span:first-child { color: var(--muted); }
.kv > span:last-child { font-weight: 600; text-align: right; min-width: 0; word-break: break-word; }
.kv.total { border-top: 1px dashed var(--slate-300); margin-top: 6px; padding-top: 12px; font-size: 16px; }
.kv.total > span { color: var(--ink); font-weight: 800; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 20px; border-radius: 16px;
  font-weight: 700; font-size: 15px; letter-spacing: -.005em;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, #fff) 0%, var(--accent-600) 100%);
  color: #fff;
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent-600) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: transform .12s, filter .2s, opacity .2s, box-shadow .2s;
  white-space: nowrap; position: relative; user-select: none;
}
.btn:active { transform: scale(.975); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; box-shadow: none; }
.btn.busy { pointer-events: none; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn.soft.busy::after, .btn.ghost.busy::after, .btn.outline.busy::after, .btn.white.busy::after { border-color: color-mix(in srgb, var(--accent) 30%, transparent); border-top-color: var(--accent-600); }
.btn .i { width: 20px; height: 20px; }
.btn.block { width: 100%; }
.btn.sm { height: 38px; padding: 0 14px; border-radius: 12px; font-size: 13.5px; }
.btn.sm .i { width: 17px; height: 17px; }
.btn.xs { height: 32px; padding: 0 12px; border-radius: 10px; font-size: 12.5px; }
.btn.xs .i { width: 15px; height: 15px; }
.btn.lg { height: 56px; border-radius: 18px; font-size: 16px; }
.btn.soft { background: var(--accent-50); color: var(--accent-600); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--accent-600); box-shadow: none; }
.btn.outline { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--border); }
.btn.white { background: #fff; color: var(--accent-600); box-shadow: var(--sh-1); }
.btn.danger { --accent: var(--rose); --accent-600: var(--rose-600); --accent-50: var(--rose-50); }
.btn.success { --accent: var(--emerald); --accent-600: var(--emerald-600); --accent-50: var(--emerald-50); }
.btn.dark { background: var(--ink); box-shadow: 0 8px 20px -10px rgba(15, 23, 42, .6); }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; min-width: 0; padding: 0 12px; }
.link-btn { color: var(--accent-600); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Chips, badges ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; scroll-padding-inline: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 12px;
  background: #fff; color: var(--body); font-weight: 600; font-size: 13.5px;
  border: 1px solid var(--border); white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.chip:active { transform: scale(.96); }
.chip .i { width: 17px; height: 17px; }
.chip.on { background: var(--accent-600); border-color: var(--accent-600); color: #fff; box-shadow: 0 6px 14px -8px var(--accent-600); }
.chip.soft-on.on { background: var(--accent-50); color: var(--accent-600); border-color: color-mix(in srgb, var(--accent) 40%, transparent); box-shadow: none; }
.chip[disabled] { opacity: .45; pointer-events: none; text-decoration: line-through; }
.chip.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 10px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px; border-radius: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
  background: var(--slate-100); color: var(--body);
}
.badge .i { width: 13px; height: 13px; stroke-width: 2.2; }
.badge.sm { height: 20px; padding: 0 7px; font-size: 10.5px; border-radius: 6px; }
.b-primary { background: var(--primary-50); color: var(--primary-700); }
.b-teal { background: var(--teal-50); color: var(--teal-600); }
.b-amber { background: var(--amber-50); color: #b45309; }
.b-rose { background: var(--rose-50); color: var(--rose-600); }
.b-emerald { background: var(--emerald-50); color: var(--emerald-600); }
.b-sky { background: var(--sky-50); color: var(--sky-600); }
.b-violet { background: var(--violet-50); color: var(--violet-600); }
.b-slate { background: var(--slate-100); color: #475569; }
.b-live { background: var(--emerald); color: #fff; }
.b-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: none; display: inline-block; }

/* ---------- Segmented ---------- */
.seg { display: flex; background: var(--slate-100); padding: 4px; border-radius: 14px; gap: 4px; position: relative; }
.seg button { flex: 1; height: 38px; border-radius: 11px; font-weight: 700; font-size: 13.5px; color: var(--muted); transition: background .2s, color .2s, box-shadow .2s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; white-space: nowrap; }
.seg button .i { width: 17px; height: 17px; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px -2px rgba(15, 23, 42, .15); }
.seg.lg button { height: 44px; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 16px; }
.field > label, .field .lbl { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; }
.field .lbl .opt, .field > label .opt { font-weight: 500; color: var(--slate-400); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea {
  width: 100%; height: 50px; padding: 0 14px;
  border: 1.5px solid var(--border); border-radius: 14px;
  background: #fff; font-size: 15.5px; font-weight: 500; color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { height: auto; min-height: 104px; padding: 12px 14px; resize: none; line-height: 1.5; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.field input[type=date] { min-width: 0; display: block; line-height: 48px; }
.field input[type=date]::-webkit-date-and-time-value { text-align: left; }
.input::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--slate-400); font-weight: 400; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.field.has-err input, .field.has-err select, .field.has-err textarea, .field.has-err .ig, .field.has-err .filepick { border-color: var(--rose) !important; box-shadow: 0 0 0 4px rgba(244, 63, 94, .1); }
.field .err { color: var(--rose-600); font-size: 12.5px; font-weight: 600; margin-top: 6px; display: none; align-items: flex-start; gap: 5px; }
.field.has-err .err { display: flex; }
.field .err::before { content: "!"; flex: none; width: 15px; height: 15px; margin-top: 1px; border-radius: 50%; background: var(--rose); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.field .hint { color: var(--muted); font-size: 12px; margin-top: 6px; }
.field .date-echo { color: var(--accent-600); font-weight: 700; }
.field .date-echo:empty { display: none; }
.field .counter { font-size: 11.5px; color: var(--slate-400); text-align: right; margin-top: 4px; font-weight: 600; }
.field .counter.warn { color: var(--amber-600); }
.field .counter.over { color: var(--rose-600); }
.ig { display: flex; align-items: stretch; border: 1.5px solid var(--border); border-radius: 14px; background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.ig:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.ig input { border: 0 !important; box-shadow: none !important; border-radius: 0 !important; min-width: 0; }
.ig .ig-pre { display: flex; align-items: center; gap: 6px; padding: 0 10px 0 14px; font-weight: 700; color: var(--ink); background: var(--slate-50); border-right: 1px solid var(--border); white-space: nowrap; flex: none; }
.ig button.ig-pre:active { background: var(--slate-100); }
.ig .ig-pre .i { width: 16px; height: 16px; color: var(--muted); }
.flag { font-size: 20px; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.form-note { background: var(--slate-50); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; font-size: 13px; color: var(--body); display: flex; gap: 10px; }
.form-note .i { width: 18px; height: 18px; color: var(--accent-600); margin-top: 1px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent-600); margin: 1px 0 0; flex: none; }

/* Switch */
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 15px; background: var(--slate-300); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(15, 23, 42, .25); transition: transform .22s cubic-bezier(.3, 1.4, .5, 1); }
.switch input:checked + span { background: var(--accent-600); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:disabled + span { opacity: .5; }

/* File pick */
.filepick { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px dashed var(--slate-300); border-radius: 16px; background: #fff; cursor: pointer; position: relative; min-height: 68px; transition: border-color .15s, background .15s; }
.filepick:active { background: var(--slate-50); }
.filepick.has-file { border-style: solid; border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-50); }
.filepick input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.filepick .fp-thumb { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-50); color: var(--accent-600); display: grid; place-items: center; flex: none; overflow: hidden; }
.filepick.has-file .fp-thumb { background: #fff; }
.filepick .fp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.filepick .fp-main { flex: 1; min-width: 0; }
.filepick .fp-t { font-weight: 700; font-size: 14px; }
.filepick .fp-s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filepick .fp-x { position: relative; z-index: 2; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); background: #fff; }

/* Stars */
.stars { display: inline-flex; align-items: center; gap: 3px; color: var(--amber); font-weight: 700; font-size: 13px; }
.stars .i { width: 15px; height: 15px; }
.rate-input { display: flex; gap: 8px; justify-content: center; }
.rate-input button { color: var(--slate-300); transition: transform .15s, color .15s; }
.rate-input button .i { width: 40px; height: 40px; }
.rate-input button.on { color: var(--amber); }
.rate-input button:active { transform: scale(.85); }

/* Avatars */
.avatar { flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; overflow: hidden; position: relative; letter-spacing: -.02em; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sq { border-radius: 30%; }
.ico-tile { flex: none; border-radius: 14px; display: grid; place-items: center; }

/* ---------- Skeleton ---------- */
.sk { background: linear-gradient(90deg, #eceff5 0%, #f6f7fb 40%, #eceff5 80%); background-size: 300% 100%; animation: shimmer 1.3s ease-in-out infinite; border-radius: 10px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sk-line { height: 12px; margin: 8px 0; }
.sk-card { height: 120px; border-radius: var(--r-lg); margin-bottom: 12px; }

/* ---------- Empty ---------- */
.empty { text-align: center; padding: 34px 24px; display: flex; flex-direction: column; align-items: center; }
.empty svg.illus { width: 168px; height: 128px; margin-bottom: 10px; }
.empty h3 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.empty p { color: var(--muted); font-size: 14px; margin: 0 0 18px; max-width: 290px; }

/* ---------- Toast ---------- */
#toasts { position: absolute; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); z-index: 120; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { max-width: 100%; background: rgba(15, 23, 42, .94); color: #fff; padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; box-shadow: var(--sh-3); animation: toastIn .28s cubic-bezier(.2, .9, .3, 1.3) both; pointer-events: auto; }
.toast .i { width: 20px; height: 20px; flex: none; }
.toast.ok .i { color: #34d399; } .toast.err .i { color: #fb7185; } .toast.info .i { color: #8DB4EA; }
.toast.out { animation: toastOut .22s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Bottom sheet ---------- */
.sheet-wrap { position: absolute; inset: 0; z-index: 100; display: flex; align-items: flex-end; background: rgba(15, 23, 42, .42); animation: fade .22s ease both; }
.sheet-wrap.closing { animation: fadeOut .22s ease both; }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.sheet {
  width: 100%; max-height: 92%;
  background: #fff; border-radius: 26px 26px 0 0;
  display: flex; flex-direction: column;
  padding-bottom: var(--safe-b);
  animation: sheetUp .34s cubic-bezier(.2, .9, .25, 1) both;
  box-shadow: 0 -20px 50px -20px rgba(15, 23, 42, .3);
}
.sheet-wrap.closing .sheet { animation: sheetDown .22s ease both; }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes sheetDown { to { transform: translateY(100%); } }
.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--slate-200); margin: 9px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px 20px; flex: none; }
.sheet-head h3 { flex: 1; font-size: 18px; font-weight: 800; letter-spacing: -.015em; }
.sheet-body { overflow-y: auto; padding: 8px 20px 20px; overscroll-behavior: contain; }
.sheet-foot { padding: 12px 20px 16px; border-top: 1px solid var(--slate-100); flex: none; }
.sheet.full { height: 92%; }
.opt-list .opt { display: flex; align-items: center; gap: 12px; padding: 13px 4px; width: 100%; text-align: left; border-bottom: 1px solid var(--slate-100); font-weight: 600; }
.opt-list .opt:last-child { border-bottom: 0; }
.opt-list .opt .chk { margin-left: auto; color: var(--accent-600); visibility: hidden; }
.opt-list .opt.on .chk { visibility: visible; }
.opt-list .opt:active { background: var(--slate-50); }

/* ---------- Sticky CTA ---------- */
.cta-bar { flex: none; padding: 12px calc(16px + var(--safe-r)) calc(12px + var(--safe-b)) calc(16px + var(--safe-l)); background: rgba(255, 255, 255, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--slate-100); display: flex; align-items: center; gap: 12px; z-index: 6; }
.cta-bar .cta-price { min-width: 0; }
.cta-bar .cta-price .tiny { color: var(--muted); font-weight: 600; }
.cta-bar .cta-price .amt { font-size: 19px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.cta-bar .btn { flex: 1; }
.cta-bar.col { flex-direction: column; align-items: stretch; gap: 8px; }
.cta-bar.col .btn { flex: none; width: 100%; }

/* ---------- Search ---------- */
.search { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px; border-radius: 16px; background: #fff; border: 1.5px solid var(--border); color: var(--slate-400); box-shadow: var(--sh-1); transition: border-color .15s, box-shadow .15s; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 15px; font-weight: 500; color: var(--ink); }
.search input::placeholder { color: var(--slate-400); font-weight: 500; }
.search input::-webkit-search-cancel-button { display: none; }
.search .s-ph { flex: 1; min-width: 0; text-align: left; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search .s-clear { color: var(--slate-400); display: grid; place-items: center; }
.search .s-btn { width: 36px; height: 36px; margin-right: -6px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-50); color: var(--accent-600); }

/* ---------- Auth ---------- */
.splash { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(160deg, #1151AB 0%, #0D4290 60%, #0b8f87 130%); color: #fff; z-index: 200; transition: opacity .4s; }
.splash.out { opacity: 0; pointer-events: none; }
.splash .logo-mark { width: 84px; height: 84px; border-radius: 26px; background: #fff; display: grid; place-items: center; margin: 0 auto 14px; backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); animation: pop .6s cubic-bezier(.2, 1.4, .4, 1) both; }
.splash .logo-mark svg { width: 46px; height: 46px; }
.splash h1 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; text-align: center; animation: fadeIn .5s .15s both; }
.splash p { margin: 4px 0 0; opacity: .85; text-align: center; font-weight: 500; animation: fadeIn .5s .25s both; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }

.onb { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff; }
.onb-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.onb-track::-webkit-scrollbar { display: none; }
.onb-slide { flex: none; width: 100%; scroll-snap-align: center; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--safe-t) + 60px) 28px 10px; text-align: center; }
.onb-art { width: 100%; max-width: 300px; aspect-ratio: 1; margin: 0 auto 26px; }
.onb-slide h2 { font-size: 26px; font-weight: 800; letter-spacing: -.025em; line-height: 1.2; margin-bottom: 10px; }
.onb-slide p { color: var(--muted); font-size: 15.5px; margin: 0 auto; max-width: 320px; }
.onb-foot { padding: 16px 24px calc(20px + var(--safe-b)); display: flex; align-items: center; gap: 14px; }
.onb-dots { display: flex; gap: 6px; flex: 1; }
.onb-dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--slate-200); transition: width .3s, background .3s; }
.onb-dots i.on { width: 26px; background: var(--primary); }
.onb-skip { position: absolute; top: calc(var(--safe-t) + 12px); right: 16px; z-index: 2; font-weight: 700; color: var(--muted); padding: 8px 12px; font-size: 14px; }

.auth-hero { padding: calc(var(--safe-t) + 26px) 24px 0; }
.auth-hero .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.02em; margin-bottom: 30px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: #fff; display: grid; place-items: center; color: #1151AB; box-shadow: 0 8px 18px -8px rgba(13,66,144,.6); }
.brand-mark svg { width: 22px; height: 22px; }
.auth-hero h1 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.auth-hero p { color: var(--muted); margin: 8px 0 0; font-size: 15px; }
.auth-body { padding: 26px 24px 24px; }
.otp-boxes { display: flex; gap: 8px; justify-content: space-between; }
.otp-boxes input { width: 100%; min-width: 0; height: 58px; max-width: 54px; text-align: center; font-size: 23px; font-weight: 800; border: 1.5px solid var(--border); border-radius: 15px; outline: none; background: #fff; transition: border-color .15s, box-shadow .15s, transform .15s; padding: 0; }
.otp-boxes input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(17,81,171, .14); transform: translateY(-1px); }
.otp-boxes input.filled { border-color: var(--primary-100); background: var(--primary-50); }
.otp-boxes.bad input { border-color: var(--rose); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.dev-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 8px 12px; border-radius: 12px; background: var(--amber-50); color: #92400e; font-size: 13px; font-weight: 700; border: 1px dashed #fcd34d; }
.dev-chip b { letter-spacing: .12em; }

/* ---------- Home ---------- */
.home-top { display: flex; align-items: center; gap: 12px; padding: calc(var(--safe-t) + 12px) calc(16px + var(--safe-r)) 10px calc(16px + var(--safe-l)); flex: none; background: var(--bg); position: relative; z-index: 5; }
.home-top .hello { flex: 1; min-width: 0; }
.home-top .hello small { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.home-top .hello b { font-size: 19px; font-weight: 800; letter-spacing: -.02em; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upcoming { background: linear-gradient(135deg, #0D4290 0%, #1151AB 45%, #7c3aed 100%); color: #fff; border-radius: 24px; padding: 18px; position: relative; overflow: hidden; box-shadow: 0 20px 40px -20px rgba(13,66,144, .7); }
.upcoming::before { content: ""; position: absolute; right: -40px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .09); }
.upcoming::after { content: ""; position: absolute; right: 40px; bottom: -70px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.upcoming > * { position: relative; z-index: 1; }
.upcoming .up-when { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.upcoming .up-when span { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .15); padding: 7px 10px; border-radius: 11px; font-size: 12.5px; font-weight: 700; }
.upcoming .up-when .i { width: 15px; height: 15px; }
.upcoming .cd { font-size: 12px; font-weight: 600; opacity: .9; }
.upcoming .btn.white { color: var(--primary-700); }
.upcoming .btn.glass { background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.ai-hero { position: relative; overflow: hidden; border-radius: 24px; padding: 18px; color: #fff; background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #a78bfa 100%); box-shadow: 0 20px 40px -22px rgba(124, 58, 237, .8); display: flex; gap: 14px; align-items: center; }
.ai-hero .ai-orb { width: 58px; height: 58px; border-radius: 20px; flex: none; display: grid; place-items: center; background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.ai-hero .ai-orb .i { width: 30px; height: 30px; }
.ai-hero h3 { font-size: 16.5px; font-weight: 800; letter-spacing: -.015em; }
.ai-hero p { margin: 3px 0 10px; font-size: 13px; opacity: .9; }
.ai-hero .ai-go { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--violet-600); font-weight: 800; font-size: 13px; padding: 8px 12px; border-radius: 11px; }
.ai-hero .ai-go .i { width: 16px; height: 16px; }
.ai-hero::after { content: ""; position: absolute; width: 160px; height: 160px; right: -50px; top: -60px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .25), transparent 70%); }
.qa-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); text-align: center; line-height: 1.2; }
.qa .qa-ic { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; transition: transform .15s; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); }
.qa:active .qa-ic { transform: scale(.92); }
.qa .qa-ic .i { width: 25px; height: 25px; }
.spec-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.spec { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--ink-2); line-height: 1.2; padding: 12px 4px 10px; background: #fff; border-radius: 18px; border: 1px solid rgba(226, 232, 240, .7); box-shadow: var(--sh-1); min-width: 0; }
.spec:active { transform: scale(.96); }
.spec .spec-ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; }
.spec .spec-ic .i { width: 24px; height: 24px; }
.spec span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; width: 100%; }
.ref-banner { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 22px; background: linear-gradient(120deg, #fffbeb 0%, #fef3c7 100%); border: 1px solid #fde68a; color: #78350f; position: relative; overflow: hidden; }
.ref-banner .rb-ic { width: 50px; height: 50px; border-radius: 16px; background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 10px 20px -10px #f59e0b; }
.ref-banner h4 { font-size: 15px; font-weight: 800; color: #78350f; }
.ref-banner p { margin: 2px 0 0; font-size: 12.5px; color: #92400e; }

/* ---------- Doctor ---------- */
.doc-card { padding: 14px; }
.doc-card .dc-top { display: flex; gap: 12px; }
.doc-card .dc-name { font-size: 16px; font-weight: 800; letter-spacing: -.015em; }
.doc-card .dc-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.doc-card .dc-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.doc-card .dc-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--slate-200); }
.doc-card .fee { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.next-slot { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--emerald-600); }
.next-slot .i { width: 14px; height: 14px; }
.modes { display: inline-flex; gap: 4px; }
.modes span { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--slate-100); color: var(--muted); }
.modes span .i { width: 15px; height: 15px; }
.spec-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 8px; font-size: 11.5px; font-weight: 700; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.spec-chip .i { width: 13px; height: 13px; stroke-width: 2.1; }
.top-doc { width: 168px; padding: 14px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.top-doc .td-name { font-weight: 800; font-size: 14px; margin-top: 10px; width: 100%; }
.top-doc .td-spec { font-size: 12px; color: var(--muted); margin-top: 2px; width: 100%; }
.top-doc .td-foot { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--slate-200); }

.doc-hero { position: relative; padding: 4px 16px 0; text-align: center; }
.doc-hero .dh-bg { position: absolute; left: 0; right: 0; top: -120px; height: 250px; z-index: 0; }
.doc-hero > *:not(.dh-bg) { position: relative; z-index: 1; }
.doc-hero .avatar { margin: 6px auto 12px; box-shadow: 0 0 0 5px #fff, 0 16px 30px -12px rgba(15, 23, 42, .35); }
.doc-hero h2 { font-size: 22px; font-weight: 800; letter-spacing: -.025em; }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.stat { background: #fff; border-radius: 18px; padding: 12px 8px; text-align: center; border: 1px solid rgba(226, 232, 240, .7); box-shadow: var(--sh-1); min-width: 0; }
.stat .st-ic { width: 34px; height: 34px; border-radius: 11px; margin: 0 auto 6px; display: grid; place-items: center; }
.stat .st-ic .i { width: 18px; height: 18px; }
.stat b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.stat small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.trust { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 18px; background: linear-gradient(120deg, var(--emerald-50), #f0fdfa); border: 1px solid #a7f3d0; }
.trust .tr-ic { width: 42px; height: 42px; border-radius: 13px; background: var(--emerald); color: #fff; display: grid; place-items: center; flex: none; }
.review { padding: 14px 0; border-bottom: 1px solid var(--slate-100); }
.review:last-child { border-bottom: 0; padding-bottom: 0; }

/* ---------- Booking ---------- */
.date-strip { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: 16px; }
.date-strip::-webkit-scrollbar { display: none; }
.dpill { flex: none; width: 62px; padding: 9px 0 8px; border-radius: 18px; background: #fff; border: 1.5px solid var(--border); text-align: center; scroll-snap-align: start; transition: all .15s; }
.dpill .dw { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dpill .dd { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.dpill .df { font-size: 10.5px; font-weight: 700; color: var(--emerald-600); }
.dpill.full .df { color: var(--rose); }
.dpill.full { opacity: .6; }
.dpill.on { background: var(--accent-600); border-color: var(--accent-600); color: #fff; box-shadow: 0 10px 20px -10px var(--accent-600); }
.dpill.on .dw, .dpill.on .df { color: rgba(255, 255, 255, .85); }
.slot-group { margin-top: 14px; }
.slot-group .sg-h { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 9px; }
.slot-group .sg-h .i { width: 17px; height: 17px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.slot { height: 42px; border-radius: 12px; background: #fff; border: 1.5px solid var(--border); font-weight: 700; font-size: 13.5px; color: var(--ink); transition: all .12s; }
.slot:disabled { background: var(--slate-50); color: var(--slate-300); text-decoration: line-through; border-color: var(--slate-100); }
.slot.on { background: var(--accent-600); border-color: var(--accent-600); color: #fff; box-shadow: 0 8px 16px -8px var(--accent-600); }
.tz-note { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); background: var(--slate-50); border: 1px solid var(--border); padding: 9px 12px; border-radius: 12px; margin-top: 12px; }
.tz-note .i { width: 16px; height: 16px; color: var(--accent-600); }
.mode-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mode-opt { padding: 14px 8px 12px; border-radius: 18px; background: #fff; border: 1.5px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; transition: all .15s; }
.mode-opt .mo-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--slate-100); color: var(--muted); transition: all .15s; }
.mode-opt.on { border-color: var(--accent); background: var(--accent-50); color: var(--accent-600); }
.mode-opt.on .mo-ic { background: var(--accent-600); color: #fff; }
.step-label { font-size: 15px; font-weight: 800; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; letter-spacing: -.01em; }
.step-label .n { width: 24px; height: 24px; border-radius: 8px; background: var(--accent-50); color: var(--accent-600); font-size: 12.5px; display: grid; place-items: center; }

/* Pay sheet */
.paycard { border-radius: 22px; padding: 18px; color: #fff; background: linear-gradient(135deg, #071E45 0%, #0A3577 55%, #1151AB 100%); position: relative; overflow: hidden; aspect-ratio: 1.75; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 24px 40px -22px rgba(67, 56, 202, .9); }
.paycard::before { content: ""; position: absolute; width: 230px; height: 230px; border-radius: 50%; right: -80px; top: -110px; background: rgba(255, 255, 255, .1); }
.paycard::after { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; left: -60px; bottom: -90px; background: rgba(20, 184, 166, .28); }
.paycard > * { position: relative; z-index: 1; }
.paycard .chip-gold { width: 40px; height: 30px; border-radius: 7px; background: linear-gradient(135deg, #fde68a, #f59e0b); }
.paycard .pc-num { font-size: 18px; letter-spacing: .14em; font-weight: 700; font-variant-numeric: tabular-nums; }
.paycard .pc-sub { display: flex; justify-content: space-between; font-size: 11px; opacity: .85; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.sandbox-tag { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .16); padding: 4px 9px; border-radius: 8px; font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.hold { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--amber-50); color: #92400e; font-size: 13px; font-weight: 600; border: 1px solid #fde68a; }
.hold .i { width: 18px; height: 18px; flex: none; }
.hold b { font-variant-numeric: tabular-nums; }

/* Success */
.success-wrap { text-align: center; padding: 24px 8px 8px; }
.check-anim { width: 104px; height: 104px; margin: 6px auto 18px; position: relative; }
.check-anim .ring { position: absolute; inset: 0; border-radius: 50%; background: var(--emerald-50); animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.check-anim .ring2 { position: absolute; inset: 12px; border-radius: 50%; background: var(--emerald); box-shadow: 0 16px 30px -12px var(--emerald); animation: pop .5s .1s cubic-bezier(.2, 1.4, .4, 1) both; }
.check-anim svg { position: absolute; inset: 30px; width: 44px; height: 44px; stroke: #fff; stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.check-anim svg path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .45s .45s ease forwards; }
.check-anim.fail .ring { background: var(--rose-50); }
.check-anim.fail svg path { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
.check-anim.fail .ring2 { background: var(--rose); box-shadow: 0 16px 30px -12px var(--rose); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -10px; width: 8px; height: 12px; border-radius: 2px; animation: fall 1.8s ease-in forwards; }
@keyframes fall { to { transform: translateY(460px) rotate(540deg); opacity: 0; } }

/* ---------- Consult ---------- */
.bk-card { padding: 14px; }
.bk-when { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--slate-50); font-size: 13px; font-weight: 600; }
.bk-when .i { width: 17px; height: 17px; color: var(--accent-600); }
.waiting { text-align: center; padding: 22px 18px; border-radius: 22px; background: linear-gradient(160deg, var(--emerald-50), #fff 70%); border: 1px solid #a7f3d0; }
.pulse-ring { width: 80px; height: 80px; margin: 4px auto 14px; border-radius: 50%; background: var(--emerald); display: grid; place-items: center; color: #fff; position: relative; }
.pulse-ring::before, .pulse-ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--emerald); animation: ripple 2s ease-out infinite; }
.pulse-ring::after { animation-delay: 1s; }
.pulse-ring .i { width: 34px; height: 34px; }
@keyframes ripple { from { transform: scale(1); opacity: .7; } to { transform: scale(1.8); opacity: 0; } }
.tips { text-align: left; margin: 14px 0 0; padding: 0; list-style: none; }
.tips li { display: flex; gap: 8px; font-size: 13px; padding: 4px 0; color: var(--body); }
.tips li .i { width: 16px; height: 16px; color: var(--emerald-600); margin-top: 2px; }
.perm-row { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.act { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: #fff; border: 1px solid var(--border); font-weight: 700; font-size: 13.5px; text-align: left; min-width: 0; }
.act .act-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.act .act-ic .i { width: 19px; height: 19px; }
.act:active { background: var(--slate-50); }
.act .act-l { flex: 1; min-width: 0; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---------- Chat ---------- */
.chat-screen .scroll { padding: 10px 12px 12px; background: #eef0f6; background-image: radial-gradient(rgba(17,81,171, .06) 1px, transparent 1px); background-size: 18px 18px; }
.msgs { display: flex; flex-direction: column; gap: 3px; }
.day-sep { align-self: center; margin: 12px 0 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); background: rgba(255, 255, 255, .9); padding: 5px 11px; border-radius: 10px; box-shadow: var(--sh-1); }
.sys-msg { align-self: center; margin: 8px 0; font-size: 12px; font-weight: 700; color: #475569; background: #D3E2F7; padding: 6px 12px; border-radius: 12px; display: inline-flex; gap: 6px; align-items: center; max-width: 85%; text-align: center; }
.sys-msg .i { width: 14px; height: 14px; }
.bubble { max-width: 80%; padding: 8px 11px 6px; border-radius: 18px; font-size: 14.5px; line-height: 1.4; position: relative; word-break: break-word; box-shadow: 0 1px 1px rgba(15, 23, 42, .06); animation: bubIn .2s ease both; }
@keyframes bubIn { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.bubble.mine { align-self: flex-end; background: linear-gradient(180deg, #1151AB, #5b5bf0); color: #fff; border-bottom-right-radius: 6px; }
.bubble.theirs { align-self: flex-start; background: #fff; color: var(--ink); border-bottom-left-radius: 6px; }
.bubble.cont.mine { border-top-right-radius: 8px; } .bubble.cont.theirs { border-top-left-radius: 8px; }
.bubble + .bubble.new-group { margin-top: 8px; }
.bubble .b-time { font-size: 10.5px; opacity: .7; float: right; margin: 6px 0 -2px 10px; font-weight: 600; }
.bubble .b-sender { font-size: 11.5px; font-weight: 800; color: var(--violet-600); margin-bottom: 2px; }
.bubble.img { padding: 4px; }
.bubble.img img { border-radius: 14px; max-height: 260px; min-width: 120px; min-height: 80px; object-fit: cover; background: var(--slate-100); cursor: zoom-in; }
.bubble.img .b-cap { padding: 6px 7px 2px; }
.bubble.img .b-time { position: absolute; right: 12px; bottom: 10px; background: rgba(15, 23, 42, .5); color: #fff; padding: 2px 7px; border-radius: 8px; opacity: 1; margin: 0; }
.bubble.img .b-cap + .b-time, .bubble.img.has-cap .b-time { position: static; background: none; padding: 0; float: right; margin: 4px 4px 0 10px; opacity: .7; color: inherit; }
.fcard { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 13px; background: rgba(255, 255, 255, .16); min-width: 210px; text-align: left; color: inherit; }
.bubble.theirs .fcard { background: var(--slate-50); border: 1px solid var(--slate-100); }
.fcard .f-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; background: #fff; color: var(--rose); font-size: 10px; font-weight: 800; flex-direction: column; }
.fcard .f-ic.doc { color: var(--sky-600); }
.fcard .f-name { font-weight: 700; font-size: 13.5px; }
.fcard .f-size { font-size: 11.5px; opacity: .75; }
.bubble.pending { opacity: .75; }
.bubble .up-prog { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .3); margin-top: 6px; overflow: hidden; }
.bubble .up-prog i { display: block; height: 100%; background: #fff; width: 0; transition: width .2s; }
.bubble.failed { background: var(--rose-50) !important; color: var(--rose-600) !important; }
.composer { flex: none; display: flex; align-items: flex-end; gap: 6px; padding: 8px calc(8px + var(--safe-r)) calc(8px + var(--safe-b)) calc(8px + var(--safe-l)); background: #fff; border-top: 1px solid var(--slate-100); position: relative; z-index: 6; }
.composer .cmp-box { flex: 1; min-width: 0; display: flex; align-items: flex-end; background: var(--slate-100); border-radius: 22px; padding: 0 4px; }
.composer textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; resize: none; max-height: 120px; min-height: 44px; padding: 11px 6px; font-size: 15px; line-height: 1.4; }
.composer .icon-btn { width: 44px; height: 44px; color: var(--muted); border-radius: 22px; }
.composer .send { width: 46px; height: 46px; border-radius: 50%; background: var(--primary-600); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 8px 16px -8px var(--primary-600); transition: transform .12s, opacity .2s; }
.composer .send:disabled { opacity: .45; box-shadow: none; }
.composer .send:active { transform: scale(.9); }
.composer .send .i { width: 21px; height: 21px; margin-left: -2px; }
.cmp-count { position: absolute; right: 70px; top: -22px; font-size: 11px; font-weight: 700; background: #fff; padding: 2px 8px; border-radius: 8px; box-shadow: var(--sh-1); color: var(--amber-600); }
.cmp-count.over { color: var(--rose-600); }
.emoji-panel { flex: none; height: 250px; background: #fff; border-top: 1px solid var(--slate-100); overflow-y: auto; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); padding: 8px 8px calc(8px + var(--safe-b)); align-content: start; }
.emoji-panel button { height: 44px; font-size: 25px; border-radius: 10px; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.emoji-panel button:active { background: var(--slate-100); }
.chat-closed { flex: none; display: flex; gap: 10px; align-items: center; padding: 12px 16px calc(12px + var(--safe-b)); background: var(--amber-50); color: #92400e; font-size: 13px; font-weight: 600; border-top: 1px solid #fde68a; }
.chat-closed .i { width: 18px; height: 18px; flex: none; }
.viewer { position: absolute; inset: 0; z-index: 150; background: rgba(2, 6, 23, .96); display: flex; flex-direction: column; animation: fade .2s both; }
.viewer .v-top { display: flex; justify-content: space-between; align-items: center; padding: calc(var(--safe-t) + 8px) 12px 8px; color: #fff; }
.viewer .v-top .icon-btn { color: #fff; }
.viewer .v-img { flex: 1; display: grid; place-items: center; padding: 10px; min-height: 0; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.jump-down { position: absolute; right: 14px; bottom: 80px; width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: var(--sh-2); display: grid; place-items: center; color: var(--primary-600); z-index: 7; }

/* ---------- Prescription ---------- */
.rx-head { padding: 18px; border-radius: 22px; background: linear-gradient(140deg, #EAF1FB 0%, #f5f3ff 60%, #fff 100%); border: 1px solid var(--primary-100); }
.rx-symbol { font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 700; color: var(--primary); line-height: 1; }
.med { padding: 14px; border-radius: 18px; background: #fff; border: 1px solid var(--border); }
.med + .med { margin-top: 10px; }
.med .med-n { display: flex; gap: 10px; align-items: flex-start; }
.med .med-ix { width: 26px; height: 26px; border-radius: 9px; background: var(--primary-50); color: var(--primary-700); display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.med-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.med-tags span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 9px; background: var(--slate-50); border: 1px solid var(--slate-100); color: var(--body); }
.med-tags span .i { width: 14px; height: 14px; color: var(--primary); }
.rx-block { margin-top: 14px; }
.card > .rx-block:first-child { margin-top: 0; }
.rx-block h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--primary-600); font-weight: 800; margin-bottom: 6px; }
.rx-block p { margin: 0; font-size: 14px; color: var(--body); }

/* ---------- Pharmacy ---------- */
.ph-hero { padding: 16px; border-radius: 22px; background: linear-gradient(130deg, #0d9488 0%, #14b8a6 55%, #2dd4bf 100%); color: #fff; display: flex; gap: 12px; align-items: center; position: relative; overflow: hidden; box-shadow: 0 18px 34px -22px #0d9488; }
.ph-hero::after { content: ""; position: absolute; width: 150px; height: 150px; right: -40px; bottom: -70px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.ph-hero .ph-ic { width: 46px; height: 46px; border-radius: 15px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; flex: none; }
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; text-align: center; line-height: 1.2; min-width: 0; }
.cat .cat-ic { width: 58px; height: 58px; border-radius: 19px; display: grid; place-items: center; transition: transform .15s; }
.cat:active .cat-ic { transform: scale(.92); }
.cat .cat-ic .i { width: 26px; height: 26px; }
.cat span { width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.prod { padding: 10px; display: flex; flex-direction: column; min-width: 0; position: relative; }
.prod .p-img { aspect-ratio: 1.15; border-radius: 14px; display: grid; place-items: center; position: relative; overflow: hidden; }
.prod .p-img img { width: 100%; height: 100%; object-fit: cover; }
.prod .p-img .i { width: 38px; height: 38px; opacity: .9; }
.prod .off { position: absolute; top: 8px; left: 8px; background: var(--rose); color: #fff; font-size: 10.5px; font-weight: 800; padding: 3px 7px; border-radius: 7px; }
.prod .rxb { position: absolute; top: 8px; right: 8px; }
.prod .p-name { font-weight: 700; font-size: 13.5px; margin-top: 10px; line-height: 1.3; min-height: 35px; }
.prod .p-pack { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.prod .p-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 8px; }
.prod .p-price { font-weight: 800; font-size: 15px; letter-spacing: -.015em; }
.prod .p-mrp { font-size: 11.5px; }
.prod .p-add { width: 34px; height: 34px; border-radius: 11px; background: var(--teal-600); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 6px 12px -6px var(--teal-600); }
.prod .p-add .i { width: 19px; height: 19px; }
.prod .p-add.in { background: var(--teal-50); color: var(--teal-600); box-shadow: none; font-weight: 800; font-size: 14px; }
.deal { width: 158px; }
.fab-cart { position: absolute; right: calc(16px + var(--safe-r)); bottom: calc(var(--tab-h) + var(--safe-b) + 16px); z-index: 15; height: 54px; padding: 0 18px 0 16px; border-radius: 27px; background: var(--ink); color: #fff; display: flex; align-items: center; gap: 8px; font-weight: 800; box-shadow: 0 16px 30px -12px rgba(15, 23, 42, .6); animation: pop .4s cubic-bezier(.2, 1.4, .4, 1) both; }
.fab-cart .fc-n { min-width: 22px; height: 22px; border-radius: 11px; background: var(--teal); display: grid; place-items: center; font-size: 12px; padding: 0 6px; }
.screen:not(.has-tabs) .fab-cart { bottom: calc(var(--safe-b) + 18px); }
.pd-img { aspect-ratio: 1.5; border-radius: 24px; display: grid; place-items: center; position: relative; overflow: hidden; }
.pd-img .i { width: 76px; height: 76px; }
.pd-img img { width: 100%; height: 100%; object-fit: cover; }
.qty { display: inline-flex; align-items: center; background: var(--slate-100); border-radius: 13px; padding: 3px; }
.qty button { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--ink); }
.qty button:active { background: #fff; }
.qty button:disabled { opacity: .35; }
.qty button .i { width: 17px; height: 17px; }
.qty b { min-width: 30px; text-align: center; font-size: 15px; font-variant-numeric: tabular-nums; }
.qty.lg button { width: 42px; height: 42px; }
.cart-item { display: flex; gap: 12px; padding: 14px; }
.cart-item + .cart-item { border-top: 1px solid var(--slate-100); }
.cart-item .ci-img { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; flex: none; overflow: hidden; }
.cart-item .ci-img img { width: 100%; height: 100%; object-fit: cover; }
.progress { height: 8px; border-radius: 4px; background: var(--slate-100); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--teal), #2dd4bf); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.issue { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--rose-50); color: var(--rose-600); font-size: 13px; font-weight: 600; border: 1px solid #fecdd3; }
.issue .i { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: 13px; font-weight: 600; border: 1px solid; }
.notice .i { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.notice.amber { background: var(--amber-50); color: #92400e; border-color: #fde68a; }
.notice.sky { background: var(--sky-50); color: #075985; border-color: #bae6fd; }
.notice.violet { background: var(--violet-50); color: #5b21b6; border-color: #ddd6fe; }
.notice.rose { background: var(--rose-50); color: #9f1239; border-color: #fecdd3; }
.notice.emerald { background: var(--emerald-50); color: #065f46; border-color: #a7f3d0; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: #fff; border: 1.5px solid var(--border); width: 100%; text-align: left; transition: all .15s; }
.radio-card + .radio-card { margin-top: 10px; }
.radio-card .rc-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--slate-300); flex: none; margin-top: 1px; display: grid; place-items: center; transition: all .15s; }
.radio-card.on { border-color: var(--accent); background: var(--accent-50); }
.radio-card.on .rc-dot { border-color: var(--accent-600); }
.radio-card.on .rc-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-600); }

/* Timeline */
.tl { position: relative; padding-left: 4px; }
.tl-item { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--slate-200); }
.tl-item:last-child::before { display: none; }
.tl-item.done::before { background: var(--accent); }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--slate-100); color: var(--slate-400); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--slate-200); position: relative; z-index: 1; }
.tl-dot .i { width: 14px; height: 14px; stroke-width: 2.6; }
.tl-item.done .tl-dot { background: var(--accent-600); color: #fff; box-shadow: none; }
.tl-item.current .tl-dot { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
.tl-item.bad .tl-dot { background: var(--rose); color: #fff; box-shadow: none; }
.tl-body { padding-top: 3px; min-width: 0; }
.tl-body b { font-size: 14px; display: block; }
.tl-body small { font-size: 12px; color: var(--muted); }

/* ---------- Referral ---------- */
.ref-hero { border-radius: 26px; padding: 22px 18px 18px; text-align: center; color: #fff; background: linear-gradient(150deg, #f59e0b 0%, #f97316 60%, #fb7185 130%); position: relative; overflow: hidden; box-shadow: 0 22px 40px -22px #f97316; }
.ref-hero::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; top: -110px; left: -60px; background: rgba(255, 255, 255, .14); }
.ref-hero > * { position: relative; }
.ref-code { margin: 14px auto 0; display: flex; align-items: center; gap: 8px; background: #fff; color: var(--ink); border-radius: 18px; padding: 8px 8px 8px 18px; max-width: 320px; border: 2px dashed #fcd34d; }
.ref-code b { flex: 1; font-size: 22px; letter-spacing: .14em; font-weight: 800; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.how { display: flex; gap: 12px; align-items: flex-start; }
.how + .how { margin-top: 14px; }
.how .how-n { width: 34px; height: 34px; border-radius: 12px; background: var(--amber-50); color: var(--amber-600); display: grid; place-items: center; font-weight: 800; flex: none; }
.wallet-hero { border-radius: 24px; padding: 20px; color: #fff; background: linear-gradient(140deg, #0f172a 0%, #082A5E 70%, #0D4290 120%); position: relative; overflow: hidden; }
.wallet-hero::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -80px; top: -90px; background: radial-gradient(circle, rgba(245, 158, 11, .45) 0%, rgba(245, 158, 11, 0) 70%); }
.wallet-hero > * { position: relative; z-index: 1; }

/* ---------- AI ---------- */
.ai-screen .scroll { background: linear-gradient(180deg, #f5f3ff 0%, var(--bg) 260px); }
.ai-msg { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.ai-msg .ai-av { width: 34px; height: 34px; border-radius: 12px; background: linear-gradient(135deg, #7c3aed, #a78bfa); color: #fff; display: grid; place-items: center; flex: none; }
.ai-msg .ai-av .i { width: 19px; height: 19px; }
.ai-msg .ai-b { background: #fff; border-radius: 6px 20px 20px 20px; padding: 12px 14px; box-shadow: var(--sh-1); font-size: 14.5px; min-width: 0; max-width: calc(100% - 44px); border: 1px solid rgba(221, 214, 254, .6); }
.ai-msg.user { flex-direction: row-reverse; }
.ai-msg.user .ai-b { background: var(--violet-600); color: #fff; border-radius: 20px 6px 20px 20px; border: 0; }
.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); animation: bounce 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-6px); opacity: 1; } }
.emerg { border-radius: 24px; padding: 20px; background: linear-gradient(150deg, #e11d48 0%, #f43f5e 60%, #fb7185 100%); color: #fff; box-shadow: 0 22px 44px -18px rgba(225, 29, 72, .8); position: relative; overflow: hidden; animation: fadeIn .35s both; }
.emerg::after { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; right: -80px; top: -90px; background: rgba(255, 255, 255, .12); }
.emerg > * { position: relative; z-index: 1; }
.emerg .em-ic { width: 54px; height: 54px; border-radius: 18px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; animation: pulse 1.6s infinite; }
.emerg .em-ic .i { width: 30px; height: 30px; }
.emerg .btn.white { color: var(--rose-600); height: 58px; font-size: 18px; font-weight: 800; }
.emerg ul { margin: 12px 0 0; padding: 0; list-style: none; }
.emerg li { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; padding: 3px 0; }
.emerg li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; flex: none; }
.rec-spec { padding: 16px; border-radius: 22px; background: #fff; border: 1.5px solid; box-shadow: var(--sh-2); animation: fadeIn .35s both; }
.ul-dots { margin: 0; padding: 0; list-style: none; }
.ul-dots li { display: flex; gap: 10px; padding: 5px 0; font-size: 14px; color: var(--body); }
.ul-dots li .i { width: 17px; height: 17px; flex: none; margin-top: 2px; }

/* ---------- Visa ---------- */
.wiz-prog { display: flex; gap: 6px; margin: 4px 0 6px; }
.wiz-prog i { flex: 1; height: 5px; border-radius: 3px; background: var(--slate-200); transition: background .3s; }
.wiz-prog i.on { background: var(--sky); }
.visa-hero { border-radius: 26px; padding: 22px 18px; background: linear-gradient(145deg, #0284c7 0%, #0ea5e9 55%, #38bdf8 100%); color: #fff; position: relative; overflow: hidden; box-shadow: 0 22px 40px -22px #0284c7; }
.visa-hero::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 170px; height: 170px; border-radius: 50%; background: rgba(255, 255, 255, .13); }
.visa-hero > * { position: relative; z-index: 1; }
.att-card { padding: 14px; border-radius: 18px; background: #fff; border: 1px solid var(--border); margin-bottom: 12px; }

/* ---------- Support ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.contact { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: 18px; background: #fff; border: 1px solid var(--border); font-weight: 700; font-size: 13px; color: var(--ink); text-align: center; min-width: 0; }
.contact .ct-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; }
.faq { border-bottom: 1px solid var(--slate-100); }
.faq:last-child { border-bottom: 0; }
.faq summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-weight: 700; font-size: 14.5px; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { margin-left: auto; width: 18px; height: 18px; color: var(--slate-400); transition: transform .2s; flex: none; }
.faq[open] summary .i { transform: rotate(180deg); color: var(--rose); }
.faq .faq-a { padding: 0 16px 14px; color: var(--body); font-size: 14px; }
.thread-msg { padding: 12px 14px; border-radius: 18px; max-width: 88%; font-size: 14px; }
.thread-msg.me { margin-left: auto; background: var(--rose-50); border: 1px solid #fecdd3; }
.thread-msg.staff { background: #fff; border: 1px solid var(--border); }
.thread-msg + .thread-msg { margin-top: 10px; }

/* ---------- Notifications ---------- */
.notif { display: flex; gap: 12px; padding: 14px 16px; position: relative; width: 100%; text-align: left; }
.notif + .notif { border-top: 1px solid var(--slate-100); }
.notif.unread { background: linear-gradient(90deg, rgba(238, 242, 255, .9), rgba(255, 255, 255, 0)); }
.notif .n-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.notif .n-ic .i { width: 20px; height: 20px; }
.notif .n-t { font-weight: 700; font-size: 14.5px; }
.notif.unread .n-t { font-weight: 800; }
.notif .n-b { font-size: 13px; color: var(--body); margin-top: 2px; }
.notif .n-at { font-size: 11.5px; color: var(--slate-400); margin-top: 4px; font-weight: 600; }
.notif .unread-dot { position: absolute; right: 14px; top: 18px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); }

/* ---------- Profile ---------- */
.prof-hero { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 24px; background: linear-gradient(135deg, #EAF1FB 0%, #f5f3ff 50%, #f0fdfa 100%); border: 1px solid var(--primary-100); }
.av-edit { position: relative; flex: none; }
.av-edit .av-cam { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-600); color: #fff; display: grid; place-items: center; border: 3px solid #fff; }
.av-edit .av-cam .i { width: 13px; height: 13px; stroke-width: 2.2; }
.av-edit input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.av-edit.busy::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(255, 255, 255, .6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 3a9 9 0 1 0 9 9'/%3E%3C/svg%3E") center no-repeat; animation: spin 1s linear infinite; }

/* Mod accents */
[data-mod="pharmacy"] { --accent: var(--teal); --accent-600: var(--teal-600); --accent-50: var(--teal-50); }
[data-mod="ai"] { --accent: var(--violet); --accent-600: var(--violet-600); --accent-50: var(--violet-50); }
[data-mod="visa"] { --accent: var(--sky); --accent-600: var(--sky-600); --accent-50: var(--sky-50); }
[data-mod="refer"] { --accent: var(--amber); --accent-600: var(--amber-600); --accent-50: var(--amber-50); }
[data-mod="support"] { --accent: var(--rose); --accent-600: var(--rose-600); --accent-50: var(--rose-50); }

/* Pull to refresh */
.ptr { height: 0; display: grid; place-items: center; overflow: hidden; color: var(--accent-600); transition: height .2s; }
.ptr .i { width: 22px; height: 22px; }
.ptr.spin .i { animation: spin .8s linear infinite; }

/* Offline banner */
.offline { position: absolute; top: 0; left: 0; right: 0; z-index: 130; padding: calc(var(--safe-t) + 6px) 12px 6px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 700; text-align: center; }

@media (max-width: 370px) {
  .scroll { padding-left: calc(14px + var(--safe-l)); padding-right: calc(14px + var(--safe-r)); }
  .hscroll, .chips, .date-strip { margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
  .qa .qa-ic { width: 50px; height: 50px; border-radius: 16px; }
  .qa { font-size: 11px; }
  .spec-grid { gap: 8px; }
  .spec { font-size: 11px; padding: 10px 3px 9px; }
  .spec .spec-ic { width: 42px; height: 42px; }
  .otp-boxes { gap: 6px; }
  .otp-boxes input { height: 52px; font-size: 21px; }
  .btn { padding: 0 16px; }
  .h1 { font-size: 24px; }
  .dpill { width: 58px; }
  .contact { font-size: 12px; }
  .cat .cat-ic { width: 52px; height: 52px; }
  .deal { width: 148px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.logo-svg{fill:initial;stroke:none}
.splash-logo{display:block;height:56px;margin:0 auto 10px;animation:pop .6s cubic-bezier(.2,1.4,.4,1) both}

/* v0.1.0 — email sign-in, WAAFI, in-person visits */
.or-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin: 18px 0 14px; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: transparent; color: var(--muted); border-radius: 10px; display: grid; place-items: center; }
.pw-eye.on { color: var(--accent-600); }
.pw-eye .i { width: 20px; height: 20px; }
.form-note.ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.form-note.ok .i { color: #059669; }
.form-note.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.form-note.warn .i { color: #d97706; }
.wallet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.wallet-opt { border: 1.5px solid var(--border); border-radius: 14px; background: #fff; padding: 12px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; color: var(--ink); text-align: left; }
.wallet-opt i.dot { width: 28px; height: 28px; border-radius: 9px; flex: none; display: grid; place-items: center; color: #fff; font-style: normal; font-size: 13px; }
.wallet-opt.on { border-color: var(--accent-600); box-shadow: 0 0 0 3px var(--accent-50); }
.visit-card { border-radius: 16px; background: linear-gradient(135deg, var(--accent-50), #f0fdfa); border: 1px solid var(--border); padding: 14px; display: flex; gap: 12px; }
.visit-card .i { width: 22px; height: 22px; color: var(--accent-600); flex: none; margin-top: 2px; }
.mode-pill.in_person { background: #fef3c7; color: #92400e; }
.hp-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.hp-status.booked { background: #ecfdf5; color: #047857; }
.hp-status.pending { background: #fffbeb; color: #b45309; }
.hp-status .i { width: 14px; height: 14px; }
.file-pick { display: flex; align-items: center; gap: 10px; border: 1.5px dashed var(--border); border-radius: 14px; padding: 14px; color: var(--body); font-size: 14px; background: #fff; cursor: pointer; }
.file-pick .i { width: 20px; height: 20px; color: var(--accent-600); flex: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
