/* Márgenes del sistema (barra de estado, barra de gestos). Capacitor 8 los publica como
   --safe-area-inset-* en los WebView que aún no soportan env(); en el resto se usa env(). */
:root {
  --sat: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --sab: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Arial, sans-serif;
  background: #f1f5f9;
  min-height: 100vh;
  /* Alto de la barra inferior (62px) + barra de gestos + aire, para que lo último no quede tapado */
  padding-bottom: calc(86px + var(--sab));
  -webkit-tap-highlight-color: transparent;
}

body.sin-menu { padding-bottom: 0; }

/* ── Top bar ── */
.pwa-topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: calc(56px + var(--sat));
  padding-top: var(--sat);
  background: linear-gradient(135deg, #0d9488, #0f766e);
  display: flex; align-items: center; justify-content: space-between;
  padding-left: 16px; padding-right: 16px; z-index: 100;
}
.pwa-topbar-title  { color: #fff; font-size: 16px; font-weight: 700; }
.pwa-topbar-user   { color: rgba(255,255,255,.85); font-size: 13px;
                     max-width: 140px; white-space: nowrap;
                     overflow: hidden; text-overflow: ellipsis; }
.pwa-logout {
  color: rgba(255,255,255,.8); font-size: 13px;
  padding: 4px 10px; border: 1px solid rgba(255,255,255,.4);
  border-radius: 6px; background: none; cursor: pointer;
}
.pwa-logout:hover { background: rgba(255,255,255,.15); }

/* ── Content ── */
.pwa-content  { margin-top: calc(56px + var(--sat)); padding: 16px; }
.pwa-card     { background: #fff; border-radius: 12px; padding: 16px;
                box-shadow: 0 2px 8px rgba(0,0,0,.07); margin-bottom: 16px; }
.pwa-card-title   { font-size: 16px; font-weight: 700; color: #1e293b; margin-bottom: 12px; }
.pwa-section-title { font-size: 14px; font-weight: 600; color: #14b8a6;
                     margin: 16px 0 8px; letter-spacing: .3px; }

/* ── Bottom nav ── */
.pwa-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(62px + var(--sab));
  padding-bottom: var(--sab);
  background: #fff; border-top: 1px solid #e2e8f0;
  display: flex; align-items: stretch; z-index: 100;
}
.pwa-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; color: #94a3b8; text-decoration: none;
  font-size: 10px; gap: 3px; transition: color .15s; position: relative;
}
.pwa-nav a.active, .pwa-nav a:hover { color: #0d9488; }
.pwa-nav svg { width: 22px; height: 22px; }
.nav-badge {
  position: absolute; top: 6px; right: calc(50% - 18px);
  background: #ef4444; color: #fff; font-size: 10px; font-weight: 700;
  line-height: 1; padding: 2px 5px; border-radius: 99px;
  min-width: 16px; text-align: center;
}

/* ── Utility ── */
.loading    { text-align: center; padding: 32px; color: #94a3b8; }
.badge      { display: inline-block; padding: 2px 8px; border-radius: 99px;
              font-size: 11px; font-weight: 700; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warn    { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-info    { background: #dbeafe; color: #1e40af; }

/* ── Login ── */
.login-bg {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  padding: 20px;
}
.login-card {
  background: #fff; border-radius: 16px; padding: 36px 28px;
  width: 100%; max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.login-logo       { text-align: center; margin-bottom: 8px; }
.login-logo img   { width: auto; height: 90px; border-radius: 0; }
.login-title      { text-align: center; font-size: 22px; font-weight: 700;
                    color: #0d9488; margin-bottom: 4px; }
.login-sub        { text-align: center; font-size: 13px; color: #64748b; margin-bottom: 28px; }
.login-footer     { text-align: center; margin-top: 20px; font-size: 12px;
                    color: rgba(255,255,255,.7); }
.form-label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 4px; }
.form-input {
  display: block; width: 100%; padding: 12px 14px;
  border: 1.5px solid #d1d5db; border-radius: 8px;
  font-size: 15px; outline: none; transition: border .2s; margin-bottom: 16px;
}
.form-input:focus { border-color: #0d9488; }
.btn-primary {
  width: 100%; padding: 13px; background: #0d9488; color: #fff;
  border: none; border-radius: 8px; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: background .2s;
}
.btn-primary:hover    { background: #0f766e; }
.btn-primary:disabled { background: #5eead4; cursor: not-allowed; }
.error-box {
  background: #fee2e2; color: #b91c1c; border-radius: 8px;
  padding: 10px 14px; font-size: 13px; margin-bottom: 16px; display: none;
}

/* ── Notas ── */
.notas-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.notas-table th {
  background: #0d9488; color: #fff; padding: 9px 8px;
  text-align: center; font-size: 11px; font-weight: 700;
  white-space: nowrap; position: sticky; top: 0; z-index: 10;
  box-shadow: 0 2px 5px rgba(0,0,0,.2);
}
.notas-table th:nth-child(even) { background: #115e59; }
.notas-table th.th-asig { text-align: left; min-width: 110px; }
.notas-table th.th-des  { text-align: left; }
.notas-table td {
  padding: 9px 8px; border-bottom: 1px solid #f1f5f9;
  text-align: center; color: #1e293b; font-size: 13px;
}
.notas-table td.td-asig { text-align: left; font-weight: 600; }
.notas-table td.td-des  { text-align: left; }
.notas-table tr:last-child td { border-bottom: none; }
.notas-table tr:hover td { background: #f8fafc; }
.notas-table tbody tr:not(.tr-area):not(.tr-prom-area) td:nth-child(even) { background: #f0f4f8; }
.notas-table tbody tr:not(.tr-area):not(.tr-prom-area):hover td:nth-child(even) { background: #e8eef5; }
.tabla-scroll-wrap {
  overflow: auto; -webkit-overflow-scrolling: touch;
  max-height: calc(100vh - 310px);
}
/* Encabezado de la tabla de notas con el botón (discreto) de pantalla completa */
.tabla-encabezado {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid #f1f5f9;
  font-weight: 700; font-size: 14px; color: #1e293b;
}
.tabla-encabezado span { flex: 1; min-width: 0; }
.btn-pantalla {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border: 1px solid #e2e8f0; border-radius: 8px;
  background: #fff; color: #64748b; cursor: pointer;
}
.btn-pantalla:active { background: #f1f5f9; }
/* Pantalla completa: cubre encabezado y navegación de la app (z-index 100), debajo de las observaciones (1000) */
/* En Android 15 la app se dibuja bajo la barra de estado y el WebView puede reportar
   safe-area 0: se deja un mínimo para que el botón Cerrar no quede junto a la batería.
   !important porque la tarjeta trae style="padding:0" en el HTML (notas.js). */
.tabla-pantalla-completa {
  position: fixed !important; inset: 0; z-index: 900;
  margin: 0 !important; border-radius: 0 !important;
  display: flex; flex-direction: column; background: #fff;
  padding-top: max(var(--sat), 48px) !important;
  padding-bottom: max(var(--sab), 16px) !important;
}
.tabla-pantalla-completa .tabla-scroll-wrap { flex: 1; max-height: none; }

/* Pista de scroll horizontal (notas.js → PistaScroll): sombra en el borde derecho y "Desliza →" */
.sombra-scroll {
  position: absolute; right: 0; bottom: 0; width: 28px;   /* top: lo pone notas.js */
  background: linear-gradient(to left, rgba(15, 23, 42, .18), transparent);
  pointer-events: none; transition: opacity .3s; z-index: 20;
}
.scroll-al-final .sombra-scroll { opacity: 0; }
.pista-scroll {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%); z-index: 30;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(30, 41, 59, .88); color: #fff; font-size: 13px; font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25); pointer-events: none;
  animation: pista-entrar .35s ease-out;
  transition: opacity .35s;
}
.pista-scroll svg { animation: pista-flecha 1s ease-in-out infinite; }
.pista-scroll.saliendo { opacity: 0; }
@keyframes pista-entrar { from { opacity: 0; transform: translate(12px, -50%); } }
@keyframes pista-flecha { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) {
  .pista-scroll, .pista-scroll svg { animation: none; }
}
/* Cerrar en rojo: el encabezado de la tabla es morado y un botón morado no se distinguía */
.btn-pantalla.cerrar {
  width: auto; height: 38px; padding: 0 16px; gap: 6px;
  background: #dc2626; border-color: #dc2626; color: #fff;
  font-size: 14px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(220, 38, 38, .35);
}
.btn-pantalla.cerrar:active { background: #b91c1c; }
.tr-perdida td           { background: #fff0f0 !important; }
.tr-perdida td.td-asig   { color: #b91c1c !important; }
.tr-perdida:hover td     { background: #ffe4e4 !important; }
.nota-superior, .nota-Superior { color: #15803d; font-weight: 700; }
.nota-alto,     .nota-Alto     { color: #1d4ed8; font-weight: 700; }
.nota-basico,   .nota-Basico   { color: #d97706; font-weight: 700; }
.nota-bajo,     .nota-Bajo     { color: #dc2626; font-weight: 700; }
.des-cell      { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.icono-des     { width: 22px; height: 22px; flex-shrink: 0; }
.des-label             { font-size: 11px; font-weight: 700; }
.des-label-Superior    { color: #15803d; }
.des-label-Alto        { color: #1d4ed8; }
.des-label-Basico      { color: #92400e; }
.des-label-Bajo        { color: #dc2626; }
.obs-btn      { display: inline-flex; align-items: center; justify-content: center;
                width: 32px; height: 32px; border-radius: 50%; border: none;
                background: #fef3c7; color: #92400e; cursor: pointer;
                font-size: 16px; transition: .15s; }
.obs-btn:hover   { background: #fde68a; }
.obs-btn-vacia   { color: #cbd5e1; font-size: 16px; }
.tr-area td      { background: #334155; color: #fff; font-weight: 700;
                   font-size: 11px; padding: 7px 12px; text-align: left;
                   letter-spacing: .6px; text-transform: uppercase; }
.tr-prom-area td { background: #bfdbfe; color: #1e3a8a; font-size: 13px;
                   font-weight: 700; padding: 8px 8px;
                   border-top: 2px solid #93c5fd; border-bottom: 2px solid #93c5fd; }
.tr-prom-area td.td-prom-label { border-left: 4px solid #2563eb; padding-left: 10px;
                                  white-space: nowrap; font-style: italic; }
.tr-prom-area td.td-prom-val   { color: #1d4ed8; font-weight: 800; font-size: 14px; }
.bloqueado-msg { text-align: center; padding: 40px 20px; color: #64748b; }
.bloqueado-msg svg { display: block; margin: 0 auto 12px; }
/* Notas: lista de informes disponibles (parcial / definitivo) con botón Ver */
.inf-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid #f1f5f9;
}
.inf-item:last-child { border-bottom: none; padding-bottom: 2px; }
.inf-icono {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
}
.inf-parcial    { background: #fef3c7; color: #b45309; }
.inf-definitivo { background: #dcfce7; color: #15803d; }
.inf-texto  { flex: 1; min-width: 0; }
.inf-titulo { font-size: 14px; font-weight: 700; color: #1e293b; }
.inf-sub    { font-size: 12px; color: #64748b; }
.btn-ver-informe {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: none; border-radius: 8px;
  background: #0d9488; color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
}
.btn-ver-informe:active   { background: #0f766e; }
.btn-ver-informe:disabled { opacity: .7; }

/* ── Más / menú ── */
.mas-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 4px;
}
.mas-item {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: #fff; border: none; border-radius: 14px; padding: 20px 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.07); cursor: pointer;
  font-size: 13px; font-weight: 600; color: #1e293b;
  transition: transform .12s, box-shadow .12s;
}
.mas-item:active { transform: scale(.96); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.mas-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.mas-icon svg { width: 26px; height: 26px; }

/* ── Overlay observación ── */
.obs-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.45); align-items: center;
  justify-content: center; padding: 20px;
}
.obs-overlay.visible { display: flex; }
.obs-sheet {
  background: #fff; border-radius: 16px; padding: 28px 24px;
  width: 100%; max-width: 480px; position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,.22);
  max-height: 85vh; overflow-y: auto;
}
.obs-asig { font-size: 15px; font-weight: 800; color: #1e293b;
            margin-bottom: 12px; padding-bottom: 12px;
            border-bottom: 1.5px solid #f1f5f9; padding-right: 36px; }
.obs-desc { font-size: 13.5px; color: #374151; line-height: 1.7; margin-bottom: 14px; }
.obs-obs-block { border-top: 1px solid #f1f5f9; padding-top: 12px; margin-top: 4px; }
.obs-obs-label { font-size: 11px; font-weight: 700; color: #94a3b8;
                 text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.obs-txt  { font-size: 13.5px; color: #64748b; line-height: 1.65; }
.obs-cerrar {
  position: absolute; top: 14px; right: 14px;
  background: #f1f5f9; border: none; border-radius: 50%;
  width: 32px; height: 32px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #64748b;
}
.obs-cerrar:hover { background: #e2e8f0; }

/* ── Asistencia ── */
.periodo-tab { padding: 7px 14px; border-radius: 20px; border: 1.5px solid #e2e8f0;
               background: #fff; font-size: 13px; cursor: pointer; }
.periodo-tab.active { background: #0d9488; color: #fff; border-color: #0d9488; }
.falla-item { display: flex; align-items: center; gap: 12px;
              padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.falla-item:last-child { border-bottom: none; }
.falla-fecha { font-size: 12px; color: #64748b; min-width: 70px; }
.falla-asig  { font-size: 14px; color: #1e293b; flex: 1; }
.falla-cnt   { font-weight: 700; color: #dc2626; font-size: 15px; }

/* ── Mensajes ── */
.msg-card          { background: #fff; border-radius: 12px; padding: 16px;
                     box-shadow: 0 2px 8px rgba(0,0,0,.07); margin-bottom: 14px;
                     border-left: 4px solid #e2e8f0; transition: border-color .2s; }
.msg-card.sin-resp { border-left-color: #f59e0b; }
.msg-card.respondido { border-left-color: #22c55e; opacity: .85; }
.msg-header  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.msg-nombre  { font-weight: 700; font-size: 15px; color: #1e293b; }
.msg-fecha   { font-size: 12px; color: #94a3b8; }
.msg-asig    { font-size: 14px; color: #374151; margin-bottom: 4px; }
.msg-asig strong { color: #0d9488; }
.msg-periodo { font-size: 12px; color: #64748b; margin-bottom: 10px; }
.msg-info    { font-size: 13px; color: #475569; margin-bottom: 12px; }
.msg-botones { display: flex; flex-direction: column; gap: 8px; }
.msg-btn {
  padding: 10px 14px; border: none; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: opacity .15s, transform .1s; text-align: left;
}
.msg-btn:active   { transform: scale(.98); }
.msg-btn:disabled { opacity: .45; cursor: not-allowed; }
.msg-btn-verde { background: #dcfce7; color: #166534; }
.msg-btn-azul  { background: #dbeafe; color: #1e40af; }
.msg-btn-rojo  { background: #fee2e2; color: #991b1b; }
.msg-respondido {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: #166534; background: #f0fdf4;
  border-radius: 8px; padding: 8px 12px;
}
.msg-empty       { text-align: center; padding: 48px 16px; color: #94a3b8; }
.msg-empty svg   { margin-bottom: 12px; }
.msg-empty p     { font-size: 15px; margin-bottom: 6px; color: #64748b; }
.msg-empty small { font-size: 12px; }
.msg-hora        { font-size: 10px; color: #94a3b8; text-align: right; margin-top: 8px; }

/* ── Observador de estudiante ── */
.obs-caso { background:#fff;border-radius:12px;box-shadow:0 2px 8px rgba(0,0,0,.07);margin-bottom:14px;overflow:hidden; }
.obs-caso-header { display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid #f1f5f9;cursor:pointer;user-select:none; }
.obs-caso-header:active { background:#f8fafc; }
.obs-tipo-badge { font-size:11px;font-weight:700;padding:3px 9px;border-radius:99px;text-transform:uppercase;letter-spacing:.4px;flex-shrink:0; }
.obs-tipo-academico   { background:#dbeafe;color:#1d4ed8; }
.obs-tipo-convivencia { background:#fce7f3;color:#9d174d; }
.obs-grav-leve     { background:#dcfce7;color:#166534; }
.obs-grav-moderada { background:#fef3c7;color:#92400e; }
.obs-grav-grave    { background:#fee2e2;color:#991b1b; }
.obs-estado-abierto { color:#d97706;font-size:12px; }
.obs-estado-cerrado { color:#64748b;font-size:12px; }
.obs-chevron { margin-left:auto;transition:transform .2s;color:#94a3b8;flex-shrink:0; }
.obs-chev-open { transform:rotate(180deg); }
.obs-body { display:none;padding:0 14px 14px; }
.obs-body-open { display:block; }
.obs-anotacion { border-left:3px solid #ccfbf1;padding:10px 12px;margin-top:10px;border-radius:0 8px 8px 0;background:#f8fafc; }
.obs-anot-meta { font-size:11px;color:#64748b;margin-bottom:6px;display:flex;gap:8px;flex-wrap:wrap;align-items:center; }
.obs-campo-label { font-size:11px;font-weight:700;color:#14b8a6;text-transform:uppercase;letter-spacing:.4px;margin:8px 0 3px; }
.obs-campo-val { font-size:13px;color:#1e293b;line-height:1.5;white-space:pre-wrap; }
.obs-vacio { color:#94a3b8;font-style:italic; }

/* ── Evaluación docente ── */
.ev-intro{background:linear-gradient(135deg,#0891b2,#0d9488);color:#fff}
.ev-intro p{font-size:13px;line-height:1.5;color:rgba(255,255,255,.88)}
.ev-task{position:relative;border-left:4px solid #0d9488;cursor:pointer}
.ev-task.done{border-color:#94a3b8;cursor:default;background:#f1f5f9;box-shadow:none;opacity:.72;padding-right:66px}
.ev-task.done .ev-role,.ev-task.done>div{color:#64748b!important}
.ev-done-icon{position:absolute;right:16px;top:50%;transform:translateY(-50%);width:38px;height:38px;border-radius:50%;background:#dcfce7;color:#15803d;display:flex;align-items:center;justify-content:center;border:2px solid #86efac}
.ev-done-icon svg{width:22px;height:22px}
.ev-task.parent{border-left-color:#a855f7;background:linear-gradient(90deg,#faf5ff 0,#fff 45%)}
.ev-task.student{border-left-color:#0891b2;background:linear-gradient(90deg,#ecfeff 0,#fff 45%)}
.ev-periods{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-bottom:14px}
.ev-period{border:1px solid #cbd5e1;background:#fff;border-radius:9px;padding:10px 2px;color:#64748b;font-size:11px;font-weight:700;cursor:pointer}
.ev-period.active{background:#0d9488;border-color:#0d9488;color:#fff}
.ev-child{font-size:13px;font-weight:700;color:#475569;margin:17px 2px 8px;padding-bottom:6px;border-bottom:1px solid #cbd5e1}
.ev-role{font-size:12px;font-weight:800;letter-spacing:.5px;color:#0e7490;margin-bottom:6px}
.ev-task.parent .ev-role{color:#7e22ce}
.ev-teacher{font-size:18px;font-weight:700;color:#1e293b;margin:7px 0}
.ev-question{padding:16px 0;border-bottom:1px solid #e2e8f0}.ev-question:last-child{border-bottom:0}
.ev-question-title{font-size:14px;font-weight:600;line-height:1.45;color:#1e293b;margin-bottom:10px}
.ev-scale{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.ev-scale input{display:none}
.ev-scale label{display:flex;align-items:center;justify-content:center;height:42px;border:1.5px solid #cbd5e1;border-radius:8px;background:#fff;font-weight:800;cursor:pointer}
.ev-scale label:nth-of-type(1){border-color:#ef4444;color:#b91c1c;background:#fef2f2}
.ev-scale label:nth-of-type(2){border-color:#f97316;color:#c2410c;background:#fff7ed}
.ev-scale label:nth-of-type(3){border-color:#eab308;color:#a16207;background:#fefce8}
.ev-scale label:nth-of-type(4){border-color:#84cc16;color:#4d7c0f;background:#f7fee7}
.ev-scale label:nth-of-type(5){border-color:#22c55e;color:#15803d;background:#f0fdf4}
.ev-scale input[value="1"]:checked+label{background:#ef4444;border-color:#ef4444;color:#fff}
.ev-scale input[value="2"]:checked+label{background:#f97316;border-color:#f97316;color:#fff}
.ev-scale input[value="3"]:checked+label{background:#eab308;border-color:#eab308;color:#fff}
.ev-scale input[value="4"]:checked+label{background:#84cc16;border-color:#84cc16;color:#fff}
.ev-scale input[value="5"]:checked+label{background:#22c55e;border-color:#22c55e;color:#fff}
.ev-text{width:100%;min-height:90px;border:1px solid #cbd5e1;border-radius:9px;padding:10px;font:inherit;resize:vertical}
.ev-btn{width:100%;border:0;border-radius:10px;background:#0d9488;color:#fff;padding:13px;font-size:15px;font-weight:700;margin-top:16px}
.ev-btn:disabled{opacity:.6}
.ev-back{border:0;background:none;color:#0d9488;font-weight:700;padding:0 0 14px;cursor:pointer}
.ev-note{font-size:11px;color:#64748b;line-height:1.4;margin-top:8px}
.ev-scale-note{display:flex;justify-content:space-between;gap:5px;font-size:9.5px;line-height:1.2;margin-top:7px;white-space:nowrap}
.ev-scale-note span{text-align:center;flex:1;font-weight:700}
.ev-scale-note span:nth-child(1){color:#b91c1c}
.ev-scale-note span:nth-child(2){color:#c2410c}
.ev-scale-note span:nth-child(3){color:#a16207}
.ev-scale-note span:nth-child(4){color:#4d7c0f}
.ev-scale-note span:nth-child(5){color:#15803d}
.ev-error{background:#fee2e2;color:#991b1b;padding:12px;border-radius:9px;margin-bottom:12px}

/* ── IvAna Estudiante ──────────────────────────────────────── */
/* Las pantallas compartidas con la app de padres traen "Cambiar" (de hijo): aquí no aplica */
#btnCambiarHijoNotas, #btnCambiarAsist, #btnCambiarInf, #plBtnCambiar { display: none !important; }

/* Primer ingreso y Mi cuenta */
.link-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  color: #0d9488; font-size: 13px; font-weight: 600; text-decoration: underline;
}
.link-btn:disabled { color: #94a3b8; cursor: default; }
.cuenta-fila {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 14px;
}
.cuenta-fila:last-child { border-bottom: none; }
.cuenta-fila span { color: #64748b; }
.cuenta-fila b    { color: #1e293b; text-align: right; overflow-wrap: anywhere; }
.btn-salir {
  display: block; width: 100%; padding: 12px; margin: 4px 0 16px;
  border: 1.5px solid #fecaca; border-radius: 10px; background: #fff;
  color: #b91c1c; font-size: 15px; font-weight: 700; cursor: pointer;
}
.aviso-clave {
  font-size: 13px; line-height: 1.5; color: #92400e; background: #fef3c7;
  border-radius: 8px; padding: 10px 12px; margin-bottom: 12px;
}

/* ── Otros cuestionarios ── */
.cq-intro{background:linear-gradient(135deg,#0d9488,#2563eb);color:#fff}
.cq-intro p{font-size:13px;line-height:1.5;color:rgba(255,255,255,.9)}
.cq-task{position:relative;border-left:4px solid #0d9488;cursor:pointer}
.cq-task.respondido,.cq-task.cerrado{border-color:#94a3b8;cursor:default;background:#f1f5f9;box-shadow:none;opacity:.75;padding-right:66px}
.cq-task-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:9px;font-size:12px;color:#64748b}
.badge-muted{background:#e2e8f0;color:#475569}
.cq-juntos{display:inline-block;margin-top:8px;background:#f3e8ff;color:#7e22ce;font-size:12px;font-weight:700;border-radius:8px;padding:5px 9px}
.cq-instr{font-size:13px;line-height:1.5;color:#334155;white-space:pre-wrap;margin:10px 0 0}
.cq-img{display:block;max-width:100%;border-radius:10px;margin:0 0 12px;border:1px solid #e2e8f0}
.cq-opts{display:grid;gap:8px}
.cq-opt{display:flex;align-items:center;gap:10px;border:1.5px solid #cbd5e1;border-radius:10px;padding:11px 12px;background:#fff;font-size:14px;cursor:pointer}
.cq-opt input{width:18px;height:18px;margin:0;accent-color:#0d9488;flex-shrink:0}
.cq-opt:has(input:checked){border-color:#0d9488;background:#f0fdfa;color:#115e59;font-weight:600}
.cq-sino{grid-template-columns:1fr 1fr}
.cq-hint{font-size:11px;color:#64748b}
.cq-input{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:9px;padding:11px 10px;font:inherit}
.cq-scale-note{display:flex;justify-content:space-between;font-size:11px;font-weight:700;color:#64748b;margin-top:6px}
.ev-question.cq-falta .ev-question-title{color:#dc2626}
.ev-question.cq-falta .cq-opt,.ev-question.cq-falta .cq-input,.ev-question.cq-falta .ev-text{border-color:#fca5a5}
.cq-candidatos{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}
.cq-candidatos .cq-opt{flex-direction:column;align-items:stretch;text-align:center;gap:8px;padding:10px;position:relative}
.cq-candidatos .cq-opt input{position:absolute;top:10px;left:10px;background:#fff}
.cq-cand-foto{width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px;background:#f1f5f9;display:block}
.cq-sin-foto{background:#f1f5f9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.5'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21v-1a7 7 0 0 1 16 0v1'/%3E%3C/svg%3E") center/45% no-repeat}
.cq-candidatos .cq-opt:has(input:checked){box-shadow:0 0 0 3px #99f6e4}

/* ── Inicio y horario ── */
.ini-hola{background:linear-gradient(135deg,#0d9488,#2563eb);color:#fff}
.ini-saludo{font-size:18px;font-weight:700}
.ini-fecha{font-size:13px;color:rgba(255,255,255,.88);margin-top:3px}
.ini-dia{text-align:center;padding:20px 16px}
.ini-dia-label{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:#64748b}
.ini-dia-nombre{font-size:30px;font-weight:800;color:#0f766e;margin:4px 0}
.ini-dia-curso{font-size:12px;color:#64748b}
.ini-dia.sin-clase .ini-dia-nombre{color:#475569}
.ini-ultimo{font-size:13px;color:#475569;line-height:1.5;margin-top:6px}
.ini-btn{background:#0d9488}
.hor-dias{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin-bottom:12px}
.hor-dia{border:1px solid #cbd5e1;background:#fff;border-radius:9px;padding:10px 2px;color:#475569;font-size:12px;font-weight:700;cursor:pointer;position:relative}
.hor-dia.hoy::after{content:'';position:absolute;top:5px;right:5px;width:6px;height:6px;border-radius:50%;background:#0d9488}
.hor-dia.active{background:#0d9488;border-color:#0d9488;color:#fff}
.hor-dia.active.hoy::after{background:#fff}
.hor-lista{display:grid;gap:8px}
.hor-bloque{display:flex;align-items:center;gap:12px;margin:0;padding:12px 14px}
.hor-hora{display:flex;flex-direction:column;align-items:center;min-width:46px;padding-right:12px;border-right:2px solid #e2e8f0}
.hor-hora b{font-size:16px;color:#0f766e}
.hor-hora span{font-size:11px;color:#64748b}
.hor-info{flex:1;min-width:0}
.hor-asig{font-weight:700;color:#1e293b}
.hor-prof{font-size:12px;color:#64748b;margin-top:2px;text-transform:capitalize}
.hor-bloque.actual{border:2px solid #0d9488;background:#f0fdfa}
.hor-ahora{display:inline-block;margin-top:5px;font-size:11px;font-weight:700;color:#fff;background:#0d9488;border-radius:99px;padding:2px 8px}

/* ── Bloqueo con huella / oferta de huella ── */
.bloqueo { position: fixed; inset: 0; z-index: 1000; overflow-y: auto; }

/* Enlaces a privacidad y derechos (al pie del ingreso y de Mi cuenta) */
.legal-links{font-size:12px;line-height:1.6;text-align:center;margin:14px auto 0;max-width:560px;color:rgba(255,255,255,.75)}
.legal-links a{color:inherit;white-space:nowrap}
