/* Hora Viva · marca propia */
:root {
  --pino: #0E4D45;
  --pino-2: #15675C;
  --pino-claro: #E3EFEA;
  --lima: #B8F26B;
  --lima-suave: #EEFBDA;
  --mandarina: #FF8A3D;
  --mandarina-suave: #FFEBDD;
  --crema: #FAF6EE;
  --papel: #FFFFFF;
  --tinta: #1C2321;
  --gris: #5F6B67;
  --linea: #E4DED2;
  --rojo: #C8463A;
  --rojo-suave: #FBE6E3;
  --radio: 16px;
  --sombra: 0 1px 2px rgba(28, 35, 33, .06), 0 8px 24px rgba(28, 35, 33, .07);
  --titulos: 'Bricolage Grotesque', system-ui, sans-serif;
  --texto: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--crema); color: var(--tinta); font: 16px/1.5 var(--texto); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--titulos); line-height: 1.12; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: var(--pino-2); }
img, svg { max-width: 100%; }
.oculto { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.contenedor { width: min(1120px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--gris); }
.peq { font-size: .875rem; }

/* marca */
.marca { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--titulos); font-weight: 700; font-size: 1.25rem; color: var(--pino); text-decoration: none; }
.marca svg { width: 30px; height: 30px; }
.punto-vivo { animation: latido 1.6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes latido { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.75); opacity: .65; } }
.chip-vivo { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; color: var(--pino); background: var(--lima-suave); border: 1px solid #D4F2A9; padding: .2rem .6rem; border-radius: 99px; }
.chip-vivo::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #5BBF2A; animation: latido 1.6s infinite; }
.chip-vivo.caido { background: var(--mandarina-suave); border-color: #FFD3B4; color: #9A4A12; }
.chip-vivo.caido::before { background: var(--mandarina); }

/* barra superior */
.barra { position: sticky; top: 0; z-index: 30; background: rgba(250, 246, 238, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linea); }
.barra .contenedor { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.barra nav { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* botones */
.btn { --c: var(--pino); display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .7rem 1.15rem; border-radius: 12px; border: 1.5px solid var(--c);
  background: var(--c); color: #fff; font: 600 .95rem var(--texto); cursor: pointer; text-decoration: none; transition: transform .08s, background .15s, box-shadow .15s; min-height: 44px; }
.btn:hover { background: var(--pino-2); border-color: var(--pino-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sec { background: transparent; color: var(--pino); }
.btn.sec:hover { background: var(--pino-claro); }
.btn.lima { --c: var(--lima); color: var(--pino); }
.btn.lima:hover { background: #A6E553; border-color: #A6E553; }
.btn.peligro { --c: var(--rojo); }
.btn.peligro:hover { background: #A93A30; border-color: #A93A30; }
.btn.fantasma { background: transparent; border-color: transparent; color: var(--pino); }
.btn.fantasma:hover { background: var(--pino-claro); }
.btn.chico { padding: .4rem .75rem; min-height: 34px; font-size: .85rem; border-radius: 10px; }
.btn.ancho { width: 100%; }
:focus-visible { outline: 3px solid var(--mandarina); outline-offset: 2px; }

/* tarjetas y formularios */
.tarjeta { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.25rem; box-shadow: var(--sombra); }
label { display: block; font-weight: 600; font-size: .9rem; margin: .8rem 0 .3rem; }
input, select, textarea { width: 100%; padding: .7rem .85rem; border: 1.5px solid var(--linea); border-radius: 12px; font: inherit; background: #fff; color: var(--tinta); min-height: 44px; }
input:focus, select:focus, textarea:focus { border-color: var(--pino); outline: none; box-shadow: 0 0 0 3px var(--pino-claro); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--pino); }
input[type=color] { padding: .2rem; height: 44px; }
.fila { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.error { background: var(--rojo-suave); color: #8C2B22; border-radius: 12px; padding: .7rem .9rem; margin: .8rem 0; font-size: .92rem; }
.aviso { background: var(--mandarina-suave); color: #8A420F; border-radius: 12px; padding: .7rem .9rem; margin: .8rem 0; font-size: .92rem; }
.ok { background: var(--lima-suave); color: #2E5A10; border-radius: 12px; padding: .7rem .9rem; margin: .8rem 0; font-size: .92rem; }

/* toast */
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: grid; gap: .5rem; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--tinta); color: #fff; padding: .8rem 1rem; border-radius: 14px; box-shadow: var(--sombra); font-size: .92rem; animation: entra .25s ease; }
.toast.verde { background: var(--pino); }
.toast.naranja { background: #B85A1A; }
@keyframes entra { from { transform: translateY(10px); opacity: 0; } }

/* modal */
.velo { position: fixed; inset: 0; background: rgba(28, 35, 33, .45); z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--papel); border-radius: 20px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 1.4rem; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal header { display: flex; justify-content: space-between; align-items: start; gap: 1rem; margin-bottom: .5rem; }
.modal .acciones { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }

/* ---------- PORTADA ---------- */
.heroe { padding: clamp(2.5rem, 7vw, 5.5rem) 0 3rem; }
.heroe .rejilla { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }
.heroe h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--lima) 62%); }
.heroe .lead { font-size: 1.15rem; color: var(--gris); max-width: 34ch; }
.heroe .ctas { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.5rem 0 .6rem; }
.demo-vivo { background: var(--papel); border-radius: 24px; padding: 1.2rem; box-shadow: var(--sombra); border: 1px solid var(--linea); }
.demo-vivo .horas { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: .8rem; }
.secc { padding: 3.5rem 0; }
.beneficios { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.beneficio .icono { width: 44px; height: 44px; border-radius: 12px; background: var(--pino-claro); display: grid; place-items: center; margin-bottom: .6rem; color: var(--pino); }
.rubros { display: flex; flex-wrap: wrap; gap: .5rem; }
.rubros span { background: var(--papel); border: 1px solid var(--linea); padding: .45rem .8rem; border-radius: 99px; font-size: .9rem; }
.franja { background: var(--pino); color: var(--crema); border-radius: 28px; padding: clamp(1.5rem, 4vw, 3rem); }
.franja h2 { color: #fff; }
.pasos { counter-reset: p; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pasos li { list-style: none; counter-increment: p; }
.pasos li::before { content: counter(p); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--lima); color: var(--pino); font-weight: 700; margin-bottom: .5rem; }
.pie { padding: 2.5rem 0; color: var(--gris); font-size: .9rem; border-top: 1px solid var(--linea); margin-top: 3rem; }

/* ---------- RESERVA PÚBLICA ---------- */
.cabecera-negocio { padding: 1.6rem 0 1rem; }
.cabecera-negocio .logo-negocio { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-family: var(--titulos); font-weight: 700; font-size: 1.4rem; flex: none; }
.pasos-barra { display: flex; gap: .35rem; margin: .5rem 0 1.2rem; }
.pasos-barra span { flex: 1; height: 6px; border-radius: 6px; background: var(--linea); }
.pasos-barra span.hecho { background: var(--pino); }
.pasos-barra span.actual { background: var(--lima); }
.reserva-rejilla { display: grid; grid-template-columns: 1fr 330px; gap: 1.2rem; align-items: start; }
.lista-servicios { display: grid; gap: .6rem; }
.item-servicio { display: flex; justify-content: space-between; gap: 1rem; text-align: left; background: var(--papel); border: 1.5px solid var(--linea); border-radius: 14px; padding: 1rem; cursor: pointer; font: inherit; color: inherit; width: 100%; }
.item-servicio:hover, .item-servicio.sel { border-color: var(--pino); box-shadow: 0 0 0 3px var(--pino-claro); }
.item-servicio .precio { font-weight: 700; white-space: nowrap; }
.etiqueta { display: inline-block; font-size: .75rem; font-weight: 600; padding: .12rem .5rem; border-radius: 99px; background: var(--pino-claro); color: var(--pino); margin-right: .3rem; }
.etiqueta.naranja { background: var(--mandarina-suave); color: #9A4A12; }
.etiqueta.lima { background: var(--lima-suave); color: #3A6B12; }
.etiqueta.gris { background: #EEE; color: #555; }
.etiqueta.roja { background: var(--rojo-suave); color: #8C2B22; }
.cat-titulo { font-family: var(--titulos); font-weight: 650; margin: 1rem 0 .3rem; color: var(--gris); font-size: .95rem; }
.personas { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.persona { background: var(--papel); border: 1.5px solid var(--linea); border-radius: 14px; padding: 1rem; text-align: center; cursor: pointer; font: inherit; color: inherit; }
.persona:hover, .persona.sel { border-color: var(--pino); box-shadow: 0 0 0 3px var(--pino-claro); }
.avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; margin: 0 auto .5rem; font-size: 1.1rem; }

.calendario { user-select: none; }
.calendario .cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.calendario .grilla { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendario .dsem { text-align: center; font-size: .75rem; color: var(--gris); font-weight: 600; padding: .2rem 0; }
.calendario .dia { aspect-ratio: 1; border: none; background: transparent; border-radius: 10px; font: inherit; cursor: pointer; position: relative; color: var(--tinta); }
.calendario .dia:hover:not(:disabled) { background: var(--pino-claro); }
.calendario .dia:disabled { color: #BBB; cursor: default; }
.calendario .dia.libre::after { content: ''; position: absolute; bottom: 5px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #5BBF2A; }
.calendario .dia.lleno::after { content: ''; position: absolute; bottom: 5px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--mandarina); }
.calendario .dia.sel { background: var(--pino); color: #fff; }
.calendario .dia.hoy { font-weight: 700; text-decoration: underline; }

.horas { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .5rem; }
.hora { border: 1.5px solid var(--linea); background: var(--papel); border-radius: 12px; padding: .65rem .3rem; font: 600 .95rem var(--texto); cursor: pointer; color: var(--tinta); position: relative; transition: all .25s; min-height: 48px; }
.hora small { display: block; font-weight: 500; font-size: .7rem; color: var(--gris); }
.hora.libre:hover { border-color: var(--pino); background: var(--lima-suave); }
.hora.retenida { background: var(--mandarina-suave); border-color: #FFC69C; color: #9A4A12; cursor: pointer; }
.hora.retenida small { color: #9A4A12; }
.hora.tomada { background: #F1EEE8; color: #A9A39A; cursor: not-allowed; text-decoration: line-through; }
.hora.mia { background: var(--pino); color: #fff; border-color: var(--pino); }
.hora.mia small { color: var(--lima); }
.hora.parpadeo { animation: parpadeo .9s ease 2; }
@keyframes parpadeo { 50% { box-shadow: 0 0 0 4px var(--mandarina); } }
.leyenda { display: flex; flex-wrap: wrap; gap: .8rem; font-size: .8rem; color: var(--gris); margin: .8rem 0; }
.leyenda i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: .3rem; vertical-align: -2px; border: 1px solid var(--linea); }

.carrito { position: sticky; top: 80px; }
.carrito .item { display: flex; justify-content: space-between; gap: .5rem; padding: .6rem 0; border-bottom: 1px dashed var(--linea); font-size: .92rem; }
.reloj { font-variant-numeric: tabular-nums; font-weight: 700; color: #B85A1A; }
.total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; margin: .8rem 0; }
.ia-caja { background: linear-gradient(135deg, var(--pino) 0%, var(--pino-2) 100%); color: #fff; border-radius: var(--radio); padding: 1rem; margin-bottom: 1rem; }
.ia-caja input { border-color: transparent; }
.ia-caja .fila-ia { display: flex; gap: .5rem; }
.ia-caja .fila-ia input { flex: 1; }

/* pago */
.tarjeta-pago { max-width: 460px; margin: 2rem auto; }
.tarjeta-falsa { background: linear-gradient(135deg, #0E4D45, #2F7D6D); color: #fff; border-radius: 16px; padding: 1.2rem; margin: 1rem 0; font-family: monospace; letter-spacing: .08em; }
.check-grande { width: 76px; height: 76px; border-radius: 50%; background: var(--lima); color: var(--pino); display: grid; place-items: center; margin: 0 auto 1rem; }

/* ---------- PANEL ---------- */
.panel { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.lateral { background: var(--pino); color: #DDEBE6; padding: 1rem .8rem; position: sticky; top: 0; height: 100vh; overflow: auto; display: flex; flex-direction: column; gap: .2rem; }
.lateral .marca { color: #fff; margin: .2rem .4rem 1rem; }
.lateral .marca svg circle:first-child { fill: var(--crema); }
.lateral .marca svg path { stroke: var(--pino); }
.lateral .marca svg .punto-vivo { stroke: var(--pino); }
.lateral a.nav { display: flex; align-items: center; gap: .6rem; color: #DDEBE6; text-decoration: none; padding: .6rem .75rem; border-radius: 10px; font-weight: 500; font-size: .95rem; }
.lateral a.nav:hover { background: rgba(255,255,255,.08); color: #fff; }
.lateral a.nav.activo { background: var(--lima); color: var(--pino); font-weight: 650; }
.lateral .abajo { margin-top: auto; padding: .6rem .5rem 0; font-size: .82rem; }
.lateral .abajo a { color: var(--lima); }
.principal { padding: 1.2rem clamp(1rem, 2.5vw, 2rem) 3rem; min-width: 0; }
.cab-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.cab-panel .izq { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.kpi { background: var(--papel); border: 1px solid var(--linea); border-radius: 14px; padding: .9rem 1rem; }
.kpi b { display: block; font-family: var(--titulos); font-size: 1.6rem; }
.kpi span { color: var(--gris); font-size: .85rem; }

.agenda-wrap { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); overflow: auto; max-height: calc(100vh - 210px); }
.agenda { display: grid; position: relative; min-width: 100%; }
.agenda .col-horas { position: sticky; left: 0; background: var(--papel); z-index: 3; border-right: 1px solid var(--linea); }
.agenda .cab-col { position: sticky; top: 0; z-index: 4; background: var(--papel); border-bottom: 1px solid var(--linea); padding: .6rem .5rem; font-weight: 650; font-size: .9rem; display: flex; align-items: center; gap: .4rem; height: 48px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda .cab-col i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.agenda .col { position: relative; border-right: 1px solid var(--linea); min-width: 170px; }
.agenda .linea-h { position: absolute; left: 0; right: 0; border-top: 1px solid #F1ECE2; }
.agenda .linea-h.hora-entera { border-top-color: var(--linea); }
.agenda .etq-hora { position: absolute; right: 6px; font-size: .72rem; color: var(--gris); transform: translateY(-50%); }
.agenda .cerrado { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(45deg, #F7F4EE, #F7F4EE 6px, #F1EDE5 6px, #F1EDE5 12px); }
.agenda .hueco { position: absolute; left: 0; right: 0; cursor: copy; }
.agenda .hueco:hover { background: var(--lima-suave); }
.agenda .bloque { position: absolute; left: 4px; right: 4px; border-radius: 10px; padding: .3rem .5rem; font-size: .78rem; line-height: 1.25; overflow: hidden; cursor: pointer; border-left: 4px solid var(--c, var(--pino)); background: var(--pino-claro); color: var(--tinta); box-shadow: 0 1px 2px rgba(0,0,0,.06); transition: transform .1s; z-index: 2; }
.agenda .bloque:hover { transform: scale(1.01); z-index: 5; }
.agenda .bloque b { display: block; font-size: .82rem; }
.agenda .bloque.retenida, .agenda .bloque.pendiente_pago { background: repeating-linear-gradient(-45deg, var(--mandarina-suave), var(--mandarina-suave) 8px, #FFE0C9 8px, #FFE0C9 16px); border-left-color: var(--mandarina); color: #8A420F; }
.agenda .bloque.asistio { background: var(--lima-suave); border-left-color: #6CB82E; }
.agenda .bloque.no_asistio { background: var(--rojo-suave); border-left-color: var(--rojo); }
.agenda .bloque.cancelada { background: #F4F2EE; border-left-color: #BBB; color: #999; text-decoration: line-through; opacity: .7; }
.agenda .bloque.nueva { animation: aparece 1.2s ease; }
@keyframes aparece { 0% { box-shadow: 0 0 0 0 var(--lima); transform: scale(.96); } 40% { box-shadow: 0 0 0 6px var(--lima); } 100% { box-shadow: none; transform: none; } }
.agenda .ahora-linea { position: absolute; left: 0; right: 0; height: 2px; background: var(--mandarina); z-index: 3; }
.agenda .ahora-linea::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--mandarina); }
.agenda .bloqueo { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(45deg, #EDE8DF, #EDE8DF 4px, #E1DBD0 4px, #E1DBD0 8px); font-size: .72rem; color: var(--gris); padding: .2rem .4rem; z-index: 1; }

.feed { display: grid; gap: .5rem; }
.feed .ev { display: flex; gap: .7rem; padding: .7rem .8rem; background: var(--papel); border: 1px solid var(--linea); border-radius: 12px; font-size: .9rem; align-items: start; }
.feed .ev .ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--pino-claro); }
.feed .ev.vivo { border-color: #FFC69C; background: #FFF8F2; }
.feed .ev.pago .ico { background: var(--lima-suave); }
.feed .ev.nueva { animation: entra .4s ease; }
.tabla { width: 100%; border-collapse: collapse; background: var(--papel); border-radius: var(--radio); overflow: hidden; border: 1px solid var(--linea); font-size: .92rem; }
.tabla th, .tabla td { padding: .7rem .8rem; text-align: left; border-bottom: 1px solid var(--linea); vertical-align: top; }
.tabla th { background: #F6F2EA; font-weight: 650; font-size: .82rem; color: var(--gris); }
.tabla tr:last-child td { border-bottom: none; }
.tabla tr.click { cursor: pointer; }
.tabla tr.click:hover td { background: #FBF9F4; }
.tabla-scroll { overflow-x: auto; }
.barras { display: grid; gap: .45rem; }
.barras .b { display: grid; grid-template-columns: 110px 1fr 46px; gap: .6rem; align-items: center; font-size: .85rem; }
.barras .b .pista { background: #F1EDE5; border-radius: 99px; height: 12px; overflow: hidden; }
.barras .b .pista i { display: block; height: 100%; background: var(--pino); border-radius: 99px; }
.dos-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.horario-dia { display: grid; grid-template-columns: 90px 1fr; gap: .5rem; align-items: center; padding: .35rem 0; border-bottom: 1px dashed var(--linea); }
.horario-dia .tramos { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.horario-dia .tramo { display: flex; gap: .25rem; align-items: center; }
.horario-dia input[type=time] { width: 110px; min-height: 36px; padding: .3rem .4rem; }
.menu-movil { display: none; }

/* ---------- COMPONENTES NUEVOS ---------- */
.pestanas { display: flex; gap: .3rem; flex-wrap: wrap; border-bottom: 1px solid var(--linea); margin-bottom: 1rem; }
.pestanas button { background: none; border: 0; border-bottom: 3px solid transparent; padding: .6rem .9rem; font: 600 .92rem var(--texto); color: var(--gris); cursor: pointer; min-height: 44px; }
.pestanas button.on { color: var(--tinta); border-bottom-color: var(--pino); }
canvas.firma { width: 100%; max-width: 560px; height: 160px; border: 1.5px dashed var(--linea); border-radius: 12px; background: #fff; touch-action: none; display: block; }
.texto-legal { max-height: 220px; overflow: auto; background: var(--crema); border: 1px solid var(--linea); border-radius: 12px; padding: .8rem; font-size: .88rem; white-space: pre-line; }
.redes { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.redes a { font-size: .85rem; text-decoration: none; padding: .3rem .7rem; border-radius: 99px; background: var(--pino-claro); color: var(--pino); font-weight: 600; }
.portada { width: 100%; height: 180px; object-fit: cover; border-radius: 18px; margin-top: 1rem; display: block; }
.logo-img { width: 56px; height: 56px; border-radius: 16px; object-fit: cover; flex: none; }
.estrellas-n { color: #C77A00; font-weight: 700; }
.resena { border-bottom: 1px dashed var(--linea); padding: .6rem 0; font-size: .92rem; }
.codigo-caja { display: flex; gap: .5rem; margin-top: .8rem; }
.codigo-caja input { text-transform: uppercase; }
.precios { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.precio-plan { background: var(--papel); border: 1.5px solid var(--linea); border-radius: 20px; padding: 1.4rem; display: flex; flex-direction: column; gap: .6rem; }
.precio-plan.destacado-plan { border-color: var(--pino); box-shadow: 0 0 0 3px var(--pino-claro); }
.precio-plan .monto { font: 700 2rem var(--titulos); }
.precio-plan ul { padding-left: 1.1rem; margin: .3rem 0; font-size: .9rem; }
.precio-plan li { margin: .2rem 0; }
.menu-grupo { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(221,235,230,.6); margin: .8rem .75rem .2rem; }
.candado-plan { font-size: .65rem; background: rgba(255,255,255,.15); padding: .05rem .35rem; border-radius: 6px; margin-left: auto; }
.mejorar { background: var(--mandarina-suave); border: 1px solid #FFD3B4; border-radius: 14px; padding: 1rem; }
.agenda-mes { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.agenda-mes .dsem { text-align: center; font-size: .75rem; font-weight: 650; color: var(--gris); padding: .3rem 0; }
.agenda-mes .celda { background: var(--papel); border: 1px solid var(--linea); border-radius: 10px; min-height: 104px; padding: .3rem; font-size: .72rem; overflow: hidden; cursor: pointer; }
.agenda-mes .celda.otro { opacity: .45; } .agenda-mes .celda.hoy { border-color: var(--mandarina); box-shadow: 0 0 0 2px var(--mandarina-suave); }
.agenda-mes .celda b { font-size: .8rem; display: block; margin-bottom: .2rem; }
.agenda-mes .chip { display: block; border-radius: 6px; padding: .1rem .3rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tinta); }
.lista-dia { display: grid; gap: .5rem; }
.lista-dia .item-r { display: flex; gap: .7rem; padding: .7rem; border-radius: 12px; border: 1px solid var(--linea); background: var(--papel); cursor: pointer; border-left: 5px solid var(--c, var(--pino)); }
.mini { font-size: .78rem; color: var(--gris); }
.grid-form { display: grid; gap: .2rem .9rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ok-chip { color: #0B5D0B; font-weight: 600; }
.qr { background: #fff; padding: 10px; border-radius: 12px; display: inline-block; }
.tarjeta-negocio { display: flex; gap: .9rem; align-items: start; text-decoration: none; color: inherit; }
.tarjeta-negocio:hover { border-color: var(--pino); }
.ayuda-art { border: 1px solid var(--linea); border-radius: 14px; padding: .9rem 1rem; background: var(--papel); }
.ayuda-art summary { font-weight: 650; cursor: pointer; }
pre.codigo { background: #10201C; color: #DDEBE6; padding: .8rem; border-radius: 12px; overflow: auto; font-size: .8rem; }

/* ---------- TEMAS: oscuro y alto contraste ---------- */
:root[data-theme="oscuro"] {
  --pino: #2BA586; --pino-2: #34B796; --pino-claro: #1C3A33; --lima: #B8F26B; --lima-suave: #22361D; --mandarina: #FF9A55; --mandarina-suave: #3A2718;
  --crema: #101614; --papel: #18201D; --tinta: #E9EFEC; --gris: #A3B1AC; --linea: #2C3834; --rojo: #E06A5E; --rojo-suave: #3B1F1C;
  --sombra: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); color-scheme: dark;
}
:root[data-theme="oscuro"] .barra { background: rgba(16,22,20,.92); }
:root[data-theme="oscuro"] input, :root[data-theme="oscuro"] select, :root[data-theme="oscuro"] textarea { background: #121A17; color: var(--tinta); }
:root[data-theme="oscuro"] .hora { background: var(--papel); color: var(--tinta); }
:root[data-theme="oscuro"] .hora.tomada { background: #232C29; color: #6E7B76; }
:root[data-theme="oscuro"] .hora.retenida { background: #3A2718; border-color: #6B4320; color: #FFC79C; }
:root[data-theme="oscuro"] .tabla th { background: #1F2926; }
:root[data-theme="oscuro"] .tabla tr.click:hover td { background: #1E2825; }
:root[data-theme="oscuro"] .lateral { background: #0C1210; }
:root[data-theme="oscuro"] .agenda .cerrado { background: repeating-linear-gradient(45deg, #151C19, #151C19 6px, #1A2220 6px, #1A2220 12px); }
:root[data-theme="oscuro"] .agenda .bloque { color: var(--tinta); }
:root[data-theme="oscuro"] .agenda .linea-h { border-top-color: #222C29; }
:root[data-theme="oscuro"] .feed .ev.vivo { background: #2A2016; }
:root[data-theme="oscuro"] .destacado, :root[data-theme="oscuro"] .alerta { background: #18231F; }
:root[data-theme="oscuro"] .segmentado { background: #222C29; }
:root[data-theme="oscuro"] .segmentado button.on { background: #2E3A36; }
:root[data-theme="oscuro"] .error { color: #FFC7C0; } :root[data-theme="oscuro"] .aviso { color: #FFD3B4; } :root[data-theme="oscuro"] .ok { color: #CFF5A6; }
:root[data-theme="oscuro"] .item-servicio, :root[data-theme="oscuro"] .persona { background: var(--papel); }
:root[data-theme="oscuro"] .calendario .dia { color: var(--tinta); }
:root[data-theme="oscuro"] .btn.lima { color: #10201C; }

:root[data-theme="contraste"] {
  --pino: #FFE600; --pino-2: #FFF176; --pino-claro: #333000; --lima: #FFE600; --lima-suave: #222; --mandarina: #FF9F1A; --mandarina-suave: #331F00;
  --crema: #000; --papel: #000; --tinta: #FFF; --gris: #E6E6E6; --linea: #FFF; --rojo: #FF6B6B; --rojo-suave: #330000; --sombra: none; color-scheme: dark;
}
:root[data-theme="contraste"] body { font-size: 17px; }
:root[data-theme="contraste"] .btn { color: #000; border-width: 2px; }
:root[data-theme="contraste"] .btn.sec, :root[data-theme="contraste"] .btn.fantasma { color: #FFE600; background: transparent; }
:root[data-theme="contraste"] .btn.sec:hover, :root[data-theme="contraste"] .btn.fantasma:hover { background: #222; }
:root[data-theme="contraste"] a { color: #FFE600; text-decoration: underline; }
:root[data-theme="contraste"] .barra { background: #000; border-bottom: 2px solid #fff; }
:root[data-theme="contraste"] input, :root[data-theme="contraste"] select, :root[data-theme="contraste"] textarea { background: #000; color: #fff; border: 2px solid #fff; }
:root[data-theme="contraste"] .tarjeta, :root[data-theme="contraste"] .caja, :root[data-theme="contraste"] .tile, :root[data-theme="contraste"] .kpi { border: 2px solid #fff; }
:root[data-theme="contraste"] .hora { background: #000; color: #fff; border: 2px solid #fff; }
:root[data-theme="contraste"] .hora.retenida { background: #331F00; color: #FFB766; border-color: #FFB766; border-style: dashed; }
:root[data-theme="contraste"] .hora.tomada { background: #111; color: #888; border-color: #555; }
:root[data-theme="contraste"] .hora.mia { background: #FFE600; color: #000; }
:root[data-theme="contraste"] .hora.mia small { color: #000; }
:root[data-theme="contraste"] .lateral { background: #000; border-right: 2px solid #fff; }
:root[data-theme="contraste"] .lateral a.nav { color: #fff; } :root[data-theme="contraste"] .lateral a.nav.activo { background: #FFE600; color: #000; }
:root[data-theme="contraste"] .tabla th { background: #111; color: #fff; }
:root[data-theme="contraste"] .etiqueta { border: 1px solid currentColor; }
:root[data-theme="contraste"] .agenda .cerrado { background: repeating-linear-gradient(45deg, #000, #000 6px, #1a1a1a 6px, #1a1a1a 12px); }
:root[data-theme="contraste"] .agenda .bloque { background: #000; color: #fff; border: 2px solid #fff; border-left-width: 6px; }
:root[data-theme="contraste"] .toast { background: #FFE600; color: #000; border: 2px solid #000; }
:root[data-theme="contraste"] :focus-visible { outline: 3px solid #FFE600; }
:root[data-theme="contraste"] .aviso { background: #000; color: #FFC27A; border: 2px solid #FFC27A; }
:root[data-theme="contraste"] .error { background: #000; color: #FF9B9B; border: 2px solid #FF9B9B; }
:root[data-theme="contraste"] .ok { background: #000; color: #C6F58A; border: 2px solid #C6F58A; }
:root[data-theme="contraste"] .muted, :root[data-theme="contraste"] .mini { color: #E6E6E6; }
:root[data-theme="contraste"] .redes a { background: #000; border: 2px solid #FFE600; color: #FFE600; }
.btn-tema { min-width: 40px; font-size: 1.05rem; }

/* ---------- DASHBOARD DE ACTIVIDAD ---------- */
.dash { --s1: #0F8A6C; --s2: #E8742A; --s3: #2A78D6; --s4: #C2477E; --s1-suave: #7FC1AE;
  --bien: #0ca30c; --atencion: #fab219; --critico: #d03b3b; --grid: #ECE7DC; --eje: #C9C2B4; --tinta-2: #52514e; --muda: #898781; }
.dash .cab-dash { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.segmentado { display: inline-flex; background: #EFEAE0; border-radius: 12px; padding: 3px; gap: 2px; }
.segmentado button { border: 0; background: transparent; padding: .45rem .9rem; border-radius: 9px; font: 600 .88rem var(--texto); color: var(--tinta-2); cursor: pointer; min-height: 36px; }
.segmentado button.on { background: var(--papel); color: var(--tinta); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.dash .rejilla { display: grid; gap: 1rem; grid-template-columns: repeat(12, 1fr); margin-bottom: 1rem; }
.dash .c12 { grid-column: span 12; } .dash .c8 { grid-column: span 8; } .dash .c7 { grid-column: span 7; } .dash .c6 { grid-column: span 6; } .dash .c5 { grid-column: span 5; } .dash .c4 { grid-column: span 4; }
.dash .caja { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 1rem 1.1rem; min-width: 0; }
.dash .caja h3 { font-size: 1rem; margin: 0 0 .15rem; }
.dash .caja .sub { color: var(--muda); font-size: .8rem; margin: 0 0 .8rem; }
.dash .tiles { display: grid; gap: .8rem; grid-template-columns: 1.5fr repeat(5, 1fr); margin-bottom: 1rem; }
.tile { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: .9rem 1rem; display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.tile .lbl { font-size: .82rem; color: var(--tinta-2); display: flex; justify-content: space-between; gap: .4rem; align-items: center; }
.tile .val { font: 650 1.7rem/1.1 var(--texto); color: var(--tinta); }
.tile.heroe .val { font-size: 2.6rem; }
.tile .det { font-size: .78rem; color: var(--muda); }
.delta { font-size: .78rem; font-weight: 600; }
.delta.buena { color: #006300; } .delta.mala { color: #B3261E; } .delta.neutra { color: var(--muda); }
.sem { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 650; padding: .12rem .45rem .12rem .35rem; border-radius: 99px; white-space: nowrap; }
.sem i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.sem.verde { background: #E7F6E7; color: #0B5D0B; } .sem.verde i { background: var(--bien); }
.sem.amarillo { background: #FFF3D6; color: #7A5300; } .sem.amarillo i { background: var(--atencion); }
.sem.rojo { background: #FBE3E3; color: #A0221F; } .sem.rojo i { background: var(--critico); }
.sem.gris { background: #EFEDE8; color: #6B6A66; } .sem.gris i { background: #B9B6AE; }
.medidor { height: 8px; border-radius: 99px; background: #E3EFEA; overflow: hidden; margin-top: .2rem; }
.medidor b { display: block; height: 100%; border-radius: 99px; background: var(--s1); }
.medidor.amarillo b { background: var(--atencion); } .medidor.rojo b { background: var(--critico); }
.spark { width: 100%; height: 30px; display: block; margin-top: .2rem; }

.alertas { display: grid; gap: .5rem; }
.alerta { display: flex; gap: .7rem; align-items: center; padding: .65rem .8rem; border-radius: 12px; border: 1px solid var(--linea); background: #FCFBF8; font-size: .9rem; }
.alerta .ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; color: #fff; font-size: .8rem; }
.alerta.rojo { border-color: #F2C4C1; background: #FDF3F2; } .alerta.rojo .ico { background: var(--critico); }
.alerta.amarillo { border-color: #F5DFA6; background: #FFFAEC; } .alerta.amarillo .ico { background: var(--atencion); color: #0b0b0b; }
.alerta.verde .ico { background: var(--bien); } .alerta.info .ico { background: var(--s3); }
.alerta span.t { flex: 1; }

.vivo-lista { display: grid; gap: .45rem; font-size: .88rem; }
.vivo-lista .fila-v { display: flex; gap: .6rem; align-items: center; }
.vivo-lista .num { font: 650 1.4rem var(--texto); min-width: 2ch; }
.cita { display: flex; gap: .6rem; align-items: center; padding: .35rem 0; border-top: 1px dashed var(--linea); font-size: .86rem; }
.cita i { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* columnas apiladas */
.grafico { position: relative; }
.grafico .area { position: relative; height: 190px; margin-left: 52px; border-bottom: 1px solid var(--eje); display: flex; align-items: flex-end; gap: 2px; }
.grafico .rejas { position: absolute; inset: 0 0 0 52px; pointer-events: none; }
.grafico .rejas div { position: absolute; left: 0; right: 0; border-top: 1px solid var(--grid); }
.grafico .rejas span { position: absolute; right: calc(100% + 6px); transform: translateY(-50%); font-size: .7rem; color: var(--muda); font-variant-numeric: tabular-nums; white-space: nowrap; }
.grafico .banda { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; cursor: default; position: relative; min-width: 0; }
.grafico .banda:hover, .grafico .banda:focus-visible { background: rgba(15, 138, 108, .06); outline: none; border-radius: 4px; }
.grafico .pila { width: min(24px, 70%); display: flex; flex-direction: column-reverse; gap: 2px; }
.grafico .pila b { display: block; width: 100%; }
.grafico .pila b:last-child { border-radius: 4px 4px 0 0; }
.grafico .ejex { display: flex; gap: 2px; margin-left: 52px; margin-top: .3rem; }
.grafico .ejex span { flex: 1; text-align: center; font-size: .68rem; color: var(--muda); white-space: nowrap; overflow: hidden; min-width: 0; }
.leyenda-g { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .8rem; color: var(--tinta-2); margin-bottom: .6rem; }
.leyenda-g span { display: inline-flex; align-items: center; gap: .35rem; }
.leyenda-g i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* barras horizontales */
.hbarras { display: grid; gap: .55rem; }
.hb { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: .6rem; align-items: center; font-size: .85rem; }
.hb .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tinta); }
.hb .pista { height: 14px; position: relative; }
.hb .pista b { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--s1); min-width: 2px; }
.hb .v { font-variant-numeric: tabular-nums; color: var(--tinta-2); font-size: .8rem; white-space: nowrap; }

/* barra segmentada alta */
.segbar { display: flex; gap: 2px; height: 28px; margin: .4rem 0 .9rem; }
.segbar b { display: flex; align-items: center; padding-left: .45rem; color: #fff; font-size: .75rem; font-weight: 650; border-radius: 4px; min-width: 0; overflow: hidden; white-space: nowrap; }
.medios-lista { display: grid; gap: .45rem; font-size: .86rem; }
.medios-lista div { display: grid; grid-template-columns: 14px 1fr auto auto; gap: .5rem; align-items: center; }
.medios-lista i { width: 10px; height: 10px; border-radius: 3px; }
.medios-lista .m { font-variant-numeric: tabular-nums; font-weight: 600; }
.medios-lista .c { color: var(--muda); font-size: .78rem; font-variant-numeric: tabular-nums; }
.destacado { background: #F1F8F5; border-radius: 12px; padding: .7rem .8rem; margin-bottom: .8rem; font-size: .9rem; }
.destacado b.grande { font-size: 1.25rem; display: block; }

.dash .tabla { font-size: .86rem; }
.dash .tabla td.num, .dash .tabla th.num { text-align: right; font-variant-numeric: tabular-nums; }
.estrellas { color: #C77A00; letter-spacing: 1px; white-space: nowrap; }
.queja { border: 1px solid var(--linea); border-radius: 12px; padding: .7rem .8rem; display: grid; gap: .3rem; font-size: .88rem; }
.queja.nueva { border-color: #F2C4C1; background: #FDF6F5; }
.queja .acc { display: flex; gap: .4rem; flex-wrap: wrap; }
.distrib { display: grid; gap: .3rem; }
.distrib .hb { grid-template-columns: 42px 1fr 28px; }
details.tabla-alt { margin-top: .6rem; font-size: .82rem; }
details.tabla-alt summary { cursor: pointer; color: var(--pino-2); }
details.tabla-alt table { margin-top: .4rem; }
#hvTip { position: fixed; z-index: 120; pointer-events: none; background: var(--tinta); color: #fff; font-size: .8rem; line-height: 1.35; padding: .5rem .65rem; border-radius: 10px; max-width: 260px; box-shadow: 0 6px 20px rgba(0,0,0,.2); white-space: pre-line; }
@media (max-width: 1100px) { .dash .tiles { grid-template-columns: repeat(3, 1fr); } .dash .c8, .dash .c7, .dash .c6, .dash .c5, .dash .c4 { grid-column: span 12; } }
@media (max-width: 560px) { .dash .tiles { grid-template-columns: repeat(2, 1fr); } .tile.heroe { grid-column: span 2; } .grafico .area, .grafico .ejex { margin-left: 40px; } .grafico .rejas { left: 40px; } }

@media (max-width: 900px) {
  .heroe .rejilla, .reserva-rejilla { grid-template-columns: 1fr; }
  .carrito { position: static; }
  .panel { grid-template-columns: 1fr; }
  .lateral { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 90; transform: translateX(-100%); transition: transform .2s; }
  .lateral.abierto { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .menu-movil { display: inline-flex; }
}
@media (max-width: 520px) {
  .barra nav .btn.sec { display: none; }
  .horas { grid-template-columns: repeat(3, 1fr); }
  .barras .b { grid-template-columns: 80px 1fr 40px; }
}
