/* UYARIQ SALUD · App Ciudadano (móvil, tema claro cálido) */

body.app-ciudadano {
  min-height: 100vh;
  background:
    radial-gradient(700px 400px at 85% -5%, rgba(30, 139, 148, .10), transparent 60%),
    radial-gradient(600px 400px at 0% 105%, rgba(232, 160, 32, .08), transparent 55%),
    #EDF0EC;
  display: grid; place-items: center;
  padding: 34px 16px;
}

.back-hub {
  position: fixed; top: 18px; left: 18px; z-index: 50;
  font-size: var(--fs-small); font-weight: 650; text-decoration: none;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
  padding: 8px 16px; border-radius: var(--r-pill); box-shadow: var(--shadow-soft);
}
.back-hub:hover { color: var(--brand); }

/* ---------- Marco de teléfono ---------- */
.phone {
  width: 393px; height: 800px; max-height: calc(100vh - 48px);
  background: var(--bg);
  border: 10px solid #1A2422;
  border-radius: 46px;
  box-shadow: 0 30px 80px rgba(10, 40, 43, .35);
  display: flex; flex-direction: column;
  overflow: hidden; position: relative;
}
.phone::before {  /* notch */
  content: ''; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 22px; background: #1A2422; border-radius: var(--r-pill); z-index: 40;
}

/* ---------- Cabecera de la app ---------- */
.app-head {
  padding: 44px 20px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg);
}
.app-head .who { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-weight: 800; font-family: var(--font-display); font-size: 15px;
}
.app-head .hi { font-size: var(--fs-micro); color: var(--muted); font-weight: 600; }
.app-head .name { font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.15; }
.bell { position: relative; font-size: 19px; }
.bell .dot-n {
  position: absolute; top: -2px; right: -4px; width: 15px; height: 15px;
  background: var(--crit); color: #fff; border-radius: 50%;
  font-size: 9.5px; font-weight: 700; display: grid; place-items: center;
}

/* ---------- Área scrolleable ---------- */
.app-body { flex: 1; overflow-y: auto; padding: 6px 20px 20px; scrollbar-width: thin; }

/* ---------- Navegación inferior ---------- */
.tabbar {
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 8px 6px calc(10px + env(safe-area-inset-bottom));
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 650; color: var(--muted);
  padding: 5px 2px; border-radius: var(--r-sm);
  transition: color .15s, transform .15s var(--ease-out);
}
.tab .t-icon { font-size: 20px; line-height: 1; filter: grayscale(1) opacity(.55); transition: filter .15s; }
.tab.active { color: var(--brand); }
.tab.active .t-icon { filter: none; }
.tab:active { transform: scale(.94); }

