/* Puki Klub — estilos compartidos */
:root {
  /* colores exactos del logo */
  --azul: #10549F;
  --amarillo: #F3C811;
  --rojo: #E83233;
  --verde: #06A275;

  --bg: #FFF9F3;
  --surface: #FFFFFF;
  --ink: #1E2638;
  --muted: #6F7485;
  --line: #F0E8DF;
  --line-strong: #E4D9CD;
  --accent: var(--azul);
  --accent-dark: #0B4180;
  --accent-soft: #E4EDF7;
  --ok: #04855F;
  --ok-soft: #DDF3EA;
  --warn: #8A6700;
  --warn-soft: #FDF3CC;
  --danger: #D42A2B;
  --danger-soft: #FCE4E4;
  --gray-soft: #F2EEE9;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(42, 39, 51, .04), 0 8px 24px rgba(42, 39, 51, .05);
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 800; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
code { background: var(--gray-soft); padding: 1px 6px; border-radius: 6px; font-size: .85em; font-weight: 700; }
[hidden] { display: none !important; }

input:not([type=checkbox]):not([type=radio]), select, textarea {
  font: inherit;
  color: inherit;
  width: 100%;
  border: 1.5px solid var(--line-strong);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; }

/* utilidades */
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { margin-top: 6px; font-size: 1.02rem; }
.center { text-align: center; }
.left { text-align: left; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; gap: 6px 10px; }
.row.gap { gap: 12px; align-items: flex-start; }
.stack > * + * { margin-top: 14px; }
.stack-sm > * + * { margin-top: 8px; }
.self-start { align-self: flex-start; }
.self-end { align-self: flex-end; }
.page-head + .section-title { margin-top: 0; }
.nota-horario { display: inline-flex; margin-top: 10px; padding: 5px 12px; border-radius: 99px; background: var(--gray-soft); font-size: .82rem; font-weight: 700; }
.mr-auto { margin-right: auto; }
.text-danger { color: var(--danger) !important; }
.section-title { margin: 28px 0 12px; font-size: 1.1rem; }
.print-only { display: none; }
.cargando { padding: 80px 16px; text-align: center; color: var(--muted); font-weight: 700; }
.login-wrap { max-width: 420px; margin: 6vh auto 0; }
.login-wrap .hero { margin-bottom: 18px; }
.sin-sesion .sidebar, .sin-sesion .admin-topbar { display: none !important; }
.sin-sesion .admin-main { max-width: none; padding: 24px 16px 60px; }

/* marca */
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { display: block; height: 44px; width: auto; }
.logo-lg img { height: 120px; }
/* franja con los 4 colores del logo, arriba de barras y tarjetas clave */
.franja-top { position: relative; overflow: hidden; }
.franja-top::before, .topbar::before, .sidebar::before, .admin-topbar::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--rojo) 0 25%, var(--azul) 25% 50%, var(--amarillo) 50% 75%, var(--verde) 75%);
}
/* botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--line-strong); background: var(--surface);
  border-radius: 999px; padding: 10px 18px; font-weight: 700;
  text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: var(--azul); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(42, 39, 51, .05); border-color: transparent; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-block { width: 100%; }
.icon-btn { border: 0; background: transparent; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.icon-btn:hover { background: rgba(42, 39, 51, .06); }
.link { border: 0; background: none; padding: 0; color: var(--accent-dark); font-weight: 700; text-decoration: underline; }

/* tarjetas y bloques */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.empty { padding: 22px; text-align: center; color: var(--muted); }
.aviso { background: var(--warn-soft); border-radius: var(--radius-sm); padding: 12px 14px; }
.form-error { color: var(--danger); font-weight: 700; font-size: .9rem; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: .82rem; font-weight: 800; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: .76rem; font-weight: 800; white-space: nowrap; }
.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-warn { background: var(--warn-soft); color: var(--warn); }
.b-accent { background: var(--accent-soft); color: var(--accent-dark); }
.b-gray { background: var(--gray-soft); color: var(--muted); }
.b-danger { background: var(--danger-soft); color: var(--danger); }

.avatar { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 900; font-size: 1.1rem; background: var(--accent-soft); color: var(--accent-dark); flex-shrink: 0; }
.avatar.sm { width: 36px; height: 36px; border-radius: 11px; font-size: .95rem; }

