:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.06);
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius: 16px;
  --blue: #2563eb;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --green: #16a34a;
  --green-50: #ecfdf5;
  --green-100: #d1fae5;
  --purple: #7c3aed;
  --purple-50: #f5f3ff;
  --purple-100: #ede9fe;
  --red: #ef4444;
  --red-50: #fef2f2;
  --orange: #f97316;
  --orange-50: #fff7ed;
  --indigo: #4f46e5;
  --rose: #e11d48;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.3;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  user-select: none;
  position: relative;
}

.app-header {
  height: 80px;
  padding: 0 calc(24px + env(safe-area-inset-right)) 0 calc(24px + env(safe-area-inset-left));
  background: var(--card);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  flex-shrink: 0;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-badge {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 20px;
}
.brand-title { font-weight: 900; font-size: 24px; letter-spacing: -0.02em; }
.brand-subtitle { color: var(--muted); font-size: 14px; margin-top: 0; }
.header-date { font-size: 16px; font-weight: 600; color: rgba(15, 23, 42, 0.72); }

.app-main {
  flex: 1;
  width: 100%;
  max-width: 100%;
  padding-top: 16px;
  padding-right: calc(24px + env(safe-area-inset-right));
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  padding-left: calc(24px + env(safe-area-inset-left));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.scroll-container {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 4px;
  -webkit-overflow-scrolling: touch;
}

/* Page Structure */
.page { height: 100%; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.page-full { height: 100%; min-height: 0; }
.page-topbar {
  display: grid; grid-template-columns: 180px 1fr 180px;
  align-items: center; gap: 16px; margin-bottom: 12px;
  flex-shrink: 0;
}
.header-row {
  display: grid;
  grid-template-columns: 180px 1fr 180px;
  align-items: center;
  gap: 16px;
  padding: 0 0 12px 0;
  flex-shrink: 0;
}
.header-center { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.header-title { font-size: 24px; font-weight: 950; margin: 0; color: rgba(15, 23, 42, 0.9); }
.header-subtitle { font-size: 15px; color: rgba(100, 116, 139, 0.9); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.text-strong { font-weight: 800; color: rgba(15, 23, 42, 0.9); background: rgba(15, 23, 42, 0.04); padding: 2px 8px; border-radius: 6px; }

.page-title { margin: 0; text-align: center; font-size: 28px; font-weight: 900; letter-spacing: -0.02em; }
.topbar-spacer { height: 1px; }

/* Home Layout */
.home { height: 100%; display: flex; flex-direction: column; padding-bottom: 40px; }
.home-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 20px;
  height: 100%;
}
.home-left { display: flex; flex-direction: column; gap: 16px; height: 100%; }
.home-right { display: flex; flex-direction: column; gap: 16px; height: 100%; }
.home-bottom { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; flex: 1; min-height: 0; }

/* Carousel Compact */
.carousel {
  flex: 1.5;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  min-height: 0;
}
.carousel-track { position: absolute; inset: 0; }
.carousel-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s ease; }
.carousel-slide.is-active { opacity: 1; }
.carousel-image { width: 100%; height: 100%; object-fit: cover; }
.carousel-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.1), transparent);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px;
}
.carousel-title { margin: 0 0 4px 0; color: #fff; font-size: 28px; letter-spacing: -0.02em; }
.carousel-subtitle { margin: 0; color: rgba(255, 255, 255, 0.9); font-size: 16px; max-width: 90%; }
.carousel-indicators { position: absolute; right: 24px; bottom: 16px; display: flex; gap: 6px; }
.carousel-dot { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.55); width: 6px; transition: width 0.18s ease, background 0.18s ease; }
.carousel-dot.is-active { width: 20px; background: #fff; }

/* Cards & Actions */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  display: flex; flex-direction: column;
  height: 100%;
}
.card-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.card-title { font-weight: 900; color: rgba(15, 23, 42, 0.86); font-size: 14px; }
.card-body { padding: 0 16px 12px 16px; color: rgba(15, 23, 42, 0.78); flex: 1; display: flex; flex-direction: column; justify-content: center; }
.card-solid { border: none; box-shadow: var(--shadow); }
.card-solid.is-primary { background: var(--blue); color: #fff; }

.big-action {
  flex: 1;
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 2px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
  overflow: hidden;
  position: relative;
  min-height: 0;
}
.big-action:hover { transform: translateY(-2px); }
.big-action:active { transform: scale(0.99); }
.big-action-bar { position: absolute; left: 0; top: 0; height: 100%; width: 6px; }
.big-action-icon {
  width: 52px; height: 52px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: rgba(15, 23, 42, 0.04);
  flex-shrink: 0;
}
.big-action-title { font-size: 18px; font-weight: 950; line-height: 1.1; }
.big-action-subtitle { font-size: 12px; color: rgba(100, 116, 139, 0.9); margin-top: 2px; }
.big-action.is-blue { border-color: rgba(219, 234, 254, 0.9); }
.big-action.is-blue .big-action-bar { background: var(--blue); }
.big-action.is-blue .big-action-icon { background: rgba(37, 99, 235, 0.12); }
.big-action.is-purple { border-color: rgba(237, 233, 254, 0.9); }
.big-action.is-purple .big-action-bar { background: var(--purple); }
.big-action.is-purple .big-action-icon { background: rgba(124, 58, 237, 0.12); }
.big-action.is-green { border-color: rgba(209, 250, 229, 0.9); }
.big-action.is-green .big-action-bar { background: var(--green); }
.big-action.is-green .big-action-icon { background: rgba(22, 163, 74, 0.12); }

/* Grid Pages (Choice, Service) */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; height: 100%; align-content: center; }
.choice-card {
  height: 100%;
  max-height: 340px;
  min-height: 300px;
  padding: 34px 22px;
  border-radius: var(--radius-xl);
  border: 2px solid rgba(226, 232, 240, 0.9);
  background: var(--card);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px;
  cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform 0.15s ease;
}

