@font-face { font-family: "Poppins"; src: url("fuentes/Poppins-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fuentes/Poppins-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fuentes/Poppins-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --fondo: #F4F7FB; --tinta: #1B2A3A; --suave: #66778A; --linea: #DCE3EC; --papel: #FFFFFF;
  --principal: #1F5FA8; --acento: #5E8C12; --claro: #E3EDF8;
  --ok: #4F8A63; --mal: #C2554A; --radio: 16px;
  --sombra: 0 1px 2px rgba(0,0,0,.04), 0 4px 14px rgba(0,0,0,.04);
  --nav: 64px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--fondo); }
body { margin: 0; font-family: "Poppins", system-ui, sans-serif; font-size: 15px; color: var(--tinta); background: var(--fondo); line-height: 1.45; }
a { color: inherit; text-decoration: none; }
#app { max-width: 720px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 24px); }

/* ---------- cabecera */
#top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top) + 14px) 18px 12px; background: var(--fondo); }
#top h1 { flex: 1; margin: 0; font: 700 24px/1.15 "Poppins", sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#top.con-atras h1 { font-size: 21px; }
.atras { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--papel); border: 1px solid var(--linea); font-size: 26px; line-height: 1; padding-bottom: 3px; flex: none; }
.accion { font-weight: 500; font-size: 14px; color: var(--principal); padding: 8px 12px; border-radius: 20px; background: var(--claro); flex: none; }
#vista { padding: 4px 18px 0; }

/* ---------- navegación inferior */
#nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; display: flex; justify-content: center; background: var(--papel); border-top: 1px solid var(--linea); padding-bottom: env(safe-area-inset-bottom); }
#nav a { flex: 1; max-width: 180px; height: var(--nav); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 500; color: var(--suave); }
#nav svg { width: 24px; height: 24px; fill: currentColor; }
#nav a.activo { color: var(--principal); }
#nav a.activo svg { background: var(--claro); border-radius: 12px; padding: 2px 14px; width: 52px; box-sizing: content-box; height: 22px; }

/* ---------- textos */
.saludo p { margin: 0; color: var(--suave); font-size: 14px; }
.saludo h2 { margin: 0 0 14px; font: 700 25px "Poppins", sans-serif; }
h3.sec { display: flex; justify-content: space-between; align-items: baseline; margin: 24px 2px 10px; font-size: 15px; font-weight: 600; color: var(--principal); }
h3.sec a { font-size: 13px; font-weight: 500; color: var(--acento); }
.nota { color: var(--suave); font-size: 13.5px; margin: 8px 2px; }
.centro { text-align: center; }

