/* =====================================================================
   CANS ONLINE — estilo tipo Duolingo con colores CANS, para toda la plataforma (26 oct 2026)
   Se carga DESPUÉS de app.css y solo cambia el aspecto; no cambia ninguna función.
   Para deshacer: quitar su <link> en index.html.
   Letra Nunito (licencia SIL OFL 1.1, ver assets/fonts/Nunito-OFL.txt), alojada en el mismo servidor.
   Movimiento reducido: app.css ya acorta todas las animaciones.
   ===================================================================== */
@font-face {
  font-family: "Nunito";
  src: url(../fonts/nunito-latin.woff2) format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --brand-deep: #071e5c;
  --bg: #f6f7fb;
  --bg-elev: #ffffff;
  --bg-sunken: #eef0f5;
  --sidebar: #ffffff;
  --toolbar: rgba(255, 255, 255, .92);
  --text: #1f2a44;
  --text-2: #5b6478;
  --text-3: #7c8496;
  --border: #e3e6ee;
  --border-strong: #cdd3e0;
  --hover: #f1f3f8;
  --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 24px;
  --press: 4px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-deep: #1b3a9e;
    --bg: #131416; --bg-elev: #1e1f23; --bg-sunken: #191a1d; --sidebar: #1a1b1e; --toolbar: rgba(19, 20, 22, .92);
    --text: #f2f3f7; --text-2: #aab0bd; --text-3: #848a98; --border: #2e3036; --border-strong: #42454e; --hover: #25272c;
  }
}
:root[data-theme="dark"] {
  --brand-deep: #1b3a9e;
  --bg: #131416; --bg-elev: #1e1f23; --bg-sunken: #191a1d; --sidebar: #1a1b1e; --toolbar: rgba(19, 20, 22, .92);
  --text: #f2f3f7; --text-2: #aab0bd; --text-3: #848a98; --border: #2e3036; --border-strong: #42454e; --hover: #25272c;
}

body { font-weight: 600; }
h1, h2, h3, h4, strong, b { font-weight: 800; }

/* ------------------------------------------------------------ animaciones comunes */
@keyframes duo-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes duo-pop { 0% { opacity: 0; transform: scale(.85); } 70% { opacity: 1; transform: scale(1.03); } 100% { transform: scale(1); } }
/* Al entrar a una pantalla, sus bloques aparecen en cascada. Solo mientras #view tiene la clase
   "entering" (la pone app.js unos segundos al cambiar de pantalla), para que las actualizaciones
   automáticas cada 3 minutos no repitan la animación. */
#view.entering .page > *, #view.entering .home-body > *, #view.entering .apps-grid > *, #view.entering .kpi-row > *, #view.entering .people-list > *, #view.entering .admin-list > *, #view.entering .event-list > *, #view.entering .photo-grid > * { animation: duo-rise .45s var(--ease) both; }
#view.entering .page > :nth-child(2), #view.entering .home-body > :nth-child(2), #view.entering .apps-grid > :nth-child(2), #view.entering .kpi-row > :nth-child(2), #view.entering .people-list > :nth-child(2), #view.entering .admin-list > :nth-child(2), #view.entering .event-list > :nth-child(2), #view.entering .photo-grid > :nth-child(2) { animation-delay: 50ms; }
#view.entering .page > :nth-child(3), #view.entering .home-body > :nth-child(3), #view.entering .apps-grid > :nth-child(3), #view.entering .kpi-row > :nth-child(3), #view.entering .people-list > :nth-child(3), #view.entering .admin-list > :nth-child(3), #view.entering .event-list > :nth-child(3), #view.entering .photo-grid > :nth-child(3) { animation-delay: 100ms; }
#view.entering .page > :nth-child(4), #view.entering .home-body > :nth-child(4), #view.entering .apps-grid > :nth-child(4), #view.entering .kpi-row > :nth-child(4), #view.entering .people-list > :nth-child(4), #view.entering .admin-list > :nth-child(4), #view.entering .event-list > :nth-child(4), #view.entering .photo-grid > :nth-child(4) { animation-delay: 150ms; }
#view.entering .page > :nth-child(5), #view.entering .home-body > :nth-child(5), #view.entering .apps-grid > :nth-child(5), #view.entering .kpi-row > :nth-child(5), #view.entering .people-list > :nth-child(5), #view.entering .admin-list > :nth-child(5), #view.entering .event-list > :nth-child(5), #view.entering .photo-grid > :nth-child(5) { animation-delay: 200ms; }
#view.entering .page > :nth-child(n+6), #view.entering .home-body > :nth-child(n+6), #view.entering .apps-grid > :nth-child(n+6), #view.entering .kpi-row > :nth-child(n+6), #view.entering .people-list > :nth-child(n+6), #view.entering .admin-list > :nth-child(n+6), #view.entering .event-list > :nth-child(n+6), #view.entering .photo-grid > :nth-child(n+6) { animation-delay: 250ms; }
.page { animation: none; }

