/* Cheques Profes & Clases: sistema de diseño (móvil primero) */

@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../vendor/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../vendor/fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url("../vendor/fonts/figtree-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url("../vendor/fonts/figtree-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url("../vendor/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations"); }

:root {
  /* Marca (del logo) */
  --ink: #17181C;          /* tinta: texto y acción principal */
  --ink-soft: #2B2D35;
  --stamp: #D71B02;        /* rojo del logo: sello, indicador activo */
  --stamp-soft: #FCEBE7;
  --gold: #C0A010;         /* dorado del "&": acentos decorativos */
  --gold-text: #7D6400;    /* dorado legible sobre blanco (contraste AA) */
  --gold-soft: #FBF5DC;
  /* Neutros */
  --paper: #EDEFF3;        /* fondo de la app */
  --surface: #FFFFFF;
  --line: #DADDE4;
  --muted: #5C6070;
  --ok: #17775A;
  --ok-soft: #E3F4EC;
  --warn-soft: #FFF4D6;

  --font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(23, 24, 28, .06), 0 6px 20px rgba(23, 24, 28, .06);
  --topbar-h: 56px;
  --tabbar-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Bootstrap */
  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--paper);
  --bs-link-color: var(--ink);
  --bs-link-color-rgb: 23, 24, 28;
  --bs-link-hover-color: var(--stamp);
  --bs-border-color: var(--line);
  --bs-focus-ring-color: rgba(215, 27, 2, .35);
}

html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); font-size: 1rem; line-height: 1.5; color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, .display { font-family: var(--font-display); letter-spacing: -.02em; color: var(--ink); }
.mono { font-family: var(--font-mono); font-feature-settings: "zero" 1; }
.text-muted-app { color: var(--muted); }

:focus-visible { outline: 3px solid var(--stamp); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 2000; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Estructura ---------- */
.topbar { position: sticky; top: 0; z-index: 1020; height: calc(var(--topbar-h) + var(--safe-top)); padding: var(--safe-top) 16px 0;
  display: flex; align-items: center; justify-content: space-between; background: rgba(237, 239, 243, .88);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.topbar-logo { height: 24px; width: auto; }
.main { padding: 8px 16px calc(var(--tabbar-h) + var(--safe-bottom) + 24px); outline: none; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: flex; height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom); background: rgba(255, 255, 255, .94); border-top: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; position: relative;
  color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; letter-spacing: .01em; min-height: 48px; }
.tab .bi { font-size: 1.35rem; line-height: 1; }
.tab.is-active { color: var(--ink); }
.tab.is-active::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--stamp); }
.tab:active { transform: scale(.94); }

.sidebar { display: none; }

.avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--ink); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: .9rem; letter-spacing: .02em; }
.avatar-btn { border: 0; padding: 0; }
.avatar-sm { width: 32px; height: 32px; font-size: .78rem; }
.avatar-soft { background: var(--gold-soft); color: var(--gold-text); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; background: #E9EBEF; border-radius: 12px; color: var(--ink); text-decoration: none; }
.icon-btn:hover { background: #DDE0E6; color: var(--ink); }
.sidebar-user .icon-btn { background: var(--surface); box-shadow: 0 1px 2px rgba(23, 24, 28, .08); }
.sidebar-user .icon-btn:hover { background: #F4F5F8; }
.account-menu { border: 0; border-radius: var(--radius); box-shadow: var(--shadow), 0 20px 40px rgba(23, 24, 28, .12); padding: 6px; min-width: 230px; }
.account-menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: grid; }
.account-menu-head small { color: var(--muted); }
.account-menu .dropdown-item { border-radius: 10px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; }

@media (min-width: 992px) {
  .topbar, .tabbar { display: none; }
  .sidebar { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 264px; padding: 24px 16px; background: var(--surface);
    border-right: 1px solid var(--line); z-index: 1030; }
  .sidebar-brand { padding: 4px 12px 28px; }
  .sidebar-brand img { height: 28px; width: auto; }
  .sidebar-nav { display: grid; gap: 4px; }
  .sidebar-link { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 600; position: relative; }
  .sidebar-link .bi { font-size: 1.15rem; }
  .sidebar-link:hover { background: var(--paper); color: var(--ink); }
  .sidebar-link.is-active { background: var(--paper); color: var(--ink); }
  .sidebar-link.is-active::before { content: ""; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--stamp); }
  .sidebar-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--radius); background: var(--paper); }
  .sidebar-user-text { display: grid; min-width: 0; line-height: 1.25; }
  .sidebar-user-text strong { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidebar-user-text small { color: var(--muted); }
  .sidebar-user .icon-btn { margin-left: auto; }
  .main { margin-left: 264px; padding: 40px 48px 48px; max-width: 1840px; }
}