.print-area { display: none; }
.choice-card:hover { transform: translateY(-4px); }
.choice-card:active { transform: scale(0.985); }
.choice-accent { position: absolute; left: 0; top: 0; width: 100%; height: 6px; }
.choice-icon {
  width: 84px; height: 84px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; background: rgba(15, 23, 42, 0.04);
}
.choice-title { font-size: 28px; font-weight: 950; letter-spacing: -0.02em; text-align: center; }
.choice-subtitle { font-size: 14px; color: rgba(100, 116, 139, 0.9); text-align: center; }
.choice-card.is-green { border-color: rgba(209, 250, 229, 0.9); }
.choice-card.is-green .choice-accent { background: var(--green); }
.choice-card.is-green .choice-icon { background: rgba(22, 163, 74, 0.12); }
.choice-card.is-blue { border-color: rgba(219, 234, 254, 0.9); }
.choice-card.is-blue .choice-accent { background: var(--blue); }
.choice-card.is-blue .choice-icon { background: rgba(37, 99, 235, 0.12); }
.choice-card.is-purple { border-color: rgba(237, 233, 254, 0.9); }
.choice-card.is-purple .choice-accent { background: var(--purple); }
.choice-card.is-purple .choice-icon { background: rgba(124, 58, 237, 0.12); }

/* Internal Pages (Panel, Numpad) */
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; height: 100%; min-height: 0; }
.col-4 { grid-column: span 4; display: flex; flex-direction: column; gap: 12px; height: 100%; min-height: 0; }
.col-8 { grid-column: span 8; display: flex; flex-direction: column; gap: 12px; height: 100%; min-height: 0; }

.stack { display: flex; flex-direction: column; gap: 10px; height: 100%; overflow-y: auto; }
.method-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border-radius: 16px;
  border: 2px solid rgba(226, 232, 240, 0.95);
  background: var(--card); cursor: pointer; text-align: left;
  transition: transform 0.12s ease;
  width: 100%;
}
.method-btn:hover { box-shadow: var(--shadow-sm); border-color: rgba(147, 197, 253, 0.7); background: rgba(37, 99, 235, 0.04); }
.method-btn.is-active { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22); transform: scale(1.02); }
.method-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: rgba(15, 23, 42, 0.06); flex-shrink: 0; }
.method-btn.is-active .method-icon { background: rgba(255, 255, 255, 0.18); }
.method-title { font-weight: 900; font-size: 16px; }
.method-subtitle { margin-top: 2px; color: rgba(100, 116, 139, 0.9); font-size: 12px; }
.method-btn.is-active .method-subtitle { color: rgba(219, 234, 254, 0.9); }

.panel {
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 20px;
  flex: 1;
  display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto;
  min-height: 0;
}
.panel-wide { max-width: 600px; margin: 0 auto; width: 100%; }
.center-wrap { display: flex; align-items: center; justify-content: center; height: 100%; }
.panel-title { font-size: 24px; font-weight: 950; text-align: center; margin-bottom: 8px; }
.panel-subtitle {
  text-align: center;
  color: rgba(100, 116, 139, 0.92);
  font-weight: 800;
  margin-top: -6px;
  margin-bottom: 6px;
}