/* ---------- botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 10px 18px; border: 0; border-radius: 14px; background: var(--principal); color: #fff; font: 500 15px "Poppins", sans-serif; cursor: pointer; text-align: center; }
.btn.sec { background: var(--papel); color: var(--tinta); border: 1px solid var(--linea); }
.btn.peligro { background: transparent; color: var(--mal); border: 1px solid color-mix(in srgb, var(--mal) 35%, transparent); }
.btn.bloque { display: flex; width: 100%; margin-top: 12px; }
.btn:active { transform: scale(.98); }
.acciones-fila { display: flex; gap: 10px; margin: 12px 0; }
.acciones-fila .btn { flex: 1; }
.archivo input { display: none; }

/* ---------- listas y filas */
.lista { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); }
.fila { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 58px; border-top: 1px solid var(--linea); }
.fila:first-child { border-top: 0; }
a.fila:active { background: var(--claro); }
.fila-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fila-txt b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila-txt small { color: var(--suave); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lista.grande .fila { min-height: 68px; }
.ic { font-size: 22px; width: 32px; text-align: center; }
.mas { color: var(--suave); font-size: 22px; }
.n { color: var(--suave); font-size: 12px; width: 20px; text-align: right; flex: none; }
.punto { width: 12px; height: 36px; border-radius: 6px; flex: none; }
.pill { font-size: 12px; font-weight: 500; padding: 5px 10px; border-radius: 20px; background: var(--claro); color: var(--principal); white-space: nowrap; flex: none; }
.pill.ok { background: color-mix(in srgb, var(--ok) 14%, white); color: var(--ok); }
.pill.mal { background: color-mix(in srgb, var(--mal) 13%, white); color: var(--mal); }
.fecha-chip { width: 44px; height: 46px; flex: none; border-radius: 12px; background: var(--claro); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.fecha-chip b { font-size: 17px; }
.fecha-chip small { font-size: 11px; color: var(--suave); text-transform: lowercase; }
.tipo { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; background: var(--suave); }
.t-feriado { background: var(--acento); } .t-nolab { background: var(--linea); } .t-efem { background: var(--principal); opacity: .5; }
.t-mesa { background: #8E6FB0; } .t-reunion { background: #4C8FB5; } .t-acto { background: #D9A441; } .t-entrega { background: #C2554A; } .t-otro { background: var(--suave); }

/* ---------- avisos */
.banner { display: block; padding: 14px 16px; border-radius: var(--radio); background: var(--claro); margin: 0 0 12px; }
.banner b { display: block; font-weight: 600; }
.banner span { font-size: 13px; color: var(--principal); }
.banner.mal { background: color-mix(in srgb, var(--mal) 12%, white); }
.banner.mal span { color: var(--mal); }
.banner.suave { background: var(--papel); border: 1px dashed var(--linea); margin-top: 22px; }
.chip-dia { padding: 10px 14px; border-radius: 12px; margin: 8px 0; font-weight: 500; font-size: 14px; }
.chip-dia.feriado { background: color-mix(in srgb, var(--acento) 15%, white); color: var(--acento); }
.vacio { text-align: center; padding: 34px 18px; background: var(--papel); border: 1px dashed var(--linea); border-radius: 20px; margin-top: 10px; }
.vacio-ic { font-size: 40px; }
.vacio h3 { margin: 8px 0 4px; font: 600 20px "Poppins", sans-serif; }
.vacio p { color: var(--suave); margin: 0 0 18px; }
.estado-lic { padding: 16px; border-radius: var(--radio); background: var(--claro); font-weight: 500; }
.estado-lic.ok { background: color-mix(in srgb, var(--ok) 13%, white); color: var(--ok); }
.estado-lic.mal { background: color-mix(in srgb, var(--mal) 12%, white); color: var(--mal); }
.codigo { font: 600 24px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 1px; text-align: center; padding: 18px; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); }

/* ---------- cursos */
.tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tarjeta-curso { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 120px; padding: 16px; border-radius: 18px; background: var(--papel); border: 1px solid var(--linea); box-shadow: var(--sombra); overflow: hidden; }
.tarjeta-curso::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 8px; background: var(--c); }
.tarjeta-curso b { font: 600 22px "Poppins", sans-serif; margin-top: 6px; }
.tarjeta-curso span { font-size: 13px; color: var(--suave); }
.tarjeta-curso small { margin-top: auto; font-size: 12px; color: var(--principal); font-weight: 500; }
.curso-cab { margin: -6px 0 8px; font-size: 13px; color: var(--suave); display: flex; align-items: center; gap: 8px; }
.curso-cab::before { content: ""; width: 26px; height: 6px; border-radius: 3px; background: var(--c); }
.tabs { display: flex; gap: 4px; background: var(--papel); border: 1px solid var(--linea); border-radius: 14px; padding: 4px; margin-bottom: 12px; overflow-x: auto; }
.tabs a { flex: 1; text-align: center; padding: 9px 8px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--suave); white-space: nowrap; }
.tabs a.activo { background: var(--principal); color: #fff; }

/* ---------- asistencia */
.fecha-bar, .mes-bar { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; }
.flecha { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--papel); border: 1px solid var(--linea); font-size: 24px; flex: none; }
.fecha-sel { position: relative; flex: 1; text-align: center; padding: 10px; background: var(--papel); border: 1px solid var(--linea); border-radius: 12px; }
.fecha-sel input { position: absolute; inset: 0; opacity: 0; width: 100%; }
.mes-bar b { flex: 1; text-align: center; font: 600 20px "Poppins", sans-serif; }
.fila-asis { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border-top: 1px solid var(--linea); min-height: 56px; }
.fila-asis:first-child { border-top: 0; }
.fila-asis .nom { flex: 1; min-width: 0; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg { display: flex; gap: 4px; flex: none; }
.seg button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--linea); background: var(--fondo); color: var(--suave); font: 600 14px "Poppins", sans-serif; cursor: pointer; }
.seg button.on { color: #fff; border-color: transparent; }
.seg .e-P { background: var(--ok); } .seg .e-A { background: var(--mal); } .seg .e-T { background: #D9A441; } .seg .e-J { background: #4C8FB5; }
.totales { font-size: 12.5px; color: var(--suave); text-align: center; margin: 10px 0; }

/* ---------- tablas */
.tabla-wrap { overflow-x: auto; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); box-shadow: var(--sombra); }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th { text-align: center; font-weight: 500; font-size: 12px; color: var(--suave); padding: 10px 6px; border-bottom: 1px solid var(--linea); background: var(--fondo); }
.tabla th:first-child, .tabla td:first-child { text-align: left; padding-left: 14px; }
.tabla td { text-align: center; padding: 10px 6px; border-top: 1px solid var(--linea); white-space: nowrap; }
.tabla td:first-child { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.tabla td.ok { color: var(--ok); font-weight: 600; } .tabla td.mal { color: var(--mal); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 4px; }
.stats div { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 12px; text-align: center; }
.stats b { display: block; font-size: 22px; } .stats b.mal { color: var(--mal); } .stats b.ok { color: var(--ok); }
.stats small { color: var(--suave); font-size: 12px; }

/* ---------- formularios */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label, .bloque-txt { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--suave); }
.bloque-txt { margin-bottom: 12px; }
input, select, textarea { width: 100%; font: 400 16px "Poppins", sans-serif; color: var(--tinta); background: var(--papel); border: 1px solid var(--linea); border-radius: 12px; padding: 12px 14px; outline: none; min-height: 48px; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--principal); box-shadow: 0 0 0 3px var(--claro); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 13px; font-weight: 500; color: var(--suave); margin-bottom: 8px; padding: 0; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.colores { display: flex; flex-wrap: wrap; gap: 10px; }
.color input, .tema input { display: none; }
.color span { display: block; width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--papel); box-shadow: 0 0 0 1px var(--linea); }
.color input:checked + span { box-shadow: 0 0 0 3px var(--tinta); }
.horario-fila { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.horario-fila select { flex: 1.3; padding: 10px 8px; }
.horario-fila input { flex: 1; padding: 10px 6px; }
.horario-fila span { color: var(--suave); font-size: 13px; }
.x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--fondo); color: var(--mal); font-size: 22px; flex: none; cursor: pointer; }
.notas { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; }
.form .nota-fila { flex-direction: row; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px; border-top: 1px solid var(--linea); color: var(--tinta); font-weight: 400; font-size: 14.5px; }
.nota-fila:first-child { border-top: 0; }
.nota-fila span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nota-fila input { width: 76px; flex: none; text-align: center; min-height: 42px; padding: 8px; }
.temas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.form .tema { flex-direction: row; align-items: center; gap: 10px; padding: 10px; background: var(--papel); border: 1px solid var(--linea); border-radius: 14px; color: var(--tinta); font-size: 14px; }
.tema span { display: flex; width: 44px; height: 30px; border-radius: 8px; overflow: hidden; background: var(--f); border: 1px solid var(--linea); }
.tema span i { flex: 1; } .tema span i:first-child { background: var(--p); } .tema span i:last-child { background: var(--a); }
.form .tema:has(input:checked) { border-color: var(--principal); box-shadow: 0 0 0 2px var(--principal); }

