/* ========================================================================
   EDUNOTAS BUILD 003 — BLOQUE ACADÉMICO
   Capa visual transversal, compatible con las pantallas PHP existentes.
   ======================================================================== */
:root{
  --edn-navy-950:#071c33;
  --edn-navy-900:#0b2f59;
  --edn-navy-800:#123f70;
  --edn-blue-700:#18599a;
  --edn-blue-600:#2374c6;
  --edn-blue-100:#eaf3ff;
  --edn-cyan-100:#e9fbfb;
  --edn-green-700:#08785f;
  --edn-green-100:#e8f8f2;
  --edn-amber-700:#a85c00;
  --edn-amber-100:#fff4df;
  --edn-red-700:#b42318;
  --edn-red-100:#fff0ee;
  --edn-purple-700:#6840a5;
  --edn-purple-100:#f3edff;
  --edn-slate-950:#101828;
  --edn-slate-800:#1d2939;
  --edn-slate-700:#344054;
  --edn-slate-600:#475467;
  --edn-slate-500:#667085;
  --edn-slate-400:#98a2b3;
  --edn-slate-300:#d0d5dd;
  --edn-slate-200:#e4e7ec;
  --edn-slate-100:#f2f4f7;
  --edn-slate-50:#f8fafc;
  --edn-white:#fff;
  --edn-radius-sm:8px;
  --edn-radius-md:12px;
  --edn-radius-lg:16px;
  --edn-radius-xl:22px;
  --edn-shadow-xs:0 1px 2px rgba(16,24,40,.05);
  --edn-shadow-sm:0 2px 8px rgba(16,24,40,.07);
  --edn-shadow-md:0 10px 28px rgba(16,24,40,.09);
  --edn-ring:0 0 0 4px rgba(35,116,198,.13);
  --edn-transition:160ms cubic-bezier(.2,.8,.2,1);
}