/* ---------- Componentes propios ---------- */
.next-cita {
  background: linear-gradient(135deg, var(--petrol-700), var(--petrol-600));
  color: #fff; border-radius: var(--r-lg); padding: 18px;
  box-shadow: 0 10px 26px rgba(14, 94, 99, .30);
}
.next-cita .nc-top { display: flex; justify-content: space-between; align-items: center; }
.next-cita .nc-tag { font-size: var(--fs-micro); font-weight: 700; letter-spacing: .09em; text-transform: uppercase; opacity: .85; }
.next-cita .nc-count { background: rgba(255,255,255,.16); border-radius: var(--r-pill); padding: 3px 12px; font-size: var(--fs-small); font-weight: 700; }
.next-cita h3 { color: #fff; margin: 10px 0 2px; font-size: 17px; }
.next-cita .nc-meta { font-size: var(--fs-small); opacity: .88; }
.next-cita .nc-actions { display: flex; gap: 8px; margin-top: 14px; }
.next-cita .btn { background: rgba(255,255,255,.16); color: #fff; padding: 8px 14px; font-size: var(--fs-small); }
.next-cita .btn.solid { background: #fff; color: var(--petrol-700); }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: var(--sp-4); }
.quick {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 13px 4px 11px; font-size: 10.5px; font-weight: 650; color: var(--ink-2);
  transition: transform .15s var(--ease-out), border-color .15s;
}
.quick:hover { transform: translateY(-3px); border-color: var(--brand); color: var(--brand); }
.quick .q-icon { font-size: 21px; }

.streak-card { display: flex; gap: 14px; align-items: center; margin-top: var(--sp-4); }
.streak-card .s-info { flex: 1; }
.streak-card .s-title { font-weight: 700; font-family: var(--font-display); font-size: 15px; }
.streak-card .s-sub { font-size: var(--fs-small); color: var(--ink-2); margin-top: 3px; }
.streak-flame { color: var(--gamify-ink); font-weight: 700; font-size: var(--fs-small); margin-top: 7px; }

.tip-card { margin-top: var(--sp-4); border-left: 4px solid var(--brand); }
.tip-card .label-muted { color: var(--brand); }

.menu-list { display: flex; flex-direction: column; gap: 8px; }
.menu-item {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px; width: 100%;
  transition: border-color .15s, transform .15s var(--ease-out);
}
.menu-item:hover { border-color: var(--brand); transform: translateX(3px); }
.menu-item .m-icon { font-size: 21px; }
.menu-item .m-txt { flex: 1; }
.menu-item .m-title { font-weight: 700; font-size: var(--fs-body); }
.menu-item .m-sub { font-size: var(--fs-micro); color: var(--muted); }
.menu-item .m-go { color: var(--muted); }

.view-title { margin: 10px 0 4px; }
.view-sub { color: var(--ink-2); font-size: var(--fs-small); margin-bottom: var(--sp-4); }

/* ============ Agendar: stepper ============ */
.stepper { display: flex; gap: 6px; margin: 4px 0 16px; }
.stepper .st {
  flex: 1; height: 4px; border-radius: var(--r-pill);
  background: var(--line); transition: background .3s;
}
.stepper .st.done { background: var(--brand); }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.step-back { font-size: 18px; color: var(--ink-2); padding: 4px 8px; border-radius: var(--r-sm); }
.step-back:hover { background: var(--surface-2); }

/* ============ Agendar: especialidades ============ */
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.spec {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: 13px; transition: border-color .15s, transform .15s var(--ease-out);
}
.spec:hover { border-color: var(--brand); transform: translateY(-2px); }
.spec .sp-icon { font-size: 22px; }
.spec .sp-nombre { font-weight: 700; font-size: 13px; line-height: 1.25; }
.spec .sp-espera { font-size: var(--fs-micro); font-weight: 650; }
.spec .sp-espera.ok { color: var(--ok); } .spec .sp-espera.warn { color: var(--amber-600); }

/* ============ Agendar: establecimientos ============ */
.estab-card {
  display: flex; flex-direction: column; gap: 6px; text-align: left; width: 100%;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: 14px; margin-bottom: 8px;
  transition: border-color .15s, transform .15s var(--ease-out);
}
.estab-card:hover { border-color: var(--brand); transform: translateX(3px); }
.estab-card .e-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.estab-card .e-nombre { font-weight: 700; font-size: var(--fs-body); }
.estab-card .e-dist { font-size: var(--fs-micro); color: var(--muted); font-weight: 650; white-space: nowrap; }
.estab-card .e-tipo { font-size: var(--fs-micro); color: var(--muted); }
.estab-card .e-foot { display: flex; align-items: center; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.estab-card .e-tele { font-size: var(--fs-micro); color: var(--brand); font-weight: 650; }

/* ============ Agendar: día y hora ============ */
.day-row { display: flex; gap: 8px; margin-bottom: 14px; }
.day {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: 10px 4px; font-weight: 650; transition: all .15s;
}
.day .d-num { font-family: var(--font-display); font-size: 19px; font-weight: 800; }
.day .d-lbl { font-size: var(--fs-micro); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.day.sel { background: var(--brand); border-color: var(--brand); color: #fff; }
.day.sel .d-lbl { color: rgba(255,255,255,.75); }

.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot {
  padding: 10px 4px; border-radius: var(--r-sm); text-align: center;
  background: var(--surface); border: 1.5px solid var(--line);
  font-weight: 650; font-size: 13px; transition: all .15s;
}
.slot:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.slot.sel { background: var(--brand); border-color: var(--brand); color: #fff; }
.slot:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }

/* ============ Agendar: confirmación + WhatsApp ============ */
.resumen-cita { border-left: 4px solid var(--brand); }
.resumen-cita .rc-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: var(--fs-small); }
.resumen-cita .rc-row .k { color: var(--muted); }
.resumen-cita .rc-row .v { font-weight: 650; text-align: right; }

.wa-preview { margin-top: var(--sp-4); }
.wa-frame {
  background: #E7DFD4; border-radius: var(--r-md); padding: 12px; margin-top: 8px;
}
.wa-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.wa-ava { width: 30px; height: 30px; border-radius: 50%; background: var(--petrol-700); display: grid; place-items: center; }
.wa-name { font-weight: 700; font-size: var(--fs-small); color: #222; }
.wa-check { font-size: var(--fs-micro); color: #5B7A68; }
.wa-bubble {
  background: #fff; border-radius: 4px 12px 12px 12px; padding: 10px 12px;
  font-size: 13px; color: #222; line-height: 1.5;
  box-shadow: 0 1px 2px rgba(0,0,0,.12); max-width: 95%;
}
.wa-bubble .wa-time { display: block; text-align: right; font-size: 10px; color: #8a9a90; margin-top: 4px; }
.wa-btns { display: flex; gap: 6px; margin-top: 8px; }
.wa-btn {
  flex: 1; text-align: center; background: #fff; border-radius: var(--r-sm);
  padding: 8px 4px; font-size: 12px; font-weight: 700; color: #0B7A6C;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}

/* éxito */
.exito { text-align: center; padding: 34px 10px 10px; }
.exito .check {
  width: 86px; height: 86px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--ok); display: grid; place-items: center;
  animation: pop .5s var(--ease-out);
}
.exito .check svg { width: 44px; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
.exito h2 { margin-bottom: 6px; }
.exito p { color: var(--ink-2); font-size: var(--fs-small); max-width: 30ch; margin: 0 auto; }
.exito .badge-pts {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  background: var(--gamify-soft); color: var(--gamify-ink);
  font-weight: 700; font-size: var(--fs-small);
  padding: 6px 14px; border-radius: var(--r-pill);
}

/* ============ Mis citas ============ */
.tabs2 { display: flex; background: var(--surface-2); border-radius: var(--r-pill); padding: 4px; margin-bottom: 14px; }
.tabs2 button {
  flex: 1; padding: 8px; border-radius: var(--r-pill);
  font-weight: 650; font-size: var(--fs-small); color: var(--ink-2);
}
.tabs2 button.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-soft); }

.cita-card { margin-bottom: 10px; }
.cita-card .cc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.cita-card .cc-esp { font-weight: 700; font-family: var(--font-display); font-size: 15px; }
.cita-card .cc-med { font-size: var(--fs-small); color: var(--ink-2); }
.cita-card .cc-meta { font-size: var(--fs-small); color: var(--ink-2); margin-top: 6px; }
.cita-card .cc-rec {
  margin-top: 10px; padding: 8px 10px; border-radius: var(--r-sm);
  background: var(--surface-2); font-size: var(--fs-micro); color: var(--ink-2);
  display: flex; align-items: center; gap: 7px;
}
.cita-card .cc-actions { display: flex; gap: 8px; margin-top: 10px; }

/* ============ Asistente (chat) ============ */
.chat-zone { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: var(--r-md); font-size: 13.5px; line-height: 1.5; animation: msg-in .25s var(--ease-out); }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } }
.msg.bot { background: var(--surface); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; align-self: flex-start; }
.msg.user { background: var(--brand); color: #fff; border-radius: 14px 4px 14px 14px; align-self: flex-end; }

.msg-note {
  align-self: center; text-align: center; max-width: 92%;
  font-size: var(--fs-micro); color: var(--muted); font-style: italic;
  padding: 2px 8px;
}

.msg-src {
  align-self: flex-start; display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-micro); color: var(--brand); font-weight: 650;
  background: var(--brand-soft); border-radius: var(--r-pill); padding: 4px 12px;
}

.msg-em {
  align-self: stretch; background: linear-gradient(135deg, #C03535, #A22626);
  color: #fff; border-radius: var(--r-md); padding: 14px;
  box-shadow: 0 8px 22px rgba(192, 53, 53, .35);
  animation: msg-in .25s var(--ease-out);
}
.msg-em .em-tag { font-size: var(--fs-micro); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .9; display: flex; align-items: center; gap: 6px; }
.msg-em .em-txt { margin-top: 6px; font-size: 14px; line-height: 1.5; }
.msg-em .em-call {
  display: block; width: 100%; margin-top: 12px; background: #fff; color: #A22626;
  font-weight: 800; font-size: 15px; padding: 12px; border-radius: var(--r-sm);
  text-align: center; animation: em-pulse 1.4s infinite;
}
@keyframes em-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }

.msg-proto {
  align-self: stretch; background: var(--surface); border: 1.5px solid var(--brand);
  border-radius: var(--r-md); overflow: hidden; animation: msg-in .25s var(--ease-out);
}
.msg-proto .pr-head { background: var(--brand-soft); padding: 10px 14px; }
.msg-proto .pr-title { font-weight: 700; font-family: var(--font-display); font-size: 14px; display: flex; gap: 7px; align-items: center; }
.msg-proto .pr-ver { font-size: var(--fs-micro); color: var(--brand); font-weight: 650; margin-top: 2px; }
.msg-proto ol { margin: 0; padding: 12px 14px 14px 30px; display: flex; flex-direction: column; gap: 9px; }
.msg-proto li { font-size: 13px; line-height: 1.5; padding-left: 4px; }
.msg-proto li::marker { font-weight: 800; color: var(--brand); }

.msg-deriv {
  align-self: stretch; background: var(--brand-soft); border-radius: var(--r-md);
  padding: 14px; animation: msg-in .25s var(--ease-out);
}
.msg-deriv .dv-title { font-weight: 700; font-family: var(--font-display); font-size: 14px; color: var(--brand); }
.msg-deriv .dv-sub { font-size: var(--fs-small); color: var(--ink-2); margin: 3px 0 10px; }
.msg-deriv .btn { width: 100%; margin-bottom: 6px; }

.msg-loc {
  align-self: stretch; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--crit); border-radius: var(--r-md);
  padding: 12px 14px; animation: msg-in .25s var(--ease-out);
}
.msg-loc .lc-head { font-size: var(--fs-micro); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--crit); }
.msg-loc .lc-dir { font-weight: 700; font-family: var(--font-display); font-size: 14.5px; margin-top: 6px; }
.msg-loc .lc-src { font-size: var(--fs-micro); color: var(--ink-2); margin: 2px 0 10px; }
.msg-loc .btn { width: 100%; }
.msg-loc .lc-note { font-size: var(--fs-micro); color: var(--muted); margin-top: 8px; font-style: italic; }

.typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: tp 1s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; } .typing i:nth-child(3) { animation-delay: .36s; }
@keyframes tp { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.chat-replies { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 10px; }
.qr {
  background: var(--surface); border: 1.5px solid var(--brand); color: var(--brand);
  font-weight: 650; font-size: 13px; padding: 9px 15px; border-radius: var(--r-pill);
  transition: all .15s; animation: msg-in .3s var(--ease-out);
}
.qr:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }

/* ============ Bienvenida ============ */
.welcome { text-align: center; padding: 30px 6px 10px; }
.welcome .w-mark {
  width: 68px; height: 68px; border-radius: 20px; margin: 0 auto 18px;
  background: var(--brand); display: grid; place-items: center;
  box-shadow: 0 10px 28px rgba(14, 94, 99, .35);
}
.welcome h2 { font-size: 24px; }
.welcome .w-sub { color: var(--ink-2); font-size: var(--fs-small); max-width: 30ch; margin: 8px auto 0; }
.welcome .w-dni {
  margin-top: 6px; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--surface-2); font-weight: 700; font-size: 16px; letter-spacing: .04em;
}
.welcome .w-dom {
  margin-top: 6px; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--surface-2); font-weight: 650; font-size: 13.5px;
}