/* ---------- agenda */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 8px; }
.cal .cab { text-align: center; font-size: 12px; color: var(--suave); font-weight: 500; padding: 4px 0; }
.dia { aspect-ratio: 1 / 1.05; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 12px; font-size: 15px; }
.dia.finde { color: var(--suave); }
.dia.fuera { opacity: .3; }
.dia.fer span { color: var(--acento); font-weight: 600; }
.dia.hoy span { background: var(--claro); border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; font-weight: 600; color: var(--principal); }
.dia.sel { background: var(--principal); color: #fff; }
.dia.sel span { color: #fff !important; background: transparent !important; }
.dia i { display: flex; gap: 3px; height: 6px; }
.dia em { width: 6px; height: 6px; }
.leyenda { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--suave); margin: 10px 2px 0; }
.leyenda span { display: flex; align-items: center; gap: 5px; }
.leyenda em { width: 8px; height: 8px; }

.pasos ol { margin: 0; padding-left: 22px; } .pasos li { margin: 6px 0; }
@supports (-webkit-touch-callout: none) { .oculto-ios { } }

#toast { position: fixed; left: 50%; bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 16px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--tinta); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; max-width: calc(100% - 36px); transition: .25s; z-index: 10; text-align: center; }
#toast.ver { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 760px) {
  #vista { padding: 4px 24px 0; }
  #top { padding-left: 24px; padding-right: 24px; }
}