.ident { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
.ident-field { flex-shrink: 0; }

.label { display: block; color: rgba(100, 116, 139, 0.92); font-weight: 800; font-size: 14px; margin: 0 0 6px 8px; }
.input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border-radius: 16px;
  border: 2px solid rgba(226, 232, 240, 0.95);
  background: rgba(15, 23, 42, 0.03);
  color: rgba(15, 23, 42, 0.86);
  font-weight: 900;
  font-size: 18px;
  outline: none;
}
.input:focus {
  background: var(--card);
  border-color: rgba(147, 197, 253, 0.9);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.row { display: flex; gap: 12px; }
.row .btn { flex: 1; }
.ident-display {
  height: 56px;
  background: rgba(15, 23, 42, 0.03);
  border-radius: 14px;
  border: 2px solid rgba(226, 232, 240, 0.95);
  display: flex; align-items: center; padding: 0 16px;
  font-size: 28px; font-weight: 900; letter-spacing: 0.18em;
  font-family: monospace; color: rgba(15, 23, 42, 0.9);
}

.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; flex: 1; min-height: 0; }
.numpad-btn {
  border: 1px solid transparent; background: rgba(15, 23, 42, 0.03);
  border-radius: 14px; font-size: 24px; font-weight: 950;
  color: rgba(15, 23, 42, 0.78); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  height: 100%; min-height: 0;
}
.numpad-btn:hover { background: var(--card); box-shadow: var(--shadow-sm); border-color: rgba(191, 219, 254, 0.75); }
.numpad-btn.is-danger { background: rgba(239, 68, 68, 0.10); color: #b91c1c; }
.numpad-btn.is-warn { background: rgba(249, 115, 22, 0.12); color: #c2410c; }

.scan-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 24px 12px;
  border-radius: 20px; background: rgba(15, 23, 42, 0.02);
  border: 1px dashed rgba(148, 163, 184, 0.6);
  flex: 1;
}
.scan-icon { font-size: 48px; opacity: 0.25; }
.scan-title { font-weight: 900; font-size: 18px; color: rgba(15, 23, 42, 0.74); text-align: center; }
.scan-subtitle { color: rgba(37, 99, 235, 0.9); font-weight: 800; font-size: 14px; }

/* Service Queue */
.service-modes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 8px;
}
.mode-card {
  border-radius: 18px;
  border: 2px solid rgba(226, 232, 240, 0.95);
  background: rgba(15, 23, 42, 0.02);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  padding: 16px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.mode-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: rgba(147, 197, 253, 0.8); background: rgba(37, 99, 235, 0.04); }
.mode-card:active { transform: scale(0.99); }
.mode-icon {
  width: 48px; height: 48px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: rgba(37, 99, 235, 0.10);
  color: var(--blue);
  flex-shrink: 0;
}
.mode-title { font-weight: 950; font-size: 16px; color: rgba(15, 23, 42, 0.86); }
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  color: rgba(100, 116, 139, 0.9);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.divider::before, .divider::after {
  content: "";
  height: 1px;
  background: rgba(226, 232, 240, 0.95);
  flex: 1;
}
.divider > span { padding: 0 2px; }
.service-scan, .service-manual { display: flex; flex-direction: column; gap: 12px; }

/* Scan QR Look */
.scan-box {
  position: relative;
  overflow: hidden;
  max-width: 560px;
  margin: 0 auto;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background:
    radial-gradient(600px 240px at 50% 0%, rgba(37, 99, 235, 0.08), transparent 60%),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.01));
}
.scan-box::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 18px;
  pointer-events: none;
  background:
    linear-gradient(var(--blue), var(--blue)) left top / 28px 4px no-repeat,
    linear-gradient(var(--blue), var(--blue)) left top / 4px 28px no-repeat,
    linear-gradient(var(--blue), var(--blue)) right top / 28px 4px no-repeat,
    linear-gradient(var(--blue), var(--blue)) right top / 4px 28px no-repeat,
    linear-gradient(var(--blue), var(--blue)) left bottom / 28px 4px no-repeat,
    linear-gradient(var(--blue), var(--blue)) left bottom / 4px 28px no-repeat,
    linear-gradient(var(--blue), var(--blue)) right bottom / 28px 4px no-repeat,
    linear-gradient(var(--blue), var(--blue)) right bottom / 4px 28px no-repeat;
  opacity: 0.85;
}
.scan-box::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 24px;
  height: 2px;
  border-radius: 999px;
  pointer-events: none;
  background: linear-gradient(to right, transparent, rgba(37, 99, 235, 0.95), transparent);
  box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.06);
  animation: scanline 1.6s ease-in-out infinite;
}
@keyframes scanline {
  0% { transform: translateY(0); opacity: 0.35; }
  45% { opacity: 1; }
  100% { transform: translateY(190px); opacity: 0.35; }
}
.scan-icon { opacity: 0.55; }
.scan-subtitle { animation: scanpulse 1.1s ease-in-out infinite; }
@keyframes scanpulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

