/* SMC Mobile v2 — Pop palette + iPhone 17 chassis + base components */

:root {
  /* Pop palette — Cream / Coral / Midnight */
  --bg:        #FFF4ED;
  --card:      #FFFFFF;
  --card-alt:  #FFF8F2;
  --ink:       #1F2937;
  --ink-soft:  #374151;
  --mu:        #6B7280;
  --mu2:       #9CA3AF;
  --hairline:  #F3E8E0;
  --gray-50:   #F3F4F4;

  --coral:     #FF8F6B;
  --coral-d:   #C2410C;
  --coral-l:   #FFE5DD;
  --coral-xl:  #FFF1EC;

  --mint:      #D4F0E8;
  --mint-d:    #065F46;

  --warn:      #F59E0B;
  --warn-l:    #FFF4DC;
  --err:       #DC2626;
  --err-l:     #FEE7E7;

  --blue:      #3B82F6;
  --blue-l:    #EAF2FF;
  --indigo:    #3730A3;
  --indigo-l:  #E0E7FF;
  --purple:    #9333EA;
  --purple-l:  #F3E8FF;
  --teal:      #0E7490;
  --teal-l:    #CFFAFE;

  /* Geometry */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(31,41,55,.05);
  --shadow-md: 0 4px 12px rgba(31,41,55,.08);
  --shadow-lg: 0 12px 32px rgba(31,41,55,.12);

  /* Phone */
  --phone-w: 402px;     /* iPhone 17 logical */
  --phone-h: 874px;
  --bezel:   14px;
  --chassis-radius: 56px;
  --screen-radius:  44px;

  /* Bottom nav */
  --nav-h: 84px;

  /* Header (status bar + content header) */
  --status-h: 44px;
  --header-h: 56px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: linear-gradient(135deg, #1a1a1f 0%, #2a2530 50%, #1a1a1f 100%);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01";
}

/* Page stage background */
.stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 32px 16px 80px;
  gap: 24px;
}
.stage-title {
  color: rgba(255,255,255,.85);
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.stage-title small {
  display: block;
  color: rgba(255,255,255,.5);
  font-weight: 400;
  font-size: 11px;
  margin-top: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.stage-toolbar {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.stage-toolbar button {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  font-weight: 500;
  transition: background .15s;
}
.stage-toolbar button:hover { background: rgba(255,255,255,.16); }
.stage-toolbar button.danger { color: #FCA5A5; border-color: rgba(252,165,165,.3); }

/* iPhone 17 chassis */
.iphone {
  position: relative;
  width: calc(var(--phone-w) + var(--bezel) * 2);
  height: calc(var(--phone-h) + var(--bezel) * 2);
  border-radius: var(--chassis-radius);
  background:
    linear-gradient(155deg, #2c2c30 0%, #18181b 50%, #2c2c30 100%);
  padding: var(--bezel);
  box-shadow:
    0 60px 120px rgba(0,0,0,.55),
    0 24px 48px rgba(0,0,0,.4),
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -1px 0 rgba(0,0,0,.5),
    inset 2px 0 0 rgba(255,255,255,.04),
    inset -2px 0 0 rgba(255,255,255,.04);
}
/* Side buttons (decorative) */
.iphone::before, .iphone::after {
  content: "";
  position: absolute;
  background: linear-gradient(to right, #1a1a1c, #38383d, #1a1a1c);
  border-radius: 2px;
}
.iphone::before {
  /* Power button right side */
  right: -3px;
  top: 180px;
  width: 5px;
  height: 90px;
}
.iphone::after {
  /* Volume up left side */
  left: -3px;
  top: 150px;
  width: 5px;
  height: 60px;
  box-shadow:
    0 80px 0 0 #1a1a1c,
    0 80px 0 1px rgba(255,255,255,.04);
}
/* Mute switch + volume down (decoration) */
.iphone-side-btn {
  position: absolute;
  left: -3px;
  width: 5px;
  background: linear-gradient(to right, #1a1a1c, #38383d, #1a1a1c);
  border-radius: 2px;
}
.iphone-side-btn.mute  { top: 100px; height: 32px; }
.iphone-side-btn.voldn { top: 240px; height: 60px; }

/* Screen surface */
.screen {
  position: relative;
  width: var(--phone-w);
  height: var(--phone-h);
  border-radius: var(--screen-radius);
  background: var(--bg);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.4);
}

/* Dynamic Island (top center) */
.dynamic-island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 124px;
  height: 36px;
  background: #000;
  border-radius: 999px;
  z-index: 50;
  pointer-events: none;
}

/* Status bar */
.status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--status-h);
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 28px 0;
  pointer-events: none;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  font-family: -apple-system, system-ui, sans-serif;
}
.status-bar .clock { letter-spacing: -0.5px; }
.status-bar .right { display: flex; align-items: center; gap: 6px; }
.status-bar .signal-bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.status-bar .signal-bars i { width: 3px; background: var(--ink); border-radius: 1px; }
.status-bar .signal-bars i:nth-child(1) { height: 4px; }
.status-bar .signal-bars i:nth-child(2) { height: 6px; }
.status-bar .signal-bars i:nth-child(3) { height: 9px; }
.status-bar .signal-bars i:nth-child(4) { height: 12px; }
.status-bar .battery {
  width: 26px; height: 13px; border: 1px solid var(--ink); border-radius: 4px;
  position: relative; padding: 1px;
}
.status-bar .battery::after {
  content: ""; position: absolute; right: -3px; top: 3px; width: 2px; height: 5px;
  background: var(--ink); border-radius: 0 2px 2px 0;
}
.status-bar .battery::before {
  content: ""; display: block; width: 80%; height: 100%; background: var(--ink); border-radius: 1px;
}

/* Phone viewport (scrollable area, accounts for status + nav) */
.phone-viewport {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding-top: var(--status-h);
  padding-bottom: var(--nav-h);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.phone-viewport::-webkit-scrollbar { width: 0; display: none; }
.screen-content {
  min-height: calc(var(--phone-h) - var(--nav-h) - var(--status-h));
  padding: 8px 0 24px;
}

/* Screen header (title + back + bell) */
.s-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 20px 12px;
  gap: 8px;
}
.s-header .title-block { flex: 1; min-width: 0; padding-top: 2px; }
.s-header h1 { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.2; margin-bottom: 2px; }
.s-header .sub { font-size: 12px; color: var(--mu); line-height: 1.3; }
.s-header.with-back .title-block { padding-left: 8px; }

.icon-btn {
  width: 32px; height: 32px;
  border-radius: var(--r-md);
  background: var(--card);
  border: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
  transition: transform .12s, background .12s;
  position: relative;
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn:active { transform: translateY(0); background: var(--coral-l); }
.icon-btn.back { width: 44px; padding-bottom: 2px; }
.icon-btn .badge {
  position: absolute; top: -2px; right: -2px;
  width: 12px; height: 12px;
  background: var(--err);
  border-radius: 50%;
  border: 2px solid var(--bg);
}

/* Bottom nav */
.bottom-nav {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--card);
  border-top: 1px solid var(--hairline);
  z-index: 30;
  padding: 6px 16px 18px;
  border-radius: 0 0 var(--screen-radius) var(--screen-radius);
}
.bottom-nav .tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  color: var(--mu);
  font-size: 10px;
  font-weight: 500;
  transition: background .15s, color .15s;
  min-width: 64px;
}
.bottom-nav .tab .ico {
  font-size: 20px;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
}
.bottom-nav .tab.active {
  background: var(--coral-l);
  color: var(--coral-d);
  font-weight: 700;
}
.bottom-nav .tab:hover:not(.active) { background: var(--gray-50); }

/* Home indicator (iOS gesture bar) */
.home-bar {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background: var(--ink);
  border-radius: 3px;
  z-index: 35;
  pointer-events: none;
}

/* === Generic UI primitives === */
.card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 16px;
  margin: 8px 16px;
  box-shadow: var(--shadow-sm);
}
.card.flat { box-shadow: none; border: 1px solid var(--hairline); }
.card.coral { background: linear-gradient(135deg, #FFA88B 0%, var(--coral) 100%); color: white; }
.card.dark  { background: var(--ink); color: white; }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.row.between { justify-content: space-between; }
.row.center { justify-content: center; }
.col { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }

.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin: 6px 16px;
  cursor: pointer;
  transition: background .12s, transform .12s;
}
.list-row:hover { background: var(--coral-xl); }
.list-row:active { transform: scale(.98); }
.list-row .lr-icon {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.list-row .lr-title { font-weight: 600; font-size: 13px; color: var(--ink); }
.list-row .lr-sub   { font-size: 11px; color: var(--mu); margin-top: 1px; }
.list-row .lr-chev  { color: var(--mu2); font-size: 16px; flex-shrink: 0; }

.section-title {
  padding: 16px 20px 6px;
  font-size: 12px;
  color: var(--mu);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.section-title.with-link {
  display: flex; align-items: center; justify-content: space-between;
}
.section-title.with-link .link {
  color: var(--coral-d); font-weight: 600; font-size: 11px; cursor: pointer;
}

/* Buttons */
.btn {
  font-family: inherit;
  border: none;
  background: var(--card);
  color: var(--ink);
  padding: 10px 18px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform .12s, background .12s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--coral); color: white; }
.btn.primary:hover { background: var(--coral-d); }
.btn.outline { background: transparent; border: 1px solid var(--hairline); }
.btn.danger { background: var(--err-l); color: var(--err); }
.btn.block { width: 100%; padding: 14px; font-size: 14px; }
.btn.lg { padding: 16px 24px; font-size: 15px; }

/* Badges / pills */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--gray-50);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.pill.coral { background: var(--coral-l); color: var(--coral-d); }
.pill.mint  { background: var(--mint);    color: var(--mint-d); }
.pill.warn  { background: var(--warn-l);  color: #92400E; }
.pill.err   { background: var(--err-l);   color: var(--err); }
.pill.dark  { background: var(--ink);     color: white; }

/* Avatar */
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFA88B 0%, var(--coral) 100%);
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.avatar.lg { width: 88px; height: 88px; font-size: 36px; border: 4px solid white; box-shadow: var(--shadow-md); }

/* Toast */
.toast-stack {
  position: absolute;
  top: 60px;
  left: 0; right: 0;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
  z-index: 100;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: white;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toast-in .22s ease;
}
.toast.ok   { background: var(--mint-d); }
.toast.warn { background: #B45309; }
.toast.err  { background: var(--err); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Toggle / switch */
.switch {
  position: relative;
  display: inline-block;
  width: 38px; height: 22px;
  background: var(--gray-50);
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s;
  flex-shrink: 0;
}
.switch::before {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform .18s;
}
.switch.on { background: var(--mint-d); }
.switch.on::before { transform: translateX(16px); }

/* Radio / checkmark */
.radio {
  width: 22px; height: 22px;
  border: 2px solid var(--mu2);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: border-color .15s;
}
.radio.on {
  border-color: var(--coral-d);
}
.radio.on::after {
  content: ""; width: 10px; height: 10px;
  border-radius: 50%; background: var(--coral-d);
}

/* Stat card */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px 16px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--r-md);
  padding: 14px 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-card .v { font-size: 22px; font-weight: 800; color: var(--ink); }
.stat-card .l { font-size: 10px; color: var(--mu); margin-top: 2px; }

/* Grid 2-col card layout */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 8px 16px;
}
.grid-2 .gcard {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 14px;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
  box-shadow: var(--shadow-sm);
}
.grid-2 .gcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.grid-2 .gcard .gico {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-bottom: 10px;
}
.grid-2 .gcard .gtitle { font-size: 13px; font-weight: 700; color: var(--ink); }
.grid-2 .gcard .gsub   { font-size: 10px; color: var(--mu); margin-top: 2px; }
.grid-2 .gcard .glink  { font-size: 10px; color: var(--coral-d); margin-top: 8px; font-weight: 600; }

/* Hero (coral) card */
.hero {
  background: linear-gradient(135deg, #FFA88B 0%, var(--coral) 100%);
  color: white;
  padding: 18px;
  border-radius: var(--r-lg);
  margin: 8px 16px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.12);
  border-radius: 50%;
  right: -60px; top: -60px;
}
.hero .h-eyebrow { font-size: 11px; opacity: .85; font-weight: 500; margin-bottom: 4px; position: relative; z-index: 1; }
.hero .h-title   { font-size: 26px; font-weight: 800; line-height: 1.1; position: relative; z-index: 1; }
.hero .h-meta    { font-size: 11px; opacity: .85; margin-top: 8px; position: relative; z-index: 1; }
.hero .h-actions { display: flex; gap: 8px; margin-top: 12px; position: relative; z-index: 1; }
.hero .h-actions .btn { background: white; color: var(--coral-d); }

/* Star rating */
.stars { display: inline-flex; gap: 4px; }
.stars .star {
  font-size: 28px;
  color: #E5E7EB;
  cursor: pointer;
  transition: color .12s, transform .12s;
}
.stars .star.on { color: var(--warn); }
.stars .star:hover { transform: scale(1.15); }

/* Filter chips row */
.chips-row {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
}
.chips-row::-webkit-scrollbar { display: none; }
.chip {
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--card);
  border: 1px solid var(--hairline);
  font-size: 12px;
  font-weight: 600;
  color: var(--mu);
  cursor: pointer;
  white-space: nowrap;
  transition: all .12s;
}
.chip.on { background: var(--coral-d); color: white; border-color: var(--coral-d); }

/* Empty state */
.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--mu);
}
.empty .e-icon { font-size: 56px; margin-bottom: 12px; opacity: .4; }
.empty .e-title { font-weight: 700; color: var(--ink); margin-bottom: 4px; font-size: 14px; }
.empty .e-sub { font-size: 12px; }