/* ---------- versión para la compu: un poco más ancha */
body.escritorio #app { max-width: 880px; }
body.escritorio #nav a { max-width: 200px; }

/* ---------- sincronización */
.sinc { display: inline-block; font-size: 12.5px; color: var(--principal); margin-top: 4px; }
.sinc::before { content: "☁ "; }
.sinc.offline { color: var(--suave); } .sinc.error { color: var(--mal); }
.sinc.sincronizando { color: var(--suave); }
.privacidad { margin-top: 18px; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 12px 16px; }
.privacidad summary { font-weight: 500; cursor: pointer; }
.privacidad p { font-size: 13.5px; color: var(--suave); }

/* ---------- agenda personal: notas, planner y hojas semanales */
textarea.auto { resize: none; overflow: hidden; min-height: 64px; line-height: 26px; padding: 10px 14px;
  background-color: var(--papel);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 25px, var(--linea) 25px, var(--linea) 26px);
  background-position: 0 9px; background-attachment: local; }
.fila-acc { display: block; margin: 8px 2px 4px; font-size: 13.5px; font-weight: 500; color: var(--acento); }
.fila-acc.centro { text-align: center; }
.dia.con-nota span { text-decoration: underline; text-decoration-color: var(--acento); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.planner-mes { display: grid; gap: 12px; }
@media (min-width: 640px) { .planner-mes { grid-template-columns: 1fr 1fr; } }
.sem-tit { flex: 1; text-align: center; display: flex; flex-direction: column; line-height: 1.2; }
.sem-tit b { font: 600 20px "Poppins", sans-serif; }
.sem-tit small { color: var(--suave); font-size: 13px; }
.semana-grid { display: grid; gap: 12px; }
@media (min-width: 700px) { .semana-grid { grid-template-columns: 1fr 1fr; } }
.dia-card { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--sombra); }
.dia-card.hoy { border-color: var(--principal); box-shadow: 0 0 0 2px var(--claro); }
.dia-card header { display: flex; align-items: baseline; gap: 8px; }
.dia-card header b { font: 600 24px "Poppins", sans-serif; }
.dia-card header span { font-weight: 500; }
.dia-card header small { color: var(--suave); font-size: 12.5px; flex: 1; }
.dia-card header a { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--claro); color: var(--principal); font-size: 20px; flex: none; align-self: center; }
.dia-card.fer header b { color: var(--acento); }
.dia-card textarea.auto { border-color: transparent; padding-left: 4px; padding-right: 4px; min-height: 56px; }
.dia-card textarea.auto:focus { border-color: var(--principal); }
.dia-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.dia-items li { display: flex; align-items: center; gap: 8px; }
.dia-items li a { display: flex; align-items: center; gap: 8px; }
.dia-items li.feriado { color: var(--acento); font-weight: 500; }
.dia-items li.efemeride, .dia-items li.nolab { color: var(--suave); }
.dia-items .tipo { width: 8px; height: 8px; }
h3.sec .cuenta { font-size: 13px; font-weight: 500; color: var(--suave); }
.tareas .tarea { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border-top: 1px solid var(--linea); min-height: 52px; }
.tareas .tarea:first-child { border-top: 0; }
.tarea span { flex: 1; min-width: 0; word-break: break-word; }
.tarea.hecha span { text-decoration: line-through; color: var(--suave); }
.check { width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--suave); background: var(--papel); color: #fff; font-weight: 700; flex: none; cursor: pointer; }
.tarea.hecha .check { background: var(--principal); border-color: var(--principal); }
.tarea-nueva { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--linea); }
.tarea-nueva input { flex: 1; min-height: 44px; }
.tarea-nueva .btn { min-height: 44px; padding: 8px 14px; }