/* Split View (Poli, Doctors) */
.split {
  display: flex; gap: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: var(--card);
  flex: 1; min-height: 0;
}
.split-sidebar {
  width: 260px;
  border-right: 1px solid rgba(226, 232, 240, 0.9);
  background: var(--card);
  padding: 12px;
  overflow-y: auto;
}
.split-content {
  flex: 1;
  background: rgba(15, 23, 42, 0.02);
  padding: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar-title { font-size: 11px; font-weight: 950; color: rgba(100, 116, 139, 0.8); letter-spacing: 0.14em; text-transform: uppercase; margin: 8px 8px 10px 8px; }
.sidebar-list { display: flex; flex-direction: column; gap: 8px; }
.sidebar-btn {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 14px;
  border: 1px solid transparent; background: rgba(15, 23, 42, 0.03);
  cursor: pointer;
}
.sidebar-btn.is-active { background: var(--blue); color: #fff; box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18); }
.sidebar-pill {
  width: 28px; height: 28px; border-radius: 10px;
  background: rgba(15, 23, 42, 0.08); display: flex; align-items: center; justify-content: center;
  font-weight: 950; font-size: 12px;
}
.sidebar-btn.is-active .sidebar-pill { background: rgba(255, 255, 255, 0.18); }

.content-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.content-title { margin: 0; font-size: 20px; font-weight: 950; }

.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cards-grid-tight { grid-template-columns: repeat(4, 1fr); gap: 12px; }
.card-item {
  border-radius: 20px; background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer; position: relative; overflow: hidden;
}
.card-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: rgba(147, 197, 253, 0.8); }
.card-item.is-active {
  border-color: var(--blue);
  background: rgba(37, 99, 235, 0.06);
  box-shadow: 0 0 0 2px var(--blue);
  transform: translateY(-2px);
}
.card-item-title { font-weight: 950; font-size: 15px; color: rgba(15, 23, 42, 0.82); line-height: 1.2; }
.card-item-sub { color: rgba(100, 116, 139, 0.9); font-weight: 800; font-size: 11px; }
.card-item-icon {
  width: 44px; height: 44px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(37, 99, 235, 0.10); font-size: 20px; color: var(--blue);
}

body[data-page="select-doctor"] .cards-grid-tight[data-doctor-grid] { grid-template-columns: 1fr; }
body[data-page="select-doctor"] .card-item { align-items: stretch; text-align: left; }
body[data-page="select-doctor"] .card-item > div { width: 100%; }

.poli-cat-trigger { display: none; }

/* Page Helpers */
.page-center { align-items: center; justify-content: center; }
.center-title { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.page-subtitle { color: rgba(100, 116, 139, 0.9); font-weight: 800; font-size: 14px; text-align: center; }

/* Loading & Empty States */
.loading {
  margin: 20px auto 0 auto;
  padding: 14px 16px;
  width: 100%;
  max-width: 520px;
  text-align: center;
  color: rgba(100, 116, 139, 0.92);
  font-weight: 900;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(226, 232, 240, 0.95);
}
.empty {
  margin: 20px auto 0 auto;
  padding: 28px 24px;
  width: 100%;
  max-width: 560px;
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.empty-title { font-size: 22px; font-weight: 950; letter-spacing: -0.01em; color: rgba(15, 23, 42, 0.9); }
.empty-subtitle { font-size: 14px; font-weight: 800; color: rgba(100, 116, 139, 0.92); max-width: 52ch; }
.empty .btn { margin-top: 6px; }

/* Confirm & Success */
.confirm-card {
  background: var(--card); border-radius: var(--radius-xl);
  box-shadow: var(--shadow); overflow: hidden;
  max-width: 500px; width: 100%;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 120px);
}
.confirm-banner { padding: 20px; background: var(--blue-50); border-bottom: 1px solid rgba(219, 234, 254, 0.9); text-align: center; flex-shrink: 0; }
.confirm-title { font-size: 22px; font-weight: 950; color: #1e3a8a; }
.confirm-subtitle { color: rgba(30, 58, 138, 0.8); font-weight: 700; margin-top: 4px; font-size: 14px; }
.confirm-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.confirm-actions {
  padding: 20px; border-top: 1px solid rgba(226, 232, 240, 0.9);
  display: flex; gap: 12px; flex-shrink: 0;
}
.confirm-actions .btn { flex: 1; }

.kv { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 12px; background: rgba(15, 23, 42, 0.03); }
.k { color: var(--muted); font-weight: 800; font-size: 13px; }
.v { font-weight: 950; color: rgba(15, 23, 42, 0.9); font-size: 16px; }

.error {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.22);
  color: #b91c1c;
  font-weight: 900;
  font-size: 13px;
}

.confirm { width: 100%; display: flex; align-items: center; justify-content: center; }
.success { width: 100%; display: flex; align-items: center; justify-content: center; }
.success-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 28px 24px;
  max-width: 500px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.success-icon {
  width: 72px; height: 72px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px;
}
.success-title { font-size: 24px; font-weight: 950; letter-spacing: -0.02em; }
.success-subtitle { color: rgba(100, 116, 139, 0.92); font-weight: 800; font-size: 14px; }
.success-number {
  margin-top: 2px;
  font-size: 40px;
  font-weight: 1000;
  letter-spacing: 0.06em;
  color: rgba(15, 23, 42, 0.92);
}
.success-meta { color: rgba(100, 116, 139, 0.92); font-weight: 800; font-size: 13px; margin-top: 4px; }
.success-actions { display: flex; gap: 12px; width: 100%; margin-top: 10px; }
.success-actions .btn { flex: 1; }

/* Sticky Actions */
.sticky-actions {
  flex-shrink: 0;
  padding: 16px 0 0 0;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  margin-top: 12px;
}
.btn-block { width: 100%; display: flex; }

/* Buttons & Elements */
.btn {
  border: 1px solid var(--border); background: var(--card);
  color: rgba(15, 23, 42, 0.78); padding: 10px 16px;
  border-radius: 14px; font-weight: 800; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; cursor: pointer;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18); }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 10px 20px rgba(22, 163, 74, 0.18); }