/* ------------------------------------------------------------ menú lateral y barra superior */
.sidebar { background: var(--sidebar); backdrop-filter: none; -webkit-backdrop-filter: none; border-right: 2px solid var(--border); padding: 16px 12px; }
.sb-brand-text { font-weight: 900; letter-spacing: .04em; color: var(--brand); }
.logo-tile { border-radius: 12px; border: 2px solid var(--border); box-shadow: none; }
.sb-nav ul, .sb-foot ul { gap: 4px; }
.sb-group { font-weight: 800; }
.sb-label { overflow: hidden; text-overflow: ellipsis; }
.sb-link { padding: 10px 14px; border-radius: 14px; border: 2px solid transparent; font-size: 15px; font-weight: 800; color: var(--text-2); transition: background .15s, color .15s, border-color .15s, transform .1s ease-out; }
.sb-link:active { transform: scale(.97); }
.sb-link:hover { background: var(--hover); color: var(--text); }
.sb-link.active { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 35%, transparent); color: var(--brand); }
.sb-count { font-weight: 800; }
.sb-foot { border-top: 2px solid var(--border); }
.sb-user { border-radius: 14px; }
.toolbar { border-bottom: 2px solid var(--border); }
.view-title { font-size: 18px; font-weight: 900; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; transition: background .15s, color .15s, transform .1s ease-out; }
.icon-btn:active { transform: scale(.9); }
.badge { font-weight: 900; }