html{scroll-behavior:smooth}
body.edn-product-ui{
  color:var(--edn-slate-800);
  background:
    radial-gradient(circle at 95% 0%,rgba(35,116,198,.07),transparent 28rem),
    var(--edn-slate-50);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
body.edn-product-ui *,body.edn-product-ui *::before,body.edn-product-ui *::after{box-sizing:border-box}
body.edn-product-ui a{transition:color var(--edn-transition),background var(--edn-transition),border-color var(--edn-transition),box-shadow var(--edn-transition),transform var(--edn-transition)}
body.edn-product-ui img{max-width:100%}
body.edn-product-ui :focus-visible{outline:2px solid var(--edn-blue-600);outline-offset:2px}

/* Contenedor principal y ritmo vertical */
body.edn-product-ui .main,
body.edn-product-ui main,
body.edn-product-ui .content,
body.edn-product-ui .app-content{
  min-width:0;
}
body.edn-product-ui .content:not(.topbar-content),
body.edn-product-ui main{
  animation:edn-enter .28s ease-out both;
}
@keyframes edn-enter{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}

/* Encabezados de página existentes */
body.edn-product-ui .page-header,
body.edn-product-ui .header-page,
body.edn-product-ui .page-head,
body.edn-product-ui .head:not(.topbar .head),
body.edn-product-ui .hdr{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin:0 0 20px;
}
body.edn-product-ui h1,
body.edn-product-ui .page-title{
  color:var(--edn-navy-900);
  letter-spacing:-.025em;
  line-height:1.12;
}
body.edn-product-ui h2{letter-spacing:-.015em}
body.edn-product-ui .subtitle,
body.edn-product-ui .page-subtitle,
body.edn-product-ui .muted{color:var(--edn-slate-500)}
body.edn-product-ui .section-label,
body.edn-product-ui .sec-title,
body.edn-product-ui .doc-section-label,
body.edn-product-ui .doc-sec-title{
  color:var(--edn-navy-900);
  font-weight:800;
  letter-spacing:.035em;
}

/* Tarjetas y paneles */
body.edn-product-ui .card,
body.edn-product-ui .edn-card,
body.edn-product-ui .panel,
body.edn-product-ui .table-card,
body.edn-product-ui .doc-panel,
body.edn-product-ui .sa2-card,
body.edn-product-ui .stat-box,
body.edn-product-ui .res-card,
body.edn-product-ui .acceso-card{
  border:1px solid var(--edn-slate-200)!important;
  border-radius:var(--edn-radius-lg)!important;
  background:rgba(255,255,255,.97)!important;
  box-shadow:var(--edn-shadow-xs)!important;
}
body.edn-product-ui .card,
body.edn-product-ui .edn-card,
body.edn-product-ui .panel,
body.edn-product-ui .table-card,
body.edn-product-ui .doc-panel,
body.edn-product-ui .sa2-card{
  overflow:hidden;
}
body.edn-product-ui .card:hover,
body.edn-product-ui .acceso-card:hover{
  border-color:#c7d7ea!important;
  box-shadow:var(--edn-shadow-sm)!important;
}
body.edn-product-ui .card-header,
body.edn-product-ui .edn-card__header,
body.edn-product-ui .doc-panel-head,
body.edn-product-ui .sa2-card-h{
  background:linear-gradient(180deg,#fff,#fbfcfe)!important;
  border-bottom:1px solid var(--edn-slate-200)!important;
}
body.edn-product-ui .card-header h2,
body.edn-product-ui .card-header h3,
body.edn-product-ui .edn-card__title,
body.edn-product-ui .doc-panel-head h3{
  color:var(--edn-navy-900)!important;
  font-weight:800!important;
}

/* KPIs */
body.edn-product-ui .stats-grid,
body.edn-product-ui .stat-grid,
body.edn-product-ui .stats,
body.edn-product-ui .doc-kpis,
body.edn-product-ui .sa2-kpis{
  gap:14px!important;
}
body.edn-product-ui .stat,
body.edn-product-ui .stat-card,
body.edn-product-ui .stat-box,
body.edn-product-ui .doc-kpi,
body.edn-product-ui .sa2-kpi{
  border:1px solid var(--edn-slate-200)!important;
  border-radius:var(--edn-radius-lg)!important;
  background:linear-gradient(145deg,#fff,#fbfdff)!important;
  box-shadow:var(--edn-shadow-xs)!important;
  transition:transform var(--edn-transition),box-shadow var(--edn-transition),border-color var(--edn-transition);
}
body.edn-product-ui .stat:hover,
body.edn-product-ui .stat-card:hover,
body.edn-product-ui .stat-box:hover,
body.edn-product-ui .doc-kpi:hover,
body.edn-product-ui .sa2-kpi:hover{
  transform:translateY(-2px);
  border-color:#c8d9ec!important;
  box-shadow:var(--edn-shadow-sm)!important;
}
body.edn-product-ui .stat-value,
body.edn-product-ui .stat .v,
body.edn-product-ui .stat-box .val,
body.edn-product-ui .sv{
  color:var(--edn-navy-900)!important;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.035em;
}
body.edn-product-ui .stat-label,
body.edn-product-ui .stat .l,
body.edn-product-ui .stat-box .lbl{color:var(--edn-slate-600)!important}
body.edn-product-ui .stat-icon,
body.edn-product-ui .icon,
body.edn-product-ui .ico{
  border-radius:12px!important;
}

/* Botones */
body.edn-product-ui .btn,
body.edn-product-ui .edn-btn,
body.edn-product-ui button:not(.acc-btn):not(.sidebar-toggle),
body.edn-product-ui input[type="submit"],
body.edn-product-ui input[type="button"]{
  min-height:38px;
  border-radius:10px!important;
  font-weight:750!important;
  letter-spacing:-.005em;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  cursor:pointer;
  box-shadow:none;
  transition:transform var(--edn-transition),box-shadow var(--edn-transition),background var(--edn-transition),border-color var(--edn-transition),color var(--edn-transition);
}
body.edn-product-ui .btn:hover,
body.edn-product-ui .edn-btn:hover,
body.edn-product-ui button:not(.acc-btn):not(.sidebar-toggle):hover{transform:translateY(-1px)}
body.edn-product-ui .btn:active,
body.edn-product-ui .edn-btn:active,
body.edn-product-ui button:not(.acc-btn):not(.sidebar-toggle):active{transform:translateY(0)}
body.edn-product-ui .btn-primary,
body.edn-product-ui .edn-btn--primary,
body.edn-product-ui button.primary{
  background:linear-gradient(135deg,var(--edn-navy-900),var(--edn-blue-700))!important;
  border-color:transparent!important;
  color:#fff!important;
  box-shadow:0 5px 14px rgba(24,89,154,.18)!important;
}
body.edn-product-ui .btn-primary:hover,
body.edn-product-ui .edn-btn--primary:hover{box-shadow:0 8px 18px rgba(24,89,154,.24)!important}
body.edn-product-ui .btn-gray,
body.edn-product-ui .btn-secondary,
body.edn-product-ui .secondary{
  background:#fff!important;
  color:var(--edn-slate-700)!important;
  border:1px solid var(--edn-slate-300)!important;
}
body.edn-product-ui .btn-green{background:var(--edn-green-700)!important;color:#fff!important;border-color:transparent!important}
body.edn-product-ui .btn-red,
body.edn-product-ui .btn-danger{background:var(--edn-red-700)!important;color:#fff!important;border-color:transparent!important}
body.edn-product-ui .btn-sm{min-height:32px!important;padding:6px 10px!important;border-radius:8px!important;font-size:12px!important}
body.edn-product-ui .actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}

/* Formularios */
body.edn-product-ui .fg,
body.edn-product-ui .field{min-width:0}
body.edn-product-ui label,
body.edn-product-ui .lbl{
  color:var(--edn-slate-700);
  font-weight:700;
}
body.edn-product-ui input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
body.edn-product-ui select,
body.edn-product-ui textarea{
  min-height:40px;
  border:1px solid var(--edn-slate-300)!important;
  border-radius:10px!important;
  background:#fff!important;
  color:var(--edn-slate-800)!important;
  box-shadow:var(--edn-shadow-xs)!important;
  transition:border-color var(--edn-transition),box-shadow var(--edn-transition),background var(--edn-transition);
}
body.edn-product-ui textarea{min-height:96px;resize:vertical}
body.edn-product-ui input:hover,
body.edn-product-ui select:hover,
body.edn-product-ui textarea:hover{border-color:#aebed0!important}
body.edn-product-ui input:focus,
body.edn-product-ui select:focus,
body.edn-product-ui textarea:focus{
  outline:none!important;
  border-color:var(--edn-blue-600)!important;
  box-shadow:var(--edn-ring)!important;
}
body.edn-product-ui input::placeholder,
body.edn-product-ui textarea::placeholder{color:var(--edn-slate-400)}
body.edn-product-ui input[type="checkbox"],body.edn-product-ui input[type="radio"]{accent-color:var(--edn-blue-700)}
body.edn-product-ui .grid2{gap:14px!important}

/* Tablas */
body.edn-product-ui .edn-table-scroll{
  width:100%;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  border-radius:inherit;
}
body.edn-product-ui table{
  width:100%;
  border-collapse:separate!important;
  border-spacing:0!important;
  background:#fff;
  font-variant-numeric:tabular-nums;
}
body.edn-product-ui table thead th{
  position:relative;
  background:#f3f7fb!important;
  color:var(--edn-slate-700)!important;
  border-bottom:1px solid #dbe4ee!important;
  font-size:11px!important;
  font-weight:800!important;
  letter-spacing:.045em!important;
  text-transform:uppercase!important;
  white-space:nowrap;
}
body.edn-product-ui table tbody td{
  color:var(--edn-slate-700);
  border-bottom:1px solid #edf1f5!important;
  vertical-align:middle!important;
}
body.edn-product-ui table tbody tr:last-child td{border-bottom:0!important}
body.edn-product-ui table tbody tr{transition:background var(--edn-transition)}
body.edn-product-ui table tbody tr:hover td{background:#f8fbff!important}
body.edn-product-ui table td,body.edn-product-ui table th{padding:12px 13px!important}
body.edn-product-ui .edn-table-count{
  color:var(--edn-slate-500);
  font-size:12px;
  font-weight:650;
  padding:9px 13px;
  border-top:1px solid var(--edn-slate-200);
  background:#fbfcfe;
}

/* Badges */
body.edn-product-ui .badge,
body.edn-product-ui .pill,
body.edn-product-ui .tag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-height:24px;
  padding:3px 9px!important;
  border-radius:999px!important;
  font-size:11px!important;
  font-weight:800!important;
  line-height:1!important;
  border:1px solid transparent;
}
body.edn-product-ui .badge-success,body.edn-product-ui .badge.green{color:var(--edn-green-700)!important;background:var(--edn-green-100)!important}
body.edn-product-ui .badge-warning,body.edn-product-ui .badge.warn{color:var(--edn-amber-700)!important;background:var(--edn-amber-100)!important}
body.edn-product-ui .badge-danger,body.edn-product-ui .badge.red{color:var(--edn-red-700)!important;background:var(--edn-red-100)!important}

/* Alertas */
body.edn-product-ui .alert{
  border:1px solid #cddff2!important;
  border-left:4px solid var(--edn-blue-600)!important;
  background:#f3f8ff!important;
  color:var(--edn-slate-700)!important;
  border-radius:12px!important;
  box-shadow:var(--edn-shadow-xs);
}
body.edn-product-ui .alert.success{border-color:#b8ead9!important;border-left-color:var(--edn-green-700)!important;background:var(--edn-green-100)!important}
body.edn-product-ui .alert.error,body.edn-product-ui .alert.danger{border-color:#f2c4bf!important;border-left-color:var(--edn-red-700)!important;background:var(--edn-red-100)!important}
body.edn-product-ui .alert.warning,body.edn-product-ui .alert.warn{border-color:#f2d49e!important;border-left-color:var(--edn-amber-700)!important;background:var(--edn-amber-100)!important}

/* Tabs */
body.edn-product-ui .tabs{
  display:flex;
  align-items:center;
  gap:5px!important;
  padding:5px!important;
  border:1px solid var(--edn-slate-200)!important;
  border-radius:12px!important;
  background:#f3f6f9!important;
  overflow-x:auto;
}
body.edn-product-ui .tab{
  border-radius:8px!important;
  color:var(--edn-slate-600)!important;
  font-weight:750!important;
  white-space:nowrap;
}
body.edn-product-ui .tab.active{
  background:#fff!important;
  color:var(--edn-navy-900)!important;
  box-shadow:var(--edn-shadow-sm)!important;
}

/* Estados vacíos */
body.edn-product-ui .empty,
body.edn-product-ui .empty-state,
body.edn-product-ui .sa2-empty{
  border:1px dashed #c8d4e1!important;
  border-radius:14px!important;
  background:linear-gradient(145deg,#fbfdff,#f5f8fb)!important;
  color:var(--edn-slate-500)!important;
}

/* Modales */
body.edn-product-ui .modal,
body.edn-product-ui .modal-content,
body.edn-product-ui .modal-box{
  border-radius:18px!important;
}
body.edn-product-ui .modal-content,
body.edn-product-ui .modal-box{
  border:1px solid var(--edn-slate-200)!important;
  box-shadow:0 24px 80px rgba(16,24,40,.22)!important;
}

/* Topbar y sidebar: refinamiento sin alterar la arquitectura */
body.edn-product-ui .topbar{box-shadow:0 1px 0 rgba(16,24,40,.07),0 4px 16px rgba(16,24,40,.035)!important}
body.edn-product-ui .sidebar{box-shadow:8px 0 28px rgba(7,28,51,.12)!important}
body.edn-product-ui .sidebar a.active{box-shadow:inset 3px 0 0 rgba(255,255,255,.9),0 4px 14px rgba(0,0,0,.10)!important}

/* Scrollbars discretos */
body.edn-product-ui *{scrollbar-width:thin;scrollbar-color:#bdcad8 transparent}
body.edn-product-ui *::-webkit-scrollbar{width:9px;height:9px}
body.edn-product-ui *::-webkit-scrollbar-thumb{background:#bdcad8;border-radius:999px;border:2px solid transparent;background-clip:padding-box}

/* Responsive */
@media(max-width:900px){
  body.edn-product-ui .page-header,
  body.edn-product-ui .header-page,
  body.edn-product-ui .page-head,
  body.edn-product-ui .hdr{flex-direction:column;align-items:stretch}
  body.edn-product-ui .page-header .actions,
  body.edn-product-ui .header-page .actions{width:100%}
  body.edn-product-ui .page-header .actions .btn,
  body.edn-product-ui .header-page .actions .btn{flex:1}
}
@media(max-width:700px){
  body.edn-product-ui .card,
  body.edn-product-ui .edn-card,
  body.edn-product-ui .panel,
  body.edn-product-ui .table-card{border-radius:14px!important}
  body.edn-product-ui table td,body.edn-product-ui table th{padding:10px 11px!important}
  body.edn-product-ui .actions{align-items:stretch}
  body.edn-product-ui .actions>.btn,body.edn-product-ui .actions>.edn-btn{flex:1 1 auto}
}
@media(max-width:520px){
  body.edn-product-ui .btn,body.edn-product-ui .edn-btn{min-height:40px}
  body.edn-product-ui .grid2{grid-template-columns:1fr!important}
}

/* Impresión */
@media print{
  body.edn-product-ui{background:#fff!important}
  body.edn-product-ui .card,body.edn-product-ui .edn-card,body.edn-product-ui .panel,body.edn-product-ui .table-card{box-shadow:none!important;border-color:#d8dee7!important}
  body.edn-product-ui .edn-table-scroll{overflow:visible!important}
  body.edn-product-ui table thead th{background:#f2f4f7!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* Identidad contextual por módulo */
body.edn-product-ui{--edn-module-accent:var(--edn-blue-700);--edn-module-soft:var(--edn-blue-100)}
body.edn-module-psicologia,body.edn-module-psicologia-fichas,body.edn-module-psicologia-referimientos{--edn-module-accent:var(--edn-purple-700);--edn-module-soft:var(--edn-purple-100)}
body.edn-module-biblioteca{--edn-module-accent:#9a650d;--edn-module-soft:#fff7e7}
body.edn-module-tic{--edn-module-accent:#087ea4;--edn-module-soft:#e7f8fc}
body.edn-module-financiero,body.edn-module-contabilidad,body.edn-module-presupuesto{--edn-module-accent:var(--edn-green-700);--edn-module-soft:var(--edn-green-100)}
body.edn-module-fct-dashboard,body.edn-module-fct-horas,body.edn-module-vinculacion{--edn-module-accent:#6c3bb1;--edn-module-soft:#f3edff}
body.edn-module-estudiantes{--edn-module-accent:#1769aa;--edn-module-soft:#eaf4ff}
body.edn-module-cursos,body.edn-module-asignaciones{--edn-module-accent:#0a7b6c;--edn-module-soft:#e8f8f4}
body.edn-product-ui .page-header::before,
body.edn-product-ui .header-page::before,
body.edn-product-ui .page-head::before{
  content:"";
  width:4px;
  align-self:stretch;
  min-height:42px;
  border-radius:999px;
  background:var(--edn-module-accent);
  flex:0 0 4px;
}
body.edn-product-ui .page-header>div:first-of-type,
body.edn-product-ui .header-page>div:first-of-type,
body.edn-product-ui .page-head>div:first-of-type{flex:1;min-width:0}
body.edn-product-ui .card-header::before,
body.edn-product-ui .edn-card__header::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:3px;
  background:var(--edn-module-accent);
}
body.edn-product-ui .card-header,
body.edn-product-ui .edn-card__header{position:relative}


/* ========================================================================
   BUILD 001 — Ajustes de estabilidad y compatibilidad
   ======================================================================== */
html[data-edunotas-ui="build005"]{color-scheme:light}
body.edn-product-ui{min-height:100vh}
body.edn-product-ui .edn-table-scroll{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
body.edn-product-ui .edn-table-scroll>table{margin-bottom:0}
body.edn-product-ui table{border-collapse:separate;border-spacing:0}
body.edn-product-ui table thead th{position:relative}
body.edn-product-ui table tbody tr:last-child td{border-bottom:0}
body.edn-product-ui button:disabled,
body.edn-product-ui .btn:disabled,
body.edn-product-ui [aria-disabled="true"]{opacity:.58;cursor:not-allowed;transform:none!important;box-shadow:none!important}
body.edn-product-ui .edn-is-loading{pointer-events:none;position:relative}
body.edn-product-ui .edn-is-loading .edn-loading-mark{display:inline-block;animation:edn-spin .75s linear infinite}
@keyframes edn-spin{to{transform:rotate(360deg)}}
body.edn-product-ui .edn-field-error,
body.edn-product-ui [aria-invalid="true"]{border-color:var(--edn-red-700)!important;box-shadow:0 0 0 4px rgba(180,35,24,.11)!important}
body.edn-product-ui .edn-help-text{font-size:12px;line-height:1.45;color:var(--edn-slate-500)}
body.edn-product-ui .edn-empty-state{text-align:center;padding:34px 20px;color:var(--edn-slate-500)}
body.edn-product-ui .edn-empty-state strong{display:block;color:var(--edn-navy-900);font-size:15px;margin-bottom:5px}
body.edn-product-ui .modal,
body.edn-product-ui [role="dialog"]{isolation:isolate}
body.edn-product-ui .modal-content{border:1px solid var(--edn-slate-200);border-radius:var(--edn-radius-xl);box-shadow:0 24px 70px rgba(7,28,51,.2)}
body.edn-product-ui .dropdown-menu{border:1px solid var(--edn-slate-200);border-radius:12px;box-shadow:var(--edn-shadow-md)}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  body.edn-product-ui *,body.edn-product-ui *::before,body.edn-product-ui *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}
@media print{
  body.edn-product-ui{background:#fff!important}
  body.edn-product-ui .edn-table-scroll{overflow:visible!important}
  body.edn-product-ui .no-print,
  body.edn-product-ui .sidebar,
  body.edn-product-ui .topbar{display:none!important}
  body.edn-product-ui .card,
  body.edn-product-ui .panel,
  body.edn-product-ui .table-card{box-shadow:none!important;border-color:#bbb!important;break-inside:avoid}
}


/* ========================================================================
   BUILD 002 — Estudiantes, Cursos, Asignaciones y Usuarios
   ======================================================================== */
body.edn-product-ui.edn-module-estudiantes,
body.edn-product-ui.edn-module-cursos,
body.edn-product-ui.edn-module-asignaciones,
body.edn-product-ui.edn-module-usuarios{
  --edn-module-accent:#1b5f9e;
  --edn-module-soft:#eef6ff;
  --edn-module-border:#d9e8f7;
}
body.edn-product-ui.edn-module-usuarios{--edn-module-accent:#5b3fa3;--edn-module-soft:#f5f1ff;--edn-module-border:#e5dcfb}
body.edn-product-ui.edn-module-asignaciones{--edn-module-accent:#087b70;--edn-module-soft:#ecfbf8;--edn-module-border:#cfeee8}
body.edn-product-ui.edn-module-cursos{--edn-module-accent:#ad6414;--edn-module-soft:#fff7eb;--edn-module-border:#f5e0c3}

/* Área de contenido y cabeceras detectadas progresivamente. */
body.edn-product-ui .edn-admin-shell{display:grid;gap:16px}
body.edn-product-ui .edn-page-heading{
  display:flex;align-items:flex-start;justify-content:space-between;gap:18px;
  padding:20px 22px;border:1px solid var(--edn-module-border,var(--edn-slate-200));
  border-radius:18px;background:linear-gradient(135deg,#fff 0%,var(--edn-module-soft,#f7faff) 100%);
  box-shadow:0 8px 25px rgba(24,56,88,.06);margin-bottom:16px
}
body.edn-product-ui .edn-page-heading h1,
body.edn-product-ui .edn-page-heading h2{margin:0;color:var(--edn-navy-900);letter-spacing:-.025em}
body.edn-product-ui .edn-page-heading p{margin:5px 0 0;color:var(--edn-slate-500);line-height:1.45}
body.edn-product-ui .edn-page-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}

/* Indicadores administrativos. */
body.edn-product-ui .edn-admin-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin-bottom:16px}
body.edn-product-ui .edn-admin-stat{
  min-height:92px;padding:15px 16px;border:1px solid var(--edn-module-border,var(--edn-slate-200));
  background:#fff;border-radius:15px;box-shadow:0 5px 16px rgba(24,56,88,.05)
}
body.edn-product-ui .edn-admin-stat .edn-stat-number{font-size:23px;font-weight:800;color:var(--edn-module-accent,var(--edn-blue-700));line-height:1.1}
body.edn-product-ui .edn-admin-stat .edn-stat-label{margin-top:5px;font-size:11px;font-weight:700;letter-spacing:.055em;text-transform:uppercase;color:var(--edn-slate-500)}

/* Barras de búsqueda y filtros. */
body.edn-product-ui form.edn-filter-bar,
body.edn-product-ui .filtros.edn-filter-bar{
  display:flex;align-items:end;gap:10px;flex-wrap:wrap;padding:13px 14px;margin-bottom:14px;
  border:1px solid var(--edn-module-border,var(--edn-slate-200));border-radius:14px;background:#fff;
  box-shadow:0 4px 14px rgba(24,56,88,.04)
}
body.edn-product-ui .edn-filter-bar label{font-size:11px;font-weight:750;color:var(--edn-slate-600);letter-spacing:.035em}
body.edn-product-ui .edn-filter-bar input,
body.edn-product-ui .edn-filter-bar select{min-height:40px;background:#fbfdff}
body.edn-product-ui .edn-filter-bar .edn-filter-grow{flex:1 1 240px}
body.edn-product-ui .edn-filter-bar .edn-filter-actions{display:flex;gap:8px;align-items:center}

/* Tablas de gestión. */
body.edn-product-ui.edn-module-estudiantes .edn-table-scroll,
body.edn-product-ui.edn-module-cursos .edn-table-scroll,
body.edn-product-ui.edn-module-asignaciones .edn-table-scroll,
body.edn-product-ui.edn-module-usuarios .edn-table-scroll{
  border:1px solid var(--edn-module-border);border-radius:15px;background:#fff;
  box-shadow:0 7px 22px rgba(24,56,88,.055)
}
body.edn-product-ui .edn-enhanced-table thead th{background:var(--edn-module-soft,#f6f9fc);color:var(--edn-module-accent,var(--edn-navy-800));border-bottom:1px solid var(--edn-module-border,#e5edf5)}
body.edn-product-ui .edn-enhanced-table tbody tr{transition:background .15s ease,box-shadow .15s ease}
body.edn-product-ui .edn-enhanced-table tbody tr:hover{background:#f9fcff}
body.edn-product-ui .edn-enhanced-table td:last-child{white-space:nowrap}
body.edn-product-ui .edn-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:5px;flex-wrap:wrap}

/* Formularios y modales administrativos. */
body.edn-product-ui .edn-enhanced-form .edn-form-section{
  margin:16px 0 10px;padding:9px 11px;border-left:3px solid var(--edn-module-accent,var(--edn-blue-700));
  background:var(--edn-module-soft,#f4f8fc);border-radius:0 9px 9px 0;color:var(--edn-module-accent,var(--edn-blue-700));
  font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.065em
}
body.edn-product-ui .edn-form-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px}
body.edn-product-ui .edn-form-grid>*{grid-column:span 6}
body.edn-product-ui .edn-form-grid>.edn-col-full{grid-column:1/-1}
body.edn-product-ui .edn-modal-footer{display:flex;justify-content:flex-end;gap:8px;padding-top:13px;margin-top:14px;border-top:1px solid var(--edn-slate-200)}

/* Estados y etiquetas. */
body.edn-product-ui .edn-status-pill{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:999px;font-size:10.5px;font-weight:800;line-height:1.2;background:#edf4fb;color:#28577f;border:1px solid #d7e5f2}
body.edn-product-ui .edn-status-pill[data-state="activo"],body.edn-product-ui .edn-status-pill[data-state="activa"]{background:#eaf9f1;color:#187044;border-color:#c9ecd9}
body.edn-product-ui .edn-status-pill[data-state="retirado"],body.edn-product-ui .edn-status-pill[data-state="inactivo"]{background:#fff0ee;color:#a63a2f;border-color:#f3d2cd}
body.edn-product-ui .edn-status-pill[data-state="pendiente"]{background:#fff8e7;color:#94600b;border-color:#f2dfad}

@media(max-width:800px){
  body.edn-product-ui .edn-page-heading{padding:16px;flex-direction:column}
  body.edn-product-ui .edn-page-actions{width:100%;justify-content:flex-start}
  body.edn-product-ui .edn-form-grid>*{grid-column:1/-1}
}
@media(max-width:640px){
  body.edn-product-ui form.edn-filter-bar,body.edn-product-ui .filtros.edn-filter-bar{align-items:stretch}
  body.edn-product-ui .edn-filter-bar>*{width:100%}
  body.edn-product-ui .edn-filter-actions>*{flex:1}
  body.edn-product-ui .edn-enhanced-table.edn-mobile-cards thead{display:none}
  body.edn-product-ui .edn-enhanced-table.edn-mobile-cards,
  body.edn-product-ui .edn-enhanced-table.edn-mobile-cards tbody,
  body.edn-product-ui .edn-enhanced-table.edn-mobile-cards tr,
  body.edn-product-ui .edn-enhanced-table.edn-mobile-cards td{display:block;width:100%}
  body.edn-product-ui .edn-enhanced-table.edn-mobile-cards tr{padding:11px 12px;border-bottom:1px solid var(--edn-module-border,#e4edf5)}
  body.edn-product-ui .edn-enhanced-table.edn-mobile-cards td{display:grid;grid-template-columns:minmax(105px,38%) 1fr;gap:10px;padding:6px 0;border:0;white-space:normal!important}
  body.edn-product-ui .edn-enhanced-table.edn-mobile-cards td::before{content:attr(data-label);font-size:10px;font-weight:800;text-transform:uppercase;color:var(--edn-slate-500)}
}


/* ========================================================================
   BUILD 003 — Notas, asistencia, registro digital, boletines y actas
   ======================================================================== */
body.edn-product-ui.edn-module-notas,
body.edn-product-ui.edn-module-reportes,
body.edn-product-ui.edn-module-servicios{
  --edn-academic:#174f82;--edn-academic-soft:#eef6fd;--edn-academic-border:#d7e6f3;
}
body.edn-product-ui .edn-academic-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:end;padding:14px 16px;margin:0 0 14px;border:1px solid var(--edn-academic-border);border-radius:14px;background:#fff;box-shadow:0 5px 16px rgba(24,56,88,.05)}
body.edn-product-ui .edn-academic-toolbar>*{min-width:0}
body.edn-product-ui .edn-academic-toolbar .edn-grow{flex:1 1 220px}
body.edn-product-ui .edn-grade-table-wrap{width:100%;max-width:100%;overflow:auto;border:1px solid var(--edn-academic-border);border-radius:15px;background:#fff;box-shadow:0 8px 24px rgba(24,56,88,.06);overscroll-behavior:contain}
body.edn-product-ui .edn-grade-table{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;font-variant-numeric:tabular-nums}
body.edn-product-ui .edn-grade-table th{position:sticky;top:0;z-index:4;background:var(--edn-academic-soft);color:#173d61;font-size:11px;line-height:1.2;text-align:center;white-space:nowrap;border-bottom:1px solid var(--edn-academic-border)}
body.edn-product-ui .edn-grade-table td{background:#fff;text-align:center;vertical-align:middle;white-space:nowrap}
body.edn-product-ui .edn-grade-table tbody tr:nth-child(even) td{background:#fbfdff}
body.edn-product-ui .edn-grade-table tbody tr:hover td{background:#f2f8fd}
body.edn-product-ui .edn-grade-table th:first-child,
body.edn-product-ui .edn-grade-table td:first-child{position:sticky;left:0;z-index:3;min-width:42px}
body.edn-product-ui .edn-grade-table th:nth-child(2),
body.edn-product-ui .edn-grade-table td:nth-child(2){position:sticky;left:42px;z-index:3;min-width:210px;max-width:280px;text-align:left;white-space:normal;box-shadow:8px 0 12px -12px rgba(18,48,76,.55)}
body.edn-product-ui .edn-grade-table th:first-child,
body.edn-product-ui .edn-grade-table th:nth-child(2){z-index:6;background:#e8f2fb}
body.edn-product-ui .edn-grade-table input[type="number"],body.edn-product-ui .edn-grade-table input[type="text"],body.edn-product-ui .edn-grade-table select{min-width:54px;max-width:76px;height:34px;padding:4px 6px;text-align:center;border-radius:7px;border:1px solid #cfdce8;background:#fff}
body.edn-product-ui .edn-grade-table input:focus,body.edn-product-ui .edn-grade-table select:focus{outline:none;border-color:#2b70ad;box-shadow:0 0 0 3px rgba(43,112,173,.14)}
body.edn-product-ui .edn-grade-table .edn-invalid-grade{background:#fff0ef!important;border-color:#d75549!important;color:#9d2f27!important}
body.edn-product-ui .edn-grade-table .edn-saved-grade{background:#eef9f3!important;border-color:#79bd97!important}
body.edn-product-ui .edn-save-indicator{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:750;background:#eef6fd;color:#24577e;border:1px solid #d5e5f1}
body.edn-product-ui .edn-save-indicator[data-state="saving"]{background:#fff8e7;color:#8a5a08;border-color:#efdca6}
body.edn-product-ui .edn-save-indicator[data-state="saved"]{background:#eaf8f0;color:#1c7046;border-color:#cbe9d8}
body.edn-product-ui .edn-save-indicator[data-state="error"]{background:#fff0ef;color:#a4372f;border-color:#f0d0cc}
body.edn-product-ui .edn-attendance-grid td,body.edn-product-ui .edn-attendance-grid th{text-align:center}
body.edn-product-ui .edn-attendance-grid input[type="radio"],body.edn-product-ui .edn-attendance-grid input[type="checkbox"]{width:18px;height:18px;accent-color:#1f649d}
body.edn-product-ui .edn-print-document{background:#fff;color:#111}
@media(max-width:760px){body.edn-product-ui .edn-grade-table th:nth-child(2),body.edn-product-ui .edn-grade-table td:nth-child(2){min-width:170px;max-width:210px}.edn-academic-toolbar{align-items:stretch}.edn-academic-toolbar>*{width:100%}}
@media print{
 body.edn-product-ui.edn-print-mode .sidebar,body.edn-product-ui.edn-print-mode .topbar,body.edn-product-ui.edn-print-mode .no-print,body.edn-product-ui.edn-print-mode .edn-academic-toolbar{display:none!important}
 body.edn-product-ui.edn-print-mode .main-content,body.edn-product-ui.edn-print-mode main{margin:0!important;padding:0!important;width:100%!important;max-width:none!important}
 body.edn-product-ui .edn-grade-table-wrap{overflow:visible!important;border:0!important;box-shadow:none!important}
 body.edn-product-ui .edn-grade-table{width:100%!important;min-width:0!important}
 body.edn-product-ui .edn-grade-table th,body.edn-product-ui .edn-grade-table td{position:static!important;box-shadow:none!important;background:#fff!important;color:#000!important}
 body.edn-product-ui .edn-print-document{box-shadow:none!important;border:0!important;margin:0!important;padding:0!important}
}


/* ========================================================================
   BUILD 004 — Gestión institucional, servicios, psicología y FCT
   ======================================================================== */
body.edn-product-ui{
  --edn-b4-navy:#123d63;--edn-b4-blue:#1f6fa8;--edn-b4-soft:#f2f7fb;
  --edn-b4-line:#dbe7f0;--edn-b4-text:#203447;--edn-b4-muted:#66798a;
  --edn-b4-green:#1d7a55;--edn-b4-amber:#a7650b;--edn-b4-red:#b33b32;
}
body.edn-product-ui .edn-module-shell{display:grid;gap:16px}
body.edn-product-ui .edn-module-hero{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding:20px 22px;border:1px solid var(--edn-b4-line);border-radius:18px;background:linear-gradient(135deg,#fff 0%,var(--edn-b4-soft) 100%);box-shadow:0 10px 28px rgba(22,61,96,.07)}
body.edn-product-ui .edn-module-hero h1,body.edn-product-ui .edn-module-hero h2{margin:0;color:var(--edn-b4-navy);letter-spacing:-.02em}
body.edn-product-ui .edn-module-hero p{margin:5px 0 0;color:var(--edn-b4-muted);max-width:760px}
body.edn-product-ui .edn-module-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
body.edn-product-ui .edn-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}
body.edn-product-ui .edn-kpi{padding:16px;border:1px solid var(--edn-b4-line);border-radius:15px;background:#fff;box-shadow:0 6px 18px rgba(22,61,96,.055)}
body.edn-product-ui .edn-kpi strong{display:block;font-size:25px;line-height:1.1;color:var(--edn-b4-navy);font-variant-numeric:tabular-nums}
body.edn-product-ui .edn-kpi span{display:block;margin-top:5px;font-size:12px;color:var(--edn-b4-muted)}
body.edn-product-ui .edn-filterbar{display:flex;flex-wrap:wrap;align-items:end;gap:10px;padding:13px 15px;border:1px solid var(--edn-b4-line);border-radius:14px;background:#fff}
body.edn-product-ui .edn-filterbar>*{min-width:0}
body.edn-product-ui .edn-filterbar input[type="search"],body.edn-product-ui .edn-filterbar input[type="text"]{flex:1 1 240px}
body.edn-product-ui .edn-section-card{border:1px solid var(--edn-b4-line);border-radius:16px;background:#fff;box-shadow:0 7px 22px rgba(22,61,96,.055);overflow:hidden}
body.edn-product-ui .edn-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px 17px;border-bottom:1px solid var(--edn-b4-line);background:#fbfdff}
body.edn-product-ui .edn-section-head h2,body.edn-product-ui .edn-section-head h3{margin:0;color:var(--edn-b4-navy)}
body.edn-product-ui .edn-section-body{padding:17px}
body.edn-product-ui .edn-status{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:750;border:1px solid transparent}
body.edn-product-ui .edn-status::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
body.edn-product-ui .edn-status.is-active,body.edn-product-ui .edn-status.is-complete{color:var(--edn-b4-green);background:#eaf8f1;border-color:#caeadb}
body.edn-product-ui .edn-status.is-pending{color:var(--edn-b4-amber);background:#fff7e7;border-color:#f0ddae}
body.edn-product-ui .edn-status.is-alert,body.edn-product-ui .edn-status.is-inactive{color:var(--edn-b4-red);background:#fff0ee;border-color:#efd0cc}
body.edn-product-ui .edn-empty-state{text-align:center;padding:42px 20px;border:1px dashed #c8d8e5;border-radius:15px;background:#fbfdff;color:var(--edn-b4-muted)}
body.edn-product-ui .edn-empty-state strong{display:block;margin-bottom:5px;color:var(--edn-b4-navy);font-size:16px}
body.edn-product-ui .edn-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px}
body.edn-product-ui .edn-form-grid .edn-span-2{grid-column:1/-1}
body.edn-product-ui .edn-action-group{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
body.edn-product-ui .edn-action-group form{margin:0}
body.edn-product-ui.edn-module-servicios .edn-enhanced-table td:last-child,
body.edn-product-ui.edn-module-usuarios .edn-enhanced-table td:last-child{white-space:nowrap}
body.edn-product-ui.edn-module-servicios .edn-enhanced-table tbody tr:hover td,
body.edn-product-ui.edn-module-usuarios .edn-enhanced-table tbody tr:hover td{background:#f4f9fd}
body.edn-product-ui .edn-tabs{display:flex;gap:6px;overflow:auto;padding:5px;border:1px solid var(--edn-b4-line);border-radius:12px;background:#f7fafc}
body.edn-product-ui .edn-tabs a,body.edn-product-ui .edn-tabs button{flex:0 0 auto;padding:8px 11px;border:0;border-radius:8px;background:transparent;color:#526a7e;text-decoration:none;font-weight:700;font-size:12px}
body.edn-product-ui .edn-tabs .active,body.edn-product-ui .edn-tabs [aria-selected="true"]{background:#fff;color:var(--edn-b4-blue);box-shadow:0 2px 8px rgba(22,61,96,.1)}
@media(max-width:1100px){body.edn-product-ui .edn-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){body.edn-product-ui .edn-module-hero{flex-direction:column;padding:16px}body.edn-product-ui .edn-module-actions{justify-content:flex-start;width:100%}body.edn-product-ui .edn-kpi-grid{grid-template-columns:1fr 1fr}body.edn-product-ui .edn-form-grid{grid-template-columns:1fr}body.edn-product-ui .edn-form-grid .edn-span-2{grid-column:auto}}
@media(max-width:480px){body.edn-product-ui .edn-kpi-grid{grid-template-columns:1fr}}


/* ========================================================================
   BUILD 005 — Product Polish / Release Candidate visual
   ======================================================================== */
:root{
  --edn-radius-xs:7px;--edn-radius-sm:10px;--edn-radius-md:14px;--edn-radius-lg:18px;
  --edn-shadow-xs:0 1px 3px rgba(15,42,67,.08);
  --edn-shadow-sm:0 7px 22px rgba(15,42,67,.07);
  --edn-shadow-md:0 16px 42px rgba(15,42,67,.11);
  --edn-focus:0 0 0 3px rgba(31,111,168,.19);
  --edn-motion:cubic-bezier(.2,.8,.2,1);
}
html{scroll-behavior:smooth}
body.edn-product-ui{color:#203447;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
body.edn-product-ui :where(a,button,input,select,textarea,[tabindex]):focus-visible{outline:2px solid #1f6fa8;outline-offset:2px;box-shadow:var(--edn-focus)}
body.edn-product-ui :where(button,.btn,a.btn,.ni,.card,.stat-card,.edn-kpi,.edn-section-card){transition:transform .18s var(--edn-motion),box-shadow .18s var(--edn-motion),border-color .18s var(--edn-motion),background-color .18s var(--edn-motion)}
body.edn-product-ui :where(button,.btn,a.btn):active{transform:translateY(1px)}
body.edn-product-ui .main-content,body.edn-product-ui main{max-width:1720px;margin-inline:auto}
body.edn-product-ui .edn-section-card:hover,body.edn-product-ui .edn-kpi:hover{border-color:#c8dbe9;box-shadow:var(--edn-shadow-sm)}
body.edn-product-ui .edn-kpi:hover{transform:translateY(-2px)}
body.edn-product-ui .edn-kpi strong{letter-spacing:-.035em}
body.edn-product-ui .edn-enhanced-table{border-collapse:separate;border-spacing:0;width:100%}
body.edn-product-ui .edn-enhanced-table thead th{position:sticky;top:0;z-index:2;background:#f5f9fc;color:#29475f;font-size:11px;letter-spacing:.035em;text-transform:uppercase;border-bottom:1px solid #d8e5ee}
body.edn-product-ui .edn-enhanced-table tbody td{border-bottom:1px solid #e8eff4;vertical-align:middle}
body.edn-product-ui .edn-enhanced-table tbody tr:last-child td{border-bottom:0}
body.edn-product-ui .edn-enhanced-table tbody tr:focus-within td{background:#f3f8fc}
body.edn-product-ui .edn-table-scroll{scrollbar-width:thin;scrollbar-color:#aabfce transparent;overscroll-behavior-inline:contain}
body.edn-product-ui .edn-table-scroll::after{content:"";position:sticky;right:0;display:block;width:1px;height:1px}
body.edn-product-ui input:not([type="checkbox"]):not([type="radio"]),body.edn-product-ui select,body.edn-product-ui textarea{border-radius:10px;border-color:#cbdbe6;background:#fff;min-height:40px}
body.edn-product-ui textarea{min-height:96px;resize:vertical}
body.edn-product-ui input::placeholder,body.edn-product-ui textarea::placeholder{color:#8a9cab}
body.edn-product-ui label{color:#3c5366;font-weight:700}
body.edn-product-ui [aria-invalid="true"]{border-color:#c84c43!important;background:#fff7f6!important}
body.edn-product-ui .alert,body.edn-product-ui [role="alert"]{border-radius:12px;box-shadow:var(--edn-shadow-xs)}
body.edn-product-ui .edn-skip-link{position:fixed;left:12px;top:-60px;z-index:100000;padding:10px 14px;border-radius:9px;background:#123d63;color:#fff;font-weight:800;text-decoration:none;box-shadow:var(--edn-shadow-md)}
body.edn-product-ui .edn-skip-link:focus{top:12px}
body.edn-product-ui .edn-backtop{position:fixed;right:18px;bottom:18px;z-index:999;width:42px;height:42px;border:1px solid #cbdbe6;border-radius:50%;background:#fff;color:#123d63;box-shadow:var(--edn-shadow-sm);display:grid;place-items:center;opacity:0;pointer-events:none;transform:translateY(8px)}
body.edn-product-ui .edn-backtop.is-visible{opacity:1;pointer-events:auto;transform:none}
body.edn-product-ui .edn-page-tools{display:flex;align-items:center;gap:8px;margin-left:auto}
body.edn-product-ui .edn-density-btn{border:1px solid #cbdbe6;border-radius:9px;background:#fff;color:#3b566c;padding:7px 10px;font-size:12px;font-weight:750;cursor:pointer}
body.edn-product-ui.edn-compact .edn-enhanced-table :is(th,td){padding-top:6px!important;padding-bottom:6px!important}
body.edn-product-ui .ni[aria-current="page"]{font-weight:800}
body.edn-product-ui .ni[aria-current="page"]::after{content:"";position:absolute;right:9px;width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.75}
body.edn-product-ui .edn-live-region{position:fixed;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
body.edn-product-ui .edn-page-enter{animation:ednPageEnter .28s var(--edn-motion) both}
@keyframes ednPageEnter{from{opacity:.01;transform:translateY(5px)}to{opacity:1;transform:none}}
@media(max-width:760px){
  body.edn-product-ui .edn-backtop{right:12px;bottom:12px}
  body.edn-product-ui .edn-enhanced-table thead th{position:static}
  body.edn-product-ui .edn-page-tools{width:100%;justify-content:flex-end}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  body.edn-product-ui *,body.edn-product-ui *::before,body.edn-product-ui *::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}
@media print{
  body.edn-product-ui .edn-backtop,body.edn-product-ui .edn-density-btn,body.edn-product-ui .edn-skip-link{display:none!important}
  body.edn-product-ui .edn-section-card,body.edn-product-ui .edn-kpi{box-shadow:none!important;break-inside:avoid}
}