/* Notification list specific */
.notif-row {
  display: flex;
  gap: 12px;
  background: var(--card);
  border-radius: var(--r-md);
  padding: 12px;
  margin: 6px 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background .12s;
}
.notif-row.unread::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--coral-d);
}
.notif-row .n-icon {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.notif-row .n-body { flex: 1; min-width: 0; }
.notif-row .n-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.notif-row .n-text  { font-size: 11px; color: var(--mu); }
.notif-row .n-time  { font-size: 10px; color: var(--mu2); margin-top: 4px; }
.notif-row .n-dot   {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--coral-d);
  align-self: center;
  flex-shrink: 0;
}

/* Tap targets — make sure clickable cursor */
[role="button"], button { cursor: pointer; }

/* Modal */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  border-radius: var(--screen-radius);
  animation: fade-in .15s ease;
}
.modal {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 24px;
  width: 100%; max-width: 320px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.modal h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.modal p  { font-size: 12px; color: var(--mu); margin-bottom: 16px; }
.modal .actions { display: flex; gap: 8px; }
.modal .actions .btn { flex: 1; }
@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }

/* QR placeholder */
.qr-box {
  width: 220px; height: 220px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  margin: 16px auto;
  position: relative;
  background-image:
    linear-gradient(45deg, var(--ink) 25%, transparent 25%, transparent 75%, var(--ink) 75%),
    linear-gradient(45deg, var(--ink) 25%, transparent 25%, transparent 75%, var(--ink) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
}
.qr-box::after {
  content: "QR";
  position: absolute; inset: 16px;
  background: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 28px; color: var(--ink);
  border-radius: 8px;
}

/* Calendar */
.cal {
  background: var(--card);
  border-radius: var(--r-lg);
  margin: 8px 16px;
  padding: 14px;
}
.cal-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
}
.cal-head h3 { font-size: 14px; font-weight: 700; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center;
}
.cal-grid .dow { font-size: 10px; color: var(--mu); padding: 4px 0; font-weight: 600; }
.cal-grid .day {
  padding: 8px 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.cal-grid .day:hover { background: var(--coral-xl); }
.cal-grid .day.today { background: var(--ink); color: white; }
.cal-grid .day.sel   { background: var(--coral); color: white; }
.cal-grid .day.muted { color: var(--mu2); }
.cal-grid .day.dot::after {
  content: ""; display: block; width: 4px; height: 4px;
  background: var(--coral-d); border-radius: 50%; margin: 2px auto 0;
}

/* Slot grid */
.slot-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding: 8px 16px;
}
.slot {
  background: var(--card);
  border-radius: var(--r-md);
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  transition: all .12s;
  border: 1px solid transparent;
}
.slot:hover { border-color: var(--coral); }
.slot.taken { opacity: .35; cursor: not-allowed; background: var(--gray-50); }
.slot.sel { background: var(--coral); color: white; }
.slot.sel .slot-sub { color: rgba(255,255,255,.85); }
.slot-time { font-size: 16px; font-weight: 800; }
.slot-sub { font-size: 10px; color: var(--mu); margin-top: 2px; }

