/* Comenio · hoja de estilos (sistema "Patio")
   Identidad: Guía de identidad Juan Amos Comenio 2026. Mucho papel claro, índigo para títulos y
   bloques, cielo como apoyo y solo toques de amarillo, rojo y verde; la franja de colores sale del libro abierto.
   Tema claro a propósito: la guía pide el logotipo siempre sobre fondo blanco o muy claro. */
:root {
  color-scheme: light;
  /* colores de marca */
  --indigo: #3A3F95; --sky: #7CCFF0; --sun: #FFDD1A; --red: #D4161C;
  --emerald: #1FD18B; --forest: #087A39; --orange: #F0842C; --turq: #B3DEDD;
  --charcoal: #333333; --peach: #FBCBA3; --blush: #F4857E;
  /* superficies y texto (neutros tibios hacia el Papel de la marca) */
  --paper: #FFFBF0; --surface: #ffffff; --sunk: #F7F1E2; --line: #ECE4D0;
  --ink: #333333; --ink-2: #5b5a63; --ink-3: #85838c;
  --pine: #3A3F95; --pine-ink: #ffffff; --pine-soft: #E8E9F6;
  --marigold: #F0842C; --marigold-soft: #FFF5C4; --marigold-ink: #3A3F95;
  --ok: #087A39; --ok-soft: #DDF6E9; --warn: #A34E06; --warn-soft: #FDEBD9; --bad: #D4161C; --bad-soft: #FCE4E2;
  --shadow: 0 1px 2px rgba(58, 63, 149, .06), 0 8px 26px rgba(58, 63, 149, .10);
  --stripe: linear-gradient(90deg, #3A3F95 0 16.66%, #7CCFF0 16.66% 33.33%, #1FD18B 33.33% 50%, #FFDD1A 50% 66.66%, #F0842C 66.66% 83.33%, #D4161C 83.33% 100%);
  --f-display: "Baloo 2", "Nunito", "Segoe UI", system-ui, sans-serif;
  --f-body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-hand: "Caveat", "Segoe Print", cursive;
  --f-mono: "Nunito", "Segoe UI", system-ui, sans-serif;
  --r: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
#app { min-height: 100%; }
body { background: var(--paper); color: var(--ink); font: 15.5px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 1.85rem; font-weight: 800; color: var(--indigo); } h2 { font-size: 1.3rem; font-weight: 700; color: var(--indigo); } h3 { font-size: 1.1rem; font-weight: 600; color: var(--indigo); }
p { margin: 0; }
a { color: var(--pine); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
.num, td.num, .money { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: .04em; font-weight: 700; }
.hand { font-family: var(--f-hand); font-weight: 600; color: var(--indigo); }
.stripe { height: 6px; background: var(--stripe); flex: none; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); } .small { font-size: .85rem; } .tiny { font-size: .78rem; }
.eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: var(--ink-3); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row.end { justify-content: flex-end; } .row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; } .stack.lg { gap: 22px; } .stack.sm { gap: 6px; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
[hidden] { display: none !important; }

/* ── estructura ── */
.shell { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100%; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 2px 6px 14px; text-align: center; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.brand img { width: 150px; height: auto; display: block; }
.brand .hand { font-size: 1.15rem; line-height: 1; }
.brand small { color: var(--ink-3); font-size: .74rem; display: block; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 700; }
.nav a:hover { background: var(--sunk); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--indigo); color: #fff; }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .count { margin-left: auto; background: var(--sun); color: var(--charcoal); font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding-block: 14px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; flex-wrap: wrap; }
.top h1 { font-size: 1.35rem; }
.content { padding-block: 22px 60px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); max-width: 1320px; width: 100%; }
.demo-bar { background: var(--marigold-soft); color: var(--marigold-ink); padding-block: 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); font-size: .86rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.demo-bar select { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; overflow-x: auto; padding: 8px max(10px, env(safe-area-inset-right, 0px)) 8px max(10px, env(safe-area-inset-left, 0px)); border-right: 0; border-bottom: 1px solid var(--line); gap: 2px; }
  .brand { display: none; }
  .nav { display: flex; gap: 2px; } .nav a { white-space: nowrap; padding: 8px 10px; } .nav a span.lbl { display: none; } .nav a[aria-current="page"] span.lbl { display: inline; }
  .side-foot { display: none; }
  .top { position: static; }
  .content, .top { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}

/* ── controles ── */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); padding: 8px 15px; border-radius: 999px; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.2; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--pine); border-color: var(--pine); color: var(--pine-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.accent { background: var(--sun); border-color: var(--sun); color: var(--charcoal); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 5px 11px; font-size: .86rem; }
.btn.wa { background: var(--forest); border-color: var(--forest); color: #fff; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
label.f { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .88rem; min-width: 0; }
label.f > span.h { font-weight: 400; color: var(--ink-3); font-size: .8rem; }
input.i, select.i, textarea.i { width: 100%; border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 10px; font-weight: 400; min-width: 0; }
textarea.i { min-height: 80px; resize: vertical; }
input.i:focus, select.i:focus, textarea.i:focus { border-color: var(--pine); outline: 2px solid color-mix(in srgb, var(--pine) 25%, transparent); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: .9rem; }
.check input { width: 18px; height: 18px; accent-color: var(--pine); }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px 14px; }
.search { max-width: 280px; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 13px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--indigo); color: #fff; }

/* ── superficies ── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.panel > header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.panel > header h2, .panel > header h3 { flex: 1; min-width: 0; }
.sect { display: flex; flex-direction: column; gap: 12px; }
.sect > header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sect > header h2 { flex: 1; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.kpi { background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.kpi b { font-family: var(--f-display); font-size: 1.75rem; font-weight: 800; color: var(--indigo); font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .eyebrow { margin-bottom: 2px; }
.kpi.neg b { color: var(--bad); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
table.t td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--sunk); }
table.t td.num, table.t th.num { text-align: right; white-space: nowrap; }
table.t tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap; background: var(--sunk); color: var(--ink-2); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.info { background: var(--pine-soft); color: var(--pine); } .pill.plain::before { display: none; }
.empty { padding: 28px 16px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line); border-radius: var(--r); }
.alerts { display: flex; flex-direction: column; gap: 8px; }
.alert { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); flex-wrap: wrap; }
.alert .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ink-3); }
.alert.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: var(--bad-soft); } .alert.bad .dot { background: var(--bad); }
.alert.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); } .alert.warn .dot { background: var(--warn); }
.alert.info .dot { background: var(--pine); }
.alert .grow { min-width: 180px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; font-weight: 700; border-bottom-width: 4px !important; color: var(--ink-2); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--indigo); border-bottom-color: var(--sky); }
.dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: .92rem; }
.dl dt { color: var(--ink-3); } .dl dd { margin: 0; overflow-wrap: anywhere; }
.code-chip { font-family: var(--f-mono); font-size: 1.05rem; font-weight: 800; letter-spacing: .18em; background: var(--marigold-soft); color: var(--indigo); border-radius: 7px; padding: 3px 10px; }

/* ── pase de lista ── */
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 285px), 1fr)); gap: 10px; }
.kid { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; display: flex; gap: 11px; align-items: flex-start; min-width: 0; }
.kid .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-family: var(--f-display); flex: none; background: var(--sunk); color: var(--ink-2); border: 2px solid var(--line); }
.kid.in .av { background: var(--ok-soft); color: var(--forest); border-color: var(--emerald); }
.kid.denied { border-color: var(--bad); background: #FFF7F6; }
.kid.denied .av { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.kid.out .av { background: var(--sunk); color: var(--ink-3); border-style: dashed; }
.kid.flag { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.kid .who { flex: 1; min-width: 0; }
.kid .who b { display: block; line-height: 1.25; }
.kid .who small { color: var(--ink-3); font-size: .8rem; display: block; line-height: 1.35; margin-top: 2px; }
.feed { display: flex; flex-direction: column; }
.feed .ev { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); align-items: center; font-size: .9rem; }
.feed .ev:last-child { border-bottom: 0; }
.feed time { font-family: var(--f-mono); font-size: .82rem; color: var(--ink-2); }

/* ── horario ── */
.sched { display: grid; grid-template-columns: 170px repeat(7, minmax(108px, 1fr)); min-width: 940px; }
.sched > div { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 7px; min-height: 52px; }
.sched .hd { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); background: var(--surface); min-height: 0; }
.sched .hd.today { color: var(--indigo); box-shadow: inset 0 -4px 0 var(--sky); }
.sched .person { font-weight: 600; font-size: .9rem; background: var(--surface); }
.shift { display: block; width: 100%; text-align: left; border: 1px solid #C9EAF7; border-radius: 8px; padding: 4px 6px; font-size: .78rem; background: #E5F5FC; cursor: pointer; margin-bottom: 4px; color: var(--ink); }
.shift.draft { background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 5px, var(--sunk) 5px, var(--sunk) 10px); border-style: dashed; }
.shift b { font-family: var(--f-mono); font-weight: 600; font-size: .78rem; }
.add-shift { border: 1px dashed var(--line); background: none; border-radius: 7px; width: 100%; color: var(--ink-3); cursor: pointer; font-size: .8rem; padding: 3px; }

/* ── modal y avisos ── */
.scrim { position: fixed; inset: 0; background: rgba(8, 20, 18, .45); z-index: 50; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); overflow-y: auto; }
.modal { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); width: min(640px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; display: flex; flex-direction: column; }
.modal::before { content: ""; display: block; height: 6px; background: var(--stripe); flex: none; }
.modal.wide { width: min(920px, 100%); }
.modal > header { padding: 18px 20px 6px; display: flex; gap: 10px; align-items: flex-start; }
.modal > header h2 { flex: 1; }
.modal > .body { padding: 10px 20px 18px; display: flex; flex-direction: column; gap: 14px; }
.modal > footer { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--surface); }
.err { color: var(--bad); font-weight: 600; font-size: .9rem; }
.toasts { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; }
body:has(.scrim) .toasts { bottom: auto; top: max(16px, env(safe-area-inset-top, 0px)); }
.toast { background: var(--indigo); color: var(--paper); padding: 11px 14px; border-radius: 10px; box-shadow: var(--shadow); font-size: .92rem; display: flex; gap: 10px; align-items: flex-start; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.pickup { background: var(--surface); color: var(--ink); border: 2px solid var(--sky); }
.toast.pickup.unauth { border-color: var(--bad); }
.toast button.x { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.bell { position: relative; }
.bell .badge { position: absolute; top: -4px; right: -4px; background: var(--bad); color: #fff; font-size: .68rem; font-weight: 700; padding: 0 5px; border-radius: 99px; }

/* ── barras ── */
.bar { height: 8px; background: var(--sunk); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--sky); border-radius: 99px; }
.hbars { display: flex; flex-direction: column; gap: 9px; }
.hbars .hb { display: grid; grid-template-columns: minmax(0, 140px) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: .88rem; }

/* ── acceso ── */
.auth { min-height: 100%; display: grid; place-items: center; padding-block: 24px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.auth .panel { width: min(440px, 100%); padding: 28px; }
.auth .logo { width: 190px; display: block; margin: 0 auto; }

/* ── iPad de la puerta ── */
.kiosk { min-height: 100vh; min-height: 100dvh; background: var(--indigo); color: #fff; display: flex; flex-direction: column; font-size: 20px; user-select: none; -webkit-user-select: none; }
.kiosk-top { display: flex; align-items: center; gap: 16px; padding-block: 14px; padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); }
.kiosk-logo { background: #fff; border-radius: 18px; padding: 8px 12px; flex: none; }
.kiosk-logo img { width: 128px; height: auto; display: block; }
.kiosk-top .hello { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kiosk-top b { font-family: var(--f-display); font-size: 1.45rem; font-weight: 800; line-height: 1.1; }
.kiosk-top .hand { color: var(--sky); font-size: 1.5rem; }
.kiosk-top .clock { margin-left: auto; font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.kiosk-body { flex: 1; display: grid; place-items: center; padding-block: 12px 28px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.kcard { background: #fff; color: var(--charcoal); border-radius: 28px; padding: 30px; width: min(620px, 100%); box-shadow: 0 20px 50px rgba(10, 12, 50, .3); display: flex; flex-direction: column; gap: 18px; }
.kcard h2 { font-size: 2rem; font-weight: 800; }
.kbig { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; width: min(760px, 100%); }
.kbig button { border: 0; border-radius: 32px; padding: 44px 20px; font-family: var(--f-display); font-size: 2.4rem; font-weight: 800; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--indigo); background: #fff; box-shadow: 0 14px 40px rgba(10, 12, 50, .25); }
.kbig button small { font-family: var(--f-body); font-size: 1.1rem; font-weight: 600; color: var(--ink-2); }
.kbig button.out { background: var(--sun); color: var(--charcoal); } .kbig button.out small { color: #4d4300; }
.kbig svg { width: 56px; height: 56px; }
.dots { display: flex; justify-content: center; gap: 14px; }
.dots i { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--indigo); }
.dots i.on { background: var(--indigo); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pad button { font-size: 2rem; font-family: var(--f-display); font-weight: 700; padding: 10px 0; border-radius: 20px; border: 2px solid var(--line); background: #fff; color: var(--charcoal); cursor: pointer; min-height: 62px; }
.pad button:active { background: #E5F5FC; border-color: var(--sky); }
.pad button.k-ok { background: var(--indigo); color: #fff; border-color: var(--indigo); font-size: 1.25rem; font-family: var(--f-body); font-weight: 800; }
.pad button.k-del { font-size: 1.2rem; font-family: var(--f-body); font-weight: 700; }
.kbtn { border: 0; border-radius: 999px; padding: 18px 26px; font-size: 1.35rem; font-weight: 800; cursor: pointer; background: var(--indigo); color: #fff; min-height: 64px; font-family: var(--f-body); }
.kbtn.alt { background: var(--sunk); color: var(--charcoal); }
.kbtn.mari { background: var(--sun); color: var(--charcoal); }
.kbtn:disabled { opacity: .4; }
.kinput { font-size: 1.6rem; padding: 16px 18px; border-radius: 18px; border: 2px solid var(--line); width: 100%; background: #fff; color: var(--charcoal); font-family: var(--f-body); }
.kinput:focus { border-color: var(--indigo); outline: 4px solid var(--sky); }
.kmsg { font-size: 1.15rem; color: var(--red); font-weight: 800; text-align: center; min-height: 1.5em; }
.kstatus { display: inline-flex; padding: 6px 16px; border-radius: 99px; font-weight: 800; font-size: 1rem; background: var(--sunk); color: var(--ink-2); }
.kstatus.in { background: var(--ok-soft); color: var(--forest); } .kstatus.out { background: #E5F5FC; color: var(--indigo); }
.kchoices { display: grid; gap: 10px; }
.kchoices button { text-align: left; padding: 16px 22px; border-radius: 18px; border: 2px solid var(--line); background: #fff; font-size: 1.25rem; font-weight: 700; cursor: pointer; color: var(--charcoal); font-family: var(--f-body); }
.kchoices button[aria-pressed="true"] { border-color: var(--indigo); background: var(--pine-soft); color: var(--indigo); }
.knote { background: var(--marigold-soft); color: var(--charcoal); border-radius: 18px; padding: 16px 18px; font-size: 1.05rem; display: flex; flex-direction: column; gap: 10px; }
.kreport { background: #FDECEB; color: var(--charcoal); border-left: 6px solid var(--blush); border-radius: 18px; padding: 16px 18px; font-size: 1rem; display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.kdone { text-align: center; align-items: center; }
.kdone .tick { width: 104px; height: 104px; border-radius: 50%; background: var(--emerald); display: grid; place-items: center; }
.kdone .tick svg { width: 58px; height: 58px; color: #fff; stroke-width: 3; }
.kdone .hand { font-size: 1.6rem; }
.qr { background: #fff; padding: 14px; border-radius: 18px; display: grid; place-items: center; border: 2px solid var(--line); }
.qr img, .qr canvas, .qr svg { width: 240px; height: 240px; image-rendering: pixelated; }
.kfoot { display: flex; justify-content: space-between; align-items: center; padding-block: 0 16px; padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); font-size: .95rem; gap: 12px; flex-wrap: wrap; color: #DDE0F5; }
.kfoot button { background: none; border: 1.5px solid rgba(255,255,255,.45); color: #fff; padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: .95rem; font-family: var(--f-body); font-weight: 700; }
.offline { background: var(--red); color: #fff; text-align: center; padding: 8px; font-weight: 800; font-size: 1rem; }
@media (max-width: 620px) { .kbig { grid-template-columns: 1fr; } .kbig button { padding: 28px 16px; font-size: 1.9rem; } .kcard { padding: 22px; } .kiosk-top .hello { display: none; } }

/* ── páginas públicas para padres ── */
.pub { min-height: 100%; padding-block: 20px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; justify-content: center; }
.doc { width: min(620px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px; overflow: hidden; position: relative; display: flex; flex-direction: column; gap: 18px; }
.doc::before { content: ""; position: absolute; inset: 0 0 auto; height: 7px; background: var(--stripe); }
.doc .head .logo { width: 124px; height: auto; flex: none; }
.doc .sign { font-family: var(--f-hand); font-weight: 600; color: var(--indigo); font-size: 1.5rem; }
.doc .head { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid var(--indigo); padding-bottom: 14px; flex-wrap: wrap; }
.doc .head .grow { min-width: 200px; }
.doc .folio { font-family: var(--f-mono); font-size: 1rem; font-weight: 600; background: var(--sunk); padding: 4px 10px; border-radius: 6px; }
.doc .total { display: flex; justify-content: space-between; font-family: var(--f-display); font-size: 1.5rem; font-weight: 800; color: var(--indigo); border-top: 2px solid var(--indigo); padding-top: 10px; gap: 10px; flex-wrap: wrap; }
.copy-row { display: flex; gap: 8px; align-items: center; background: var(--sunk); padding: 10px 12px; border-radius: 9px; flex-wrap: wrap; }
.copy-row .mono { font-size: 1.05rem; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.stamp { border: 2px solid var(--bad); color: var(--bad); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; padding: 6px 12px; border-radius: 8px; align-self: flex-start; transform: rotate(-3deg); }
.incident { border-left: 5px solid var(--sky); padding: 4px 0 4px 14px; display: flex; flex-direction: column; gap: 6px; }

@media (prefers-reduced-motion: no-preference) { .toast { animation: rise .25s ease-out; } @keyframes rise { from { transform: translateY(8px); opacity: 0; } } }
@media print {
  .side, .top .row, .demo-bar, .no-print, .toasts { display: none !important; }
  .shell { display: block; } body { background: #fff; color: #000; }
  .panel, .tablewrap { border-color: #ccc; }
}
@media (max-width: 480px) { .doc { padding: 18px; } .pub { padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px)); } }

/* ── espera y resultado en el iPad ── */
.kdone .face { width: 150px; height: 150px; }
.waiting { display: flex; gap: 14px; padding: 18px 0 4px; }
.waiting i { width: 22px; height: 22px; border-radius: 50%; background: var(--sky); }
.waiting i:nth-child(2) { background: var(--sun); } .waiting i:nth-child(3) { background: var(--emerald); }
@media (prefers-reduced-motion: no-preference) {
  .waiting i { animation: hop 1.1s ease-in-out infinite; } .waiting i:nth-child(2) { animation-delay: .15s; } .waiting i:nth-child(3) { animation-delay: .3s; }
  @keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-14px); } }
  .kdone .face { animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); } @keyframes pop { from { transform: scale(.4); opacity: 0; } }
}
/* ── ventana de la maestra: llegó a la puerta ── */
.door-call { display: flex; flex-direction: column; gap: 12px; }
.door-item { border: 2px solid var(--line); border-radius: 20px; padding: 16px 18px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; background: var(--surface); }
.door-item.out { border-color: var(--sun); }
.door-item .av { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 1.4rem; background: #E5F5FC; color: var(--indigo); flex: none; }
.door-item .who { flex: 1; min-width: 180px; }
.door-item .who b { font-family: var(--f-display); font-size: 1.6rem; font-weight: 800; color: var(--indigo); display: block; line-height: 1.15; }
.door-item .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.yes { background: var(--forest); border-color: var(--forest); color: #fff; font-size: 1.1rem; padding: 12px 22px; }
.btn.no { background: var(--red); border-color: var(--red); color: #fff; font-size: 1.1rem; padding: 12px 22px; }

/* ── tabla de permisos ── */
table.perms th.c, table.perms td.c { text-align: center; width: 110px; }
table.perms tr.grp td { background: var(--sunk); font-family: var(--f-display); font-weight: 700; color: var(--indigo); font-size: .95rem; padding-top: 12px; }
table.perms input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--indigo); cursor: pointer; }
table.perms input[type=checkbox]:disabled { cursor: not-allowed; opacity: .6; }

/* ── fotos de los niños ── */
img.av.photo { border-radius: 50%; object-fit: cover; border: 2px solid var(--line); flex: none; display: block; }
.kid.in img.av.photo { border-color: var(--emerald); } .kid.denied img.av.photo { border-color: var(--bad); } .kid.out img.av.photo { opacity: .75; }
.photo-box { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.photo-box .av { display: grid; place-items: center; border-radius: 50%; font-family: var(--f-display); font-weight: 800; background: var(--sunk); color: var(--ink-2); border: 2px solid var(--line); }
.door-item img.av.photo { border: 3px solid var(--sky); }
.door-item span.av { width: 96px !important; height: 96px !important; font-size: 2rem; }
.kchild { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.kphoto { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 5px solid var(--sky); flex: none; }
.kphoto.ini { display: grid; place-items: center; background: #E5F5FC; color: var(--indigo); font-family: var(--f-display); font-weight: 800; font-size: 3rem; }
.kchild > div { flex: 1; min-width: 200px; } .kchild h2 { font-size: 1.8rem; }

/* ── ficha de pago ── */
.ficha-qr { background: #fff; border: 2px dashed var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.ficha-qr .qr { border: 0; padding: 6px; }
.ficha-qr .qr svg { width: 220px; height: 220px; max-width: 100%; }