.btn-soft { background: rgba(15, 23, 42, 0.04); border-color: rgba(226, 232, 240, 0.95); color: rgba(15, 23, 42, 0.8); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: rgba(15, 23, 42, 0.72); }
.btn-ghost:hover { background: rgba(15, 23, 42, 0.04); border-color: rgba(226, 232, 240, 0.9); }
.btn-xl { padding: 14px 18px; border-radius: 16px; font-size: 18px; }

.idle-guard {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.idle-guard-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
}
.idle-guard-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
.idle-guard-title { font-size: 22px; font-weight: 1000; letter-spacing: -0.02em; color: rgba(15, 23, 42, 0.92); }
.idle-guard-subtitle { font-size: 14px; font-weight: 900; color: rgba(100, 116, 139, 0.92); }
.idle-guard-actions { display: flex; justify-content: center; margin-top: 8px; }
.is-idle-locked { overflow: hidden; }

.marquee {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #0b2b63; color: #fff; padding: 8px 0;
  overflow: hidden; z-index: 50; font-size: 14px;
}
.marquee-track { display: inline-flex; gap: 20px; white-space: nowrap; animation: marquee 28s linear infinite; padding-left: 100%; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

.event-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; }
.event-title { font-weight: 700; color: rgba(15, 23, 42, 0.78); font-size: 14px; }
.pill { padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 900; }
.pill.is-blue { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }
.pill.is-red { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.pill.is-purple { background: rgba(124, 58, 237, 0.12); color: #6d28d9; }
.info-tag { font-weight: 900; letter-spacing: 0.12em; font-size: 11px; opacity: 0.9; }
.info-text { margin-top: 6px; font-size: 15px; line-height: 1.4; font-weight: 650; }

.icon-badge { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.icon-badge.is-orange { background: rgba(249, 115, 22, 0.15); color: var(--orange); }

/* Service Cards */
.service-card {
  border-radius: 20px; background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 32px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
  height: 100%;
}
.service-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: rgba(147, 197, 253, 0.8); }
.service-card:active { transform: scale(0.99); }
.service-icon { width: 64px; height: 64px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 32px; }
.service-icon.is-blue { background: rgba(37, 99, 235, 0.12); color: var(--blue); }
.service-icon.is-purple { background: rgba(124, 58, 237, 0.12); color: var(--purple); }
.service-icon.is-green { background: rgba(22, 163, 74, 0.12); color: var(--green); }
.service-icon.is-orange { background: rgba(249, 115, 22, 0.14); color: var(--orange); }
.service-icon.is-indigo { background: rgba(79, 70, 229, 0.12); color: var(--indigo); }
.service-icon.is-rose { background: rgba(225, 29, 72, 0.12); color: var(--rose); }
.service-title { font-size: 18px; font-weight: 950; text-align: center; }
.service-desc { font-size: 12px; color: rgba(100, 116, 139, 0.9); font-weight: 800; text-align: center; }

.info {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  gap: 16px;
}

.info-sidebar {
  width: 320px;
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.info-sidebar-top {
  padding: 18px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background:
    radial-gradient(900px 260px at 0% 0%, rgba(37, 99, 235, 0.10), transparent 55%),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.01));
}

.info-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(15, 23, 42, 0.02);
  font-weight: 950;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.78);
  margin-bottom: 12px;
}

