:root {
  --bg: #f1f6fd;
  --surface: #ffffff;
  --surface-2: #f6f9fe;
  --ink: #172033;
  --text: #172033;
  --muted: #56627a;
  --line: #d7e3f6;
  --line-2: #e6eefa;
  --campo: #7d90b3;
  --pri: #1456d8;
  --pri-d: #0f45b0;
  --pri-l: #eaf1fd;
  --pri-b: #9db8ea;
  --ok: #166534;
  --ok-l: #dcfce7;
  --ok-b: #9fdcb4;
  --warn: #8a4a0b;
  --warn-l: #fef3c7;
  --warn-b: #f2d675;
  --bad: #b42318;
  --bad-l: #fee4e2;
  --bad-b: #f5b5af;
  --info: #0f3f9e;
  --info-b: #bcd0f3;
  --cyan: #0b5566;
  --cyan-l: #d9f4f7;
  --cyan-b: #9fdbe4;
  --neutro: #374151;
  --neutro-l: #f3f4f6;
  --neutro-b: #d1d5db;
  --radio: 10px;
  --radio-lg: 12px;
  --sombra: 0 1px 2px rgba(23, 32, 51, .05), 0 2px 8px rgba(20, 86, 216, .05);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--sans); color: var(--text); background: var(--bg); min-height: 100vh; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 .5rem; font-weight: 700; }