/* ================= Pádel Profe ================= */
:root { --s-r: #D6453D; --s-a: #E3A21A; --s-v: #3E9B5C; }
#nav a { font-size: 11.5px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--claro); color: var(--principal); display: grid; place-items: center; font-weight: 700; flex: none; text-transform: uppercase; }
.buscar { margin-bottom: 12px; }
.sem { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--linea); }
.sem.s-r { background: var(--s-r); } .sem.s-a { background: var(--s-a); } .sem.s-v { background: var(--s-v); }
.mini-sem { display: flex; gap: 3px; flex: none; }
.mini-sem i { font-style: normal; font-size: 11px; font-weight: 700; color: #fff; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; }
.mini-sem .s-v { background: var(--s-v); } .mini-sem .s-a { background: var(--s-a); color: #3a2a00; } .mini-sem .s-r { background: var(--s-r); }
.fila .hora { font-weight: 700; font-size: 15px; width: 50px; flex: none; color: var(--principal); }
a.pill { cursor: pointer; }
.antes { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 16px; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: 12px; }
.antes-cab b { display: block; font: 600 19px "Poppins", sans-serif; }
.antes-cab small { color: var(--suave); }
.proxima { background: var(--claro); border-radius: 12px; padding: 12px 14px; font-weight: 500; margin: 4px 0 8px; white-space: pre-wrap; }
.proxima span { display: block; font-size: 12.5px; font-weight: 600; color: var(--principal); margin-bottom: 2px; }
.golpes-ult { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.golpes-ult li, .hito { display: flex; gap: 10px; align-items: flex-start; }
.golpes-ult .sem, .hito .sem { margin-top: 5px; }
.golpes-ult small, .hito small { color: var(--suave); font-size: 12.5px; }
.golpes-ult p, .hito p { margin: 4px 0 0; font-size: 14px; white-space: pre-wrap; }
.general { margin: 0; font-size: 14px; color: var(--suave); white-space: pre-wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip { font-size: 12px; padding: 3px 9px; border-radius: 20px; background: var(--fondo); border: 1px solid var(--linea); }
.chip.c-r { background: color-mix(in srgb, var(--s-r) 14%, white); border-color: transparent; }
.chip.c-a { background: color-mix(in srgb, var(--s-a) 20%, white); border-color: transparent; }
.chip.c-v { background: color-mix(in srgb, var(--s-v) 15%, white); border-color: transparent; }
.sem-resumen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sem-resumen div { border-radius: var(--radio); padding: 12px; text-align: center; color: #fff; }
.sem-resumen .s-v { background: var(--s-v); } .sem-resumen .s-a { background: var(--s-a); color: #3a2a00; } .sem-resumen .s-r { background: var(--s-r); }
.sem-resumen b { display: block; font-size: 24px; } .sem-resumen small { font-size: 12px; }
.datos .fila-txt small { order: -1; }
.multi { white-space: pre-wrap !important; }
.btn.wa { margin-top: 0; }
.golpe-cab { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.golpe-cab .sem { width: 22px; height: 22px; }
.golpe-cab b { display: block; font: 600 22px "Poppins", sans-serif; } .golpe-cab small { color: var(--suave); }
.linea-tiempo { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); }
.hito { padding: 12px 14px; border-top: 1px solid var(--linea); }
.hito:first-child { border-top: 0; }
.saldo { text-align: center; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 18px; display: flex; flex-direction: column; gap: 2px; }
.saldo b { font-size: 32px; } .saldo small { color: var(--suave); }
.saldo.mal b { color: var(--mal); } .saldo.ok b { color: var(--ok); }
.monto { font-weight: 600; flex: none; } .monto.ok { color: var(--ok); }
.check-linea { display: flex; flex-direction: row !important; align-items: center; gap: 10px !important; color: var(--tinta) !important; font-size: 15px !important; padding: 6px 2px; }
.check-linea input { width: 22px; height: 22px; min-height: 0; accent-color: var(--principal); flex: none; }
.elegir-golpes { display: flex; flex-direction: column; gap: 10px; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 12px; }
.elegir-golpes small { color: var(--suave); font-size: 12px; font-weight: 500; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; font: 500 14px "Poppins", sans-serif; padding: 8px 12px; min-height: 40px; border-radius: 20px; border: 1px solid var(--linea); background: var(--fondo); color: var(--tinta); cursor: pointer; }
.chip-btn .sem { width: 10px; height: 10px; }
.chip-btn.on { background: var(--principal); color: #fff; border-color: var(--principal); }
.chip-btn.chico { font-size: 13px; padding: 6px 10px; min-height: 36px; }
.golpe-card { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 14px; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--sombra); }
.golpe-card header { display: flex; justify-content: space-between; align-items: center; }
.golpe-card header b { font: 600 19px "Poppins", sans-serif; }
.antes-golpe { margin: 0; font-size: 13px; color: var(--suave); }
.semaforo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.semaforo button { min-height: 46px; border-radius: 12px; border: 2px solid var(--linea); background: var(--papel); font: 600 13.5px "Poppins", sans-serif; cursor: pointer; color: var(--tinta); }
.semaforo .s-r { border-color: color-mix(in srgb, var(--s-r) 45%, white); }
.semaforo .s-a { border-color: color-mix(in srgb, var(--s-a) 55%, white); }
.semaforo .s-v { border-color: color-mix(in srgb, var(--s-v) 45%, white); }
.semaforo .s-r.on { background: var(--s-r); border-color: var(--s-r); color: #fff; }
.semaforo .s-a.on { background: var(--s-a); border-color: var(--s-a); color: #3a2a00; }
.semaforo .s-v.on { background: var(--s-v); border-color: var(--s-v); color: #fff; }
.rot { color: var(--suave); font-size: 12px; font-weight: 500; }
textarea.auto { resize: none; overflow: hidden; min-height: 48px; }
.tira { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 6px; }
.tira-dia { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 12px; gap: 1px; }
.tira-dia small { font-size: 11px; color: var(--suave); }
.tira-dia b { font-size: 17px; }
.tira-dia i { font-style: normal; font-size: 11px; font-weight: 700; color: var(--principal); min-height: 15px; }
.tira-dia.hoy b { color: var(--principal); }
.tira-dia.fer b { color: var(--acento); }
.tira-dia.sel { background: var(--principal); } .tira-dia.sel small, .tira-dia.sel b, .tira-dia.sel i { color: #fff; }
.sem-tit { flex: 1; text-align: center; display: flex; flex-direction: column; line-height: 1.2; }
.sem-tit b { font: 600 20px "Poppins", sans-serif; } .sem-tit small { color: var(--suave); font-size: 13px; }
.fila-acc { display: block; margin: 8px 2px 4px; font-size: 13.5px; font-weight: 500; color: var(--acento); }
.fila-acc.centro { text-align: center; }
.en-linea { border: 0; padding: 6px 0; min-height: 0; background: transparent; flex: 1; font-size: 15px; }
.en-linea:focus { box-shadow: none; border-bottom: 2px solid var(--principal); border-radius: 0; }
.tarea-nueva { display: flex; gap: 8px; margin-top: 12px; flex-direction: row !important; }
.tarea-nueva input { flex: 1; } .tarea-nueva select { width: auto; flex: none; }
.leyenda .sem { width: 10px; height: 10px; }

/* ======================================================= Stock y Ventas */
.link { color: var(--principal); font-weight: 500; text-decoration: underline; }
.btn.grande { min-height: 56px; font-size: 17px; font-weight: 700; border-radius: 16px; }
#nav a.vender svg { background: var(--principal); fill: #fff; border-radius: 14px; padding: 4px 16px; width: 56px; height: 26px; box-sizing: content-box; }
#nav a.vender.activo svg { background: var(--acento); }
#nav a.vender { color: var(--principal); }
.stats a, .stats div { display: block; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 12px 8px; text-align: center; }
.stats a b, .stats div b { display: block; font-size: 19px; line-height: 1.25; }
.stats.dos-col { grid-template-columns: 1fr 1fr; margin-top: 10px; }
.stats { margin-top: 12px; }
.monto { font-weight: 600; white-space: nowrap; flex: none; }
.monto.menos { color: var(--mal); } .monto.mas-c { color: var(--ok); }
.hora { font-size: 12.5px; color: var(--suave); width: 42px; flex: none; }
.pill.aviso { background: color-mix(in srgb, #D98A1E 16%, white); color: #A86210; }
.fila.anulada .fila-txt b, .fila.anulada .monto { text-decoration: line-through; opacity: .6; }
.buscar { margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.filtro { flex-wrap: nowrap; overflow-x: auto; margin: 0 -18px 10px; padding: 0 18px 2px; scrollbar-width: none; }
.chip { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 20px; border: 1px solid var(--linea); background: var(--papel); color: var(--tinta); font: 500 13.5px "Poppins", sans-serif; white-space: nowrap; cursor: pointer; flex: none; }
.chip.on { background: var(--principal); border-color: var(--principal); color: #fff; }
.fila-acc { display: flex; gap: 6px; flex: none; }
.fila-acc .chip { padding: 6px 10px; font-size: 12.5px; }
button.fila { width: 100%; border: 0; border-top: 1px solid var(--linea); background: var(--papel); font: inherit; color: inherit; text-align: left; cursor: pointer; position: relative; }
button.fila:first-child { border-top: 0; }
button.fila:active { background: var(--claro); }
.fila.prod small.sin { color: var(--mal); } .fila.prod small.poco { color: #A86210; }
.precio { font-weight: 600; white-space: nowrap; }
.en-carro { position: absolute; top: 8px; right: 8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--principal); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.fila.prod .precio { margin-right: 18px; }
@keyframes pulso { 0% { background: var(--claro); } 100% { background: var(--papel); } }
.fila.pulso { animation: pulso .45s ease-out; }
#barra { position: fixed; left: 0; right: 0; bottom: calc(var(--nav) + env(safe-area-inset-bottom)); z-index: 6; display: flex; justify-content: center; pointer-events: none; }
#barra:empty { display: none; }
body.con-barra #app { padding-bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 96px); }
.barra-cobrar { pointer-events: auto; width: calc(100% - 24px); max-width: 696px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding: 10px 10px 10px 18px; background: var(--tinta); color: #fff; border-radius: 18px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.barra-cobrar span:first-child { display: flex; flex-direction: column; line-height: 1.2; }
.barra-cobrar b { font-size: 20px; } .barra-cobrar small { font-size: 12.5px; opacity: .8; }
.barra-cobrar .btn { min-height: 44px; }
.fila.item { align-items: center; flex-wrap: wrap; }
.precio-edit { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--suave); margin-top: 6px; }
.precio-edit input { width: 110px; min-height: 36px; padding: 6px 10px; font-size: 15px; }
.cantidad { display: flex; align-items: center; gap: 4px; flex: none; }
.cantidad button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--linea); background: var(--fondo); font: 700 20px "Poppins", sans-serif; color: var(--tinta); cursor: pointer; }
.cantidad input { width: 58px; min-height: 38px; padding: 4px; text-align: center; font-weight: 600; }
.fila.item small.sin { color: var(--mal); }
.chips.medios .chip { padding: 10px 14px; }
.aviso-txt { color: var(--mal); font-size: 13.5px; font-weight: 500; margin: 8px 2px; }
.total-venta { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 12px 16px; margin-top: 14px; }
.total-venta div { display: flex; justify-content: space-between; color: var(--suave); font-size: 14px; padding: 2px 0; }
.total-venta div.grande { color: var(--tinta); font-size: 18px; font-weight: 600; align-items: baseline; }
.total-venta div.grande b { font-size: 26px; }
.datos-venta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 14px; margin-bottom: 12px; }
.datos-venta small { display: block; font-size: 12px; color: var(--suave); }
.datos-venta b { font-weight: 500; }
.comprobante { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 10px; text-align: center; }
.comprobante img { width: 100%; max-width: 380px; border-radius: 8px; box-shadow: var(--sombra); }
.variante { position: relative; background: var(--papel); border: 1px solid var(--linea); border-radius: 14px; padding: 12px 12px 10px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.variante > input[name=v_nombre] { padding-right: 44px; }
.variante .x { position: absolute; top: 14px; right: 14px; }
.cuatro { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cuatro label { font-size: 12px; gap: 4px; }
.cuatro input { padding: 10px 8px; min-height: 44px; }
.variante-fila { flex-wrap: wrap; }
.variante-fila .fila-acc { width: 100%; justify-content: flex-end; }
.check-linea { flex-direction: row !important; align-items: center; gap: 10px !important; color: var(--tinta) !important; font-size: 14.5px !important; font-weight: 400 !important; }
.check-linea input { width: 22px; height: 22px; min-height: 0; flex: none; }
.saldo-cli { text-align: center; padding: 18px; border-radius: var(--radio); background: color-mix(in srgb, var(--ok) 12%, white); color: var(--ok); }
.saldo-cli.mal { background: color-mix(in srgb, var(--mal) 12%, white); color: var(--mal); }
.saldo-cli.aviso { background: color-mix(in srgb, #D98A1E 14%, white); color: #A86210; }
.saldo-cli b { display: block; font-size: 32px; line-height: 1.2; }
.saldo-cli small { font-size: 13px; font-weight: 500; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--claro); color: var(--principal); display: grid; place-items: center; font-weight: 700; flex: none; }
.logo-fila { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.logo-fila img { max-height: 64px; max-width: 160px; border-radius: 8px; border: 1px solid var(--linea); background: #fff; }
.fecha-sel b { font-weight: 600; }
@media (max-width: 380px) { .cuatro { grid-template-columns: 1fr 1fr; } .stats a b, .stats div b { font-size: 16px; } }