/* Map placeholder */
.map-stub {
  height: 280px;
  margin: 8px 16px;
  border-radius: var(--r-lg);
  background:
    repeating-linear-gradient(45deg, #E8F0F9 0 12px, #DCE7F2 12px 24px);
  position: relative;
  overflow: hidden;
}
.map-stub::after {
  content: "📍 คุณอยู่ที่นี่";
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: var(--coral); color: white;
  padding: 6px 12px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600;
  box-shadow: var(--shadow-md);
}

/* === Countdown card (Reminder) === */
.countdown {
  background: linear-gradient(135deg, #FFA88B 0%, var(--coral) 100%);
  color: white;
  border-radius: var(--r-lg);
  margin: 8px 16px;
  padding: 28px 20px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.countdown::after {
  content: ""; position: absolute;
  width: 220px; height: 220px;
  background: rgba(255,255,255,.16);
  border-radius: 50%;
  right: -60px; top: -60px;
}
.countdown .cd-eyebrow { font-size: 12px; opacity: .9; font-weight: 500; position: relative; z-index: 1; margin-bottom: 4px; }
.countdown .cd-num { font-size: 96px; font-weight: 900; line-height: 1; position: relative; z-index: 1; margin: 8px 0 4px; }
.countdown .cd-unit { font-size: 22px; font-weight: 700; position: relative; z-index: 1; }
.countdown .cd-meta { font-size: 12px; opacity: .9; margin-top: 12px; position: relative; z-index: 1; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.25); }

/* === Doctor location card (Reminder) === */
.dr-card {
  background: white;
  border-radius: var(--r-lg);
  margin: 8px 16px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.dr-row { display: flex; gap: 12px; align-items: center; }
.dr-row .ico { font-size: 18px; }

/* === Checkbox (for prep list) === */
.check {
  width: 24px; height: 24px;
  border: 2px solid var(--mu2);
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .12s;
  background: white;
}
.check.on {
  background: var(--mint-d);
  border-color: var(--mint-d);
  color: white;
  font-weight: 700;
}

/* === Observation timer (Vaccine, dark) === */
.obs-timer {
  background: var(--ink);
  color: white;
  border-radius: var(--r-lg);
  margin: 8px 16px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.obs-timer::after {
  content: ""; position: absolute;
  width: 220px; height: 220px;
  background: rgba(255,143,107,.2);
  border-radius: 50%;
  right: -60px; top: -60px;
}
.obs-timer .ot-label { font-size: 11px; font-weight: 700; opacity: .7; letter-spacing: 0.08em; position: relative; z-index: 1; }
.obs-timer .ot-eyebrow { font-size: 12px; opacity: .8; margin: 2px 0 4px; position: relative; z-index: 1; }
.obs-timer .ot-time { font-size: 64px; font-weight: 900; line-height: 1; letter-spacing: -2px; font-family: 'SF Mono', monospace; position: relative; z-index: 1; }
.obs-timer .ot-bar { height: 6px; background: rgba(255,255,255,.2); border-radius: 3px; margin-top: 12px; overflow: hidden; position: relative; z-index: 1; }
.obs-timer .ot-bar > i { display: block; height: 100%; background: var(--coral); border-radius: 3px; }
.obs-timer .ot-status { font-size: 11px; opacity: .8; margin-top: 8px; text-align: center; position: relative; z-index: 1; }
.obs-timer .ot-foot {
  margin-top: 14px;
  background: rgba(255,255,255,.08);
  border-radius: var(--r-md);
  padding: 8px 12px;
  font-size: 11px;
  position: relative; z-index: 1;
}

/* === Progress card (Checkup, dark) === */
.progress-dark {
  background: var(--ink);
  color: white;
  border-radius: var(--r-lg);
  margin: 8px 16px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.progress-dark::after {
  content: ""; position: absolute;
  width: 200px; height: 200px;
  background: rgba(255,143,107,.18);
  border-radius: 50%;
  right: -60px; top: -60px;
}
.progress-dark .pd-label { font-size: 11px; font-weight: 700; opacity: .7; letter-spacing: 0.08em; position: relative; z-index: 1; }
.progress-dark .pd-pkg { font-size: 16px; font-weight: 800; margin: 4px 0 12px; position: relative; z-index: 1; }
.progress-dark .pd-num { font-size: 56px; font-weight: 900; line-height: 1; position: relative; z-index: 1; }
.progress-dark .pd-num small { font-size: 18px; opacity: .7; font-weight: 600; margin-left: 6px; }
.progress-dark .pd-bar { height: 6px; background: rgba(255,255,255,.2); border-radius: 3px; margin-top: 14px; overflow: hidden; position: relative; z-index: 1; }
.progress-dark .pd-bar > i { display: block; height: 100%; background: var(--coral); border-radius: 3px; }

/* === Caregiver — dark patient card === */
.cg-patient {
  background: var(--ink);
  color: white;
  border-radius: var(--r-lg);
  margin: 8px 16px;
  padding: 14px;
}
.cg-patient .label { font-size: 10px; opacity: .7; font-weight: 700; letter-spacing: 0.08em; }
.cg-patient .row { gap: 12px; margin-top: 6px; }

/* === Caregiver — colored shortcut grid (4 in 2x2) === */
.cg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 8px 16px;
}
.cg-shortcut {
  border-radius: var(--r-lg);
  padding: 18px 14px;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
  font-weight: 700;
  font-size: 14px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-sm);
}
.cg-shortcut:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cg-shortcut .ico { font-size: 22px; }
.cg-shortcut.coral  { background: linear-gradient(135deg, #FFA88B 0%, var(--coral) 100%); color: white; }
.cg-shortcut.mint   { background: linear-gradient(135deg, var(--mint) 0%, #A7E0CB 100%); color: var(--mint-d); }
.cg-shortcut.purple { background: linear-gradient(135deg, var(--purple-l) 0%, #DBC2FF 100%); color: var(--purple); }
.cg-shortcut.warm   { background: linear-gradient(135deg, #FFE0BF 0%, #FFCB8B 100%); color: #92400E; }

/* === QR with corner brackets === */
.qr-frame {
  position: relative;
  width: 220px; height: 220px;
  margin: 16px auto;
}
.qr-frame .qr-bg {
  position: absolute; inset: 16px;
  background-image:
    linear-gradient(45deg, var(--ink) 25%, transparent 25%, transparent 75%, var(--ink) 75%),
    linear-gradient(45deg, var(--ink) 25%, transparent 25%, transparent 75%, var(--ink) 75%);
  background-size: 14px 14px;
  background-position: 0 0, 7px 7px;
  background-color: white;
  border-radius: 8px;
}
.qr-frame .qr-center {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  background: linear-gradient(135deg, #FFA88B 0%, var(--coral) 100%);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 20px;
  border: 4px solid white;
  box-shadow: var(--shadow-sm);
  z-index: 1;
}
.qr-frame .corner {
  position: absolute;
  width: 28px; height: 28px;
  border: 3px solid var(--coral);
}
.qr-frame .corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; border-radius: 8px 0 0 0; }
.qr-frame .corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; border-radius: 0 8px 0 0; }
.qr-frame .corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; border-radius: 0 0 0 8px; }
.qr-frame .corner.br { bottom: 0; right: 0; border-left: none; border-top: none; border-radius: 0 0 8px 0; }

/* Dark info card (Check-in) */
.info-dark {
  background: var(--ink);
  color: white;
  border-radius: var(--r-lg);
  margin: 8px 16px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
}
.info-dark .label { font-size: 10px; opacity: .7; font-weight: 700; letter-spacing: 0.08em; }
.info-dark .v { font-size: 18px; font-weight: 800; margin-top: 2px; }
.info-dark .sub { font-size: 11px; opacity: .8; margin-top: 2px; }
.info-dark .right { text-align: right; }
.info-dark .right .v { color: var(--coral); }

/* Doctor dark hero (14 Doctor Card) */
.dr-hero {
  background: var(--ink);
  color: white;
  border-radius: var(--r-lg);
  margin: 8px 16px;
  padding: 24px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.dr-hero::after {
  content: ""; position: absolute;
  width: 240px; height: 240px;
  background: rgba(255,143,107,.18);
  border-radius: 50%;
  right: -80px; top: -80px;
}
.dr-hero .av-wrap { position: relative; display: inline-block; z-index: 1; }
.dr-hero .av-wrap .online {
  position: absolute; right: 6px; bottom: 6px;
  width: 14px; height: 14px;
  background: #10B981;
  border-radius: 50%;
  border: 3px solid var(--ink);
}
.dr-hero .name { font-size: 18px; font-weight: 800; margin-top: 12px; position: relative; z-index: 1; }
.dr-hero .meta { font-size: 12px; opacity: .85; margin-top: 2px; position: relative; z-index: 1; }
.dr-hero .stars { color: var(--warn); font-size: 12px; margin-top: 6px; position: relative; z-index: 1; }
.dr-hero .tags { display: flex; gap: 6px; justify-content: center; margin-top: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.dr-hero .tag { background: rgba(255,255,255,.15); padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }

/* Map with walking path (Navigation) */
.nav-map {
  position: relative;
  height: 360px;
  background:
    repeating-linear-gradient(0deg, transparent 0 39px, #E2E8F0 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, #E2E8F0 39px 40px),
    #F1F5F9;
  margin: 8px 16px 0;
  border-radius: var(--r-lg);
  overflow: hidden;
}
.nav-map .start-dot {
  position: absolute; left: 16%; bottom: 24%;
  width: 16px; height: 16px;
  border-radius: 50%; background: white;
  border: 3px solid var(--ink);
  z-index: 2;
}
.nav-map .end-pin {
  position: absolute; right: 18%; top: 18%;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--coral); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
  border: 3px solid white;
  box-shadow: var(--shadow-md);
  z-index: 2;
}
.nav-map .path {
  position: absolute; inset: 0;
  z-index: 1;
}

/* Time pill (Navigation) */
.time-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--coral);
  color: white;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
}

/* === Vaccine Passport === */
.passport-card {
  background: linear-gradient(135deg, #1F2937 0%, #374151 100%);
  color: white;
  border-radius: var(--r-lg);
  margin: 8px 16px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.passport-card::before {
  content: "✈ TRAVEL READY";
  position: absolute; top: 14px; right: 16px;
  font-size: 9px; font-weight: 800; letter-spacing: 0.12em;
  background: rgba(255,143,107,.28);
  color: var(--coral);
  padding: 4px 8px;
  border-radius: 4px;
}
.passport-card .label { font-size: 10px; font-weight: 700; opacity: .65; letter-spacing: 0.08em; }
.passport-card .name  { font-size: 18px; font-weight: 800; margin-top: 4px; }
.passport-card .qr    {
  width: 110px; height: 110px;
  background: white;
  margin: 14px auto;
  border-radius: 12px;
  background-image:
    linear-gradient(45deg, var(--ink) 25%, transparent 25%, transparent 75%, var(--ink) 75%),
    linear-gradient(45deg, var(--ink) 25%, transparent 25%, transparent 75%, var(--ink) 75%);
  background-size: 10px 10px;
  background-position: 0 0, 5px 5px;
  position: relative;
}
.passport-card .qr::after {
  content: "💉";
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: white; padding: 4px 6px; font-size: 14px; border-radius: 6px;
}
.passport-card .meta-row {
  display: flex; gap: 16px; justify-content: center;
  font-size: 11px;
  margin-top: 8px;
}
.passport-card .meta-row strong { font-weight: 700; }

/* === Trend chart modal === */
.trend-card {
  background: white;
  border-radius: var(--r-lg);
  padding: 16px;
  margin: 8px 16px;
}
.trend-svg {
  width: 100%; height: 80px;
}
.trend-axis {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--mu);
  margin-top: 4px;
}

/* === Doctor directory cards (smaller, in grid) === */
.dr-mini {
  display: flex; gap: 12px;
  background: white;
  border-radius: var(--r-md);
  padding: 12px;
  margin: 6px 16px;
  cursor: pointer;
  transition: background .12s;
}
.dr-mini:hover { background: var(--coral-xl); }
.dr-mini .av { position: relative; flex-shrink: 0; }
.dr-mini .av .online {
  position: absolute; right: 0; bottom: 0;
  width: 10px; height: 10px;
  background: #10B981;
  border-radius: 50%;
  border: 2px solid white;
}
.dr-mini .info { flex: 1; min-width: 0; }
.dr-mini .nm { font-size: 13px; font-weight: 700; }
.dr-mini .sp { font-size: 11px; color: var(--mu); margin-top: 1px; }
.dr-mini .tg { font-size: 10px; color: var(--mu2); margin-top: 4px; }

/* === Claim status pills === */
.pill.cl-ok      { background: var(--mint);   color: var(--mint-d); }
.pill.cl-wait    { background: var(--warn-l); color: #92400E; }
.pill.cl-deny    { background: var(--err-l);  color: var(--err); }
.pill.cl-paid    { background: var(--ink);    color: white; }

/* === Coverage row (Insurance lookup) === */
.cov-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--hairline);
  font-size: 12px;
}
.cov-row:first-child { border-top: none; }
.cov-row .pct { font-weight: 800; color: var(--coral-d); }

/* === MedCert · Flow stepper (5 stages) === */
.flow-stepper {
  display: flex;
  align-items: flex-start;
  margin: 8px 16px 0;
  background: var(--card);
  border-radius: var(--r-md);
  padding: 14px 10px;
  box-shadow: var(--shadow-sm);
}
.flow-stepper .step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  text-align: center;
}
.flow-stepper .step .dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gray-50);
  color: var(--mu);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  z-index: 1;
}
.flow-stepper .step.done .dot { background: var(--mint-d); color: white; }
.flow-stepper .step.current .dot {
  background: var(--coral-d); color: white;
  box-shadow: 0 0 0 4px var(--coral-l);
}
.flow-stepper .step .lbl { font-size: 9px; color: var(--mu); margin-top: 5px; line-height: 1.2; max-width: 60px; }
.flow-stepper .step.done .lbl { color: var(--ink); font-weight: 600; }
.flow-stepper .step.current .lbl { color: var(--coral-d); font-weight: 700; }
/* line connector between steps */
.flow-stepper .step::before {
  content: ""; position: absolute;
  top: 13px; left: -50%; right: 50%;
  height: 2px;
  background: var(--gray-50);
  z-index: 0;
}
.flow-stepper .step:first-child::before { display: none; }
.flow-stepper .step.done::before,
.flow-stepper .step.done + .step::before { background: var(--mint-d); }
.flow-stepper .step.current::before { background: linear-gradient(to right, var(--mint-d) 50%, var(--gray-50) 50%); }

/* === Cert list row (compact) === */
.cert-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin: 6px 16px;
  cursor: pointer;
  transition: background .12s, transform .12s;
}
.cert-row:hover { background: var(--coral-xl); transform: translateY(-1px); }
.cert-row .ico {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--coral-l); color: var(--coral-d);
}
.cert-row.intl .ico { background: var(--blue-l); color: var(--blue); }
.cert-row .body { flex: 1; min-width: 0; }
.cert-row .name-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--ink);
}
.cert-row .flag-pill {
  font-size: 9px; font-weight: 700;
  padding: 1px 6px; border-radius: 999px;
  background: var(--gray-50); color: var(--mu);
}
.cert-row.local .flag-pill { background: var(--mint); color: var(--mint-d); }
.cert-row.intl .flag-pill  { background: var(--blue-l); color: var(--blue); }
.cert-row .meta { font-size: 10px; color: var(--mu); margin-top: 2px; }
.cert-row .price-block { text-align: right; flex-shrink: 0; }
.cert-row .price { font-size: 16px; font-weight: 800; color: var(--coral-d); }
.cert-row .price-sub { font-size: 9px; color: var(--mu); }

/* === Status tracker — active orders === */
.order-card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 14px;
  margin: 6px 16px;
  border-left: 3px solid var(--coral-d);
}
.order-card.ready { border-left-color: var(--mint-d); }

/* Phone-frame note */
.phone-note {
  color: rgba(255,255,255,.5);
  font-size: 11px;
  text-align: center;
  margin-top: 8px;
  letter-spacing: 0.04em;
}

/* ========================================================== */
/* Symptom Checker styles                                      */
/* ========================================================== */

.symp-welcome {
  margin: 14px 16px 10px !important;
  padding: 20px !important;
  text-align: center;
  background: linear-gradient(135deg, #FEE2E2, #FEF3C7) !important;
  border: 1px solid #FCA5A5 !important;
}
.symp-w-icon {
  width: 64px; height: 64px; border-radius: 18px;
  background: white; margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px;
  box-shadow: 0 6px 14px rgba(0,0,0,.08);
}
.symp-disclaimer {
  margin: 0 16px 10px !important;
  padding: 12px !important;
  background: #F9FAFB !important;
  border: 1px dashed var(--bd) !important;
  font-size: 12px;
}

.symp-progress {
  height: 4px;
  background: #E5E7EB;
  margin: 0 16px 10px;
  border-radius: 4px;
  overflow: hidden;
}
.symp-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--coral-d));
  transition: width 0.3s ease;
}