h1 { font-size: 2rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 .75rem; }
a { color: var(--pri); text-underline-offset: 2px; }
a:hover { color: var(--pri-d); }
small, .peq { font-size: .85rem; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { flex: none; vertical-align: -.2em; }
:focus-visible { outline: 3px solid var(--pri); outline-offset: 2px; border-radius: 4px; }
.saltar { position: absolute; left: -999px; top: 0; background: var(--pri); color: #fff; padding: .75rem 1rem; z-index: 100; }
.saltar:focus { left: 0; }

/* Estructura */
.app { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.lateral { background: var(--surface); color: var(--ink); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: .5rem; padding: 1rem .75rem .75rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.lateral-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.marca { display: block; padding: .15rem .35rem .75rem; border-radius: var(--radio); }
.marca img { display: block; width: 100%; max-width: 205px; height: auto; }
.cerrar-menu, .abrir-menu { display: none; background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-radius: var(--radio); min-width: 44px; min-height: 44px; place-items: center; cursor: pointer; }
.cerrar-menu:hover, .abrir-menu:hover { background: var(--pri-l); }
.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: .8rem; min-height: 44px; padding: .5rem .8rem; border-radius: 8px; color: var(--ink); text-decoration: none; }
.nav a:hover { background: var(--pri-l); }
.nav a:focus-visible { outline-offset: -3px; }
.nav a[aria-current="page"] { background: var(--pri); color: #fff; font-weight: 600; }
.nav .grupo { display: flex; align-items: center; gap: .6rem; margin: 1rem .8rem .3rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nav .grupo::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lateral-pie { margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--line); display: grid; gap: .5rem; }
.cambiar-app { display: flex; align-items: center; gap: .7rem; min-height: 44px; padding: .4rem .8rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.cambiar-app span { flex: 1; }
.cambiar-app:hover { background: var(--pri-l); color: var(--ink); }
.velo { display: none; }
.principal { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .75rem; min-height: 64px; padding: .5rem clamp(1rem, 3vw, 2.25rem); background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-negocio { flex: 1; min-width: 0; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-usuario { display: flex; align-items: center; gap: .65rem; min-height: 44px; min-width: 0; padding: .15rem .6rem .15rem .2rem; border-radius: 999px; color: var(--ink); text-decoration: none; }
.topbar-usuario:hover { background: var(--pri-l); color: var(--ink); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--pri); color: #fff; font-weight: 700; }
.topbar-usuario-texto { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.topbar-usuario-texto strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14rem; }
.topbar-usuario-texto span { font-size: .82rem; color: var(--muted); }
.contenido { padding: 1.5rem clamp(1rem, 3vw, 2.25rem) 3rem; max-width: 1500px; width: 100%; }
.cabecera-pagina { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1.1rem; }
.cabecera-pagina h1 { margin: 0; }
.subtitulo { margin: .25rem 0 0; color: var(--muted); }
.acciones { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.modo-banda { display: flex; align-items: center; justify-content: center; gap: .4rem; background: var(--warn-l); color: #5b3d00; border-bottom: 1px solid var(--warn-b); padding: .45rem 1rem; font-size: .88rem; text-align: center; }

/* Componentes */
.tarjeta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radio-lg); box-shadow: var(--sombra); padding: 1.1rem 1.25rem; margin-bottom: 1.1rem; }
.tarjeta > h2:first-child, .tarjeta > h3:first-child { margin-bottom: .75rem; }
.rejilla { display: grid; gap: 1.1rem; }
.rejilla.dos { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.rejilla.tres { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 1rem; margin-bottom: 1.1rem; }
.cifra { display: flex; align-items: center; gap: .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radio-lg); box-shadow: var(--sombra); padding: .9rem 1.1rem; }
.cifra-ico { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--pri-l); color: var(--pri); }
.cifra-ico .ico { width: 24px; height: 24px; vertical-align: 0; }
.cifra-ico.acento { background: var(--cyan-l); color: var(--cyan); }
.cifra-ico.ok { background: var(--ok-l); color: var(--ok); }
.cifra-ico.warn { background: var(--warn-l); color: var(--warn); }
.cifra-txt { min-width: 0; }
.cifra .valor { font-size: 1.6rem; font-weight: 700; line-height: 1.2; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cifra .etq { font-size: .92rem; color: var(--muted); overflow-wrap: anywhere; }
.cifra.alerta { border-color: var(--warn-b); background: #fffbeb; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .5rem 1.05rem; border-radius: 8px; border: 1px solid var(--pri); background: var(--pri); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover { background: var(--pri-d); border-color: var(--pri-d); color: #fff; }
.btn .ico { width: 18px; height: 18px; vertical-align: 0; }
.btn.sec { background: var(--surface); color: var(--pri); border-color: var(--pri-b); }
.btn.sec:hover { background: var(--pri-l); border-color: var(--pri); color: var(--pri-d); }
.btn.peligro { background: var(--surface); color: var(--bad); border-color: var(--bad); }
.btn.peligro:hover { background: var(--bad-l); }
.btn.chico { padding: .35rem .8rem; font-size: .92rem; }
.btn.ancho { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn.enlace { background: none; border: 0; color: inherit; font-weight: 400; padding: .3rem .4rem; justify-content: flex-start; }
form.en-linea { display: inline; margin: 0; }
.lateral-pie form.en-linea { display: block; }

label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .25rem; }
.campo { margin-bottom: .9rem; }
.campo .ayuda { font-weight: 400; color: var(--muted); font-size: .85rem; margin-top: .2rem; display: block; }
input[type=text], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=search], input[type=email], select, textarea {
  width: 100%; min-height: 44px; padding: .55rem .75rem; font: inherit; color: var(--text); background: #fff; border: 1px solid var(--campo); border-radius: 8px;
}
select { appearance: none; -webkit-appearance: none; padding-right: 2.3rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23172033' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--pri); }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; accent-color: var(--pri); flex: none; }
.casilla { display: flex; align-items: center; gap: .6rem; min-height: 44px; font-weight: 400; cursor: pointer; }
.fila-campos { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); align-items: end; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; margin: 0 0 1rem; }
legend { font-weight: 600; padding: 0 .4rem; }
.honeypot { position: absolute; left: -5000px; height: 0; overflow: hidden; }

.aviso { display: flex; gap: .7rem; align-items: flex-start; padding: .75rem 1rem; border-radius: 9px; margin-bottom: 1rem; border: 1px solid; }
.aviso.ok { background: var(--ok-l); border-color: var(--ok-b); color: #124a28; }
.aviso.error { background: var(--bad-l); border-color: var(--bad-b); color: #7a1a12; }
.aviso.info { background: var(--pri-l); border-color: var(--info-b); color: #0f3377; }
.aviso.warn { background: var(--warn-l); border-color: var(--warn-b); color: #5b3d00; }

.tabla-caja { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; background: var(--surface-2); }
td.num, th.num { text-align: right; }
tr:last-child td { border-bottom: 0; }
.vacio { text-align: center; color: var(--muted); padding: 1.6rem 1rem; }
.vacio .ico { width: 32px; height: 32px; display: block; margin: 0 auto .4rem; opacity: .6; }

/* Estados (siempre texto + icono, nunca solo color) */
.estado { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .6rem; border-radius: 999px; font-size: .82rem; font-weight: 600; border: 1px solid; white-space: nowrap; }
.estado .ico { width: 14px; height: 14px; vertical-align: 0; }
.estado.reservada { background: var(--pri-l); color: var(--info); border-color: var(--info-b); }
.estado.en_atencion { background: var(--cyan-l); color: var(--cyan); border-color: var(--cyan-b); }
.estado.completada { background: var(--ok-l); color: var(--ok); border-color: var(--ok-b); }
.estado.cancelada { background: var(--neutro-l); color: var(--neutro); border-color: var(--neutro-b); }
.estado.ausente { background: var(--warn-l); color: var(--warn); border-color: var(--warn-b); }
.leyenda { display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center; font-size: .85rem; color: var(--muted); }
.leyenda .estado { font-size: .78rem; }

/* Agenda */
.agenda-filtros { display: grid; gap: .75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radio-lg); box-shadow: var(--sombra); padding: .8rem 1rem; margin-bottom: 1rem; }
.agenda-filtros .leyenda { padding-top: .75rem; border-top: 1px solid var(--line-2); }
.agenda-barra { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.agenda-barra form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.agenda-barra input[type=date], .agenda-barra select { width: auto; }
.fecha-titulo { font-size: 1.05rem; font-weight: 700; color: var(--ink); text-transform: capitalize; margin: 0 .4rem; }
.agenda-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radio-lg); box-shadow: var(--sombra); }
.agenda { display: grid; grid-template-columns: 64px repeat(var(--cols, 1), minmax(190px, 1fr)); min-width: max-content; width: 100%; }
.agenda-cab { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); padding: .6rem .8rem; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: .65rem; min-height: 64px; }
.agenda-cab:first-child { border-left: 0; }
.agenda-cab-nombre { min-width: 0; overflow-wrap: anywhere; }
.avatar-prof { --pc: var(--pri); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; color: var(--ink); background: var(--pri-l); background: color-mix(in srgb, var(--pc) 16%, #fff); border: 2px solid var(--pc); }
.agenda-eje { position: relative; border-right: 1px solid var(--line); }
.agenda-eje span { position: absolute; right: 8px; transform: translateY(-50%); font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; background: var(--surface); padding: 0 2px; }
.agenda-col { position: relative; border-left: 1px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 95px, var(--line-2) 95px, var(--line-2) 96px); }
.fuera { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, #e9f0fb 0 6px, #f4f8fe 6px 12px); border-block: 1px solid var(--line); }
.fuera span { position: absolute; top: 2px; left: 6px; font-size: .75rem; color: var(--muted); background: rgba(255, 255, 255, .85); padding: 0 4px; border-radius: 4px; }
.ahora { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--bad); z-index: 2; pointer-events: none; }
.bloque { position: absolute; left: 4px; right: 4px; z-index: 1; display: block; overflow: hidden; padding: .2rem .5rem; border-radius: 7px; background: var(--pri-l); border: 1px solid var(--info-b); border-left: 4px solid var(--pri); text-decoration: none; color: var(--text); font-size: .82rem; line-height: 1.25; }
.bloque:hover { box-shadow: 0 3px 10px rgba(23, 32, 51, .18); z-index: 4; color: var(--text); }
.bloque-cab { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.bloque strong { display: block; min-width: 0; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bloque-det { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bloque .hora { color: var(--muted); font-variant-numeric: tabular-nums; }
.bloque .estado { flex: none; font-size: .68rem; padding: 0 .4rem; }
.bloque .estado .ico { width: 12px; height: 12px; }
.bloque.reservada { background: var(--pri-l); border-color: var(--info-b); border-left-color: var(--pri); }
.bloque.en_atencion { background: #e3f6f8; border-color: var(--cyan-b); border-left-color: #0e7490; }
.bloque.completada { background: #e8f9ee; border-color: var(--ok-b); border-left-color: #16803c; }
.bloque.cancelada { background: var(--neutro-l); border-color: var(--neutro-b); border-left-color: #9ca3af; color: #6b7280; text-decoration: line-through; }
.bloque.ausente { background: #fef6dc; border-color: var(--warn-b); border-left-color: #d49a0b; }
.bloque.cancelada .estado, .bloque.cancelada .hora { text-decoration: none; }
.agenda-lista { display: none; }
.lista-citas { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.lista-citas a { display: grid; grid-template-columns: 4.2rem 1fr; gap: .6rem; padding: .7rem .8rem; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--pri); border-radius: 9px; text-decoration: none; color: var(--text); min-height: 44px; }
.lista-citas .h { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Horarios y selección */
.horas { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; border: 0; }
.horas label { margin: 0; }
.hora-op { position: relative; }
.hora-op input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.hora-op span { display: inline-flex; align-items: center; justify-content: center; min-width: 76px; min-height: 44px; padding: .4rem .8rem; border: 1px solid var(--campo); border-radius: 9px; background: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.hora-op input:checked + span { background: var(--pri); border-color: var(--pri); color: #fff; }
.hora-op input:focus-visible + span { outline: 3px solid var(--pri); outline-offset: 2px; }
.hora-op:hover span { border-color: var(--pri); }
.opciones { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.opcion { display: block; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 9px; background: #fff; text-decoration: none; color: var(--text); min-height: 44px; }
.opcion:hover { border-color: var(--pri); background: var(--pri-l); color: var(--text); }
.opcion[aria-current="true"] { border-color: var(--pri); background: var(--pri-l); box-shadow: inset 0 0 0 1px var(--pri); }
.opcion strong { display: block; color: var(--ink); }
.pasos { counter-reset: paso; list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .9rem; color: var(--muted); }
.pasos li::before { counter-increment: paso; content: counter(paso); display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); margin-right: .4rem; font-weight: 700; }
.pasos li.hecho { color: var(--ok); }
.pasos li.hecho::before { background: var(--ok-l); border-color: var(--ok-b); }
.pasos li.actual { color: var(--pri-d); font-weight: 700; }
.pasos li.actual::before { background: var(--pri); border-color: var(--pri); color: #fff; }

.definiciones { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.2rem; margin: 0; }
.definiciones dt { color: var(--muted); font-size: .9rem; }
.definiciones dd { margin: 0; font-weight: 500; }
.cola-item { display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: space-between; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line-2); }
.cola-item:last-child { border-bottom: 0; }
.cola-item form { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.cola-item select { width: auto; }
.cronologia { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; font-size: .9rem; }
.cronologia li { padding-left: 1rem; border-left: 3px solid var(--line); }
.cronologia time { color: var(--muted); font-size: .8rem; display: block; }
.barra-datos { height: 10px; background: var(--pri-l); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.barra-datos > i { display: block; height: 100%; background: var(--pri); }
.diferencia-0 { color: var(--ok); }
.diferencia-n { color: var(--bad); font-weight: 700; }
.enlace-copiable { display: flex; gap: .5rem; flex-wrap: wrap; }
.enlace-copiable input { flex: 1 1 260px; }

/* Acceso / público */
.publica { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding-bottom: 3rem; }
.barra-publica { align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--surface); border-bottom: 1px solid var(--line); padding: .8rem clamp(1rem, 3vw, 2.25rem); }
.barra-publica .marca { padding: 0; }
.barra-publica .marca img { width: min(230px, 60vw); }
.barra-publica-negocio { min-width: 0; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caja-publica { width: min(100%, 560px); padding: 1.75rem 1rem 0; }
.caja-publica.ancha { width: min(100%, 720px); }
.centro { text-align: center; }
.credenciales-demo { border: 2px dashed var(--warn-b); background: var(--warn-l); color: #5b3d00; border-radius: var(--radio); padding: .8rem 1rem; margin-top: 1rem; font-size: .9rem; }
.credenciales-demo code { background: #fff; padding: 0 .35rem; border-radius: 4px; overflow-wrap: anywhere; }
.pie-publico { margin-top: 1.5rem; font-size: .85rem; color: var(--muted); text-align: center; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9em; }

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .lateral { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); z-index: 50; transform: translateX(-102%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; box-shadow: 4px 0 24px rgba(23, 32, 51, .25); }
  .menu-abierto { overflow: hidden; }
  .menu-abierto .lateral { transform: none; visibility: visible; transition: transform .2s ease, visibility 0s; }
  .menu-abierto .velo { display: block; }
  .velo { position: fixed; inset: 0; background: rgba(23, 32, 51, .5); z-index: 40; }
  .abrir-menu, .cerrar-menu { display: grid; }
}
@media (max-width: 720px) {
  .contenido { padding: 1rem .9rem 3rem; }
  h1 { font-size: 1.6rem; }
  .topbar { padding-inline: .75rem; }
  .topbar-usuario { padding-right: .2rem; }
  .topbar-usuario-texto { display: none; }
  .cifras { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .cifra { flex-direction: column; align-items: flex-start; gap: .5rem; padding: .8rem; }
  .cifra-ico { width: 40px; height: 40px; }
  .cifra-ico .ico { width: 20px; height: 20px; }
  .cifra .valor { font-size: 1.3rem; }
  .agenda-barra form { flex: 1 1 100%; }
  .agenda-barra form input[type=date], .agenda-barra form select { flex: 1 1 140px; min-width: 0; }
  .agenda-wrap { display: none; }
  .agenda-lista { display: block; }
  .definiciones { grid-template-columns: 1fr; }
  .definiciones dt { margin-top: .4rem; }
  .acciones .btn { flex: 1 1 auto; }
  table.apilar thead { display: none; }
  table.apilar tr { display: block; border-bottom: 1px solid var(--line); padding: .5rem 0; }
  table.apilar td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .25rem .4rem; text-align: right; }
  table.apilar td::before { content: attr(data-etq); color: var(--muted); font-size: .82rem; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .lateral, .topbar, .acciones, .btn { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
}
