/* V6 · Portal educativo vivo. Una capa de estilo: no altera la sesión ni las consultas MySQL. */
:root { --school-blue:#2355ce; --school-blue-deep:#183ca9; --school-teal:#087f83; --school-coral:#b83b52; --school-amber:#a5630e; }
.family-body {
  --f-bg:#f5f8ff; --f-paper:#fff; --f-ink:#202f4a; --f-sub:#5b6e88;
  --f-line:#e1e8f5; --f-brand:#2355ce; --f-brand-dark:#183ca9;
  --f-sage:#087f83; --f-sage-light:#e1f7f3; --f-sand:#fff3de;
  --f-rose:#fff0ee; --f-font:'DM Sans','Segoe UI',system-ui,sans-serif;
  background:var(--f-bg); color:var(--f-ink); font-size:14px; line-height:1.55;
}
.family-body :focus-visible,.admin-body :focus-visible,.school-auth :focus-visible {outline:3px solid #2563eb;outline-offset:3px;}
.family-body .sr-only {position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
/* Navegación y marca */
.family-sidebar {background:#fff;border-right:1px solid #e1e8f5;box-shadow:4px 0 24px rgba(29,65,144,.024);}
.family-brand {border-bottom-color:#e8edfa;gap:12px;}
.brand-mark {width:49px;height:53px;box-shadow:0 3px 12px rgba(28,70,157,.10);border:1px solid #dbe7ff;background:#fff;}
.family-brand-copy small {color:#2959c0;font-size:9px;letter-spacing:.85px;}
.family-brand-copy strong {color:#1d3057;font-size:15px;}
.family-brand-copy > span {color:#557399;font-size:11px;}
.academic-chip {background:#eef4ff;color:#315b9d;border:1px solid #dbe8ff;padding:10px 12px;}
.academic-chip-dot {background:#1c9a91;box-shadow:0 0 0 3px #d2f3ec;}
.academic-chip strong {color:#1947ad;}
.sidebar-caption {color:#677996;letter-spacing:1px;font-size:10px;}
.family-nav-item {min-height:48px;font-size:13px;color:#475d7e;border-radius:11px;transition:background .17s,color .17s;}
.family-nav-item > svg {color:#647b9d;opacity:1;}
.family-nav-item:hover {background:#eff5ff;color:#1f50b7;}
.family-nav-item.active {color:#174ab8;background:#e7f0ff;box-shadow:inset 4px 0 0 #2f64e6;font-weight:800;}
.family-nav-item.active > svg {color:#2055c5;}
.nav-dot {background:#c6445c;color:white;min-width:22px;border-radius:8px;font-size:11px;}
.sidebar-divider,.family-signout {border-color:#e7edf7;}
.family-avatar,.topbar-avatar {color:#194da9;background:#e5efff;}
.family-account strong {color:#263856;font-size:13px;}
.family-account small {color:#5e708d;font-size:11px;line-height:1.35;}
/* V6.1: perfil legible; se elimina la tarjeta decorativa que saturaba el lateral. */
.family-account {align-items:flex-start;gap:11px;padding:10px 8px 12px;min-width:0;}
.family-account-copy {min-width:0;flex:1;display:flex;flex-direction:column;gap:4px;}
.family-account .family-avatar {margin-top:1px;}
.family-account-copy strong {display:-webkit-box;max-width:none;overflow:hidden;white-space:normal;overflow-wrap:anywhere;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;line-height:1.38;font-size:12px;}
.family-account-copy small {white-space:normal;}
.family-signout {margin-top:10px;}

.family-signout:hover {color:#1e50bc!important;}
/* Barra superior */
.family-topbar {height:76px;background:rgba(255,255,255,.97);border-bottom:1px solid #e0e8f6;}
.family-topbar-title > span {color:#5c77aa;font-size:10px;letter-spacing:1px;}
.family-topbar-title > strong {color:#24365b;font-size:16px;}
.topbar-year {color:#5e718e;font-size:12px;border-right-color:#e6ebf5;}
.topbar-year strong {color:#194ebc;font-size:14px;}
.icon-button {height:40px;width:40px;border-color:#dce6f6;color:#2a58b6;background:#fff;}
.icon-button:hover {background:#eef4ff;}
.notification-point {width:10px;height:10px;background:#ea4e68;border:2px solid #fff;top:4px;right:4px;}
.notification-count {position:absolute;top:-7px;right:-7px;display:grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:99px;background:#c53c57;color:#fff;font-size:10px;font-weight:800;border:2px solid white;}
.topbar-avatar {height:40px;width:40px;font-weight:800;}
.family-main {padding-top:27px;}
/* Bienvenida institucional: color protagonista, contenido claro */
.school-welcome {
  background:linear-gradient(113deg,#2356ce 0%,#2863da 56%,#198ea8 100%);
  border:1px solid #2b61cb;border-radius:19px;padding:29px 30px;
  box-shadow:0 10px 30px rgba(31,76,181,.09);
}
.school-welcome::before {content:'';position:absolute;right:-72px;bottom:-146px;width:310px;height:310px;border-radius:50%;border:55px solid rgba(255,255,255,.09);pointer-events:none;}
.school-welcome::after {width:190px;height:190px;right:33%;top:-142px;border:36px solid rgba(255,255,255,.075);}
.eyebrow {color:#e7f0ff;font-size:11px;letter-spacing:1px;font-weight:800;}
.eyebrow-mark,.eyebrow-separator {color:#eaf5ff;}
.welcome-copy h1 {color:#fff;font-size:clamp(28px,2.8vw,39px);font-weight:800;letter-spacing:-1.2px;line-height:1.25;margin:12px 0 8px;}
.welcome-copy h1 span {color:#ffe28b;}
.welcome-subtitle {color:#f1f6ff;font-size:14px;line-height:1.58;max-width:585px;}
.hero-signature {color:#e4f2ff;font-size:12px;margin-top:20px;}
.hero-signature svg {color:#ffe28b;}
.child-switcher {background:#fff;border:1px solid #e2ecff;border-radius:15px;box-shadow:0 12px 25px rgba(15,41,101,.12);padding:17px;gap:12px;}
.child-avatar {background:#e7f8f4;color:#087f83;width:51px;height:51px;}
.child-switcher-text > span {font-size:10px;color:#3d64a0;letter-spacing:.6px;}
.child-switcher-text > select {color:#263759;font-size:13px;font-weight:800;}
.child-switcher-text > select:hover {color:#1d55c7;}
.child-switcher-text small {color:#617490;font-size:11px;}
.switcher-apply {display:none;}
/* Encabezados de secciones y eventos */
.overview-heading {margin:27px 0 15px;}
.section-overline {color:#1e57c7;font-size:11px;}
.overview-heading h2 {color:#1f3150;font-size:21px;letter-spacing:-.7px;}
.overview-date {color:#617893;font-size:12px;}
.priority-banner {border:1px solid #ffd6d7;border-left:5px solid #ed6371;background:#fff5f3;padding:15px 18px;gap:14px;min-height:76px;border-radius:13px;}
.priority-banner:hover {background:#ffedeb;border-color:#f9b3b8;}
.priority-banner-icon {background:#ffe2e5;color:#b83250;width:41px;height:41px;border-radius:11px;}
.priority-banner > div span {color:#a1384a;font-size:11px;letter-spacing:.35px;}
.priority-banner > div strong {color:#6f2438;font-size:14px;white-space:normal;line-height:1.35;}
.priority-link {color:#b12d47;font-size:12px;}
/* Tarjetas de resumen: diferencia semántica por color */
.insights-grid {gap:15px;margin-bottom:17px;}
.insight {gap:13px;min-height:127px;padding:19px 18px;border:1px solid #dbe6f5;background:#fff;border-radius:15px;box-shadow:0 5px 16px rgba(28,71,140,.035);}
.insight::before {width:5px;background:#3185eb;}
.insight-schedule {background:linear-gradient(145deg,#fff 60%,#eff6ff);}
.insight-assignments {background:linear-gradient(145deg,#fff 60%,#fff7e6);}
.insight-assignments::before {background:#e7a32c;}
.insight-notices {background:linear-gradient(145deg,#fff 60%,#fff0f3);}
.insight-notices::before {background:#e85b78;}
.insight:hover {border-color:#96b8eb;transform:translateY(-2px);box-shadow:0 10px 21px rgba(28,71,140,.08);}
.insight-icon {width:47px;height:47px;border-radius:13px;}
.insight-icon.sage {background:#e3f0ff;color:#2461ca;}
.insight-icon.sand {background:#fff0ce;color:#995e0a;}
.insight-icon.rose {background:#ffe5e9;color:#b33151;}
.insight-copy small {font-size:11px;letter-spacing:.35px;color:#536782;line-height:1.4;}
.insight-copy strong {color:#213655;font-size:29px;margin:5px 0 4px;}
.insight-copy strong span {font-size:13px;color:#566c85;}
.insight-copy > span {color:#1e56bc;font-size:12px;}
/* El estado de la jornada tiene personalidad propia sin competir con los avisos */
.class-day-context {background:#e9f9f5;border:1px solid #c4ebe3;color:#14615f;font-size:13px;border-radius:13px;margin-bottom:19px;}
.class-day-icon {background:#d0f0e8;color:#087f83;width:34px;height:34px;}
.context-muted {color:#3a7779;}
.class-day-context > a {color:#076f71;font-size:12px;}
/* Módulos y filas */
.family-two-cols {gap:18px;}
.content-panel {border:1px solid #dee8f5;border-radius:16px;box-shadow:0 5px 18px rgba(23,58,124,.025);padding:24px 25px;}
.panel-eyebrow {color:#2c62bb;font-size:10px;letter-spacing:.85px;}
.panel-heading h2 {color:#223657;font-size:19px;letter-spacing:-.45px;}
.panel-heading p:not(.panel-eyebrow) {color:#62748c;font-size:12.5px;line-height:1.5;}
.text-link {color:#2056bf!important;font-size:12px;padding-top:4px;}
.text-link:hover {text-decoration:underline;}
.class-row {min-height:76px;}
.class-hour strong {color:#2c4668;font-size:13px;}
.class-hour small {color:#687f9a;font-size:11px;}
.class-line::before {background:#d9e8fa;}
.class-line i {background:#3383dc;border-color:#dbebff;}
.class-row.is-current {background:#eaf4ff;}
.class-row.is-current .class-line i {background:#0a998d;border-color:#d9f7ee;}
.class-details strong {color:#243a59;font-size:13px;}
.class-details small {color:#62748b;font-size:11px;}
.class-details strong em {color:#087369;background:#d9f7ed;font-size:10px;padding:3px 6px;}
.class-duration {background:#eef4ff;border-color:#dce7f6;color:#536d91;font-size:11px;}
.task-row,.notice-row {border-bottom-color:#e8edf6;}
.task-row:hover,.notice-row:hover {background:#f7faff;}
.task-marker {background:#fff0d7;color:#9a6416;width:40px;height:40px;border-radius:11px;}
.task-info small {color:#566e8a;font-size:11px;}
.task-info strong {color:#283c59;font-size:13px;}
.task-due {color:#6c7892;font-size:11px;}
.task-due.today {color:#995e0b;}
.task-due.overdue {color:#b12a45;font-weight:800;}
.notice-symbol {background:#eaf3ff;color:#2b61c3;border-radius:11px;width:42px;height:42px;}
.notice-row.unread {background:#fff9fa;box-shadow:inset 3px 0 0 #f18a9c;border-radius:7px;padding-left:10px;padding-right:8px;}
.notice-row.unread .notice-symbol {background:#ffe6ea;color:#bd3955;}
.notice-row strong {color:#2c405c;font-size:13.5px;}
.notice-row.unread strong {color:#243456;}
.notice-meta {color:#596e88;font-size:11px;}
.tag-unread {color:#9e2240;background:#ffe3e9;font-size:11px;padding:4px 9px;}
.tag-important {color:#7e4709;background:#ffedc5;font-size:11px;}
.notice-read {color:#3f6e6c;font-size:11px;}
.home-footer {color:#687c96;font-size:11px;}
.empty-symbol {background:#eaf2ff;color:#3566c9;}
.empty-panel strong {font-size:14px;color:#253956;}
.empty-panel p {color:#647691;font-size:12.5px;}
.empty-panel a {color:#2356c5!important;font-size:12px;}
/* Horarios, tareas y comunicados por separado: mismos patrones de lectura */
.interior-intro .eyebrow {color:#275ac4;}
.interior-intro h1,.notice-detail h1 {color:#223657;font-size:clamp(27px,2.7vw,35px);}
.interior-intro > div > p:last-child {color:#61748e;}
.pill-neutral {background:#e8f1ff;color:#2354ad;font-size:12px;}
.filter-pills {background:#ecf2fc;gap:4px;}
.filter-pills a {color:#526a8c;font-size:12px;}
.filter-pills a:hover {color:#1d54bc;background:#fff;}
.filter-pills a.selected {color:#174bb1;background:#fff;box-shadow:0 2px 7px rgba(27,79,164,.10);font-weight:800;}
.week-day {background:#f7faff;border-color:#e0e9f7;}
.week-day.is-today {background:#e9f4ff;border-color:#78b4f2;box-shadow:inset 0 3px 0 #2c79d9;}
.week-title {color:#2c4668;font-size:13px;}
.week-title span {color:#145da2;background:#d7ebff;font-size:11px;}
.week-lesson {border-color:#e1e9f6;background:#fff;}
.week-lesson small {color:#5d7291;font-size:11px;}
.week-lesson strong {color:#283e5f;font-size:12.5px;line-height:1.35;}
.week-lesson span {color:#6a7d96;font-size:11px;}
.week-empty {color:#6b7c94;font-size:12px;}
.assignment-row {border-top-color:#e4eaf5;}
.assignment-row small {color:#586e88;font-size:12px;}
.assignment-row h3 {color:#263c5e;font-size:14px;}
.assignment-row p {color:#63758e;font-size:12.5px;}
.badge-complete {background:#dff6eb;color:#116b54;}
.badge-overdue {background:#ffe5e9;color:#a52947;}
.badge-pending {background:#fff0d2;color:#93580b;}
.notice-excerpt {color:#62758c;}
.notice-detail .detail-meta {color:#647792;}
.notice-detail h1 {line-height:1.22;}
.notice-body {color:#334b69;line-height:1.85;font-size:14px;}
.back-link {color:#2053b9!important;}
.primary-action {background:#2356ce;border-color:#2356ce;color:#fff;}
.primary-action:hover {background:#183ca9;border-color:#183ca9;}
.secondary-action {color:#3158a4!important;}
.confirmation {color:#087a72;}
/* Móvil: todos los controles visibles y las tarjetas legibles. */
.family-mobile-nav {background:rgba(255,255,255,.98);border-top:1px solid #dbe5f4;box-shadow:0 -5px 18px rgba(20,63,136,.05);}
.family-mobile-nav > a {color:#637796;font-size:11px;font-weight:700;}
.family-mobile-nav > a.active {color:#1a52c2;font-weight:800;}
.family-mobile-nav > a.active svg {background:#e6f0ff;border-radius:10px;box-sizing:content-box;padding:4px;margin:-4px;}
.mobile-nav-alert {width:8px;height:8px;background:#ed5271;border:1px solid #fff;}
@media(max-width:1180px) {
  .family-main {padding-left:22px;padding-right:22px;}
  .insight {padding:16px 14px;gap:10px;}
  .insight-copy strong {font-size:26px;}
}
@media(max-width:950px) {
  .family-sidebar {box-shadow:10px 0 35px rgba(17,45,112,.17);}
  .family-overlay:not([hidden]) {background:rgba(20,33,63,.43);}
}
@media(max-width:740px) {
  .family-main {padding:17px 14px calc(100px + env(safe-area-inset-bottom));}
  .school-welcome {padding:22px 18px;}
  .school-welcome::before {width:230px;height:230px;bottom:-140px;right:-70px;}
  .welcome-grid {gap:18px;}
  .welcome-copy h1 {font-size:28px;letter-spacing:-.8px;}
  .welcome-subtitle {font-size:13px;}
  .eyebrow {font-size:10px;line-height:1.5;}
  .child-switcher {padding:12px;}
  .overview-heading h2 {font-size:18px;}
  .priority-banner {padding:12px 13px;}
  .priority-banner > div span {font-size:10px;}
  .priority-banner > div strong {font-size:13px;}
  .insights-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
  .insight {min-height:112px;padding:14px 12px;gap:9px;flex-direction:row;align-items:flex-start;}
  .insight-icon {height:36px;width:36px;border-radius:10px;}
  .insight-copy small {font-size:10.5px;line-height:1.35;letter-spacing:0;}
  .insight-copy strong {font-size:27px;gap:5px;}
  .insight-copy strong span {font-size:11px;}
  .insight-copy > span {display:none;}
  .insight-notices {grid-column:1 / -1;min-height:83px;align-items:center;}
  .insight-notices .insight-copy > span {display:flex;font-size:11px;}
  .content-panel {padding:20px 16px;}
  .panel-heading {gap:9px;}
  .panel-heading h2 {font-size:17px;}
  .text-link {font-size:12px;}
  .class-day-context {font-size:12px;}
  .notice-row .tag-unread,.notice-row .notice-read {display:inline-flex;}
  .notice-row {flex-wrap:wrap;gap:9px;}
  .notice-row > div {flex-basis:calc(100% - 102px);}
  .notice-row .tag-unread,.notice-row .notice-read {margin-left:51px;font-size:10px;}
  .notice-row > svg:last-child {margin-left:auto;}
  .family-mobile-nav {height:76px;padding-bottom:max(8px,env(safe-area-inset-bottom));}
  .family-mobile-nav > a {font-size:11px;}
  .interior-intro h1 {font-size:27px;}
  .filter-pills {flex-wrap:wrap;}
}
@media(max-width:460px) {
  .family-topbar-title > span {font-size:9px;}
  .family-topbar-title > strong {font-size:14px;}
  .insight {padding:12px 10px;}
  .insight-copy small {font-size:10px;}
  .insight-copy strong {font-size:25px;flex-wrap:wrap;gap:2px;}
  .insight-copy strong span {font-size:10px;}
  .class-row {gap:8px;grid-template-columns:43px 12px minmax(0,1fr);}
  .class-hour strong {font-size:12px;}
  .class-hour small {font-size:10px;}
  .class-details strong {font-size:12.5px;}
  .week-grid {grid-template-columns:1fr;}
  .week-day {min-height:0;}
}
@media(max-width:360px) {
  .school-welcome {padding:18px 14px;}
  .insights-grid {grid-template-columns:1fr;}
  .insight {flex-direction:row;align-items:center;min-height:78px;padding:13px;}
  .insight-notices {grid-column:auto;}
  .insight-copy strong {margin:1px 0;}
  .insight-copy > span {display:flex;font-size:11px;}
  .priority-banner-icon {width:34px;height:34px;}
}
/* Estilos compartidos: acceso y administrador */
.admin-body {--a-bg:#f5f8ff;--a-paper:#fff;--a-text:#233451;--a-muted:#5d7190;--a-border:#dfe8f5;--a-accent:#2356ce;--a-accent-soft:#e8f0ff;background:var(--a-bg);color:var(--a-text);}
.admin-sidebar {background:#fff;}
.admin-brand-symbol {border-color:#dce6f5;}
.admin-side-link.active {background:#e8f0ff;color:#174bb5;box-shadow:inset 3px 0 0 #2860d6;}
.admin-side-link.active svg {color:#2056bd;}
.admin-side-link:hover {background:#eef4ff;}
.admin-topbar {background:rgba(255,255,255,.97);}
.admin-topbar-preview {background:#e9f2ff;border-color:#cfe0ff;color:#2253b6;}
.admin-topbar-preview:hover {background:#dceaff;}
.admin-user-avatar,.admin-topbar-avatar {background:#e1efff;color:#2156bd;}
.admin-intro {background:linear-gradient(110deg,#2053c8,#2585c6);border-color:#2156c7;}
.admin-intro h1,.admin-intro h1 em,.admin-intro p,.admin-intro .admin-kicker {color:white;}
.admin-intro .admin-kicker {opacity:.9;}
.admin-primary-action {background:#fff;color:#1748b2!important;}
.admin-primary-action:hover {background:#e9f2ff;}
.admin-intro-actions small {color:#e7efff;}
.admin-section-title h2,.admin-panel-heading h2 {color:#233754;}
.admin-metric {border-color:#dfe8f5;}
.admin-metric-icon {background:#e8f2ff;color:#2d61c5;}
.admin-metric-icon.sand {background:#fff0d4;color:#995d08;}
.admin-metric-icon.lavender {background:#eee9ff;color:#6956b2;}
.admin-metric-icon.rose {background:#ffe4eb;color:#b1345b;}
.admin-metric-bottom a,.admin-secondary-action {color:#2454b7;}
.admin-quick-icon {background:#e8f2ff;color:#2658b9;}
.admin-quick-action:hover {background:#f4f8ff;border-color:#9cbef3;}
.admin-family-promo {background:#f2f7ff;}
.school-auth {background:#f1f6ff;color:#253552;}
.school-auth-frame {border-color:#dce7f8;}
.auth-story {background:linear-gradient(135deg,#e6f1ff,#e4faf3);}
.auth-story-mark {border-color:#c7dfff;}
.auth-story-brand strong,.auth-form-wrap h2 {color:#213554;}
.auth-story-message h1 {color:#223b6c;}
.auth-story-message h1 em {color:#1f65d1;}
.auth-eyebrow {color:#245abe;}
.auth-story-message > p:last-child,.auth-form-lead {color:#526a87;}
.auth-benefits {border-color:#c5dced;}
.auth-benefits > div {color:#305b80;}
.auth-benefits svg {color:#177d89;}
.auth-form input {border-color:#d7e3f3;color:#263952;font-size:14px;}
.auth-form input:focus {border-color:#3172df;box-shadow:0 0 0 3px #e1edff;}
.auth-submit {background:#2356ce;font-size:14px;}
.auth-submit:hover {background:#173ca9;}
.auth-mobile-brand {color:#2455bd;}
@media(prefers-reduced-motion:reduce) {.family-body *, .family-body *::before, .family-body *::after {transition:none!important;animation:none!important;}}

.switcher-fallback {border:0;border-radius:9px;background:#2356ce;color:#fff;font-weight:800;font-size:12px;padding:9px 12px;cursor:pointer;}
.switcher-fallback:hover {background:#183ca9;}