/* --- Complaint picker grid --- */
.symp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 16px;
}
.symp-complaint-card {
  background: white;
  border: 1.5px solid var(--bd);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.symp-complaint-card:hover, .symp-complaint-card:active {
  border-color: var(--coral-d);
  background: var(--coral-xl);
  transform: scale(0.98);
}
.symp-complaint-card .ico { font-size: 30px; line-height: 1; margin-bottom: 2px; }
.symp-complaint-card .name { font-size: 13px; font-weight: 700; color: var(--ink); }
.symp-complaint-card .en { font-size: 10px; color: var(--mu); }

/* --- Red-flag rows --- */
.symp-redflag-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 16px 8px;
  padding: 12px 14px;
  background: white;
  border: 1.5px solid var(--bd);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.symp-redflag-row.on {
  background: #FEF2F2;
  border-color: #DC2626;
}
.symp-redflag-row .ico { font-size: 24px; line-height: 1; }
.symp-redflag-row .check-box {
  width: 24px; height: 24px; border-radius: 6px;
  border: 2px solid var(--bd);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 14px;
}
.symp-redflag-row .check-box.on {
  background: #DC2626; border-color: #DC2626;
}

/* --- Question card --- */
.symp-question {
  margin: 8px 16px;
  padding: 18px 16px;
  background: white;
  border-radius: 16px;
  border: 1px solid var(--bd);
}
.symp-question .q-icon {
  font-size: 38px; text-align: center; margin-bottom: 6px;
}
.symp-question h2 {
  margin: 4px 0 16px; font-size: 16px; text-align: center; font-weight: 700;
}
.q-choices {
  display: grid; gap: 8px;
}
.q-choice {
  padding: 14px 14px;
  background: #F9FAFB;
  border: 1.5px solid var(--bd);
  border-radius: 10px;
  font-size: 13px; font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}
.q-choice.on {
  background: var(--coral-xl);
  border-color: var(--coral-d);
  color: var(--coral-d);
}
.q-slider {
  padding: 16px 0;
  text-align: center;
}
.q-slider-emoji { font-size: 52px; line-height: 1; margin-bottom: 10px; }
.q-range {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  background: linear-gradient(90deg, #A7F3D0 0%, #FDE68A 50%, #FCA5A5 100%);
  border-radius: 4px;
  outline: none;
}
.q-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: white;
  border: 3px solid var(--coral-d);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.q-slider-val {
  font-size: 22px; font-weight: 800; color: var(--coral-d); margin-top: 8px;
}
.q-slider-hint {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--mu); margin-top: 4px;
}
.q-multi {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.q-chip {
  padding: 8px 14px;
  background: #F9FAFB;
  border: 1.5px solid var(--bd);
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.q-chip.on {
  background: var(--coral-xl); border-color: var(--coral-d); color: var(--coral-d);
}

/* --- Triage result hero --- */
.symp-result-hero {
  margin: 12px 16px;
  padding: 24px 16px;
  border-radius: 18px;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.symp-result-hero .tier-ico { font-size: 48px; line-height: 1; margin-bottom: 6px; }
.symp-result-hero .tier-label { font-size: 18px; font-weight: 800; }
.symp-result-hero .tier-desc { font-size: 13px; opacity: 0.9; margin-top: 4px; }
.symp-result-hero.red     { background: linear-gradient(135deg, #DC2626, #991B1B); }
.symp-result-hero.orange  { background: linear-gradient(135deg, #F97316, #C2410C); }
.symp-result-hero.yellow  { background: linear-gradient(135deg, #F59E0B, #B45309); }
.symp-result-hero.blue    { background: linear-gradient(135deg, #3B82F6, #1E40AF); }
.symp-result-hero.purple  { background: linear-gradient(135deg, #A855F7, #6B21A8); }
.symp-result-hero.green   { background: linear-gradient(135deg, #10B981, #065F46); }

.triage-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px; font-weight: 700;
  color: white;
}
.triage-badge.red     { background: #DC2626; }
.triage-badge.orange  { background: #F97316; }
.triage-badge.yellow  { background: #F59E0B; color: #78350F; }
.triage-badge.blue    { background: #3B82F6; }
.triage-badge.purple  { background: #A855F7; }
.triage-badge.green   { background: #10B981; }

.symp-ward-card {
  background: linear-gradient(135deg, #F0F9FF, #E0F2FE) !important;
  border: 1px solid #60A5FA !important;
}

/* --- Emergency takeover --- */
.symp-emergency-takeover {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #DC2626, #991B1B);
  color: white;
  padding: 40px 24px 24px;
  overflow-y: auto;
  text-align: center;
  z-index: 100;
}
.symp-emergency-takeover .em-icon {
  font-size: 64px; line-height: 1; margin-bottom: 8px;
  animation: em-pulse 1s ease-in-out infinite;
}
@keyframes em-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
.symp-emergency-takeover h1 {
  margin: 0 0 6px; font-size: 26px; font-weight: 900;
}
.symp-emergency-takeover p {
  margin: 0 0 20px; font-size: 13px; line-height: 1.6;
}
.symp-emergency-takeover .em-call-btn {
  display: block;
  margin: 0 auto 16px;
  padding: 16px 24px;
  background: white;
  color: #DC2626;
  font-size: 18px; font-weight: 900;
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  animation: em-pulse 2s ease-in-out infinite;
}
.symp-emergency-takeover .em-sub-actions {
  display: grid; gap: 8px; margin-bottom: 18px;
}
.symp-emergency-takeover .em-sub-actions .btn {
  background: rgba(255,255,255,.15); color: white; border-color: rgba(255,255,255,.3);
}
.symp-emergency-takeover .em-flag-list {
  background: rgba(0,0,0,.2);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  font-size: 12px;
}
.symp-emergency-takeover .em-cancel {
  background: transparent; border: 0; color: rgba(255,255,255,.6);
  margin-top: 16px; text-decoration: underline; font-size: 12px;
}
.symp-emergency-takeover .pulse-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 300px; height: 300px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,.15);
  animation: em-ring 2s ease-out infinite;
  pointer-events: none;
}
@keyframes em-ring {
  0%   { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

/* --- Booking slot picker --- */
.symp-booking-summary {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A) !important;
  border: 1px solid #F59E0B !important;
}
.symp-slot-card {
  display: flex; align-items: center; gap: 10px;
  margin: 0 16px 8px;
  padding: 12px 14px;
  background: white;
  border: 1.5px solid var(--bd);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.symp-slot-card.on {
  border-color: var(--coral-d);
  background: var(--coral-xl);
}
.symp-slot-card .radio-dot {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--bd);
  display: flex; align-items: center; justify-content: center;
  color: var(--coral-d);
  font-size: 10px;
}
.symp-slot-card.on .radio-dot { border-color: var(--coral-d); }

/* --- Confirmation hero --- */
.symp-confirm-hero {
  margin: 14px 16px 10px;
  padding: 24px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #10B981, #065F46);
  color: white;
  text-align: center;
}
.symp-confirm-hero .check {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 800;
  margin: 0 auto 10px;
}
.symp-confirm-hero h2 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.symp-confirm-hero p  { margin: 0; font-size: 14px; opacity: 0.95; }

.symp-qr-card img {
  border: 8px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  border-radius: 8px;
}
.kv {
  display: flex; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px dashed var(--bd);
  font-size: 13px;
}
.kv:last-child { border: 0; }
.kv span { color: var(--mu); }

/* --- Danger/primary button variants for symptom --- */
.btn.danger {
  background: #DC2626; color: white; border-color: #DC2626;
}
.btn.danger:hover { background: #991B1B; border-color: #991B1B; }