/* ============ Teleconsulta ============ */
.sala-card { text-align: center; padding: 26px 18px; }
.sala-card .sc-pos {
  font-family: var(--font-display); font-weight: 800; font-size: 44px; color: var(--brand);
}
.sala-card .sc-sub { color: var(--ink-2); font-size: var(--fs-small); max-width: 30ch; margin: 4px auto 0; }
.sala-tip { display: flex; gap: 10px; align-items: flex-start; text-align: left; margin-top: 12px; }
.sala-tip .st-icon { font-size: 19px; }

.tele-call {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(160deg, #12312F, #0A1F1E);
  aspect-ratio: 3 / 4.1; display: flex; flex-direction: column;
  justify-content: space-between; padding: 16px;
  box-shadow: var(--shadow-float);
}
.tele-call .tc-top { display: flex; justify-content: space-between; align-items: center; }
.tele-call .tc-rec {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.35); color: #fff; font-size: var(--fs-micro); font-weight: 700;
  padding: 5px 12px; border-radius: var(--r-pill);
}
.tele-call .tc-rec .rd { width: 8px; height: 8px; border-radius: 50%; background: #FF5B5B; animation: em-pulse 1.2s infinite; }
.tele-call .tc-timer { color: #fff; font-weight: 700; font-size: var(--fs-small); background: rgba(0,0,0,.35); padding: 5px 12px; border-radius: var(--r-pill); }
.tele-doc { text-align: center; color: #fff; }
.tele-doc .td-ava {
  width: 108px; height: 108px; border-radius: 50%; margin: 0 auto 12px;
  background: radial-gradient(circle at 35% 30%, #2E6E6A, #14403D);
  display: grid; place-items: center; font-size: 46px;
  border: 3px solid rgba(255,255,255,.25);
}
.tele-doc .td-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.tele-doc .td-esp { font-size: var(--fs-small); opacity: .75; }
.tele-me {
  position: absolute; right: 14px; top: 56px; width: 74px; height: 96px;
  border-radius: var(--r-md); background: linear-gradient(160deg, #C9BFae, #a89a85);
  display: grid; place-items: center; font-size: 30px;
  border: 2px solid rgba(255,255,255,.5); box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.tele-controls { display: flex; justify-content: center; gap: 12px; }
.tc-btn {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff; font-size: 21px;
  display: grid; place-items: center; transition: all .15s;
}
.tc-btn:hover { background: rgba(255,255,255,.28); }
.tc-btn.off { background: rgba(255,255,255,.85); color: #14211F; }
.tc-btn.end { background: #D84040; }

.receta-card { border: 1.5px solid var(--brand); overflow: hidden; padding: 0; }
.receta-card .rx-head { background: var(--brand-soft); padding: 11px 14px; display: flex; align-items: center; gap: 8px; }
.receta-card .rx-head .rx-title { font-weight: 700; font-family: var(--font-display); font-size: 14px; }
.receta-card .rx-body { padding: 12px 14px; }
.receta-card .rx-item { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: var(--fs-small); }
.receta-card .rx-item:last-child { border-bottom: none; }
.receta-card .rx-med { font-weight: 700; }
.stars { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.star { font-size: 30px; filter: grayscale(1) opacity(.4); transition: all .15s var(--ease-out); }
.star.on { filter: none; transform: scale(1.12); }

/* ============ Ruta de crecimiento (anemia · CRED) ============ */
.nino-head { display: flex; align-items: center; gap: 12px; }
.nino-head .n-ava {
  width: 52px; height: 52px; border-radius: 50%; font-size: 26px;
  background: var(--gamify-soft); display: grid; place-items: center;
}
.nino-head .n-nombre { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.nino-head .n-edad { font-size: var(--fs-small); color: var(--ink-2); }

.ruta { position: relative; margin: 16px 0 4px; padding-left: 30px; }
.ruta::before {
  content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 2px; background: var(--line);
}
.hito { position: relative; padding: 0 0 18px 8px; }
.hito:last-child { padding-bottom: 0; }
.hito .h-dot {
  position: absolute; left: -27px; top: 1px; width: 22px; height: 22px;
  border-radius: 50%; display: grid; place-items: center; font-size: 11px;
  background: var(--surface); border: 2.5px solid var(--line); z-index: 1;
}
.hito.done .h-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.hito.now .h-dot { background: var(--gamify); border-color: var(--gamify); color: #fff; animation: em-pulse 1.6s infinite; }
.hito .h-title { font-weight: 700; font-size: var(--fs-body); }
.hito .h-sub { font-size: var(--fs-small); color: var(--ink-2); margin-top: 2px; }
.hito.now .h-card {
  margin-top: 8px; background: var(--gamify-soft); border-radius: var(--r-md);
  padding: 12px;
}
.hito .h-hb { font-size: var(--fs-micro); font-weight: 700; margin-top: 3px; }
.hito .h-hb.ok { color: var(--ok); } .hito .h-hb.warn { color: var(--amber-600); }

.logros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.logro {
  text-align: center; padding: 12px 6px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
}
.logro.off { opacity: .45; filter: grayscale(1); }
.logro .lg-icon { font-size: 24px; }
.logro .lg-name { font-size: 10px; font-weight: 700; margin-top: 5px; line-height: 1.25; }

/* ============ Radar de medicinas ============ */
.search-box {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-pill);
  padding: 11px 16px; margin-bottom: 12px;
}
.search-box input { border: none; outline: none; flex: 1; font: inherit; background: none; color: var(--ink); }
.filtros { display: flex; gap: 7px; margin-bottom: 14px; flex-wrap: wrap; }
.filtro {
  font-size: var(--fs-micro); font-weight: 700; padding: 6px 13px;
  border-radius: var(--r-pill); background: var(--surface); border: 1.5px solid var(--line);
  color: var(--ink-2);
}
.filtro.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.med-card { margin-bottom: 8px; }
.med-card .md-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.med-card .md-lugar { font-weight: 700; font-size: var(--fs-body); }
.med-card .md-tipo { font-size: var(--fs-micro); color: var(--muted); }
.med-card .md-precio { font-family: var(--font-display); font-weight: 800; font-size: 19px; text-align: right; }
.med-card .md-precio .gratis { color: var(--ok); }
.med-card .md-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }
.med-card .md-dist { font-size: var(--fs-micro); color: var(--muted); font-weight: 650; }

/* ============ Ruta oncológica (sin gamificación) ============ */
.sla { font-size: var(--fs-micro); font-weight: 700; border-radius: var(--r-pill); padding: 3px 10px; display: inline-block; margin-top: 4px; }
.sla.ok { background: var(--ok-bg); color: var(--ok); }
.sla.warn { background: var(--warn-bg); color: var(--amber-600); }
.sla.wait { background: var(--neutral-bg); color: var(--muted); }
.onco-note { border-left: 4px solid var(--brand); margin-top: 14px; }

/* móvil real: pantalla completa */
@media (max-width: 480px) {
  body.app-ciudadano { padding: 0; display: block; background: var(--bg); }
  .phone { width: 100%; height: 100dvh; max-height: none; border: none; border-radius: 0; box-shadow: none; }
  .phone::before { display: none; }
  .app-head { padding-top: 16px; }
  .back-hub { top: auto; bottom: 74px; left: 12px; opacity: .85; }
}
