* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(31, 191, 106, 0.16), transparent 50%),
    #071018;
  color: #f4f7fb;
  line-height: 1.45;
}
a { color: inherit; }
.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 12px 18px;
  border-bottom: 1px solid rgba(42, 54, 80, 0.8);
  background: rgba(7, 16, 24, 0.92);
  backdrop-filter: blur(12px);
}
.logo {
  width: 52px; height: 52px; margin-right: 10px; flex: 0 0 auto;
  object-fit: contain; background: transparent;
}
.brand { display: flex; align-items: center; min-width: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 17px; font-weight: 750; letter-spacing: -0.03em; }
.brand-text small { color: #9fe7c0; font-size: 11px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; }
.wrap { width: min(920px, calc(100% - 40px)); margin: 28px auto 72px; }
.hero { margin-bottom: 32px; }
.eyebrow { color: #1fbf6a; font-size: 12px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 10px; }
.hero h1 { font-size: clamp(28px, 6vw, 44px); line-height: 1.08; margin: 0 0 14px; }
.lead { color: #9aa8bd; font-size: 17px; max-width: 38rem; margin: 0 0 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  border: 0; border-radius: 12px; padding: 12px 16px; cursor: pointer;
  font-weight: 700; background: #1fbf6a; color: #062014;
  box-shadow: 0 8px 20px rgba(31, 191, 106, 0.18);
}
.btn:hover { filter: brightness(1.06); }
a.btn { display: inline-block; text-decoration: none; color: #062014; }
.btn.ghost {
  background: transparent; border: 1px solid #2a3650; color: #f4f7fb;
  box-shadow: none;
}
.btn.ghost:hover { border-color: #1fbf6a; color: #9fe7c0; }
.card {
  background: #162235;
  border: 1px solid #2d3d58;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}
.card h2 { margin: 0 0 8px; font-size: 18px; }
.card.stack { margin-top: 14px; }
.hist-row {
  margin: 0; padding: 10px 0;
  border-bottom: 1px solid #243044;
  color: #c5d0de; font-size: 14px;
}
.hist-row:last-child { border-bottom: 0; padding-bottom: 0; }
.card.kind-visit { border-color: #c9a227; }
.price-card b { display: block; font-size: 16px; margin-bottom: 6px; }
.price { color: #1fbf6a; font-weight: 800; font-size: 22px; letter-spacing: -0.03em; }
.steps { margin-top: 14px; }
.steps .card { min-height: 132px; }
.step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 999px; margin-bottom: 10px;
  background: rgba(31, 191, 106, 0.16); color: #9fe7c0; font-size: 12px; font-weight: 800;
}
.steps b { display: block; margin-bottom: 6px; }
.doctor-entry {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.doctor-entry h2 { margin: 0 0 4px; }
.consult-pick .btn.active, .consult-pick .btn[data-consult].active {
  background: #1fbf6a; color: #062014; border-color: #1fbf6a;
}
.pill {
  display: inline-block; font-size: 12px; font-weight: 700;
  background: #182338; border: 1px solid #2a3650; border-radius: 999px;
  padding: 4px 10px; margin: 6px 0;
}
.pill.visit { background: #3a2a10; border-color: #ffc043; color: #ffd98a; }
.geo-box { margin: 8px 0; }
.geo-stage {
  position: relative; height: 280px; min-height: 280px; border-radius: 14px;
  overflow: hidden; border: 1px solid #2a3650; margin: 8px 0; background: #182338;
}
.geo-stage.ops { height: 420px; min-height: 420px; }
.leaflet-container { height: 100%; width: 100%; background: #182338; }
.kmc-pin { background: none !important; border: none !important; }
.kmc-pin svg { display: block; width: 28px; height: 40px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); }
.leaflet-tooltip.kmc-tip {
  background: #0b1220; color: #f4f7fb; border: 1px solid #2a3650;
  border-radius: 10px; padding: 8px 10px; font-weight: 650;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.leaflet-tooltip.kmc-tip::before { border-top-color: #0b1220; }
.geo-map { width: 100%; height: 280px; min-height: 280px; border: 0; display: block; }
.geo-stage.ops .geo-map { height: 420px; min-height: 420px; }
.map-pin { position: absolute; width: 28px; height: 40px; transform: translate(-50%, -100%); z-index: 2; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); }
.map-pin svg { display: block; width: 28px; height: 40px; }
.map-pin.patient { color: #1fbf6a; }
.map-pin.doctor { color: #e53935; }
.map-pin.idle { color: #9aa8bd; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
label { display: block; font-size: 12px; color: #9aa8bd; margin: 8px 0 4px; }
input, select {
  width: 100%; background: #182338; border: 1px solid #2a3650; color: #fff;
  border-radius: 10px; padding: 11px 12px;
}
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%239aa8bd' d='M1 1l5 6 5-6'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; cursor: pointer;
}
.state-box { border: 1px solid #2a3650; border-radius: 12px; background: #182338; overflow: hidden; }
.state-box input { border: 0; border-bottom: 1px solid #2a3650; border-radius: 0; }
.state-list { max-height: 220px; overflow-y: auto; padding: 6px; }
.state-list button { display: block; width: 100%; text-align: left; background: transparent; color: #f4f7fb; border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.state-list button:hover, .state-list button.active { background: #1fbf6a; color: #062014; }
.muted { color: #9aa8bd; }
.warn { background: #3a1c1c; color: #ffc9c2; padding: 10px 12px; border-radius: 12px; }
.pay-deadline { background: #3a2a10; border: 1px solid #ffc043; color: #ffd98a; padding: 12px 14px; border-radius: 12px; font-weight: 650; }
.pay-deadline .clock { font-size: 28px; letter-spacing: .04em; color: #ffc043; display: block; margin: 6px 0; }
.pay-deadline.ended { background: #3a1c1c; color: #ffc9c2; border-color: #e85d4c; }
.cutoff.ended { color: #e85d4c; }
.ai-line { color: #9fd7ff; font-weight: 600; }
.btn.danger { background: #e85d4c; color: #2a0c09; box-shadow: none; }
.triage-card { background: #0e1f1a; border: 1px solid #1fbf6a; margin: 8px 0; }
.triage-card b { color: #9fe7c0; }
.review-box { margin: 8px 0; }
.review-box .stars { display: flex; gap: 2px; margin: 4px 0; }
.review-box .star { background: transparent; border: none; color: #5a6470; font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 0 2px; }
.review-box .star.on { color: #f5b301; }
.review-box input { margin-bottom: 8px; }
.rating { color: #f5b301; font-weight: 600; font-size: 0.9em; }
.dispute-wrap { margin-top: 8px; }
.dispute-wrap summary { color: #9fd7ff; cursor: pointer; }
#call-bar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; background: #062014; color: #9fe7c0; border-bottom: 1px solid #1fbf6a; }
#call-bar[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.error { color: #ffb4ab; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
h1 { letter-spacing: -.03em; }
.staff-desk > summary { cursor: pointer; font-weight: 750; padding: 6px 0; }
.staff-desk > summary::-webkit-details-marker { color: #ffc043; }
.who { color: #9aa8bd; font-size: 13px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .top { padding: 10px 12px; }
  .wrap { width: calc(100% - 24px); margin-top: 20px; }
}