.info-back:hover { background: var(--card); box-shadow: var(--shadow-sm); border-color: rgba(191, 219, 254, 0.85); }
.info-back:active { transform: scale(0.99); }

.info-heading {
  font-size: 22px;
  font-weight: 1000;
  letter-spacing: -0.02em;
  color: rgba(15, 23, 42, 0.9);
}

.info-subheading {
  margin-top: 4px;
  color: rgba(100, 116, 139, 0.92);
  font-weight: 850;
  font-size: 13px;
}

.info-nav {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
}

.info-item {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.03);
  cursor: pointer;
  font-weight: 950;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.82);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.info-item:hover { background: var(--card); box-shadow: var(--shadow-sm); border-color: rgba(147, 197, 253, 0.85); }
.info-item:active { transform: scale(0.99); }
.info-item:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16); border-color: rgba(147, 197, 253, 0.95); }
.info-item.is-active { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18); }

.info-help {
  padding: 14px 16px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  background:
    radial-gradient(700px 180px at 0% 0%, rgba(22, 163, 74, 0.08), transparent 55%),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.01), rgba(15, 23, 42, 0.02));
}

.info-help-title { font-weight: 1000; font-size: 14px; color: rgba(15, 23, 42, 0.86); }
.info-help-text { margin-top: 4px; color: rgba(100, 116, 139, 0.92); font-weight: 850; font-size: 12px; line-height: 1.35; }

.info-main { flex: 1; min-height: 0; display: flex; }

.info-panel {
  flex: 1;
  min-height: 0;
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 20px;
  overflow-y: auto;
}

.info-section { max-width: 1120px; margin: 0 auto; }

.info-hero {
  margin: 14px 0 0 0;
  padding: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background:
    radial-gradient(900px 240px at 0% 0%, rgba(37, 99, 235, 0.10), transparent 55%),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.01));
}

.info-hero-img {
  width: 100%;
  display: block;
  aspect-ratio: 25 / 10;
  object-fit: cover;
}

.info-hero-caption {
  padding: 10px 14px 12px 14px;
  color: rgba(100, 116, 139, 0.92);
  font-weight: 850;
  font-size: 12px;
  line-height: 1.35;
}

.info-gallery {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.info-shot {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(15, 23, 42, 0.02);
}

.info-shot-img {
  width: 100%;
  display: block;
  aspect-ratio: 9 / 7;
  object-fit: cover;
}

.info-shot-cap {
  padding: 10px 14px 12px 14px;
  font-weight: 950;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.78);
}

.map-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: 12px;
  align-items: start;
}

.map-figure {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(15, 23, 42, 0.02);
}

.map-link { display: block; }
.map-link:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16); }

.map-img {
  width: 100%;
  display: block;
  aspect-ratio: 14 / 9;
  object-fit: contain;
  background: var(--card);
}

.map-caption {
  padding: 10px 14px 12px 14px;
  color: rgba(100, 116, 139, 0.92);
  font-weight: 850;
  font-size: 12px;
  line-height: 1.35;
}

.map-legend {
  border-radius: 22px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: var(--card);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  padding: 14px;
}

.map-legend-title {
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgba(100, 116, 139, 0.82);
  margin-bottom: 10px;
}