/* ------------------------------------------------------------ botones 3D (se hunden al tocarlos) */
.btn { height: 42px; padding: 0 18px; border-radius: 14px; border-width: 2px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: 14px; transition: background .15s, transform .1s ease-out, box-shadow .1s ease-out, opacity .15s; }
.btn:active:not(:disabled) { transform: translateY(var(--press)); }
.btn-primary { background: var(--brand-solid); border-color: transparent; box-shadow: 0 var(--press) 0 var(--brand-deep); }
.btn-primary:active:not(:disabled) { box-shadow: 0 0 0 var(--brand-deep); }
.btn-secondary { background: var(--bg-elev); border-color: var(--border-strong); color: var(--brand); box-shadow: 0 var(--press) 0 var(--border-strong); }
.btn-secondary:active:not(:disabled) { box-shadow: 0 0 0 var(--border-strong); }
.btn-danger { box-shadow: 0 var(--press) 0 #8c0010; }
.btn-danger:active:not(:disabled) { box-shadow: 0 0 0 #8c0010; }
.btn-ghost, .btn-danger-ghost { text-transform: none; letter-spacing: 0; }
.btn-ghost:active:not(:disabled), .btn-danger-ghost:active:not(:disabled) { transform: scale(.96); }
.btn-sm { height: 34px; padding: 0 12px; border-radius: 12px; font-size: 12.5px; --press: 3px; }
.btn-lg { height: 50px; padding: 0 24px; border-radius: 16px; font-size: 16px; --press: 5px; }
.btn:disabled { box-shadow: none; }

/* ------------------------------------------------------------ campos */
.input { height: 46px; border-radius: 14px; border: 2px solid var(--border); background: var(--bg-sunken); font-weight: 700; }
.input:focus { background: var(--bg-elev); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.select-sm { height: 40px; }
.field-label { font-weight: 800; color: var(--text); }
.search-input { border-radius: 14px; background: var(--bg-sunken); }
.result-item { border: 2px solid var(--border); border-radius: 14px; font-weight: 700; }
.check input { width: 20px; height: 20px; }

/* ------------------------------------------------------------ tarjetas */
.card, .kpi, .app-card, .photo-card, .readonly-banner, .week-col, .table-wrap, .person-row, .admin-row, .profile-card {
  border: 2px solid var(--border); border-bottom-width: 4px; box-shadow: none;
}
.card { border-radius: var(--r-lg); padding: 20px; }
.card-head h3 { font-size: 18px; font-weight: 900; }
.section-title { font-weight: 900; }
.hero-title { font-weight: 900; letter-spacing: -.01em; }
.hero-sub { font-weight: 700; }

.kpi { border-radius: var(--r-lg); transition: transform .1s ease-out, border-color .15s; }
.kpi:hover { transform: translateY(-2px); box-shadow: none; border-color: var(--border-strong); }
.kpi:active { transform: translateY(2px); border-bottom-width: 2px; }
.kpi-label { font-weight: 800; }
.kpi-value { font-weight: 900; }
.section-tile { border: 2px solid var(--border); border-radius: 16px; transition: transform .1s ease-out; }
.section-tile:active { transform: scale(.98); }

/* Apps: tarjetas grandes y tocables */
.app-card { border-radius: 20px; transition: transform .12s ease-out, border-color .15s; }
.app-card:hover { transform: translateY(-3px); box-shadow: none; border-color: var(--border-strong); }
.app-card:active { transform: translateY(2px); border-bottom-width: 2px; }
.app-title { font-weight: 900; font-size: 16px; }
.app-desc { font-weight: 600; }
.app-badge { font-weight: 800; border-radius: 10px; }

/* Listas de personas, administración y eventos */
.person-row, .admin-row { border-radius: 16px; }
.person-row.link { transition: transform .1s ease-out; }
.person-row.link:active { transform: scale(.99); }
.row-action { font-weight: 800; }
.event-row { border-radius: 14px; transition: background .15s, transform .1s ease-out; }
.event-row:active { transform: scale(.99); }
.ev-day { font-weight: 900; }
.ev-title { font-weight: 800; }
.ev-icon { border-radius: 10px; }
.kid-card { border: 2px solid var(--border); border-left: 6px solid var(--kid); border-radius: 16px; }
.profile-card { border-radius: 18px; }
.profile-card:hover { box-shadow: none; border-color: var(--border-strong); }

/* Calendario */
.cal-month { border: 2px solid var(--border); border-radius: var(--r-lg); box-shadow: none; }
.cal-dow { font-weight: 900; }
.cal-num { font-weight: 800; }
.cal-title { font-weight: 900; }
.cal-pill { border-radius: 8px; font-weight: 700; }
.week-col { border-radius: 18px; }
.week-col.today { border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.week-ev { border-radius: 10px; }
.agenda-date { font-weight: 900; border-bottom-width: 2px; }

/* Chips, píldoras y selectores */
.chip, .group-chip { border-width: 2px; font-weight: 700; }
.tag { font-weight: 800; border-radius: 8px; }
.toggle-chip, .cat-toggle, .kid-toggle, .pill { border-width: 2px; font-weight: 800; transition: transform .1s ease-out, background .15s, border-color .15s, color .15s; }
.toggle-chip:active, .cat-toggle:active, .kid-toggle:active, .pill:active { transform: scale(.95); }
.pill.active { background: var(--brand-solid); border-color: var(--brand-solid); color: #fff; }
.segmented { border: 2px solid var(--border); border-radius: 14px; padding: 4px; }
.segmented button { border-radius: 10px; font-weight: 800; }
.segmented button.active { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
.cat-opt, .icon-opt { border-width: 2px; border-radius: 12px; font-weight: 700; }

/* Avisos y estados */
.notice { border: 2px solid color-mix(in srgb, var(--brand) 18%, transparent); border-radius: 16px; font-weight: 700; }
.notice-warn { border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.state h3 { font-weight: 900; }
.state-icon { border-radius: 18px; animation: duo-pop .5s var(--ease) both; }
.photo-cta-icon, .big-icon, .tip-icon, .profile-icon { border-radius: 14px; }

/* Tablas */
.table-wrap { border-radius: 18px; }
.table th { font-weight: 900; }
.table th, .table td { border-bottom-width: 2px; }

/* Ventanas, menús y avisos flotantes */
dialog.modal { border: 2px solid var(--border); border-bottom-width: 5px; }
.modal-head h2 { font-size: 19px; font-weight: 900; }
.modal-foot { border-top-width: 2px; }
.menu-item { border-radius: 14px; font-weight: 800; transition: background .15s, transform .1s ease-out; }
.menu-item:active { transform: scale(.98); }
.notif-panel { border: 2px solid var(--border); border-bottom-width: 4px; }
.notif-item { border-radius: 14px; }
.toast { border-radius: 16px; font-weight: 800; }

/* Fotos */
.photo-frame, .photo-preview { border-radius: 18px; }
.tips li { border: 2px solid var(--border); border-radius: 14px; font-weight: 700; }

/* Encabezado del inicio y de familia: azul CANS con el patrón; el color de la sección en el borde inferior */
.hero { position: relative; overflow: hidden; isolation: isolate; flex-wrap: nowrap; align-items: center; gap: 18px; padding: 24px; border-radius: 24px; background: #0c3292; color: #fff; border-bottom: 6px solid var(--hero-sec, #071e5c); }
.hero .cans-pattern { opacity: .1; }
.hero > .avatar { background: #fff; color: #0c3292; box-shadow: 0 0 0 3px #0c3292, 0 0 0 6px var(--hero-sec, rgba(255, 255, 255, .5)); animation: duo-pop .5s var(--ease) .1s both; }
.hero-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.hero .hero-title { color: #fff; }
.hero .hero-sub { color: rgba(255, 255, 255, .86); }
.hero .hero-date { color: rgba(255, 255, 255, .82); font-weight: 800; align-self: flex-start; }
.hero-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #fff; color: #0c3292; font-size: 12px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.hero-chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--hero-sec, #0c3292); }
@media (max-width: 640px) {
  .hero { flex-wrap: wrap; padding: 20px 18px; gap: 12px; }
  .hero .hero-date { order: -1; width: 100%; }
  .hero > .avatar { width: 52px !important; height: 52px !important; }
}

/* Ajustes: tarjeta de perfil */
.profile-head { flex-direction: row; align-items: center; gap: 18px; border-bottom-color: var(--hero-sec, var(--border)); border-bottom-width: 6px; }
.profile-head .avatar { box-shadow: 0 0 0 3px var(--bg-elev), 0 0 0 6px var(--hero-sec, var(--brand-ring)); animation: duo-pop .5s var(--ease) both; }
.profile-head-text { display: flex; flex-direction: column; min-width: 0; }
.profile-head-text strong { font-size: 22px; font-weight: 900; }
.profile-head-text span { font-weight: 800; color: var(--text-2); }

/* Pantalla de carga */
.splash-title { font-weight: 900; }
.splash-bar { height: 6px; border-radius: 6px; }

/* ------------------------------------------------------------ barra inferior (solo celular) */
.bottom-nav { display: none; }
@media (max-width: 700px) {
  .sidebar { background: var(--bg-elev); }
  .bottom-nav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 24; background: var(--bg-elev); border-top: 2px solid var(--border); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .bn-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; padding: 0; border-radius: 14px; border: 2px solid transparent; background: none; color: var(--text-3); font: inherit; font-size: 11px; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .1s ease-out, background .15s, color .15s, border-color .15s; }
  .bn-link span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bn-link:active { transform: scale(.9); }
  .bn-link.active { color: var(--brand); background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
  .bn-link.active svg { animation: duo-pop .35s var(--ease); }
  .view { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .toast-host { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .toolbar .menu-btn { display: none !important; }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-value { font-size: 26px; }
}
@media print {
  .bottom-nav { display: none !important; }
}
@media (hover: none) {
  .app-card:hover, .kpi:hover { transform: none; }
}

/* =====================================================================
   Perfil más colorido (9 nov 2026): saludo 👋, accesos de colores del alumno, Ajustes con diseño,
   tema con vistas previas, portada de cada app en las rachas y nombre completo en el menú.
   Acentos: paleta CANS (azul, cielo, verde, amarillo, naranja) + violeta y rosa para tareas y calendario.
   ===================================================================== */

/* Saludo: la manita saluda dos veces al entrar */
.hero-title { display: flex; align-items: center; flex-wrap: wrap; gap: .25em; }
.hero-wave { display: inline-block; transform-origin: 70% 75%; animation: hand-wave 1.6s ease-in-out .5s 2; font-size: .95em; }
@keyframes hand-wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }

/* Encabezado del alumno: azul CANS con burbujas de la paleta */
.hero.role-Alumno { background: linear-gradient(125deg, #0c3292 0%, #1347c4 55%, #0a8bd6 100%); }
.hero.role-Alumno::before, .hero.role-Alumno::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.hero.role-Alumno::before { width: 190px; height: 190px; right: -48px; top: -70px; background: #ffc629; opacity: .9; }
.hero.role-Alumno::after { width: 120px; height: 120px; right: 120px; bottom: -70px; background: #7cc242; opacity: .85; }
.hero.role-Alumno .hero-date { position: relative; padding: 4px 10px; border-radius: 999px; background: rgba(7, 30, 92, .55); }

/* Menú de inicio del alumno: accesos con su color */
.quick-menu { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.quick-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 108px; padding: 14px 8px;
  border: 2px solid color-mix(in srgb, var(--q) 28%, var(--border)); border-bottom-width: 5px; border-bottom-color: color-mix(in srgb, var(--q) 55%, var(--border));
  border-radius: 20px; background: color-mix(in srgb, var(--q) 9%, var(--bg-elev)); color: var(--text); font: inherit; cursor: pointer;
  transition: transform .12s ease-out, border-color .15s; animation: duo-rise .45s var(--ease) calc(var(--i) * 45ms) both; }
.quick-tile:hover { transform: translateY(-3px); }
.quick-tile:active { transform: translateY(2px); border-bottom-width: 3px; }
.quick-tile:focus-visible { outline: 3px solid var(--q); outline-offset: 3px; }
.quick-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--q); color: #fff; box-shadow: 0 4px 0 color-mix(in srgb, var(--q) 70%, #000); }
.quick-label { font-size: 14px; font-weight: 900; line-height: 1.15; text-align: center; }
@media (max-width: 900px) { .quick-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .quick-menu { gap: 8px; } .quick-tile { min-height: 92px; } .quick-ic { width: 42px; height: 42px; border-radius: 14px; } .quick-label { font-size: 13px; } }

/* Rachas: portada de la app arriba y botón con su imagen */
.streak-card.has-cover { padding-top: 0; overflow: hidden; }
.streak-cover-link { display: block; margin: 0 -18px; }
.streak-card.has-cover > .streak-cover { margin: 0 -18px; }
.streak-cover { height: 132px; background: var(--bg-sunken); overflow: hidden; }
.streak-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s var(--ease); }
.streak-cover-link:hover .streak-cover img { transform: scale(1.04); }
.streak-go { gap: 10px; }
.streak-go-img { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; background: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); flex: none; }

/* Menú lateral: el nombre completo (hasta 2 renglones), sin cortarse */
.sb-user-text strong { white-space: normal; overflow: hidden; text-overflow: clip; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; overflow-wrap: anywhere; }
.sb-user-text small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }

/* ---------- Ajustes ---------- */
.set-profile { position: relative; border-radius: var(--r-xl); overflow: hidden; background: var(--bg-elev); border: 2px solid var(--border); border-bottom: 6px solid var(--hero-sec, var(--brand)); }
.set-profile-band { position: relative; height: 92px; overflow: hidden; isolation: isolate; background: linear-gradient(125deg, #0c3292 0%, #1347c4 55%, #0a8bd6 100%); }
.set-profile-band .cans-pattern { opacity: .12; }
.set-profile-band::after { content: ""; position: absolute; width: 150px; height: 150px; right: -30px; top: -60px; border-radius: 50%; background: #ffc629; opacity: .9; z-index: -1; }
.set-profile-body { display: flex; align-items: center; gap: 16px; padding: 12px 20px 18px; flex-wrap: wrap; }
.set-profile-body > .avatar { position: relative; flex: none; margin-top: -56px; align-self: flex-start; box-shadow: 0 0 0 4px var(--bg-elev), 0 0 0 7px var(--hero-sec, var(--brand)); animation: duo-pop .5s var(--ease) both; }
.set-profile-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; padding-bottom: 2px; }
.set-profile-text strong { display: flex; align-items: center; flex-wrap: wrap; gap: .25em; font-size: 24px; font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; }
.set-profile-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.set-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 900; background: var(--brand-soft); color: var(--brand); }
.set-tag.sec { background: color-mix(in srgb, var(--hero-sec, var(--brand)) 14%, var(--bg-elev)); color: var(--text); }
.set-tag.ghost { background: var(--bg-sunken); color: var(--text-2); }
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.set-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 760px) { .set-grid { grid-template-columns: 1fr; } }
.set-block { display: flex; flex-direction: column; gap: 14px; border-top: 5px solid var(--set); }
.set-head { display: flex; align-items: center; gap: 12px; }
.set-head h3 { margin: 0; font-size: 17px; font-weight: 900; }
.set-head p { margin: 2px 0 0; font-size: 13px; font-weight: 700; color: var(--text-2); line-height: 1.35; }
.set-ic { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 14px; background: color-mix(in srgb, var(--set) 15%, var(--bg-elev)); color: var(--set); }
.set-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.set-body .setting-row { padding: 10px 12px; border-radius: 14px; background: var(--bg-sunken); }

/* Tema: tres vistas previas */
.theme-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.theme-opt { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 16px; border: 2px solid var(--border); border-bottom-width: 4px; background: var(--bg-elev); font: inherit; color: var(--text); cursor: pointer; transition: transform .12s ease-out, border-color .15s; }
.theme-opt:hover { transform: translateY(-2px); }
.theme-opt[aria-checked="true"] { border-color: var(--brand); background: var(--brand-soft); }
.theme-opt:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.theme-label { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 13px; font-weight: 900; line-height: 1.2; text-align: center; }
.theme-mini { position: relative; display: block; height: 58px; border-radius: 10px; overflow: hidden; background: #f6f7fb; border: 1px solid #e3e6ee; }
.theme-mini i { position: absolute; left: 0; top: 0; bottom: 0; width: 26%; background: #fff; border-right: 1px solid #e3e6ee; }
.theme-mini b { position: absolute; left: 34%; height: 7px; border-radius: 4px; background: #0c3292; }
.theme-mini b:first-of-type { top: 12px; width: 44%; }
.theme-mini b:last-of-type { top: 26px; width: 30%; background: #c9d1e3; }
.theme-mini em { position: absolute; left: 34%; right: 8px; bottom: 8px; height: 14px; border-radius: 6px; background: #ffc629; }
.theme-mini.t-dark { background: #16171b; border-color: #2e3036; }
.theme-mini.t-dark i { background: #1e2024; border-color: #2e3036; }
.theme-mini.t-dark b:first-of-type { background: #6f9bff; }
.theme-mini.t-dark b:last-of-type { background: #42454e; }
.theme-mini.t-system { background: linear-gradient(135deg, #f6f7fb 0 50%, #16171b 50% 100%); }
.theme-mini.t-system i { background: linear-gradient(135deg, #fff 0 60%, #1e2024 60% 100%); }
@media (max-width: 380px) { .theme-picker { gap: 6px; } .theme-mini { height: 46px; } .theme-label { font-size: 12px; } }

@media (prefers-reduced-motion: reduce) { .hero-wave, .quick-tile { animation: none; } }

/* =====================================================================
   Todos los perfiles a color (10 nov 2026): menú lateral decorado igual para todos, inicio con accesos de
   colores para cada perfil, foto/nombre del personal y ajustes contra texto amontonado.
   ===================================================================== */

/* Menú lateral: franja de marca con el patrón y cada apartado con su color */
.sb-brand { position: relative; overflow: hidden; isolation: isolate; margin: -16px -12px 12px; padding: 18px 16px 16px; background: linear-gradient(125deg, #0c3292 0%, #1347c4 60%, #0a8bd6 100%); color: #fff; }
.sb-brand::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url(../img/patron-cans.png) 0 0 / 300px 41px repeat; opacity: .12; }
.sb-brand::after { content: ""; position: absolute; z-index: -1; width: 90px; height: 90px; right: -26px; top: -40px; border-radius: 50%; background: #ffc629; opacity: .9; }
.sb-brand .sb-brand-text { color: #fff; }
.sb-brand .logo-tile { background: #fff; box-shadow: 0 3px 0 rgba(7, 30, 92, .5); }
.sb-ic { display: inline-grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 10px; background: color-mix(in srgb, var(--nc, var(--brand)) 14%, transparent); color: var(--nc, var(--brand)); transition: background .15s, color .15s, transform .15s; }
.sb-link .sb-ic svg { color: inherit; }
.sb-link { gap: 10px; padding: 6px 10px; }
.sb-link:hover .sb-ic { transform: scale(1.06); }
.sb-link.active { background: color-mix(in srgb, var(--nc, var(--brand)) 11%, var(--bg-elev)); border-color: color-mix(in srgb, var(--nc, var(--brand)) 40%, transparent); color: var(--text); }
.sb-link.active .sb-ic { background: var(--nc, var(--brand)); color: #fff; box-shadow: 0 3px 0 color-mix(in srgb, var(--nc, var(--brand)) 65%, #000); }
.shell.collapsed .sb-link { padding: 6px; }
.sb-user { padding: 10px; border: 2px solid var(--border); background: var(--bg-elev); }
.sb-user .avatar { box-shadow: 0 0 0 2px var(--bg-elev), 0 0 0 4px #ffc629; flex: none; }
.sb-group { font-weight: 900; letter-spacing: .06em; }
@media (max-width: 900px) { .sb-brand { margin-top: -16px; } }

/* Encabezado de inicio a color para todos los perfiles (antes solo el alumno) */
.hero { background: linear-gradient(125deg, #0c3292 0%, #1347c4 55%, #0a8bd6 100%); }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.hero::before { width: 190px; height: 190px; right: -48px; top: -70px; background: #ffc629; opacity: .9; }
.hero::after { width: 120px; height: 120px; right: 120px; bottom: -70px; background: #7cc242; opacity: .85; }
.hero .hero-date { position: relative; padding: 4px 10px; border-radius: 999px; background: rgba(7, 30, 92, .55); }
.hero-title { min-width: 0; overflow-wrap: anywhere; }

/* Accesos del inicio: hasta 8 (personal) en filas parejas */
.quick-menu.many { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .quick-menu.many { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.quick-tile { min-width: 0; }
.quick-label { overflow-wrap: anywhere; }

/* Contra el texto amontonado: encabezados que bajan de renglón, KPI y mosaicos con aire */
.card-head { flex-wrap: wrap; row-gap: 8px; }
.card-head h3 { min-width: 0; overflow-wrap: anywhere; }
.kpi-row { gap: 14px; }
.kpi { min-width: 0; }
.kpi-label { line-height: 1.3; align-items: flex-start; }
.kpi-label svg { flex: none; margin-top: 1px; }
@media (max-width: 640px) { .kpi.wide { grid-column: auto; } .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.section-tile { row-gap: 2px; }
.section-tile strong, .section-tile small { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.event-row .ev-title { line-height: 1.3; overflow-wrap: anywhere; }
.event-row .ev-meta { line-height: 1.35; display: flex; flex-wrap: wrap; gap: 2px 6px; }

/* Ajustes: foto y nombre del personal */
.me-photo { display: flex; align-items: center; gap: 14px; }
.me-photo .avatar { box-shadow: 0 0 0 3px var(--bg-elev), 0 0 0 5px #7c3aed; flex: none; }
.me-photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.me-photo { margin-bottom: 8px; }