.emoji-sm, .emoji-md { display: grid; place-items: center; background: var(--c-soft, var(--gray-soft)); flex-shrink: 0; }
.emoji-sm { width: 40px; height: 40px; border-radius: 12px; font-size: 1.25rem; }
.emoji-md { width: 52px; height: 52px; border-radius: 16px; font-size: 1.6rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: 99px; padding: 6px 12px; font-size: .85rem; font-weight: 700; }
.chip:hover { border-color: var(--accent); color: var(--accent-dark); }
.mini-clases { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip-clase { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; background: var(--c-soft, var(--gray-soft)); font-size: .78rem; font-weight: 700; white-space: nowrap; }

.bar { height: 8px; background: var(--gray-soft); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; transition: width .3s; }
.bar i { background: var(--verde); }
.bar i.high { background: var(--amarillo); }
.bar i.full { background: var(--rojo); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; padding-top: 0; }

/* switch */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 800; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .slider { width: 48px; height: 28px; border-radius: 99px; background: #D9D0C6; position: relative; transition: background .2s; flex-shrink: 0; }
.switch .slider::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked + .slider { background: var(--verde); }
.switch input:checked + .slider::after { transform: translateX(20px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--accent); outline-offset: 2px; }

/* modal y toasts */
.modal-bg { position: fixed; inset: 0; background: rgba(42, 39, 51, .35); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; animation: fade .15s ease; }
.modal { background: var(--surface); border-radius: 22px; width: 100%; max-width: 620px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0, 0, 0, .18); animation: up .2s ease; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px 6px; }
.modal-body { padding: 10px 20px 18px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 100px; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: .9rem; box-shadow: var(--shadow); animation: up .2s ease; text-align: center; }
.toast.error { background: var(--rojo); }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 560px) {
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal { border-radius: 22px 22px 0 0; max-height: 92vh; }
}

/* ---------- Entrada (index) ---------- */
.landing { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 32px 16px; text-align: center; }
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 16px; margin-top: 28px; }
.role-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 20px; border-radius: 24px; background: var(--surface); border: 2px solid var(--line); text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.role-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.role-emoji { font-size: 2.6rem; margin-bottom: 6px; }
.role-card strong { font-size: 1.1rem; }
.demo-note { margin-top: 28px; }
@media (max-width: 560px) { .role-grid { grid-template-columns: 1fr; width: 100%; } }

/* ---------- Panel de padres ---------- */
.topbar { position: sticky; top: 0; z-index: 10; overflow: hidden; background: rgba(255, 249, 243, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 640px; margin: 0 auto; padding: 14px 16px 9px; display: flex; align-items: center; justify-content: space-between; }
.padres-wrap { max-width: 640px; margin: 0 auto; padding: 24px 16px 130px; }
.padres-wrap.narrow { max-width: 440px; }
.hero { text-align: center; margin: 12px 0 22px; }
.hero-emoji, .exito-ico { font-size: 3.2rem; margin-bottom: 8px; }
.demo-box { margin-top: 22px; text-align: center; }
.demo-box .chips { margin-top: 10px; }

.saludo { margin-bottom: 16px; }
.banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--accent-soft); }
.banner.cerrado { background: var(--gray-soft); }
.banner.ok { background: var(--ok-soft); }
.banner.cambio { background: var(--warn-soft); }
.banner-ico { font-size: 1.6rem; }
.hijo-card > * + * { margin-top: 14px; }