/* ---------- Tipografía de página ---------- */
.page-title { font-size: clamp(1.75rem, 6vw, 2.4rem); font-weight: 700; line-height: 1.05; margin: 8px 0 6px; }
.page-sub { color: var(--muted); margin: 0 0 20px; font-size: 1.02rem; }
.section-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; margin: 28px 0 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-title a { font-family: var(--font-body); font-size: .9rem; font-weight: 600; text-decoration: none; color: var(--stamp); }

/* ---------- Botones ---------- */
.btn { --bs-btn-font-weight: 700; --bs-btn-border-radius: 14px; --bs-btn-padding-y: .8rem; --bs-btn-padding-x: 1.25rem; min-height: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: transform .12s ease, background-color .15s ease; }
.btn:active { transform: scale(.98); }
.btn-ink { --bs-btn-color: #fff; --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--ink-soft);
  --bs-btn-hover-border-color: var(--ink-soft); --bs-btn-active-bg: #000; --bs-btn-active-color: #fff; --bs-btn-disabled-bg: #8b8d95; --bs-btn-disabled-border-color: #8b8d95; --bs-btn-disabled-color: #fff; }
.btn-soft { --bs-btn-color: var(--ink); --bs-btn-bg: var(--surface); --bs-btn-border-color: #CFD3DB; --bs-btn-border-width: 1.5px; --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: #F4F5F8; --bs-btn-hover-border-color: #BFC4CE; --bs-btn-active-color: var(--ink); --bs-btn-active-bg: #E9EBEF; --bs-btn-active-border-color: #BFC4CE; box-shadow: 0 1px 2px rgba(23, 24, 28, .08); }
.btn-block { width: 100%; }

/* ---------- Tarjetas y listas ---------- */
.card-app { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.list-app { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list-app > li + li { border-top: 1px solid var(--line); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: inherit; text-decoration: none; min-height: 64px; }
.list-row-main { min-width: 0; flex: 1; display: grid; gap: 2px; }
.list-row-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row-meta { color: var(--muted); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row-end { color: var(--muted); font-size: .9rem; text-align: right; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--paper); color: var(--ink); white-space: nowrap; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-gold { background: var(--gold-soft); color: var(--gold-text); }
.pill-stamp { background: var(--stamp-soft); color: #A31400; }

/* Chips de filtro (desplazables en móvil) */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 10px; margin: 0 -16px; scrollbar-width: none; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; scroll-snap-align: start; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px;
  padding: 8px 14px; font-weight: 600; font-size: .9rem; min-height: 40px; display: inline-flex; align-items: center; gap: 8px; }
.chip .count { color: var(--muted); font-weight: 700; font-size: .8rem; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"] .count { color: rgba(255, 255, 255, .7); }

/* ---------- El vale (cheque troquelado) ---------- */
.vale-wrap { filter: drop-shadow(0 1px 1px rgba(23, 24, 28, .07)) drop-shadow(0 6px 14px rgba(23, 24, 28, .07)); position: relative; }
.vale { --stub: 92px; --notch: 11px; position: relative; display: grid; grid-template-columns: var(--stub) 1fr; background: var(--surface);
  border-radius: var(--radius); width: 100%; border: 0; padding: 0; text-align: left; color: inherit;
  -webkit-mask: radial-gradient(circle var(--notch) at var(--stub) 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at var(--stub) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle var(--notch) at var(--stub) 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at var(--stub) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat; }
.vale-stub { display: grid; place-content: center; text-align: center; padding: 16px 6px; background: var(--gold-soft);
  border-right: 2px dashed rgba(125, 100, 0, .28); border-radius: var(--radius) 0 0 var(--radius); }
.vale-value { font-family: var(--font-display); font-weight: 800; font-size: 2rem; line-height: .95; color: var(--gold-text); letter-spacing: -.03em; }
.vale-unit { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); margin-top: 4px; }
.vale-body { padding: 14px 16px 14px 18px; min-width: 0; display: grid; gap: 4px; align-content: center; }
.vale-code { font-family: var(--font-mono); font-weight: 600; font-size: .95rem; letter-spacing: .12em; color: var(--ink); }
.vale-title { font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.vale-meta { color: var(--muted); font-size: .88rem; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.vale-meta .bi { margin-right: 4px; }
button.vale { cursor: pointer; transition: transform .12s ease; }
button.vale .vale-body { padding-right: 40px; }
button.vale:active { transform: scale(.985); }
.vale-wrap:has(button.vale:focus-visible) { outline: 3px solid var(--stamp); outline-offset: 3px; border-radius: var(--radius); }
button.vale:focus-visible { outline: none; }
.vale-go { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.1rem; pointer-events: none; }
.vale-list { display: grid; gap: 12px; }
@media (min-width: 768px) { .vale-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .vale-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1680px) { .vale-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Vale destacado de inicio: pila de vales */
.vale-hero { --stub: 112px; }
.vale-hero .vale-value { font-size: 3rem; }
.vale-hero .vale-body { padding: 20px; }
.vale-stack { position: relative; padding-bottom: 14px; }
@media (min-width: 992px) { .home-hero { max-width: 520px; } }
.vale-stack::before, .vale-stack::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 7px; height: 30px; border-radius: 0 0 var(--radius) var(--radius); background: #F7F2DC; z-index: -1; box-shadow: 0 1px 2px rgba(23, 24, 28, .08); }
.vale-stack::after { left: 28px; right: 28px; bottom: 0; background: #F1EAC9; }

/* Sello CANJEADO */
.sello { position: absolute; right: 16px; top: 72%; z-index: 2; pointer-events: none; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--stamp); border: 3px solid var(--stamp); border-radius: 8px; padding: 4px 12px;
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px var(--stamp); transform: translateY(-50%) rotate(-12deg); opacity: .92; mix-blend-mode: multiply; }
.sello.is-animated { animation: sello-in .42s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes sello-in {
  0% { opacity: 0; transform: translateY(-50%) rotate(-24deg) scale(1.9); }
  70% { opacity: .95; transform: translateY(-50%) rotate(-10deg) scale(.94); }
  100% { opacity: .92; transform: translateY(-50%) rotate(-12deg) scale(1); }
}

/* ---------- Hoja inferior (modal tipo "bottom sheet" en móvil) ---------- */
.sheet .modal-content { border: 0; border-radius: 24px; box-shadow: 0 -10px 40px rgba(23, 24, 28, .18); }
.sheet .modal-header { border: 0; padding: 20px 20px 4px; }
.sheet .modal-title { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; }
.sheet .modal-body { padding: 12px 20px 8px; }
.sheet .modal-footer { border: 0; padding: 8px 20px calc(20px + var(--safe-bottom)); display: grid; grid-template-columns: 1fr; justify-content: stretch; gap: 8px; }
.sheet .modal-footer > * { margin: 0; }
.sheet-grip { display: none; }
@media (max-width: 575.98px) {
  .sheet .modal-dialog { margin: 0; position: fixed; left: 0; right: 0; bottom: 0; max-width: none; transform: translateY(100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
  .sheet.show .modal-dialog { transform: none; }
  .sheet .modal-content { border-radius: 24px 24px 0 0; max-height: 92vh; overflow-y: auto; }
  .sheet-grip { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 10px auto 0; }
}

/* Elección de profesor */
.choice-list { display: grid; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; min-height: 60px; font-weight: 600; background: var(--surface); }
.choice label .check { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; flex: none; }
.choice input:checked + label { border-color: var(--ink); }
.choice input:checked + label .check { background: var(--ink); border-color: var(--ink); color: #fff; }
.choice input:focus-visible + label { outline: 3px solid var(--stamp); outline-offset: 2px; }
.field-label { font-weight: 700; margin: 16px 0 10px; }

/* ---------- Avisos ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--warn-soft); color: #5A4300; font-size: .95rem; }
.notice .bi { font-size: 1.2rem; line-height: 1.2; }
.notice-error { background: var(--stamp-soft); color: #8A1200; }
.notice-ok { background: var(--ok-soft); color: #0F5A43; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .bi { font-size: 2.2rem; color: var(--gold); display: block; margin-bottom: 8px; }
.empty strong { display: block; color: var(--ink); font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 4px; }

/* Esqueletos de carga */
.skeleton { background: linear-gradient(90deg, #E4E7EC 0%, #F1F3F6 50%, #E4E7EC 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: var(--radius); }
.skeleton-vale { height: 96px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Notificaciones flotantes */
.toast-zone { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px); z-index: 1090; display: grid; gap: 8px; pointer-events: none; }
.toast-app { pointer-events: auto; background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 16px; font-weight: 600; box-shadow: 0 10px 30px rgba(23, 24, 28, .25); animation: toast-in .25s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@media (min-width: 992px) { .toast-zone { left: auto; right: 32px; bottom: 32px; width: 360px; } }

/* ---------- Acceso ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: clip; background:
  radial-gradient(120% 60% at 70% 0%, #FBF3D2 0%, rgba(251, 243, 210, 0) 60%), var(--paper); }
.login-top { padding: calc(20px + var(--safe-top)) 20px 0; }
.login-logo { height: 28px; width: auto; }
.login-stage { position: relative; height: 196px; margin: 4px 0 0; }
.fan { position: absolute; inset: 0; }
.fan .vale-wrap { position: absolute; width: 230px; }
.fan .vale { --stub: 72px; --notch: 9px; }
.fan .vale-value { font-size: 1.7rem; }
.fan .vale-body { padding: 12px 14px; gap: 6px; }
.fan .vale-code { font-size: .78rem; }
.fan .vale-bar { height: 6px; border-radius: 3px; background: #EEF0F3; }
.fan .vale-bar + .vale-bar { width: 62%; }
.fan .f1 { left: 50%; top: 18px; transform: translateX(-88%) rotate(-11deg); }
.fan .f2 { left: 50%; top: 66px; transform: translateX(-36%) rotate(4deg); z-index: 2; }
.fan .f3 { left: 50%; top: 10px; transform: translateX(-2%) rotate(14deg); }
.fan .f2 .sello { font-size: .78rem; padding: 2px 9px; border-width: 2px; right: 10px; top: 64%;
  box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 3px var(--stamp); }
.login-copy { padding: 0 20px 22px; }
.login-title { font-size: clamp(2rem, 8.5vw, 2.6rem); font-weight: 800; line-height: 1; margin: 0 0 10px; }
.login-title em { font-style: normal; color: var(--stamp); }
.login-sub { color: var(--muted); font-size: 1.02rem; margin: 0; max-width: 34ch; }
.login-card { flex: 1; background: var(--surface); border-radius: 28px 28px 0 0; box-shadow: 0 -8px 30px rgba(23, 24, 28, .07);
  padding: 26px 20px calc(24px + var(--safe-bottom)); display: flex; flex-direction: column; }
.login-card h2 { font-size: 1.4rem; font-weight: 700; margin: 0 0 18px; }
.login-form { display: grid; gap: 16px; }
.input-app { display: grid; gap: 6px; }
.input-app label { font-weight: 700; font-size: .92rem; }
.input-app .form-control { min-height: 54px; border-radius: 14px; border: 1.5px solid var(--line); font-size: 1.05rem; padding: 12px 16px; background: #FAFBFC; }
.input-app .form-control:focus { border-color: var(--ink); background: var(--surface); box-shadow: 0 0 0 4px rgba(23, 24, 28, .08); }
.input-pass { position: relative; }
.input-pass .form-control { padding-right: 56px; }
.input-pass .icon-btn { position: absolute; right: 7px; top: 7px; }
.login-help { color: var(--muted); font-size: .9rem; text-align: center; margin: auto 0 0; padding-top: 24px; }

/* Reparto de los vales y golpe del sello al cargar */
.fan .vale-wrap { animation: deal .7s cubic-bezier(.2, .9, .25, 1) both; }
.fan .f1 { animation-delay: .05s; --from: translateX(-88%) rotate(-30deg) translateY(40px); }
.fan .f3 { animation-delay: .15s; --from: translateX(-2%) rotate(30deg) translateY(40px); }
.fan .f2 { animation-delay: .25s; --from: translateX(-36%) rotate(-6deg) translateY(60px); }
.fan .f2 .sello { animation: sello-in .42s cubic-bezier(.2, 1.4, .4, 1) .95s both; }
@keyframes deal { from { opacity: 0; transform: var(--from); } }

@media (min-width: 576px) {
  .login-card { flex: none; width: 100%; max-width: 460px; margin: 0 auto 32px; border-radius: 28px; box-shadow: var(--shadow), 0 20px 50px rgba(23, 24, 28, .08); padding: 32px; }
  .login-copy, .login-top { max-width: 460px; width: 100%; margin-left: auto; margin-right: auto; padding-left: 0; padding-right: 0; }
}
@media (min-width: 992px) {
  .login { display: grid; grid-template-columns: 1fr minmax(440px, 520px); align-items: center; gap: 0; padding: 0 64px 0 0;
    background: radial-gradient(70% 80% at 30% 40%, #FBF1CB 0%, rgba(251, 241, 203, 0) 70%), var(--paper); }
  .login-side { display: flex; flex-direction: column; justify-content: center; min-height: 100vh; padding: 104px 64px 40px; position: relative; }
  .login-top { padding: 0; margin: 0; max-width: none; position: absolute; top: 48px; left: 64px; }
  .login-logo { height: 32px; }
  .login-stage { height: 300px; margin: 0 0 4px; max-width: 600px; }
  .fan .vale-wrap { width: 360px; }
  .fan .vale { --stub: 100px; --notch: 12px; }
  .fan .vale-value { font-size: 2.4rem; }
  .fan .vale-body { padding: 18px 20px; }
  .fan .vale-code { font-size: .92rem; }
  .fan .f1 { top: 34px; } .fan .f2 { top: 120px; } .fan .f3 { top: 18px; }
  .fan .f2 .sello { font-size: 1rem; padding: 4px 12px; border-width: 3px; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px var(--stamp); }
  .login-copy { padding: 0; margin: 0; max-width: 560px; }
  .login-title { font-size: clamp(3rem, 4.8vw, 4.4rem); letter-spacing: -.04em; }
  .login-sub { font-size: 1.2rem; max-width: 36ch; }
  .login-card { margin: 0; max-width: none; padding: 40px; }
  .login-card h2 { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Listados (dataview) ---------- */
.dv-toolbar { display: flex; gap: 10px; align-items: stretch; margin-bottom: 4px; }
.dv-search { position: relative; display: block; margin: 0; flex: 1; min-width: 0; }
.dv-search > .bi { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.dv-search input { width: 100%; min-height: 50px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); padding: 10px 44px 10px 44px; font-size: 1rem; color: var(--ink); -webkit-appearance: none; appearance: none; }
.dv-search input::-webkit-search-cancel-button { display: none; }
.dv-search input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(23, 24, 28, .08); }
.dv-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; background: #E4E7EC; color: var(--ink); display: grid; place-items: center; border-radius: 50%; font-size: .8rem; }
.dv-clear:hover { background: #D6DAE1; }
.dv-select { display: none; }
.dv-filter-btn { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; }
.dv-filter-btn .bi { font-size: 1.15rem; }
.dv-filter-btn.is-active { border-color: var(--ink); }
.dv-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--stamp); color: #fff; font-size: .72rem; font-weight: 800; display: inline-grid; place-items: center; }
@media (max-width: 420px) { .dv-filter-btn > span:not(.dv-badge) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .dv-filter-btn { padding: 0 14px; } }
.dv-active { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.dv-tag { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 4px 8px 4px 14px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font-weight: 600; font-size: .9rem; }
.dv-tag .bi { font-size: 1.15rem; opacity: .8; }
.dv-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 12px 0 12px; }
.dv-count { color: var(--muted); font-weight: 600; font-size: .92rem; }
.dv-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.dv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dv-more { margin-top: 14px; }
@media (min-width: 992px) {
  .dv-toolbar { flex-wrap: wrap; align-items: stretch; gap: 12px; }
  .dv-toolbar .dv-search { flex: 0 1 420px; min-width: 260px; }
  .dv-toolbar .dv-search input { min-height: 58px; box-shadow: 0 1px 2px rgba(23, 24, 28, .06); }
  .dv-select { display: block; position: relative; min-width: 230px; }
  .dv-filter-btn, .dv-active { display: none !important; }
}

/* Hoja de filtros (móvil) */
.dv-sheet .modal-header { align-items: center; }
.dv-reset { margin-left: auto; border: 0; background: var(--stamp-soft); color: #A31400; font-weight: 700; padding: 8px 14px; border-radius: 999px; font-size: .9rem; }
.dv-reset:hover { background: #F8D9D2; }
.dv-reset:disabled { background: #E9EBEF; color: #9CA1AC; }
.dv-group { margin: 0 0 18px; }
.dv-group legend { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; margin-bottom: 8px; }
.dv-options { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.dv-option { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px; cursor: pointer; margin: 0; position: relative; }
.dv-option + .dv-option { border-top: 1px solid #EEF0F3; }
.dv-option input { position: absolute; opacity: 0; pointer-events: none; }
.dv-option-label { flex: 1; font-weight: 600; }
.dv-option-count { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.dv-option-check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; flex: none; }
.dv-option input:checked ~ .dv-option-check { background: var(--ink); border-color: var(--ink); color: #fff; }
.dv-option input:checked ~ .dv-option-label { font-weight: 800; }
.dv-option:has(input:focus-visible) { outline: 3px solid var(--stamp); outline-offset: -3px; }

/* Control segmentado (dos o tres vistas) */
.seg { display: inline-flex; gap: 8px; }
.seg button { border: 1.5px solid #CFD3DB; background: var(--surface); border-radius: 12px; min-height: 44px; padding: 6px 16px; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 1px 2px rgba(23, 24, 28, .08); }
.seg button:hover { background: #F4F5F8; }
.seg button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg .count { font-size: .8rem; opacity: .7; }

/* Tarjeta de listado (móvil) */
.item { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 8px; }
.item-top { display: flex; align-items: flex-start; gap: 12px; }
.item-main { min-width: 0; flex: 1; display: grid; gap: 2px; }
.item-title { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.item-meta { color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.item-meta .bi { margin-right: 4px; }
.item-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.item.is-off { opacity: .62; }
.item.is-off .item-title { text-decoration: line-through; }

/* Botones de acción en filas y tarjetas */
.act { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 700; font-size: .88rem; white-space: nowrap; }
.act:hover { background: var(--paper); }
.act.danger { color: #A31400; border-color: #F2C7BF; }
.act.danger:hover { background: var(--stamp-soft); }
.act.warn { color: #6B5200; border-color: #EBDDA6; }
.act.warn:hover { background: var(--gold-soft); }
.tabulator .act { min-height: 34px; padding: 4px 10px; }

/* Tabulator con la estética de la app */
.dv .tabulator { border: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); font-size: .94rem; overflow: hidden; }
.dv .tabulator .tabulator-header { background: var(--surface); border-bottom: 1px solid var(--line); color: var(--muted); font-weight: 700; }
.dv .tabulator .tabulator-header .tabulator-col { background: var(--surface); border-right: 0; }
.dv .tabulator .tabulator-header .tabulator-col .tabulator-col-content { padding: 14px 14px 12px; }
.dv .tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { background: var(--paper); }
.dv .tabulator .tabulator-header .tabulator-col .tabulator-col-title { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.dv .tabulator-row { background: var(--surface); border-bottom: 1px solid #EEF0F3; min-height: 54px; }
.dv .tabulator-row.tabulator-row-even { background: var(--surface); }
.dv .tabulator-row.tabulator-selectable:hover, .dv .tabulator-row:hover { background: #F7F8FA; }
.dv .tabulator-row .tabulator-cell { border-right: 0; padding: 14px; display: inline-flex; align-items: center; gap: 6px; }
.dv .tabulator-row .tabulator-cell[style*="text-align: right"] { justify-content: flex-end; }
.dv .tabulator .tabulator-tableholder { background: var(--surface); }
.dv .tabulator-row.is-off .tabulator-cell { color: var(--muted); }
.dv .tabulator-row.is-off .mono { text-decoration: line-through; }
.dv .tabulator .tabulator-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 10px 14px; color: var(--muted); font-weight: 600; }
.dv .tabulator .tabulator-footer .tabulator-page { border: 1.5px solid var(--line); border-radius: 10px; padding: 6px 12px; margin: 0 2px; background: var(--surface); color: var(--ink); font-weight: 700; }
.dv .tabulator .tabulator-footer .tabulator-page.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.dv .tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { background: var(--paper); color: var(--ink); }
.dv .tabulator .tabulator-footer .tabulator-page.active:hover { background: var(--ink); color: #fff; }
.dv .tabulator .tabulator-footer .tabulator-page-size { border: 1.5px solid var(--line); border-radius: 10px; padding: 5px 8px; }
.dv .tabulator .tabulator-col-sorter .tabulator-arrow { border-bottom-color: var(--line) !important; }
.dv .tabulator .tabulator-col[aria-sort="ascending"] .tabulator-arrow { border-bottom-color: var(--ink) !important; }
.dv .tabulator .tabulator-col[aria-sort="descending"] .tabulator-arrow { border-top-color: var(--ink) !important; }

/* ---------- Estadísticas (inicio de profesor y admin) ---------- */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: grid; gap: 6px; color: inherit; text-decoration: none; position: relative; overflow: hidden; }
.stat-value { font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; line-height: 1; letter-spacing: -.03em; }
.stat-label { color: var(--muted); font-weight: 600; font-size: .9rem; line-height: 1.3; }
.stat .bi-arrow-right { position: absolute; right: 14px; top: 14px; color: var(--muted); }
.stat-gold { background: var(--gold-soft); }
.stat-gold .stat-value { color: var(--gold-text); }
.stat-wide { grid-column: 1 / -1; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stat-wide { grid-column: auto; } }
a.stat:hover { box-shadow: var(--shadow), 0 0 0 2px var(--ink); }

/* ---------- Avisos del profesor ---------- */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feed-item { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.feed-dot { width: 10px; height: 10px; border-radius: 50%; background: transparent; margin-top: 7px; flex: none; }
.feed-item.is-unread .feed-dot { background: var(--stamp); }
.feed-item.is-unread .feed-text { font-weight: 700; }
.feed-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.feed-time { color: var(--muted); font-size: .85rem; }
.feed-item .act { margin-left: auto; flex: none; }

/* Botón peligroso del diálogo */
.btn-danger-app { --bs-btn-color: #fff; --bs-btn-bg: #B91700; --bs-btn-border-color: #B91700; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #9C1300; --bs-btn-hover-border-color: #9C1300; --bs-btn-active-bg: #861000; --bs-btn-active-color: #fff; }
.dl-app { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: .95rem; }
.dl-app dt { color: var(--muted); font-weight: 600; }
.dl-app dd { margin: 0; overflow-wrap: anywhere; }
.dl-group { font-family: var(--font-display); font-weight: 700; margin: 16px 0 8px; }
.form-app { display: grid; gap: 14px; }
.form-hint { color: var(--muted); font-size: .88rem; margin-top: -6px; }

/* Vale compacto (historial y listados de alumno) */
.vale-sm { --stub: 74px; --notch: 9px; }
.vale-sm .vale-value { font-size: 1.5rem; }
.vale-sm .vale-body { padding: 12px 14px; }
.vale-sm .vale-code { font-size: .85rem; }
.vale-wrap .sello-sm { font-size: .72rem; padding: 2px 8px; border-width: 2px; box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 3px var(--stamp); right: 14px; top: auto; bottom: 14px; transform: rotate(-10deg); }
/* Listados que siempre son tarjetas (vales): rejilla en pantallas anchas */
@media (min-width: 768px) { .dv-grid .dv-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .dv-grid .dv-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1680px) { .dv-grid .dv-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
a.vale { color: inherit; text-decoration: none; }
a.vale .vale-body { padding-right: 40px; }

/* ---------- Escritorio ancho: rejillas de las páginas de inicio ---------- */
.dash { display: grid; gap: 0 28px; }
.dash > section { min-width: 0; }
@media (min-width: 1200px) {
  .dash-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1600px) {
  .dash-home { grid-template-columns: minmax(360px, 440px) minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .dash-home .home-hero { max-width: none; margin-top: 54px; }
}
@media (min-width: 992px) and (max-width: 1599.98px) {
  .dash-home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-home .home-hero { grid-column: 1 / -1; }
}
@media (min-width: 1400px) {
  .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (min-width: 1900px) {
  .feed { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Gráfico de columnas (una serie) ---------- */
.chart { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 18px 12px; }
.chart-plot { position: relative; height: 220px; margin: 8px 0 30px 34px; }
.chart-grid { position: absolute; inset: 0; }
.chart-grid span { position: absolute; left: 0; right: 0; border-top: 1px solid #EEF0F3; }
.chart-grid em { position: absolute; right: calc(100% + 8px); top: -.6em; font-style: normal; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.chart-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; border-radius: 6px; outline-offset: 0; }
.chart-col.is-hover { background: rgba(23, 24, 28, .035); }
.chart-bar { width: 100%; max-width: 24px; min-height: 0; background: #7D6400; border-radius: 4px 4px 0 0; }
.chart-col.is-current .chart-bar { background: var(--ink); }
.chart-val { position: absolute; left: 0; right: 0; text-align: center; font-size: .78rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.chart-x { position: absolute; top: calc(100% + 8px); left: 0; right: 0; text-align: center; font-size: .75rem; color: var(--muted); text-transform: capitalize; }
.chart-col.is-current .chart-x { color: var(--ink); font-weight: 700; }
.chart-tip { position: absolute; bottom: calc(100% + 6px); transform: translateX(-50%); background: var(--ink); color: #fff; border-radius: 10px; padding: 8px 12px; font-size: .85rem; white-space: nowrap; pointer-events: none; display: grid; gap: 2px; z-index: 5; }
.chart-table summary { color: var(--muted); font-weight: 600; font-size: .88rem; cursor: pointer; padding: 4px 0; }
.chart-table table { margin-top: 8px; font-size: .9rem; }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.chart-head p { margin: 0; color: var(--muted); font-size: .9rem; }

/* Canjeo rápido por servicio */
.quick-list { display: grid; gap: 10px; }
.quick { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 14px 14px 18px; border-left: 6px solid var(--gold); }
.quick-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.quick-title { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; line-height: 1.25; }
.quick-meta { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.quick-btn { flex: none; min-height: 48px; padding: .6rem 1.1rem; }
@media (min-width: 768px) { .quick-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .quick-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Desplegable propio ---------- */
.dv-select-btn { width: 100%; height: 100%; min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 16px; background: var(--surface);
  border: 1.5px solid #D6DAE1; border-radius: 14px; box-shadow: 0 1px 2px rgba(23, 24, 28, .06); color: var(--ink); text-align: left; cursor: pointer; }
.dv-select-btn:hover { border-color: #B9BEC8; }
.dv-select.is-open .dv-select-btn, .dv-select-btn:focus-visible { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(23, 24, 28, .08); outline: none; }
.dv-select-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.dv-select-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dv-select-value { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-select-count { color: var(--muted); font-weight: 600; font-size: .85rem; margin-left: 4px; font-variant-numeric: tabular-nums; }
.dv-select-btn > .bi { color: var(--muted); transition: transform .15s ease; }
.dv-select.is-open .dv-select-btn > .bi { transform: rotate(180deg); }
.dv-select.is-set .dv-select-btn { border-color: var(--ink); }
.dv-select.is-set .dv-select-label { color: var(--ink); }
.dv-select-menu { position: absolute; z-index: 1040; top: calc(100% + 8px); left: 0; min-width: 100%; max-height: 340px; overflow-y: auto; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border-radius: 16px; box-shadow: 0 1px 2px rgba(23, 24, 28, .08), 0 16px 40px rgba(23, 24, 28, .16); outline: none; animation: menu-in .14s ease both; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.dv-select-menu [role="option"] { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; cursor: pointer; white-space: nowrap; font-weight: 600; }
.dv-select-menu [role="option"].is-active { background: #F1F3F6; }
.dv-select-menu [role="option"][aria-selected="true"] { font-weight: 800; }
.dv-opt-label { flex: 1; }
.dv-opt-count { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.dv-select-menu [role="option"] .bi { width: 18px; color: transparent; }
.dv-select-menu [role="option"][aria-selected="true"] .bi { color: var(--ink); }

/* Botón de cerrar de hojas y diálogos: círculo relleno */
.sheet .btn-close { width: 40px; height: 40px; padding: 0; border-radius: 50%; opacity: 1; background: #E2E5EA url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2317181C'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center / 12px no-repeat; }
.sheet .btn-close:hover { background-color: #D6DAE1; opacity: 1; }

/* ---------- PWA: aviso de versión nueva, instalar la app ---------- */
.pwa-update { position: fixed; z-index: 1100; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px);
  display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 18px; border-radius: 18px; background: var(--ink); color: #fff;
  box-shadow: 0 16px 40px rgba(23, 24, 28, .3); animation: toast-in .3s ease both; }
.login ~ .pwa-update, body:not(.app) .pwa-update { bottom: calc(16px + var(--safe-bottom)); }
.pwa-update-text { flex: 1; display: grid; gap: 2px; font-size: .92rem; }
.pwa-update-text span { color: rgba(255, 255, 255, .72); }
.pwa-update-btn { flex: none; min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: #fff; color: var(--ink); font-weight: 800; }
.pwa-update-btn:disabled { opacity: .7; }
@media (min-width: 992px) { .pwa-update { left: auto; right: 32px; bottom: 32px; width: 420px; } }

.sidebar-install { margin: 0 0 12px; min-height: 46px; }
.sidebar-install[hidden] { display: none !important; }
.dropdown-item[hidden] { display: none !important; }
.btn[hidden] { display: none !important; }

.pwa-ios { position: fixed; inset: 0; z-index: 1200; display: none; }
.pwa-ios.is-open { display: block; }
.pwa-ios-backdrop { position: absolute; inset: 0; background: rgba(23, 24, 28, .45); animation: fade-in .2s ease both; }
@keyframes fade-in { from { opacity: 0; } }
.pwa-ios-sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--paper); border-radius: 24px 24px 0 0; padding: 20px 20px calc(20px + var(--safe-bottom));
  box-shadow: 0 -10px 40px rgba(23, 24, 28, .18); animation: sheet-up .32s cubic-bezier(.2, .8, .2, 1) both; max-width: 560px; margin: 0 auto; }
@keyframes sheet-up { from { transform: translateY(100%); } }
.pwa-ios-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pwa-ios-head h2 { font-size: 1.3rem; font-weight: 700; margin: 0; }
.pwa-ios-close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #E2E5EA; color: var(--ink); display: grid; place-items: center; }
.pwa-ios-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.pwa-ios-steps li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); line-height: 1.45; }
.pwa-ios-n { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; font-size: .9rem; }
.pwa-ios-ok { width: 100%; min-height: 52px; border: 0; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 700; }

/* Confirmación de entrada como administrador (página de acceso) */
.admin-confirm .modal-header { flex-direction: column; align-items: flex-start; gap: 12px; }
.admin-confirm-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--gold-soft); color: var(--gold-text); display: grid; place-items: center; font-size: 1.5rem; }
.admin-confirm .modal-body p { line-height: 1.5; }
.admin-confirm .modal-footer form { margin: 0; }
@media (max-width: 575.98px) {
  .admin-confirm .modal-dialog-centered { min-height: 0; display: block; }
}