.map-legend-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-legend-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid rgba(226, 232, 240, 0.9);
  color: rgba(15, 23, 42, 0.78);
  font-weight: 950;
  font-size: 13px;
}

.map-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.06);
  flex-shrink: 0;
}

.map-dot.is-green { background: var(--green); box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.14); }
.map-dot.is-blue { background: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14); }
.map-dot.is-yellow { background: var(--orange); box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.16); }
.map-dot.is-purple { background: var(--purple); box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.14); }
.map-dot.is-sky { background: rgba(14, 165, 233, 0.92); box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14); }
.map-dot.is-gray { background: rgba(100, 116, 139, 0.9); box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.14); }

.info .section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.info .section-title { margin: 0; font-size: 26px; font-weight: 1000; letter-spacing: -0.02em; color: rgba(15, 23, 42, 0.92); }
.info .section-text { margin: 6px 0 0 0; color: rgba(100, 116, 139, 0.92); font-weight: 850; font-size: 14px; max-width: 72ch; line-height: 1.45; }

.info .grid-2 {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 12px;
}

.info .cards-grid { margin-top: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.info .loading, .info .empty { margin-top: 14px; }

.info .steps {
  margin: 14px 0 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: info-step;
}

.info .steps li {
  position: relative;
  padding: 14px 14px 14px 56px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid rgba(226, 232, 240, 0.95);
  color: rgba(15, 23, 42, 0.82);
  font-weight: 950;
  line-height: 1.35;
}

.info .steps li::before {
  counter-increment: info-step;
  content: counter(info-step);
  position: absolute;
  left: 14px;
  top: 12px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 1000;
  font-size: 13px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--blue);
}