.wizard-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -8px 0 12px -10px; }
.steps { display: flex; gap: 8px; margin-bottom: 22px; }
.step { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.step span { height: 6px; border-radius: 99px; background: var(--line-strong); transition: background .2s; }
.step small { font-size: .75rem; font-weight: 800; color: var(--muted); }
/* cada paso con un color del logo, en su orden: rojo, azul, amarillo, verde */
.step.on span { background: var(--rojo); }
.step.on:nth-child(2) span { background: var(--azul); }
.step.on:nth-child(3) span { background: var(--amarillo); }
.step.on:nth-child(4) span { background: var(--verde); }
.step.on small { color: var(--ink); }

.act-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.act-option { position: relative; text-align: left; border: 2px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 150px; transition: border-color .15s, background .15s, opacity .15s; }
.act-option:hover:not(:disabled) { border-color: var(--line-strong); }
.act-option .emoji { width: 54px; height: 54px; border-radius: 16px; background: var(--c-soft); display: grid; place-items: center; font-size: 1.8rem; margin-bottom: 6px; }
.act-option strong { font-size: 1.02rem; padding-right: 34px; }
/* opciones de días: una franja arriba con los colores del logo */
.act-grid > .slot-wrap .act-option { border-top: 6px solid var(--tono, var(--azul)); }
.act-grid > .slot-wrap:nth-child(4n+1) { --tono: var(--rojo); }
.act-grid > .slot-wrap:nth-child(4n+2) { --tono: var(--azul); }
.act-grid > .slot-wrap:nth-child(4n+3) { --tono: var(--amarillo); }
.act-grid > .slot-wrap:nth-child(4n+4) { --tono: var(--verde); }
/* cada pareja de días con su color */
.dia-card.pareja-lun-mie { border-left: 6px solid var(--azul); }
.dia-card.pareja-mar-jue { border-left: 6px solid var(--verde); }
/* descanso: discreto, al final */
.descanso-mini { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--gray-soft); }
.descanso-mini .dias-mini { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.descanso-mini .dias-mini button { border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: 99px; padding: 4px 12px; font-size: .82rem; font-weight: 700; }
.descanso-mini .dias-mini button.sel { background: var(--azul); border-color: var(--azul); color: #fff; }
.linea-descanso { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.act-option .check { position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; color: transparent; font-size: .8rem; font-weight: 900; }
.act-option.sel { border-color: var(--accent); background: var(--accent-soft); }
.act-option.sel .check { background: var(--accent); border-color: var(--accent); color: #fff; }
.act-option.dim { opacity: .5; }
.act-option:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 380px) { .act-grid { grid-template-columns: 1fr; } .act-option { min-height: 0; } }

.dia-card > .row { margin-bottom: 12px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.slot.par { text-align: center; align-items: center; }
.dia-bloque + .dia-bloque { margin-top: 12px; }
.dia-bloque .grupo-title { margin-bottom: 6px; }
.slot-wrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.slot-wrap .slot { flex: 1; }
.slot { border: 2px solid var(--line); background: var(--surface); border-radius: 14px; padding: 11px 12px; text-align: left; display: flex; flex-direction: column; gap: 1px; transition: border-color .15s, background .15s; }
.slot:hover:not(:disabled) { border-color: var(--line-strong); }
.slot .dia { font-weight: 700; font-size: .9rem; }
.slot .hora { font-size: 1.02rem; font-weight: 900; white-space: nowrap; }
.slot small { font-weight: 800; color: var(--ok); font-size: .78rem; }
.slot small.pocos { color: var(--warn); }
.slot.sel { border-color: var(--accent); background: var(--accent-soft); }
.slot.sel small { color: var(--accent-dark); }
.slot:disabled { background: var(--gray-soft); border-color: var(--gray-soft); color: var(--muted); cursor: not-allowed; }
.slot:disabled small { color: var(--muted); }

.clase-item { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--c); }
.clase-item .badge { align-self: flex-start; }
.cal-card { margin-top: 16px; }
.cal-title { margin-bottom: 12px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal .dow { font-size: .72rem; color: var(--muted); font-weight: 800; padding: 2px 0 6px; }
.cal .d { min-height: 46px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .85rem; font-weight: 700; }
.cal .d.has { background: var(--c-soft); }
.cal .d.finde { color: #C8C0B6; }
.cal .cal-emoji { font-size: .72rem; line-height: 1; margin-top: 2px; }

.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(42, 39, 51, .05); }
.bottom-in { max-width: 640px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.counter { font-weight: 900; font-size: 1.15rem; line-height: 1.1; }
.counter small { display: block; color: var(--muted); font-weight: 700; font-size: .78rem; }

/* ---------- Panel admin ---------- */
.admin { display: flex; min-height: 100vh; }
.sidebar { width: 240px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--line); padding: 26px 14px 20px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 26px; }
.sidebar .brand { padding: 0 8px; display: flex; align-items: center; justify-content: space-between; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav button { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 10px 12px; border-radius: 12px; font-weight: 700; color: var(--muted); text-align: left; position: relative; }
.nav button:hover { background: var(--bg); color: var(--ink); }
.nav button.on { background: var(--accent-soft); color: var(--accent-dark); }
.nav .ico { font-size: 1.1rem; width: 22px; text-align: center; }
.nav .count { margin-left: auto; background: var(--rojo); color: #fff; border-radius: 99px; font-size: .72rem; font-weight: 800; padding: 1px 7px; }
.sidebar-foot { margin-top: auto; padding: 0 8px; }
.admin-topbar { display: none; }
.admin-main { flex: 1; min-width: 0; padding: 30px 34px 60px; max-width: 1120px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.grid-clases { display: grid; grid-template-columns: repeat(auto-fit, minmax(520px, 1fr)); gap: 16px; align-items: start; }
.grid-2 > *, .grid-3 > *, .grid-clases > *, .act-card > * { min-width: 0; }
@media (max-width: 1180px) { .grid-clases { grid-template-columns: 1fr; } }

.periodo-card { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.field-inline input { width: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.stat strong { font-size: 2rem; font-weight: 900; line-height: 1; }
.stat strong small { font-size: 1rem; color: var(--muted); }
.stat-label { font-size: .82rem; font-weight: 800; color: var(--muted); }
.stat-link { cursor: pointer; font: inherit; }
.stat-link:hover { border-color: var(--accent); }

.buscar { margin-bottom: 14px; max-width: 420px; }
/* familias plegables: una fila compacta que se despliega */
details.familia { padding: 0; }
.familia-resumen { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; }
.familia-resumen::-webkit-details-marker { display: none; }
.familia-resumen:hover { background: var(--bg); border-radius: var(--radius); }
.familia-resumen .flecha { color: var(--muted); font-size: 1.1rem; transition: transform .15s; }
details.familia[open] .familia-resumen .flecha { transform: rotate(180deg); }
.hijos-mini { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.hijo-mini { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; }
.familia-detalle { padding: 0 16px 16px; border-top: 1px solid var(--line); padding-top: 12px; }
/* horario del día */
.bloque-dia { margin-top: 22px; }
.bloque-dia > h2 { font-size: 1.05rem; margin-bottom: 10px; }
.merienda { margin-top: 18px; padding: 8px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); font-weight: 800; font-size: .9rem; }
.clase-dia { border-left: 6px solid var(--c, var(--azul)); }
.clase-dia ol { margin: 10px 0 0; padding-left: 22px; }
.clase-dia li { padding: 3px 0; }
.familia-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.hijos { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.hijo-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 14px; background: var(--bg); flex-wrap: wrap; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.row-actions.end { justify-content: flex-end; }
.hijo-form { display: grid; grid-template-columns: 1.2fr .9fr 1fr 1fr 1.1fr auto; gap: 8px; align-items: center; }
@media (max-width: 860px) {
  .hijo-form { grid-template-columns: 1fr 1fr auto; }
  .hijo-form [name=h-nacimiento] { grid-column: 1; grid-row: 2; }
  .hijo-form [name=h-programa] { grid-column: 2; grid-row: 2; }
  .hijo-form [name=h-paquete] { grid-column: 1 / span 2; grid-row: 3; }
}

.acceso { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acceso > div { background: var(--bg); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; word-break: break-all; }
.codigo { font-size: 1.3rem; letter-spacing: .04em; color: var(--accent-dark); }

.grupo { padding: 10px 0; border-top: 1px solid var(--line); }
.grupo:first-child { border-top: 0; }
.grupo-title { font-weight: 800; margin-bottom: 4px; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-radius: 8px; cursor: pointer; }
.check-row:hover { background: var(--bg); }
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); }

.act-card { display: flex; flex-direction: column; gap: 14px; }
.act-head { display: flex; align-items: center; gap: 12px; }
.table-wrap { overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabla th { text-align: left; font-size: .75rem; font-weight: 800; color: var(--muted); padding: 6px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tabla td { padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla input, .tabla select { padding: 7px 8px; min-width: 0; }
.tabla select { min-width: 110px; }
.tabla select[data-cambio=hor-dia] { min-width: 175px; }
.tabla input[type=time] { min-width: 100px; }
.input-num { width: 70px !important; }
.tabla td.asist, .tabla td.no-asiste { text-align: center; }
.tabla td.asist::after { content: '●'; color: var(--verde); font-size: .8em; }
.tabla td.no-asiste { color: var(--muted); }
.ocupa { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.ocupa .bar { flex: 1; }

.emoji-pick, .color-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-pick label, .color-pick label { cursor: pointer; position: relative; }
.emoji-pick input, .color-pick input { position: absolute; opacity: 0; }
.emoji-pick span { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; border: 2px solid var(--line); }
.color-pick span { display: block; width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); }
.emoji-pick input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.color-pick input:checked + span { box-shadow: 0 0 0 3px var(--accent); }
.emoji-pick input:focus-visible + span, .color-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.solicitud > * + * { margin-top: 12px; }
.solicitud blockquote { margin: 12px 0 0; padding: 12px 14px; background: var(--bg); border-radius: 14px; border-left: 4px solid var(--accent); }
.lista-select { max-width: 360px; margin-bottom: 16px; }
.lista-card .act-head { margin-bottom: 14px; }

@media (max-width: 820px) {
  .admin { display: block; }
  .admin-topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 9px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 15; }
  .sidebar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; width: auto; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); z-index: 20; gap: 0; }
  .sidebar .brand, .sidebar-foot { display: none; }
  .nav { flex-direction: row; overflow-x: auto; gap: 2px; }
  .nav button { flex: 1; flex-direction: column; gap: 1px; font-size: .66rem; padding: 6px 4px; min-width: 62px; text-align: center; }
  .nav .count { position: absolute; top: 2px; right: 6px; margin: 0; }
  .admin-main { padding: 20px 16px 110px; }
  .grid-2 { grid-template-columns: 1fr; }
  .toasts { bottom: 90px; }
}

@media print {
  body { background: #fff; }
  .sidebar, .admin-topbar, .no-print, .toasts { display: none !important; }
  .admin-main { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .print-only { display: table-cell; }
  .tabla td.asist { border: 1px solid #ccc; min-width: 28px; }
  .tabla td.asist::after { content: ''; }
  .tabla td.no-asiste { background: #eee; }
}