.info .bullets {
  margin: 14px 0 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info .bullets li {
  position: relative;
  padding: 14px 14px 14px 44px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid rgba(226, 232, 240, 0.95);
  color: rgba(15, 23, 42, 0.82);
  font-weight: 900;
  line-height: 1.35;
}

.info .bullets li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 22px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.info .search { width: 360px; max-width: 100%; }
.info .search .input { height: 52px; font-size: 16px; }

@media (max-width: 980px) {
  .app-main {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .page,
  .page-full {
    height: auto;
  }

  .home,
  .home-grid,
  .home-left,
  .home-right {
    height: auto;
  }

  body[data-page="home"] .carousel,
  body[data-page="home"] .home-bottom {
    flex: none;
  }

  body[data-page="home"] .home-bottom .card {
    height: auto;
  }

  body[data-page="home"] .home-bottom .card-body {
    justify-content: flex-start;
  }

  .home-grid { grid-template-columns: 1fr; }
  .home-bottom { grid-template-columns: 1fr; }

  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-grid-tight { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .grid-12 { grid-template-columns: 1fr; height: auto; }
  .col-4, .col-8 { grid-column: span 12; }
}

@media (max-width: 720px) {
  html, body { overflow: hidden; }

  .app-header { height: 64px; }
  .brand { gap: 10px; }
  .brand-badge { width: 34px; height: 34px; border-radius: 10px; font-size: 18px; }
  .brand-title { font-size: 18px; }
  .brand-subtitle { font-size: 12px; }
  .header-date { display: none; }

  .app-main {
    padding-top: 12px;
    padding-right: calc(16px + env(safe-area-inset-right));
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    padding-left: calc(16px + env(safe-area-inset-left));
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .page,
  .page-full {
    height: auto;
  }

  .page-topbar,
  .header-row {
    grid-template-columns: auto 1fr;
    gap: 10px;
  }
  .topbar-spacer { display: none; }
  .page-title { font-size: 22px; text-align: left; }
  .header-title { font-size: 20px; }
  .header-subtitle { font-size: 13px; flex-wrap: wrap; justify-content: center; }
  .text-strong { padding: 2px 6px; }

  body[data-page="select-poli"] .header-row {
    position: relative;
    grid-template-columns: 1fr;
    justify-items: center;
    padding-top: 46px;
  }
  body[data-page="select-poli"] .header-row > a.btn {
    position: absolute;
    left: 0;
    top: 0;
  }
  body[data-page="select-poli"] .header-center { align-items: center; text-align: center; }

  body[data-page="select-poli"] .poli-cat-trigger { display: inline-flex; }
  body[data-page="select-poli"] .split-sidebar { display: none; }
  body[data-page="select-poli"] .poli-cat-drawer {
    position: fixed;
    inset: 0;
    z-index: 160;
    display: flex;
    align-items: flex-end;
  }
  body[data-page="select-poli"] .poli-cat-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
  }
  body[data-page="select-poli"] .poli-cat-sheet {
    position: relative;
    width: 100%;
    border-radius: 22px 22px 0 0;
    background: var(--card);
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 -20px 50px rgba(15, 23, 42, 0.25);
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom)) 14px;
    max-height: calc(100vh - 110px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  body[data-page="select-poli"] .poli-cat-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  body[data-page="select-poli"] .poli-cat-sheet-title {
    font-weight: 1000;
    font-size: 18px;
    letter-spacing: -0.02em;
  }
  body[data-page="select-poli"] .poli-cat-sheet-body {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  body[data-page="select-poli"] .poli-cat-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  body[data-page="select-poli"] .poli-cat-list .sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: visible;
  }
  body[data-page="select-poli"] .poli-cat-list .sidebar-btn { width: 100%; }
  body[data-page="select-poli"] .poli-cat-list .sidebar-btn { white-space: normal; }
  body.is-poli-cat-open { overflow: hidden; }

  body[data-page="select-doctor"] .page-topbar {
    position: relative;
    grid-template-columns: 1fr;
    justify-items: center;
    padding-top: 46px;
  }
  body[data-page="select-doctor"] .page-topbar > a.btn.btn-ghost {
    position: absolute;
    left: 0;
    top: 0;
  }
  body[data-page="select-doctor"] .center-title { align-items: center; text-align: center; }
  body[data-page="select-doctor"] .page-title { text-align: center; }

  body[data-page="select-schedule"] .page-topbar {
    position: relative;
    grid-template-columns: 1fr;
    justify-items: center;
    padding-top: 46px;
  }
  body[data-page="select-schedule"] .page-topbar > a.btn.btn-ghost {
    position: absolute;
    left: 0;
    top: 0;
  }
  body[data-page="select-schedule"] .center-title { align-items: center; text-align: center; }
  body[data-page="select-schedule"] .page-title { text-align: center; }

  .grid-3 { grid-template-columns: 1fr; height: auto; align-content: start; }
  .choice-card { min-height: 180px; max-height: none; padding: 22px 18px; border-radius: 20px; }
  .choice-icon { width: 64px; height: 64px; font-size: 28px; }
  .choice-title { font-size: 22px; }

  .home { padding-bottom: 72px; }
  .home-grid { gap: 14px; }
  .carousel-overlay { padding: 16px; }
  .carousel-title { font-size: 22px; }
  .carousel-subtitle { font-size: 14px; }

  .big-action { padding: 14px 16px; border-radius: 18px; gap: 12px; }
  .big-action-icon { width: 44px; height: 44px; font-size: 20px; }
  .big-action-title { font-size: 16px; }

  .panel { padding: 16px; border-radius: 20px; }
  .panel-title { font-size: 20px; }
  .input { height: 52px; font-size: 16px; }
  .ident-display { height: 52px; font-size: 22px; }
  .numpad-btn { font-size: 20px; border-radius: 12px; }

  .btn { padding: 10px 14px; font-size: 14px; }
  .btn-xl { padding: 12px 14px; font-size: 16px; }

  .split { flex-direction: column; }
  .split-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  }
  .sidebar-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .sidebar-btn { white-space: nowrap; flex-shrink: 0; }

  .cards-grid { grid-template-columns: 1fr; }
  .cards-grid-tight { grid-template-columns: 1fr; }

  .service-modes { grid-template-columns: 1fr; }
  .service-card { padding: 20px; }

  .marquee {
    padding: 10px 0;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    font-size: 13px;
  }
}

@media (max-width: 420px) {
  .page-title { font-size: 20px; }
  .brand-title { font-size: 16px; }
  .big-action-title { font-size: 15px; }
  .choice-card { min-height: 168px; padding: 20px 16px; }
  .choice-title { font-size: 20px; }
}

@media (min-width: 1200px) {
  .info .cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .info { flex-direction: column; }
  .info-sidebar { width: 100%; }
  .info-nav { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .info-item { width: auto; white-space: nowrap; flex-shrink: 0; }
  .info-help { display: none; }
}

@media (max-width: 720px) {
  .info-panel { padding: 16px; }
  .info .section-title { font-size: 22px; }
  .info .grid-2 { grid-template-columns: 1fr; }
  .info-gallery { grid-template-columns: 1fr; }
  .map-grid { grid-template-columns: 1fr; }
}
