:root {
  color-scheme: light;
  --ink: #1b1b1b;
  --muted: #52647A;
  --line: #d8e4f1;
  --soft: #f4f8fc;
  --panel: #ffffff;
  --blue: #004C94;
  --blue-dark: #2D3F54;
  --green: #028183;
  --gold: #73CC80;
  --sky: #006ECF;
  --sky-light: #3C93FA;
  --aqua: #00D4C6;
  --teal: #0FA69D;
  --shadow: 0 10px 30px rgba(45, 63, 84, 0.14);
}

@media (max-width: 680px) {
  html body.is-authenticated .site-header .topbar-actions.topbar-actions {
    position: absolute !important;
    top: auto !important;
    bottom: 12px !important;
    left: auto !important;
    right: 14px !important;
    z-index: 1100 !important;
    width: auto !important;
  }

  html body.is-authenticated .site-nav.site-nav {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  html body[data-profile="docente"].is-authenticated .grades-modal-card .panel-head.panel-head {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  html body[data-profile="docente"].is-authenticated .grades-modal-card .panel-head.panel-head > div {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  html body[data-profile="docente"].is-authenticated #gradesModalClose.ghost-button {
    width: auto !important;
    min-width: 76px !important;
    max-width: 96px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 7px 12px !important;
    flex: 0 0 auto !important;
    align-self: flex-start !important;
    font-size: 12px !important;
  }
}

#loginUser {
  text-transform: uppercase;
}

#enrollmentStudentDomicilio,
#enrollmentStudentColonia,
#enrollmentTutorDomicilio,
#enrollmentTutorColonia {
  text-transform: uppercase;
}

body.is-authenticated .excel-icon-button,
body.is-authenticated button.excel-icon-button,
body.is-authenticated .report-button-row .excel-icon-button {
  background: #107c41 !important;
  border-color: #107c41 !important;
  color: #ffffff !important;
  box-shadow: 0 10px 18px rgba(16, 124, 65, 0.18) !important;
}

body.is-authenticated .excel-icon-button:hover,
body.is-authenticated button.excel-icon-button:hover,
body.is-authenticated .report-button-row .excel-icon-button:hover {
  background: #0b6a35 !important;
  border-color: #0b6a35 !important;
  color: #ffffff !important;
}

body.is-authenticated .excel-icon-button:disabled,
body.is-authenticated button.excel-icon-button:disabled,
body.is-authenticated .report-button-row .excel-icon-button:disabled {
  background: #dff3e7 !important;
  border-color: #a7dfbd !important;
  color: #107c41 !important;
  opacity: 0.72 !important;
}

.enrollment-summary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

body.is-authenticated .pdf-icon-button,
body.is-authenticated button.pdf-icon-button,
body.is-authenticated .report-button-row .pdf-icon-button {
  background: #fee4e2 !important;
  border-color: #fecdca !important;
  color: #b42318 !important;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

body.is-authenticated .pdf-icon-button:hover,
body.is-authenticated button.pdf-icon-button:hover,
body.is-authenticated .report-button-row .pdf-icon-button:hover {
  background: #b42318 !important;
  border-color: #b42318 !important;
  color: #ffffff !important;
}

body.is-authenticated .pdf-icon-button:disabled,
body.is-authenticated button.pdf-icon-button:disabled,
body.is-authenticated .report-button-row .pdf-icon-button:disabled {
  background: #fff1f0 !important;
  border-color: #fee4e2 !important;
  color: #b42318 !important;
  opacity: 0.72 !important;
}

body.is-authenticated .app-page[data-page="historial"] .catalog-table th:first-child,
body.is-authenticated #historialTable td[data-label="Alumno"] {
  text-align: left !important;
}

body.is-authenticated .recursamiento-xls-button,
body.is-authenticated .recursamiento-panel .recursamiento-xls-button,
body.is-authenticated button.recursamiento-xls-button {
  background: #107c41 !important;
  border-color: #107c41 !important;
  color: #ffffff !important;
}

body.is-authenticated .recursamiento-xls-button:hover,
body.is-authenticated .recursamiento-panel .recursamiento-xls-button:hover,
body.is-authenticated button.recursamiento-xls-button:hover {
  background: #0b6a35 !important;
  border-color: #0b6a35 !important;
  color: #ffffff !important;
}

body.is-authenticated .active-period-panel .panel-head {
  justify-content: flex-start !important;
  text-align: left !important;
}

body.is-authenticated .active-period-panel .panel-title-block {
  margin: 0 !important;
  text-align: left !important;
}

body.is-authenticated .active-period-panel .panel-title-block h2,
body.is-authenticated .active-period-panel .panel-title-block span {
  text-align: left !important;
}

@media (min-width: 681px) {
  body.is-authenticated .active-period-panel .panel-head {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center !important;
  }

  body.is-authenticated .active-period-panel #activePeriodStatus {
    justify-self: end;
    text-align: right !important;
  }

body.is-authenticated .active-period-panel #activePeriodStatus strong,
body.is-authenticated .active-period-panel #activePeriodStatus span {
  display: inline-block;
  text-align: right !important;
  }
}

@media (min-width: 681px) {
  body.is-authenticated .active-period-panel,
  body.is-authenticated .active-period-panel .panel-head,
  body.is-authenticated .active-period-panel .panel-title-block,
  body.is-authenticated .active-period-panel .panel-title-block h2,
  body.is-authenticated .active-period-panel .panel-title-block span,
  body.is-authenticated .active-period-panel label {
    justify-content: flex-start !important;
    justify-items: start !important;
    text-align: left !important;
  }
}

/* Tema CBTIS62 final: domina las capas previas */
body,
body.is-authenticated {
  background:
    radial-gradient(circle at top left, rgba(188, 149, 92, 0.12), transparent 34%),
    linear-gradient(180deg, #faf8f4 0%, #f3f6f9 44%, #eef3f7 100%) !important;
  color: #2f2428 !important;
  font-family: Arial, Helvetica, sans-serif !important;
}

body.is-authenticated .site-header {
  background: rgba(250, 248, 244, 0.97) !important;
  border-bottom: 1px solid rgba(188, 149, 92, 0.35) !important;
  box-shadow: 0 8px 22px rgba(97, 18, 50, 0.08) !important;
}

body.is-authenticated .site-header::after {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #9f2241 0%, #bc955c 38%, #17324d 100%) !important;
}

body.is-authenticated .site-nav {
  background: linear-gradient(180deg, #17324d 0%, #0b1f35 100%) !important;
  box-shadow: 10px 0 24px rgba(23, 50, 77, 0.12) !important;
}

body.is-authenticated .site-nav .menu-button,
body.is-authenticated .site-nav .structured-menu > .menu-button {
  border-radius: 12px !important;
  color: #edf3f9 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

body.is-authenticated .menu-panel {
  background: #ffffff !important;
  border: 1px solid rgba(188, 149, 92, 0.28) !important;
  border-radius: 12px !important;
  box-shadow: 0 18px 34px rgba(23, 50, 77, 0.16) !important;
}

body.is-authenticated .menu-panel .menu-button {
  color: #17324d !important;
}

body.is-authenticated .site-nav .menu-button:hover,
body.is-authenticated .site-nav .menu-button.active,
body.is-authenticated .menu-panel .menu-button:hover,
body.is-authenticated .menu-panel .menu-button.active {
  background: rgba(188, 149, 92, 0.18) !important;
}

body.is-authenticated .panel,
body.is-authenticated .catalog-panel,
body.is-authenticated .form-panel,
body.is-authenticated .enrollment-panel,
body.is-authenticated .modal-card,
body.is-authenticated .grades-modal-card,
body.is-authenticated .grade-detail-modal-card,
body.is-authenticated .dashboard-summary-panel,
body.is-authenticated .active-period-panel {
  background: #ffffff !important;
  border: 1px solid rgba(23, 50, 77, 0.12) !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 34px rgba(23, 50, 77, 0.12) !important;
}

body.is-authenticated .panel-head h2,
body.is-authenticated .panel-head h3,
body.is-authenticated .catalog-panel h2,
body.is-authenticated .topbar h1,
body.is-authenticated .site-header h1,
body.is-authenticated .report-toolbar h3,
body.is-authenticated .dashboard-card strong {
  color: #17324d !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

body.is-authenticated .dashboard-card,
body.is-authenticated .report-toolbar,
body.is-authenticated .student-document-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,254,0.96)) !important;
  border: 1px solid rgba(23, 50, 77, 0.12) !important;
  border-top: 3px solid #bc955c !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 26px rgba(23, 50, 77, 0.1) !important;
}

body.is-authenticated .card-summary-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(23, 50, 77, 0.08);
  color: #17324d !important;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

body.is-authenticated .embedded-catalog-result {
  margin-top: 18px;
}

body.is-authenticated .embedded-catalog-empty,
body.is-authenticated .embedded-catalog-panel {
  border: 1px solid rgba(23, 50, 77, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  padding: 14px;
}

body.is-authenticated .embedded-catalog-panel .report-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  width: 100%;
}

body.is-authenticated .embedded-catalog-panel .report-output-title {
  flex: 1 1 auto;
  margin: 0;
  text-align: left;
}

body.is-authenticated .embedded-catalog-total {
  display: block;
  flex: 0 0 auto;
  margin-left: auto;
  color: #17324d !important;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

body.is-authenticated .embedded-catalog-search {
  margin-bottom: 12px;
  width: 100%;
}

body.is-authenticated .embedded-catalog-wrap {
  margin-top: 0;
}

body.is-authenticated .embedded-catalog-panel .catalog-table td.cell-center,
body.is-authenticated .embedded-catalog-panel .catalog-table th.cell-center,
body.is-authenticated .embedded-catalog-panel .catalog-table td[data-label="Turno"],
body.is-authenticated .embedded-catalog-panel .catalog-table td[data-label="SEMESTRE"],
body.is-authenticated .embedded-catalog-panel .catalog-table td[data-label="Semestre"],
body.is-authenticated .embedded-catalog-panel .catalog-table td[data-label="Grupo"],
body.is-authenticated .embedded-catalog-panel .catalog-table td[data-label="Carrera"],
body.is-authenticated .embedded-catalog-panel .catalog-table td[data-label="Alumnos"],
body.is-authenticated .embedded-catalog-panel .catalog-table td[data-label="Riesgo"],
body.is-authenticated .embedded-catalog-panel .catalog-table td[data-label="A"],
body.is-authenticated .embedded-catalog-panel .catalog-table td[data-label="NA"],
body.is-authenticated .embedded-catalog-panel .catalog-table td[data-label="NP"],
body.is-authenticated .embedded-catalog-panel .catalog-table td[data-label="TOTAL"],
body.is-authenticated .embedded-catalog-panel .catalog-table th:nth-child(n) {
  text-align: center !important;
}

body.is-authenticated .embedded-maestros-wrap th:nth-child(1),
body.is-authenticated .embedded-maestros-wrap th:nth-child(2),
body.is-authenticated .embedded-maestros-wrap th:nth-child(3),
body.is-authenticated .embedded-maestros-wrap td[data-label="Apellido paterno"],
body.is-authenticated .embedded-maestros-wrap td[data-label="Apellido materno"],
body.is-authenticated .embedded-maestros-wrap td[data-label="Nombre"],
body.is-authenticated .embedded-docenteMaterias-wrap th:nth-child(1),
body.is-authenticated .embedded-docenteMaterias-wrap th:nth-child(3),
body.is-authenticated .embedded-docenteMaterias-wrap th:nth-child(4),
body.is-authenticated .embedded-docenteMaterias-wrap th:nth-child(5),
body.is-authenticated .embedded-docenteMaterias-wrap th:nth-child(6),
body.is-authenticated .embedded-docenteMaterias-wrap th:nth-child(7),
body.is-authenticated .embedded-docenteMaterias-wrap td[data-label="PLAN"],
body.is-authenticated .embedded-docenteMaterias-wrap td[data-label="CARRERA"],
body.is-authenticated .embedded-docenteMaterias-wrap td[data-label="TIPO"],
body.is-authenticated .embedded-docenteMaterias-wrap td[data-label="ID"],
body.is-authenticated .embedded-docenteMaterias-wrap td[data-label="CLAVE"],
body.is-authenticated .embedded-docenteMaterias-wrap td[data-label="NOMBRE_ASIGNATURA"],
body.is-authenticated .embedded-carreras-wrap th:nth-child(1),
body.is-authenticated .embedded-carreras-wrap td[data-label="Periodo"],
body.is-authenticated .embedded-grupos-wrap th:nth-child(1),
body.is-authenticated .embedded-grupos-wrap td[data-label="Periodo"],
body.is-authenticated .embedded-alumnos-wrap th:nth-child(1),
body.is-authenticated .embedded-alumnos-wrap th:nth-child(2),
body.is-authenticated .embedded-alumnos-wrap th:nth-child(3),
body.is-authenticated .embedded-alumnos-wrap th:nth-child(4),
body.is-authenticated .embedded-alumnos-wrap th:nth-child(5),
body.is-authenticated .embedded-alumnos-wrap td[data-label="CURP"],
body.is-authenticated .embedded-alumnos-wrap td[data-label="No. control"],
body.is-authenticated .embedded-alumnos-wrap td[data-label="Apellido paterno"],
body.is-authenticated .embedded-alumnos-wrap td[data-label="Apellido materno"],
body.is-authenticated .embedded-alumnos-wrap td[data-label="Nombre"],
body.is-authenticated .embedded-materias-wrap th:nth-child(1),
body.is-authenticated .embedded-materias-wrap td[data-label="Materia"] {
  text-align: left !important;
}

body.is-authenticated .login-button,
body.is-authenticated button.login-button,
body.is-authenticated .number-icon-button,
body.is-authenticated .small-button,
body.is-authenticated .icon-button:not(.excel-icon-button):not(.pdf-icon-button) {
  background: #17324d !important;
  border-color: #17324d !important;
  color: #ffffff !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
}

body.is-authenticated .login-button:hover,
body.is-authenticated button.login-button:hover,
body.is-authenticated .number-icon-button:hover,
body.is-authenticated .small-button:hover,
body.is-authenticated .icon-button:not(.excel-icon-button):not(.pdf-icon-button):hover {
  background: #9f2241 !important;
  border-color: #9f2241 !important;
}

body.is-authenticated .ghost-button,
body.is-authenticated button.ghost-button {
  background: #ffffff !important;
  border: 1px solid #d9e1ea !important;
  color: #17324d !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
}

body.is-authenticated .logout-button {
  background: #9f2241 !important;
  color: #ffffff !important;
}

body.is-authenticated input,
body.is-authenticated select,
body.is-authenticated textarea,
body:not(.is-authenticated) input,
body:not(.is-authenticated) select,
body:not(.is-authenticated) textarea {
  background: #ffffff !important;
  border: 1px solid #d9e1ea !important;
  color: #172132 !important;
  border-radius: 10px !important;
}

body.is-authenticated input:focus,
body.is-authenticated select:focus,
body.is-authenticated textarea:focus,
body:not(.is-authenticated) input:focus,
body:not(.is-authenticated) select:focus,
body:not(.is-authenticated) textarea:focus {
  border-color: #bc955c !important;
  box-shadow: 0 0 0 3px rgba(188, 149, 92, 0.18) !important;
  outline: 0 !important;
}

body.is-authenticated th,
body.is-authenticated .catalog-table th,
body.is-authenticated .report-table th,
body.is-authenticated .records-table th,
body.is-authenticated .dashboard-summary-table th,
body.is-authenticated .grade-detail-table th {
  background: #17324d !important;
  color: #ffffff !important;
  border-bottom: 1px solid #0b1f35 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body.is-authenticated td,
body.is-authenticated .catalog-table td,
body.is-authenticated .report-table td,
body.is-authenticated .records-table td,
body.is-authenticated .dashboard-summary-table td,
body.is-authenticated .grade-detail-table td {
  border-bottom: 1px solid #e8edf3 !important;
  color: #172132;
  font-size: 13px !important;
}

body.is-authenticated tbody tr:hover td,
body.is-authenticated .catalog-table tbody tr:hover td,
body.is-authenticated .report-table tbody tr:hover td,
body.is-authenticated .records-table tbody tr:hover td {
  background: #eef4fa !important;
}

body:not(.is-authenticated) .login-screen {
  background:
    radial-gradient(circle at top, rgba(188, 149, 92, 0.18), transparent 34%),
    linear-gradient(135deg, #faf8f4 0%, #eef4fa 58%, #e7f0ed 100%) !important;
}

body:not(.is-authenticated) .login-card {
  border-top: 5px solid #9f2241 !important;
  box-shadow: 0 24px 60px rgba(23, 50, 77, 0.16) !important;
}

body:not(.is-authenticated) .login-card h1 {
  color: #17324d !important;
}

body:not(.is-authenticated) .login-subtitle {
  color: #9f2241 !important;
  font-weight: 900 !important;
}

/* Tema institucional CBTIS62 */
:root {
  --ink: #172132;
  --muted: #536477;
  --line: #d9e1ea;
  --soft: #f6f3ee;
  --panel: #ffffff;
  --blue: #17324d;
  --blue-dark: #0b1f35;
  --green: #235b4e;
  --gold: #bc955c;
  --sep-red: #9f2241;
  --sep-red-dark: #611232;
  --sky: #315f86;
  --sky-light: #e9f0f7;
  --aqua: #d8e8e3;
  --teal: #235b4e;
  --shadow: 0 16px 34px rgba(23, 50, 77, 0.12);
  --radius: 14px;
}

body {
  background:
    radial-gradient(circle at top left, rgba(188, 149, 92, 0.12), transparent 34%),
    linear-gradient(180deg, #faf8f4 0%, #f3f6f9 44%, #eef3f7 100%) !important;
  color: var(--ink) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 15px;
}

h1,
h2,
h3,
h4,
h5,
h6,
.login-card h1,
.panel-head h2,
.panel-head h3,
.report-toolbar h3,
.catalog-panel h2,
.topbar h1,
.site-header h1 {
  color: #17324d !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

body.is-authenticated .site-header {
  background: rgba(250, 248, 244, 0.96) !important;
  border-bottom: 1px solid rgba(188, 149, 92, 0.35) !important;
  box-shadow: 0 8px 22px rgba(23, 50, 77, 0.08) !important;
}

body.is-authenticated .site-header::after {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #9f2241 0%, #bc955c 38%, #17324d 100%);
}

body.is-authenticated .site-header h1,
.topbar h1 {
  font-size: clamp(17px, 2vw, 23px) !important;
  line-height: 1.15 !important;
}

.system-version,
.brand-domain,
.session-chip,
.student-session-line {
  color: #536477 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

body.is-authenticated .site-nav {
  background: linear-gradient(180deg, #17324d 0%, #0b1f35 100%) !important;
  border-right: 0 !important;
  box-shadow: 10px 0 24px rgba(23, 50, 77, 0.12) !important;
}

body.is-authenticated .structured-menu > .menu-group > h2 {
  color: rgba(255, 255, 255, 0.78) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body.is-authenticated .site-nav .menu-button,
body.is-authenticated .site-nav .structured-menu > .menu-button,
body.is-authenticated .menu-panel .menu-button {
  color: #edf3f9 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

body.is-authenticated .menu-panel {
  background: #ffffff !important;
  border: 1px solid rgba(188, 149, 92, 0.28) !important;
  border-radius: 12px !important;
  box-shadow: 0 18px 34px rgba(23, 50, 77, 0.16) !important;
}

body.is-authenticated .menu-panel .menu-button {
  color: #17324d !important;
}

body.is-authenticated .site-nav .menu-button:hover,
body.is-authenticated .site-nav .menu-button.active,
body.is-authenticated .menu-panel .menu-button:hover {
  background: rgba(188, 149, 92, 0.18) !important;
  color: #ffffff !important;
}

body.is-authenticated .menu-panel .menu-button:hover,
body.is-authenticated .menu-panel .menu-button.active {
  color: #17324d !important;
  background: #eef4fa !important;
}

body.is-authenticated .site-nav .menu-button::before {
  background: #e8edf3 !important;
  color: #17324d !important;
  border-radius: 6px !important;
  font-size: 11px !important;
}

.panel,
.catalog-panel,
.form-panel,
.enrollment-panel,
.dashboard-summary-panel,
.active-period-panel,
.modal-card,
.grades-modal-card,
.grade-detail-modal-card {
  background: #ffffff !important;
  border: 1px solid rgba(23, 50, 77, 0.12) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
}

.panel-head,
.dashboard-chart .panel-head,
.active-period-panel .panel-head,
.catalog-panel .panel-head {
  border-bottom: 1px solid #e5ebf1;
  padding-bottom: 10px;
}

.panel-head h2,
.catalog-panel h2 {
  font-size: 20px !important;
}

.panel-head span,
.panel-head p,
.catalog-sub,
.report-toolbar p {
  color: #536477 !important;
}

.dashboard-card,
.report-toolbar,
.student-document-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 254, 0.96)),
    #ffffff !important;
  border: 1px solid rgba(23, 50, 77, 0.12) !important;
  border-top: 3px solid #bc955c !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 26px rgba(23, 50, 77, 0.1) !important;
}

.dashboard-card::before,
.report-toolbar::before {
  background: linear-gradient(180deg, #9f2241, #bc955c, #17324d) !important;
}

.dashboard-card strong {
  color: #17324d !important;
}

.dashboard-card span,
.dashboard-card small {
  color: #536477 !important;
}

.login-button,
button.login-button,
.number-icon-button,
.small-button,
.icon-button:not(.excel-icon-button):not(.pdf-icon-button) {
  background: #17324d !important;
  border-color: #17324d !important;
  color: #ffffff !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 20px rgba(23, 50, 77, 0.16) !important;
  font-weight: 800 !important;
}

.login-button:hover,
button.login-button:hover,
.number-icon-button:hover,
.small-button:hover,
.icon-button:not(.excel-icon-button):not(.pdf-icon-button):hover {
  background: #9f2241 !important;
  border-color: #9f2241 !important;
  color: #ffffff !important;
}

.ghost-button,
button.ghost-button {
  background: #ffffff !important;
  border: 1px solid #d9e1ea !important;
  color: #17324d !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
}

.ghost-button:hover,
button.ghost-button:hover {
  background: #f6f3ee !important;
  border-color: #bc955c !important;
  color: #611232 !important;
}

.logout-button {
  background: #9f2241 !important;
  color: #ffffff !important;
  border-radius: 10px !important;
}

.logout-button:hover {
  background: #611232 !important;
}

input,
select,
textarea,
.global-search {
  background: #ffffff !important;
  border: 1px solid #d9e1ea !important;
  color: #172132 !important;
  border-radius: 10px !important;
}

input:focus,
select:focus,
textarea:focus,
.global-search:focus-within {
  border-color: #bc955c !important;
  box-shadow: 0 0 0 3px rgba(188, 149, 92, 0.18) !important;
  outline: 0 !important;
}

.catalog-table,
.report-table,
.records-table,
.dashboard-summary-table,
.grade-detail-table {
  border: 1px solid #d9e1ea !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

th,
.catalog-table th,
.report-table th,
.records-table th,
.dashboard-summary-table th,
.grade-detail-table th {
  background: #17324d !important;
  color: #ffffff !important;
  border-bottom: 1px solid #0b1f35 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

td,
.catalog-table td,
.report-table td,
.records-table td,
.dashboard-summary-table td,
.grade-detail-table td {
  border-bottom: 1px solid #e8edf3 !important;
  color: #172132;
  font-size: 13px !important;
}

tbody tr:hover td,
.catalog-table tbody tr:hover td,
.report-table tbody tr:hover td,
.records-table tbody tr:hover td {
  background: #eef4fa !important;
}

.catalog-pager,
.reportes-count,
#enrollmentReportCount,
#reportesCount {
  color: #17324d !important;
  font-weight: 800 !important;
}

.login-screen {
  background:
    radial-gradient(circle at top, rgba(188, 149, 92, 0.18), transparent 34%),
    linear-gradient(135deg, #faf8f4 0%, #eef4fa 58%, #e7f0ed 100%) !important;
}

.login-card {
  border-top: 5px solid #9f2241 !important;
  box-shadow: 0 24px 60px rgba(23, 50, 77, 0.16) !important;
}

.login-card h1 {
  color: #17324d !important;
  font-size: 30px !important;
}

.login-subtitle {
  color: #9f2241 !important;
  font-weight: 900 !important;
}

.brand-domain {
  color: #235b4e !important;
}

.status-na,
td.status-na,
tr.status-na td {
  background: #fff4cc !important;
}

.status-np,
td.status-np,
tr.status-np td {
  background: #fde2e1 !important;
}

tr.status-risk td {
  background: #fbeaea !important;
}

.status-downloaded td,
tr.status-downloaded td {
  background: #e9f5ef !important;
}

.status-missing td,
tr.status-missing td {
  background: #fff1dc !important;
}

@media (max-width: 680px) {
  body {
    font-size: 14px;
  }

  body.is-authenticated .site-nav {
    background: #17324d !important;
  }

  .panel,
  .catalog-panel,
  .form-panel,
  .enrollment-panel,
  .modal-card,
  .grades-modal-card,
  .grade-detail-modal-card {
    border-radius: 12px !important;
  }

  .catalog-table td::before,
  .report-table td::before,
  .records-table td::before {
    color: #17324d !important;
    font-weight: 900 !important;
  }
}

@media (max-width: 680px) {
  body.is-authenticated .site-header .header-logo {
    display: block !important;
    width: 58px !important;
    height: auto !important;
    align-self: end !important;
    margin: 0 8px 0 0 !important;
  }

  body.is-authenticated .site-header .brand-lockup {
    align-items: end !important;
  }
}

@media (max-width: 680px) {
  body.is-authenticated .site-header .header-logo {
    display: block !important;
    width: 58px !important;
    height: auto !important;
    align-self: end !important;
    margin: 0 8px 0 0 !important;
  }

  body.is-authenticated .site-header-inner {
    grid-template-columns: minmax(0, 1fr) !important;
    padding-bottom: 0 !important;
  }

  body.is-authenticated .site-header .brand-lockup {
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: end !important;
    padding-right: 0 !important;
  }

  body.is-authenticated .site-header .topbar-actions {
    position: fixed !important;
    top: 116px !important;
    left: auto !important;
    right: 10px !important;
    z-index: 1100 !important;
    width: auto !important;
  }

  body.is-authenticated .site-header .session-stack {
    display: flex !important;
    width: auto !important;
  }

  body.is-authenticated .site-header .session-chip {
    display: none !important;
  }

  body.is-authenticated .site-header .logout-button {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border-radius: 10px !important;
  }

  body.is-authenticated .topbar .topbar-actions {
    display: none !important;
  }

  body.is-authenticated .site-nav {
    padding-right: 56px !important;
  }

  body[data-profile="docente"].is-authenticated .grades-modal-card .panel-head {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  body[data-profile="docente"].is-authenticated .grades-modal-card .panel-head > div {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  body[data-profile="docente"].is-authenticated #gradesModalClose {
    width: auto !important;
    min-width: 76px !important;
    max-width: 96px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 7px 12px !important;
    flex: 0 0 auto !important;
    align-self: flex-start !important;
    font-size: 12px !important;
  }

  body[data-profile="docente"].is-authenticated #gradesNameFilter {
    margin-top: 8px !important;
  }
}

body.is-authenticated .active-period-panel .panel-head {
  justify-content: flex-start !important;
  text-align: left !important;
}

body.is-authenticated .active-period-panel .panel-title-block {
  margin: 0 !important;
  text-align: left !important;
}

body.is-authenticated .active-period-panel .panel-title-block h2,
body.is-authenticated .active-period-panel .panel-title-block span {
  text-align: left !important;
}

@media (min-width: 681px) {
  body.is-authenticated .active-period-panel .panel-head {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center !important;
  }

  body.is-authenticated .active-period-panel #activePeriodStatus {
    justify-self: end;
    text-align: right !important;
  }

  body.is-authenticated .active-period-panel #activePeriodStatus strong,
  body.is-authenticated .active-period-panel #activePeriodStatus span {
    display: inline-block;
    text-align: right !important;
  }
}

@media (max-width: 680px) {
  body.is-authenticated .site-header .header-logo {
    display: none !important;
  }

  body.is-authenticated .site-header-inner {
    grid-template-columns: minmax(0, 1fr) !important;
    padding-bottom: 0 !important;
  }

  body.is-authenticated .site-header .brand-lockup {
    grid-template-columns: auto minmax(0, 1fr) !important;
    padding-right: 0 !important;
  }

  body.is-authenticated .site-header .topbar-actions {
    position: fixed !important;
    top: 116px !important;
    left: auto !important;
    right: 10px !important;
    z-index: 1100 !important;
    width: auto !important;
  }

  body.is-authenticated .site-header .session-stack {
    display: flex !important;
    width: auto !important;
  }

  body.is-authenticated .site-header .session-chip {
    display: none !important;
  }

  body.is-authenticated .site-header .logout-button {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border-radius: 10px !important;
  }

  body.is-authenticated .topbar .topbar-actions {
    display: none !important;
  }

  body.is-authenticated .site-nav {
    padding-right: 56px !important;
  }

  body[data-profile="docente"].is-authenticated .grades-modal-card .panel-head {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  body[data-profile="docente"].is-authenticated .grades-modal-card .panel-head > div {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  body[data-profile="docente"].is-authenticated #gradesModalClose {
    width: auto !important;
    min-width: 76px !important;
    max-width: 96px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 7px 12px !important;
    flex: 0 0 auto !important;
    align-self: flex-start !important;
    font-size: 12px !important;
  }

  body[data-profile="docente"].is-authenticated #gradesNameFilter {
    margin-top: 8px !important;
  }
}

@media (min-width: 681px) {
  body.is-authenticated .active-period-panel .panel-head {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    text-align: left !important;
  }

  body.is-authenticated .active-period-panel #activePeriodStatus {
    justify-self: end;
    text-align: right !important;
  }

  body.is-authenticated .active-period-panel #activePeriodStatus strong,
  body.is-authenticated .active-period-panel #activePeriodStatus span {
    display: inline;
    text-align: right !important;
  }

  body.is-authenticated .active-period-panel #activePeriodStatus strong {
    margin-right: 8px;
  }
}

@media (max-width: 680px) {
  body.is-authenticated .site-header .header-logo {
    display: none !important;
  }

  body.is-authenticated .site-header-inner {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start;
  }

  body.is-authenticated .site-header .brand-lockup {
    grid-template-columns: auto minmax(0, 1fr) !important;
  }

  body.is-authenticated .site-header .topbar-actions,
  body.is-authenticated .topbar .topbar-actions {
    justify-self: end;
    align-self: start;
  }

  body.is-authenticated .session-stack {
    grid-template-columns: minmax(0, 1fr) 38px !important;
    align-items: start;
  }

  body.is-authenticated .logout-button {
    justify-self: end;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
  }

  body.is-authenticated .view-students-button .desktop-view-label {
    display: none !important;
  }

  body.is-authenticated .view-students-button .mobile-view-label {
    display: inline !important;
  }

  body.is-authenticated .view-students-button {
    min-width: 64px !important;
    padding-inline: 10px !important;
  }
}

@media (min-width: 681px) {
  body.is-authenticated .active-period-panel .panel-head {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    text-align: left !important;
  }

  body.is-authenticated .active-period-panel #activePeriodStatus {
    justify-self: end;
    text-align: right !important;
  }

  body.is-authenticated .active-period-panel #activePeriodStatus strong,
  body.is-authenticated .active-period-panel #activePeriodStatus span {
    display: inline;
    text-align: right !important;
  }

  body.is-authenticated .active-period-panel #activePeriodStatus strong {
    margin-right: 8px;
  }

  body.is-authenticated .active-period-panel .active-period-form {
    align-items: end;
  }
}

@media (max-width: 680px) {
  body.is-authenticated .site-header .header-logo {
    display: none !important;
  }

  body.is-authenticated .site-header-inner {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start;
  }

  body.is-authenticated .site-header .brand-lockup {
    grid-template-columns: auto minmax(0, 1fr) !important;
  }

  body.is-authenticated .site-header .topbar-actions,
  body.is-authenticated .topbar .topbar-actions {
    justify-self: end;
    align-self: start;
  }

  body.is-authenticated .session-stack {
    grid-template-columns: minmax(0, 1fr) 38px !important;
    align-items: start;
  }

  body.is-authenticated .logout-button {
    justify-self: end;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
  }

  body.is-authenticated .view-students-button .desktop-view-label {
    display: none !important;
  }

  body.is-authenticated .view-students-button .mobile-view-label {
    display: inline !important;
  }

  body.is-authenticated .view-students-button {
    min-width: 64px !important;
    padding-inline: 10px !important;
  }
}

.recursamiento-save-status {
  font-weight: 800;
  color: #007a3d;
}

.recursamiento-save-status[data-tone="error"] {
  color: #b91c1c;
}

.mobile-view-label {
  display: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  background: var(--soft);
  color: var(--ink);
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.15;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 17px;
  line-height: 1.25;
}

h4 {
  font-size: 15px;
}

h5,
h6 {
  font-size: 13px;
}

.app-shell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  min-height: calc(100vh - 73px);
  background: var(--soft);
  max-width: 100%;
}

.main-stage {
  display: grid;
  grid-template-columns: minmax(620px, 1fr) minmax(420px, 0.72fr);
  min-width: 0;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #eef8ff 0%, #ffffff 52%, #dffcf8 100%);
}

body.is-authenticated .login-screen {
  display: none;
}

body.is-authenticated .site-header,
body.is-authenticated .site-nav,
body.is-authenticated .app-shell,
body.is-authenticated .modal-card {
  text-transform: uppercase;
}

body:not(.is-authenticated) .site-header,
body:not(.is-authenticated) .site-nav,
body:not(.is-authenticated) .app-shell {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 12;
  background: var(--soft);
  border-bottom: 0;
}

.site-header-inner {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 10px 18px 10px 14px;
}

.site-header .brand-lockup {
  align-items: center;
}

.header-logo {
  display: block;
  width: clamp(86px, 10vw, 126px);
  height: auto;
  flex: 0 0 auto;
  object-fit: contain;
}

.site-header h1 {
  font-size: 20px;
  font-weight: 700;
}

.hamburger-button {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
  font-size: 18px;
}

.hamburger-button:hover {
  background: #e9eef6;
}

.global-search {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  background: #eaf1fb;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.global-search:focus-within {
  background: #fff;
  border-color: #cfd8e6;
  box-shadow: var(--shadow);
}

.global-search input {
  min-height: 40px;
  border: 0;
  background: transparent;
  outline: 0;
  color: var(--ink);
}

.site-nav {
  padding: 14px 12px;
  background: var(--soft);
  border-right: 0;
  border-bottom: 0;
}

.nav-backdrop {
  display: none;
}

.nav-title {
  margin: 0 12px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-logo {
  display: block;
  width: min(178px, 100%);
  height: auto;
  object-fit: contain;
}

.structured-menu {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.menu-group {
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.menu-group h2 {
  margin: 0 6px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}

.menu-group h2::after {
  content: "⌄";
  font-size: 13px;
  transition: transform 0.18s ease;
}

.menu-group.is-collapsed h2::after {
  transform: rotate(-90deg);
}

.menu-group.is-collapsed .menu-button {
  display: none;
}

.menu-group .menu-button {
  width: 100%;
  margin-top: 4px;
}

.structured-menu > .menu-button {
  align-self: stretch;
  min-height: 40px;
  background: transparent;
  border: 0;
  color: #314257;
}

.compose-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: auto;
  min-height: 56px;
  margin: 0 0 18px;
  padding: 0 22px;
  border: 0;
  border-radius: 18px;
  background: #c2e7ff;
  color: #173c5f;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
}

.compose-button::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 22px;
  line-height: 1;
}

.compose-button:hover {
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.22);
}

.login-card {
  width: min(100%, 460px);
  display: grid;
  gap: 14px;
  padding: 24px;
  background: #fff;
  border: 1px solid #d5dee9;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: 25px;
  text-align: center;
}

.login-subtitle {
  margin-top: -4px;
  color: #2D3F54;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--blue);
  border-radius: 8px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.login-card .brand-lockup {
  justify-content: center;
}

.login-logo {
  display: block;
  width: min(220px, 72vw);
  height: auto;
  margin: 0 auto;
}

.brand-domain {
  margin-top: 2px;
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
  text-transform: none;
}

.login-card .brand-domain,
.login-card .login-copy,
.login-card .system-version {
  text-align: center;
}

.system-version {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-copy {
  color: var(--muted);
  line-height: 1.45;
}

.login-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.login-button,
.logout-button,
.add-button,
.small-button,
.ghost-button {
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.login-button {
  min-height: 44px;
  padding: 10px 12px;
}

.login-button:hover,
.login-button:focus,
.login-button:active {
  background: var(--blue-dark);
  color: #fff !important;
  opacity: 1;
}

.add-button,
.small-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 10px;
}

.small-button {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 14px;
}

.catalog-page .add-button {
  display: none;
}

body[data-active-menu="usuarios"] .catalog-page[data-page="usuarios"] .add-button,
body[data-active-menu="directivos"] .catalog-page[data-page="directivos"] .add-button {
  display: inline-flex;
}

body:not([data-profile="administrador"]) .add-user-button {
  display: none !important;
}

body:not([data-profile="administrador"]) .app-page[data-page="maestros"] .teacher-import-form,
body:not([data-profile="administrador"]) .app-page[data-page="docenteMaterias"] .teacher-import-form,
body:not([data-profile="administrador"]) .app-page[data-page="tutores"] .teacher-import-form,
body:not([data-profile="administrador"]) .app-page[data-page="maestros"] .process-list,
body:not([data-profile="administrador"]) .app-page[data-page="docenteMaterias"] .process-list,
body:not([data-profile="administrador"]) .app-page[data-page="tutores"] .process-list {
  display: none !important;
}

body[data-catalog-mode="consulta"] .app-page[data-page="maestros"] .teacher-import-form,
body[data-catalog-mode="consulta"] .app-page[data-page="docenteMaterias"] .teacher-import-form,
body[data-catalog-mode="consulta"] .app-page[data-page="tutores"] .teacher-import-form,
body[data-catalog-mode="consulta"] .app-page[data-page="maestros"] .process-list,
body[data-catalog-mode="consulta"] .app-page[data-page="docenteMaterias"] .process-list,
body[data-catalog-mode="consulta"] .app-page[data-page="tutores"] .process-list {
  display: none !important;
}

.ghost-button {
  background: #e8eef5;
  color: #314257;
}

.danger {
  background: #b42318;
  color: #fff;
}

.login-error {
  min-height: 18px;
  color: #b42318;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  width: 100%;
}

.login-loading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #cfe1f5;
  border-radius: 10px;
  background: #f3f8ff;
  color: #1f3a5b;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.login-loading[hidden] {
  display: none;
}

.loading-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #cfe1f5;
  border-top-color: var(--blue);
  border-radius: 999px;
  animation: loading-spin 0.8s linear infinite;
}

.loading-spinner-lg {
  width: 38px;
  height: 38px;
  border-width: 4px;
}

.app-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(244, 248, 252, 0.86);
  backdrop-filter: blur(6px);
}

.app-loading-overlay.open {
  display: flex;
}

.app-loading-card {
  width: min(100%, 420px);
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  border: 1px solid #d6e4f4;
  border-radius: 16px;
  background: #fff;
  color: #24364b;
  box-shadow: 0 18px 45px rgba(31, 58, 91, 0.18);
  text-align: center;
}

.app-loading-card h2 {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 900;
}

.app-loading-card p {
  margin: 0;
  color: #52647a;
  line-height: 1.45;
}

.app-loading-card small {
  color: #006ecf;
  font-weight: 800;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.workspace {
  padding: 12px 18px 18px 0;
  min-width: 0;
}

.workspace > .topbar,
.workspace > .app-menu {
  display: none;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.session-stack {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.session-chip {
  align-self: center;
  padding: 8px 11px;
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  color: #314257;
  font-size: 13px;
  font-weight: 700;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-chip.has-notices {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  min-width: 42px;
}

.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: center;
  width: auto;
  min-width: 128px;
  min-height: 34px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: #5f6b7a;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0;
}

.logout-button:hover {
  background: #46515f;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.logout-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.notice-badge-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #d8dee8;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(45, 63, 84, 0.12);
  cursor: pointer;
}

.notice-badge-button:hover {
  background: #eef6ff;
  border-color: #8fb8df;
}

.notice-badge-button img {
  width: 26px;
  height: 26px;
}

.notice-badge-count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #c93030;
  color: #ffffff;
  border: 2px solid #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 16px;
  text-align: center;
}

.student-session-line {
  color: #2d3f54 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: 0;
  text-transform: uppercase;
}

.student-session-detail {
  color: #004c94 !important;
}

.staff-session-line {
  color: #2d3f54 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0;
  text-align: left;
}

.staff-session-detail {
  color: #52647A !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.2;
}

.staff-session-email {
  color: #006ECF;
  text-transform: lowercase;
}

.avisos-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 10px;
  padding-top: 18px;
  border-top: 1px solid #e4eaf2;
}

.avisos-list-head h3 {
  margin: 0;
  color: #2d3f54;
  font-size: 18px;
  font-weight: 900;
}

.notice-row.notice-pending {
  background: #fff8e7;
  box-shadow: inset 4px 0 0 #d6a643;
}

.notice-row.notice-read {
  background: #f7fafc;
  color: #52647a;
}

.notice-row.notice-pending:hover {
  background: #fff1c8;
}

.notice-row.notice-read:hover {
  background: oklch(92.9% 0.013 255.508);
}

.notice-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.notice-status-pending {
  background: #fff1c8;
  color: #8a5a00;
}

.notice-status-read {
  background: #e6eef7;
  color: #52647a;
}

.notice-message-preview {
  max-width: 340px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notice-actions {
  text-align: center;
  white-space: nowrap;
}

.notice-actions .small-button {
  margin: 0 2px;
}

.notice-message-card {
  max-width: 720px;
}

.notice-message-full {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #d9e3ef;
  border-radius: 12px;
  background: #f8fbff;
  color: #2d3f54;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(88px, 1fr));
  gap: 10px;
  min-width: 210px;
}

.stat {
  padding: 8px 10px;
  background: #e9f1f8;
  border: 1px solid #cbdced;
  border-radius: 6px;
  text-align: right;
}

.stat strong {
  display: block;
  font-size: 18px;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
}

.mobile-tabs {
  display: none;
}

.app-menu {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px;
  background: #e5edf6;
  border: 1px solid #cbd9e8;
  border-radius: 8px;
}

.site-nav .app-menu {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 0;
}

.menu-button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #314257;
  cursor: pointer;
  font-weight: 700;
}

.site-nav .menu-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 8px;
  text-align: left;
}

.site-nav .menu-button::before,
.app-menu .menu-button::before,
.quick-actions button::before,
.module-list button::before,
.add-button::before,
#printButton::before {
  display: inline-grid;
  place-items: center;
  width: 18px;
  min-width: 18px;
  height: 18px;
  border-radius: 5px;
  background: rgba(31, 78, 121, 0.1);
  color: currentColor;
  font-size: 12px;
  font-weight: 800;
}

.site-nav [data-menu="panel"]::before,
.quick-actions [data-menu="panel"]::before,
.module-list [data-menu="panel"]::before { content: "P"; }
.site-nav [data-menu="actas"]::before,
.quick-actions [data-menu="actas"]::before { content: "A"; }
.site-nav [data-menu="importacion"]::before,
.quick-actions [data-menu="importacion"]::before { content: "I"; }
.site-nav [data-menu="docentesCalificaciones"]::before,
.site-nav [data-menu="escolaresCalificaciones"]::before,
.app-menu [data-menu="docentesCalificaciones"]::before,
.app-menu [data-menu="escolaresCalificaciones"]::before { content: "C"; }
.site-nav [data-menu="docentesListas"]::before,
.quick-actions [data-menu="docentesListas"]::before { content: "L"; }
.site-nav [data-menu="usuarios"]::before,
.quick-actions [data-menu="usuarios"]::before { content: "U"; }
.site-nav [data-menu="parametros"]::before,
.quick-actions [data-menu="parametros"]::before { content: "P"; }
.site-nav [data-menu="adminAlumnos"]::before,
.quick-actions [data-menu="adminAlumnos"]::before { content: "A"; }
.site-nav [data-menu="directivos"]::before,
.quick-actions [data-menu="directivos"]::before { content: "D"; }
.site-nav [data-menu="reportes"]::before,
.quick-actions [data-menu="reportes"]::before { content: "R"; }
.site-nav [data-menu="reportesDocentes"]::before,
.site-nav [data-menu="reportesEscolares"]::before,
.site-nav [data-menu="reportesControl"]::before { content: "R"; }
.site-nav [data-menu="operaciones"]::before { content: "R"; }
.site-nav [data-menu="correos"]::before,
.quick-actions [data-menu="correos"]::before { content: "C"; }
.site-nav [data-menu="maestros"]::before,
.quick-actions [data-menu="maestros"]::before { content: "M"; }
.site-nav [data-menu="docenteMaterias"]::before,
.quick-actions [data-menu="docenteMaterias"]::before { content: "M"; }
.site-nav [data-menu="tutores"]::before,
.quick-actions [data-menu="tutores"]::before { content: "T"; }
.site-nav [data-menu="alumnos"]::before,
.quick-actions [data-menu="alumnos"]::before { content: "A"; }
.site-nav [data-menu="carreras"]::before,
.quick-actions [data-menu="carreras"]::before,
.module-list [data-menu="carreras"]::before { content: "C"; }
.site-nav [data-menu="generaciones"]::before,
.quick-actions [data-menu="generaciones"]::before,
.module-list [data-menu="generaciones"]::before { content: "G"; }
.site-nav [data-menu="semestres"]::before,
.module-list [data-menu="semestres"]::before { content: "S"; }
.site-nav [data-menu="grupos"]::before,
.quick-actions [data-menu="grupos"]::before,
.module-list [data-menu="grupos"]::before { content: "G"; }
.site-nav [data-menu="materias"]::before,
.quick-actions [data-menu="materias"]::before,
.module-list [data-menu="materias"]::before { content: "M"; }
.site-nav [data-menu="historial"]::before,
.quick-actions [data-menu="historial"]::before,
.module-list [data-menu="historial"]::before { content: "H"; }
.site-nav [data-menu="promedios"]::before,
.quick-actions [data-menu="promedios"]::before,
.module-list [data-menu="promedios"]::before { content: "C"; }
.site-nav [data-menu="documentos"]::before,
.quick-actions [data-menu="documentos"]::before,
.module-list [data-menu="documentos"]::before { content: "D"; }

.site-nav [data-menu="avisos"]::before,
.quick-actions [data-menu="avisos"]::before,
.module-list [data-menu="avisos"]::before { content: "A"; }
.site-nav [data-menu="inscripcion"]::before,
.quick-actions [data-menu="inscripcion"]::before,
.module-list [data-menu="inscripcion"]::before { content: "I"; }
.site-nav [data-menu="reinscripcion"]::before,
.quick-actions [data-menu="reinscripcion"]::before,
.module-list [data-menu="reinscripcion"]::before { content: "R"; }
.site-nav [data-menu="recursamientoSem"]::before,
.quick-actions [data-menu="recursamientoSem"]::before,
.module-list [data-menu="recursamientoSem"]::before { content: "R"; }
.site-nav [data-menu="certificadosControl"]::before,
.quick-actions [data-menu="certificadosControl"]::before,
.module-list [data-menu="certificadosControl"]::before { content: "C"; }
.site-nav [data-menu="periodos"]::before,
.quick-actions [data-menu="periodos"]::before,
.module-list [data-menu="periodos"]::before { content: "F"; }
.add-button::before { content: "+"; }
#printButton::before { content: "P"; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.menu-button.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.12);
}

.site-nav .menu-button:hover {
  background: #efe4d3;
  color: #2D3F54;
}

.site-nav .menu-button:hover::before {
  background: #d8c29d;
  color: #2D3F54;
}

.site-nav .menu-button.active {
  background: transparent;
  color: #314257;
  border-radius: 8px;
  box-shadow: none;
}

.site-nav .structured-menu > .menu-button.active {
  background: transparent;
  color: #314257;
  border-radius: 8px;
  box-shadow: none;
}

.icon-button {
  width: 32px;
  min-width: 32px;
  padding: 0;
  font-size: 17px;
  line-height: 1;
}

.danger-icon {
  background: #f7e4e2;
  color: #9f1239;
}

.danger-icon:hover {
  background: #f2c7c2;
}

.app-page {
  display: none;
}

.app-page.active {
  display: block;
}

.aviso-form {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.aviso-form[hidden] {
  display: none;
}

.aviso-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.3fr) minmax(240px, 1.4fr);
  gap: 12px;
}

.aviso-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: #2D3F54;
}

.aviso-form input,
.aviso-form select,
.aviso-form textarea {
  width: 100%;
}

@media (max-width: 900px) {
  .aviso-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-page {
  gap: 16px;
  padding: 6px;
  background: #fff;
  border-radius: 18px;
  min-height: calc(100vh - 100px);
}

.dashboard-page.active {
  display: grid;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: #f8fbff;
  border: 0;
  border-radius: 16px;
}

.dashboard-hero h2 {
  font-size: 25px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  background: #fff;
  border: 1px solid #edf1f7;
  border-radius: 14px;
}

.dashboard-card span,
.dashboard-card small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.dashboard-card span b {
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  margin-left: 6px;
}

.dashboard-card strong {
  color: var(--blue);
  font-size: 26px;
  line-height: 1;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
}

.active-period-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-page > .active-period-row {
  grid-template-columns: 1fr;
}

body:not([data-profile="administrador"]) .active-period-row {
  grid-template-columns: 1fr;
}

.active-period-panel {
  margin-bottom: 0;
}

.dashboard-charts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-summary-panel {
  margin-top: 14px;
}

.dashboard-summary-table th,
.dashboard-summary-table td {
  font-size: 14px;
}

.dashboard-summary-table th:nth-child(1),
.dashboard-summary-table th:nth-child(2),
.dashboard-summary-table th:nth-child(4),
.dashboard-summary-table th:nth-child(5),
.dashboard-summary-table th:nth-child(6),
.dashboard-summary-table th:nth-child(7),
.dashboard-summary-table td:nth-child(1),
.dashboard-summary-table td:nth-child(2),
.dashboard-summary-table td:nth-child(4),
.dashboard-summary-table td:nth-child(5),
.dashboard-summary-table td:nth-child(6),
.dashboard-summary-table td:nth-child(7) {
  text-align: center;
}

.dashboard-chart {
  min-width: 0;
}

.chart-bars {
  display: grid;
  gap: 12px;
}

.chart-row {
  display: grid;
  gap: 6px;
}

.chart-label,
.chart-legend-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  font-size: 14px;
}

.chart-label strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-label span {
  color: var(--muted);
  font-weight: 800;
}

.stack-bar {
  display: flex;
  min-height: 32px;
  overflow: hidden;
  background: #fbf6ed;
  border: 1px solid #e5d5bb;
  border-radius: 6px;
}

.stack-segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 0 4px;
  color: #20364c;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.shift-tm {
  background: #ead7b5;
}

.shift-tv {
  background: #004C94;
  color: #ffffff;
}

.chart-legend-inline {
  justify-content: flex-start;
  color: var(--muted);
  font-weight: 700;
}

.active-period-form {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.period-year-form {
  display: grid;
  grid-template-columns: minmax(160px, 220px) auto minmax(160px, 1fr);
  gap: 10px;
  align-items: end;
  margin: 12px 0;
}

.import-form {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(140px, 190px) minmax(120px, 160px) auto;
  gap: 12px;
  align-items: end;
}

.teacher-import-form {
  display: grid;
  grid-template-columns: minmax(260px, 420px) auto minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

#userImportForm {
  grid-template-columns: minmax(260px, 420px) auto minmax(120px, 1fr) auto auto;
}

#teacherImportForm,
#subjectImportForm,
#tutorImportForm,
#adminAlumnosImportForm,
#directorImportForm {
  grid-template-columns: minmax(260px, 420px) auto minmax(120px, 1fr) auto auto;
}

.template-download-button {
  justify-self: end;
}

#userImportForm .template-download-button,
#userImportForm .add-user-button,
#teacherImportForm .template-download-button,
#teacherImportForm .add-user-button,
#subjectImportForm .template-download-button,
#subjectImportForm .add-user-button,
#tutorImportForm .template-download-button,
#tutorImportForm .add-user-button,
#adminAlumnosImportForm .template-download-button,
#adminAlumnosImportForm .add-user-button,
#directorImportForm .template-download-button,
#directorImportForm .add-user-button {
  justify-self: stretch;
  min-width: 150px;
  justify-content: center;
  text-align: center;
}

.period-year-form .status-ok {
  color: #146c43;
  font-weight: 800;
}

.period-year-form .status-error,
#teacherImportStatus.status-error,
#tutorImportStatus.status-error,
#userImportStatus.status-error,
#adminAlumnosImportStatus.status-error,
#directorImportStatus.status-error,
#subjectImportStatus.status-error {
  color: #b42318;
  font-weight: 800;
}

#importStatus.status-ok,
#activePeriodStatus,
#teacherImportStatus.status-ok,
#tutorImportStatus.status-ok,
#userImportStatus.status-ok,
#adminAlumnosImportStatus.status-ok,
#directorImportStatus.status-ok,
#subjectImportStatus.status-ok {
  color: #146c43;
  font-weight: 800;
}

#importStatus.status-error {
  color: #b42318;
  font-weight: 800;
}

.process-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d8e3f0;
  border-radius: 8px;
  background: #f8fbff;
}

.process-list[hidden] {
  display: none;
}

.process-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
  color: #314257;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.process-total strong,
.process-percent {
  color: var(--blue);
}

.process-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 52px;
  gap: 10px;
  align-items: center;
  color: #314257;
  font-size: 14px;
  font-weight: 700;
}

.process-bar {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #d8e3f0;
}

.process-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f4e79, #2f855a);
  transition: width 180ms ease;
}

.process-item.is-complete .process-fill {
  background: #146c43;
}

.process-item.is-error .process-fill {
  background: #b42318;
}

.import-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.import-summary article {
  border: 1px solid #d8e3f0;
  border-radius: 6px;
  background: #f8fbff;
  padding: 12px;
}

.import-summary strong {
  display: block;
  color: var(--blue);
  font-size: 22px;
}

.import-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quick-actions,
.module-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.quick-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-actions button,
.module-list button {
  min-height: 40px;
  border: 1px solid #cbd9e8;
  border-radius: 6px;
  background: #f7f9fc;
  color: #314257;
  cursor: pointer;
  font-weight: 700;
  text-align: left;
  padding: 9px 10px;
}

.quick-actions button:hover,
.module-list button:hover {
  background: #eef5fb;
  color: var(--blue);
}

body:not([data-active-menu="actas"]) .acta-preview {
  display: none;
}

body[data-active-menu="actas"] .acta-preview {
  display: none;
}

.main-stage,
body:not([data-active-menu="actas"]) .main-stage,
body[data-active-menu="actas"] .main-stage {
  grid-template-columns: 1fr;
}

.search-band,
.panel {
  background: var(--panel);
  border: 0;
  border-radius: 16px;
}

.search-band {
  padding: 16px;
  margin-bottom: 16px;
}

.search-band label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px);
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #c9d2df;
  border-radius: 6px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.results {
  display: grid;
  gap: 6px;
  max-height: 230px;
  overflow: auto;
  margin-top: 10px;
}

.result-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f8fafc;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.result-button span,
.result-button small,
td,
dd {
  overflow-wrap: anywhere;
}

.result-button:hover,
.result-button.active {
  border-color: var(--blue);
  background: #edf5fc;
}

.result-button.is-risk {
  border-color: #b42318;
  background: #fff1f0;
  color: #8f1d18;
}

.result-button.is-risk small {
  color: #9f1239;
}

.result-button.is-risk:hover,
.result-button.is-risk.active {
  border-color: #8f1d18;
  background: #ffd9d6;
}

.result-button small {
  color: var(--muted);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.panel {
  padding: 16px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.panel-head h2 {
  font-size: 21px;
  line-height: 1.2;
}

.panel-head h3 {
  color: var(--blue-dark);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 800;
}

.panel-head span {
  color: var(--muted);
  font-size: 14px;
}

.details {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.details dt {
  color: var(--muted);
  font-size: 14px;
}

.details dd {
  margin: 2px 0 0;
  font-weight: 700;
}

.main-panel {
  min-width: 0;
}

.table-wrap {
  overflow: auto;
  width: 100%;
  max-height: 340px;
  border: 1px solid #edf0f5;
  border-radius: 14px;
  -webkit-overflow-scrolling: touch;
}

.catalog-page {
  width: 100%;
  max-width: none;
}

.catalog-panel {
  width: 100%;
  min-height: 520px;
}

.catalog-search {
  margin-bottom: 12px;
}

.lookup-search-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.lookup-search-row.has-add {
  grid-template-columns: minmax(220px, 1fr) 180px;
}

.lookup-search-row .catalog-search {
  margin-bottom: 0;
}

.catalog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.report-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 12px 0 18px;
}

.app-page[data-page="reportesControl"] .control-report-card-grid {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
}

body[data-active-menu="certificadosControl"] .control-report-card-grid {
  display: none !important;
}

.control-report-search-section .catalog-search {
  display: block !important;
  width: 100% !important;
  min-height: 42px;
  margin-bottom: 0;
}

body[data-active-menu="certificadosControl"] .control-report-search-section {
  margin: 12px 0 18px !important;
  padding: 16px !important;
}

body[data-active-menu="certificadosControl"] .control-report-search-section .catalog-search {
  min-height: 42px !important;
  padding: 10px 14px !important;
}

.report-toolbar {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  min-height: 174px;
  padding: 16px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(60, 147, 250, 0.1), rgba(0, 212, 198, 0.08)),
    #ffffff;
  border: 1px solid #dce7f4;
  border-radius: 18px;
  box-shadow: 0 16px 32px rgba(45, 63, 84, 0.08);
}

.app-page[data-page="reportesControl"] .report-toolbar,
.app-page[data-page="certificadosControl"] .report-toolbar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 254, 0.96)),
    #ffffff;
  border-color: #d9e3ee;
  border-top: 3px solid #9f2241;
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(45, 63, 84, 0.09);
}

.app-page[data-page="reportesControl"] .report-toolbar::before,
.app-page[data-page="certificadosControl"] .report-toolbar::before {
  width: 4px;
  background: linear-gradient(180deg, #9f2241, #bc955c, #004c94);
}

.app-page[data-page="reportesControl"] .report-toolbar h3,
.app-page[data-page="certificadosControl"] .report-toolbar h3 {
  color: #17324d;
  font-size: 15px;
  letter-spacing: 0;
}

.app-page[data-page="reportesControl"] .report-toolbar p,
.app-page[data-page="certificadosControl"] .report-toolbar p {
  color: #4b5f74;
  font-size: 11.5px;
}

.app-page[data-page="reportesControl"] .catalog-table th,
.app-page[data-page="certificadosControl"] .catalog-table th {
  background: #17324d;
  color: #ffffff;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.app-page[data-page="reportesControl"] #enrollmentReportCount,
.app-page[data-page="certificadosControl"] #enrollmentReportCount {
  color: #17324d;
  font-weight: 800;
}

.report-toolbar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #004C94, #3C93FA, #00D4C6);
}

.report-toolbar h3 {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  max-width: 96%;
  color: #2D3F54;
  font-weight: 900;
  font-size: 16px;
  line-height: 1.22;
  text-align: left;
  margin: 0 0 7px;
}

.report-title-icon {
  width: 28px;
  min-width: 28px;
  height: 28px;
  object-fit: contain;
}

.report-toolbar p {
  color: #52647A;
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
}

.report-result-head h3 {
  font-size: 20px;
  font-weight: 800;
}

.cell-center {
  text-align: center !important;
}

#usuariosTable td[data-label="Turno"],
section[data-page="usuarios"] .catalog-table th.cell-center,
#usuariosTable td.cell-center[data-label="Turno"] {
  text-align: center !important;
  vertical-align: middle;
}

.report-button-row {
  display: flex;
  flex-wrap: wrap;
  align-self: end;
  justify-content: flex-start;
  gap: 8px;
}

.report-card-grid .report-button-row button {
  flex: 0 0 auto;
}

.history-detail-panel {
  margin-top: 18px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(244, 248, 252, 0.96), rgba(234, 244, 255, 0.88));
  border: 1px solid #dce7f4;
  border-radius: 18px;
}

.app-page[data-page="historial"] {
  justify-items: center;
}

.app-page[data-page="historial"] .catalog-panel {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.app-page[data-page="historial"] #historialSearch {
  display: block;
  max-width: 720px;
  margin: 0 auto 14px;
}

.history-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.history-detail-head h3 {
  margin: 0;
  color: #2D3F54;
  font-size: 17px;
  line-height: 1.25;
  text-align: left;
}

.history-detail-head span {
  color: #004C94;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.history-detail-wrap {
  max-height: 430px;
}

#historialTable td[data-label="Semestre"],
#historialTable td[data-label="Carrera"],
#historialTable td[data-label="Grupo"],
#historialTable td[data-label="Alumno"],
#historialTable td[data-label="No. control"],
#historialTable td[data-label="CURP"],
#historialTable td[data-label="A"],
#historialTable td[data-label="NA"] {
  text-align: center !important;
}

.subject-detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-weight: 900;
}

.mobile-label {
  display: none;
}

.kardex-detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-weight: 900;
}

body[data-profile="alumno"] .subject-detail-button.info-icon,
body[data-profile="alumno"] .kardex-detail-button.info-icon {
  width: auto;
  min-width: 0;
}

.history-teacher-cell {
  text-align: left !important;
}

.history-detail-wrap tbody tr.status-na td {
  background: oklch(97.3% 0.071 103.193) !important;
  color: #7a4f00 !important;
}

.history-detail-wrap tbody tr.status-np td {
  background: oklch(93.6% 0.032 17.717) !important;
  color: #8f1d18 !important;
}

.history-detail-wrap tbody tr.status-na:hover td {
  background: oklch(90.5% 0.182 98) !important;
}

.history-detail-wrap tbody tr.status-np:hover td {
  background: oklch(84.8% 0.092 18.334) !important;
}

.report-icon-button {
  width: 46px;
  min-width: 46px;
  height: 42px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
}

.number-icon-button {
  font-size: 15px;
  font-weight: 900;
}

.excel-icon-button {
  color: #107c41 !important;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.import-icon-button {
  display: inline-flex;
  place-items: center;
  width: auto;
  min-width: 150px;
  height: 42px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.icon-button img {
  display: block;
  width: 21px;
  height: 21px;
}

.report-table th:nth-child(5),
.report-table th:nth-child(8),
.report-table th:nth-child(9),
.report-table td:nth-child(5),
.report-table td:nth-child(8),
.report-table td:nth-child(9) {
  text-align: center;
}

.report-table th,
.report-table td {
  white-space: nowrap;
}

.report-table th.report-subject,
.report-table td.report-subject {
  min-width: 360px;
  text-align: left;
  white-space: nowrap;
}

.report-table th.report-number,
.report-table td.report-number {
  min-width: 54px;
  text-align: center;
  white-space: nowrap;
}

.report-table th.report-student,
.report-table td.report-student {
  min-width: 260px;
  text-align: left;
  white-space: nowrap;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.catalog-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 2px 0;
  color: var(--muted);
  font-size: 14px;
}

.catalog-pager .icon-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.catalog-wrap {
  width: 100%;
  max-height: 620px;
}

.catalog-table {
  min-width: 100%;
}

.catalog-table th,
.catalog-table td {
  font-size: 14px;
}

.catalog-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.catalog-table th.sortable::after {
  content: " ↕";
  color: var(--muted);
  font-size: 12px;
}

.catalog-table th.sortable[data-sort-dir="asc"]::after {
  content: " ↑";
  color: var(--blue);
}

.catalog-table th.sortable[data-sort-dir="desc"]::after {
  content: " ↓";
  color: var(--blue);
}

.catalog-table th[data-sort-field="ALUMNOS"],
.catalog-table th[data-sort-field="MA1"],
.catalog-table th[data-sort-field="MA2"],
.catalog-table th[data-sort-field="MA3"],
.catalog-table td[data-label="Alumnos"],
.catalog-table td[data-label="MA1"],
.catalog-table td[data-label="MA2"],
.catalog-table td[data-label="MA3"] {
  text-align: center;
}

.catalog-main {
  font-weight: 700;
}

.catalog-sub {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin-top: 4px;
}

.catalog-table td:nth-child(3) {
  text-align: left;
  font-weight: 400;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #edf0f5;
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 15px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edf3f8;
  color: #20364c;
  font-weight: 800;
}

tbody tr {
  transition: background-color 0.14s ease, box-shadow 0.14s ease;
}

tbody tr:hover {
  background: oklch(92.9% 0.013 255.508);
  box-shadow: inset 3px 0 0 #8fa3bf;
}

#recordsTable tr.active {
  background: #f3f4f6;
  box-shadow: inset 3px 0 0 #6b7280;
}

tr.status-risk td {
  background: oklch(97.1% 0.013 17.38);
  color: #8f1d18;
}

tr.status-downloaded td {
  background: #ecfdf3;
  color: #14532d;
}

tr.status-downloaded:hover td {
  background: #bbf7d0;
}

tr.status-missing td {
  background: #fef9c3;
  color: #854d0e;
}

tr.status-missing:hover td {
  background: #facc15;
}

tr.status-na td {
  background: oklch(97.3% 0.071 103.193);
  color: #7a4f00;
}

tr.status-np td {
  background: oklch(93.6% 0.032 17.717);
  color: #8f1d18;
}

tr.status-na:hover td {
  background: oklch(90.5% 0.182 98);
}

tr.status-np:hover td {
  background: oklch(84.8% 0.092 18.334);
}

tr.status-risk td.status-na,
td.status-na {
  background: oklch(97.3% 0.071 103.193);
  color: #7a4f00;
  font-weight: 900;
  text-align: center;
}

tr.status-risk td.status-np,
td.status-np {
  background: oklch(93.6% 0.032 17.717);
  color: #8f1d18;
  font-weight: 900;
  text-align: center;
}

.grades-modal-card td.status-na {
  background: oklch(97.3% 0.071 103.193) !important;
  color: #7a4f00;
}

.grades-modal-card td.status-np {
  background: oklch(93.6% 0.032 17.717) !important;
  color: #8f1d18;
}

.grade-detail-table tr.status-na td {
  background: oklch(97.3% 0.071 103.193) !important;
  color: #7a4f00;
}

.grade-detail-table tr.status-np td {
  background: oklch(93.6% 0.032 17.717) !important;
  color: #8f1d18;
}

.grade-detail-table tr.status-na:hover td {
  background: oklch(94.5% 0.129 101.54) !important;
}

.grade-detail-table tr.status-np:hover td {
  background: oklch(88.5% 0.062 18.334) !important;
}

td:nth-child(3) {
  font-weight: 400;
}

.records-table th:nth-child(n+3):nth-child(-n+10),
#recordsTable td:nth-child(n+3):nth-child(-n+10) {
  text-align: center;
  vertical-align: middle;
}

.choose-record,
#printButton {
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  padding: 8px 10px;
  cursor: pointer;
  white-space: nowrap;
}

.choose-record:hover,
#printButton:hover {
  background: var(--blue-dark);
}

.form-panel {
  margin-top: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.acta-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.acta-info-row span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef4fb;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.acta-info-row strong {
  color: var(--ink);
}

.folio-label {
  display: flex;
  align-items: center;
  min-height: 39px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef4fb;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.enrollment-panel {
  max-width: 1180px;
  width: min(100%, 1180px);
  margin-inline: auto;
}

.app-page[data-page="importacion"] .catalog-panel,
.app-page[data-page="documentos"] .catalog-panel {
  max-width: 1180px;
  width: min(100%, 1180px);
  margin-inline: auto;
}

.enrollment-form {
  display: grid;
  gap: 18px;
}

.enrollment-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbff;
}

.section-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-subhead h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.enrollment-search-row {
  display: grid;
  grid-template-columns: minmax(220px, 420px) auto auto auto;
  gap: 12px;
  align-items: end;
}

.app-page[data-page="inscripcion"] .enrollment-search-row {
  grid-template-columns: minmax(360px, 1fr) max-content max-content max-content;
}

.app-page[data-page="inscripcion"] .enrollment-search-row .login-button {
  min-width: 116px;
  padding-left: 10px;
  padding-right: 10px;
  white-space: nowrap;
}

.recursamiento-panel .recursamiento-search-row {
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr) auto;
}

.selectable-row {
  cursor: pointer;
}

.enrollment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.enrollment-grid label,
.enrollment-search-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.enrollment-form input[readonly],
.readonly-grid input[readonly] {
  background: #eef4fb;
  color: #20364c;
  border-color: #9fb7d3;
  box-shadow: none;
  cursor: default;
  font-weight: 500;
}

.enrollment-form input:not([readonly]),
.enrollment-form select:not([disabled]),
.enrollment-form textarea:not([readonly]) {
  background: #fff8e6;
  border-color: #e6c46a;
  box-shadow: none;
}

.enrollment-form input:not([readonly]):focus,
.enrollment-form select:not([disabled]):focus,
.enrollment-form textarea:not([readonly]):focus {
  background: #fffdf4;
  border-color: #006ecf;
  box-shadow: 0 0 0 3px rgba(60, 147, 250, 0.16);
}

.enrollment-form .enrollment-field-editable {
  background: #fff8e6 !important;
  border-color: #e6c46a !important;
  box-shadow: none !important;
  color: #0f2740;
}

.enrollment-form .enrollment-field-readonly {
  background: #eef4fb !important;
  border-color: #9fb7d3 !important;
  box-shadow: none !important;
  color: #20364c;
  cursor: default;
}

.enrollment-form input,
.enrollment-form select,
.enrollment-form textarea {
  text-transform: uppercase;
}

.enrollment-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 260px));
  justify-content: flex-start;
  align-items: end;
  gap: 12px;
  margin-top: auto;
  padding-top: 4px;
}

.enrollment-actions .login-button {
  width: 100%;
}

.control-school-action-button {
  justify-self: start;
  align-self: end;
}

#enrollmentStatus[data-tone="ok"] {
  color: #047857;
}

#enrollmentStatus {
  align-self: flex-end;
  margin-bottom: 2px;
  text-align: right;
}

#enrollmentStatus[data-tone="error"] {
  color: #b91c1c;
}

#inscriptionCatalogStatus[data-tone="ok"] {
  color: #047857;
}

#inscriptionCatalogStatus[data-tone="error"] {
  color: #b91c1c;
}

.enrollment-pdf-button {
  font-size: 10px;
  line-height: 1;
  padding-inline: 8px;
}

.grade-change-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.grade-change-grid div {
  display: grid;
  grid-template-columns: 34px minmax(42px, 0.5fr) minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.grade-change-grid span {
  font-weight: 800;
  color: var(--blue);
}

.grade-change-grid output {
  min-height: 34px;
  padding: 8px;
  border-radius: 6px;
  background: #eaf0f7;
  color: var(--ink);
  text-align: center;
}

.grade-change-grid input {
  min-width: 0;
}

.catalog-table td[data-label="Alumnos"],
.catalog-table td[data-label="Riesgo"],
.catalog-table td[data-label="MA1"],
.catalog-table td[data-label="MA2"],
.catalog-table td[data-label="MA3"] {
  text-align: center;
}

.catalog-table th[data-sort-field="ALUMNOS"],
.catalog-table th[data-sort-field="RIESGO"],
.catalog-table th[data-sort-field="MA1"],
.catalog-table th[data-sort-field="MA2"],
.catalog-table th[data-sort-field="MA3"] {
  text-align: center;
}

.acta-preview {
  background: #dce3ec;
  padding: 24px;
  overflow: auto;
}

.acta-paper {
  min-height: calc(100vh - 48px);
  background: white;
  color: #111827;
  padding: 42px;
  box-shadow: var(--shadow);
}

.acta-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 3px solid var(--blue);
  padding-bottom: 18px;
}

.acta-header p,
.acta-meta,
.acta-text {
  color: #374151;
}

.acta-header h2 {
  margin-top: 8px;
  font-size: 24px;
  text-transform: uppercase;
}

.acta-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0;
  font-size: 13px;
}

.acta-text {
  margin: 18px 0;
  line-height: 1.55;
}

.acta-table {
  margin: 18px 0;
  border-top: 1px solid #cfd7e3;
}

.acta-table th {
  width: 32%;
  position: static;
  background: #f2f6fa;
}

.acta-table td {
  width: 68%;
}

.signatures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 72px;
  text-align: center;
}

.signatures span {
  display: block;
  border-bottom: 1px solid #111827;
  height: 28px;
}

.signatures p {
  margin-top: 8px;
  font-size: 12px;
  text-transform: uppercase;
}

.empty {
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.48);
}

.modal-backdrop.open {
  display: grid;
}

.modal-card {
  width: min(100%, 680px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.grades-modal-card {
  width: fit-content;
  min-width: min(96vw, 760px);
  max-width: min(96vw, 1480px);
}

.grades-modal-card .panel-head {
  align-items: flex-start;
}

.grades-modal-wrap {
  max-height: calc(100vh - 190px);
}

.grades-modal-wrap table {
  table-layout: fixed;
  width: max-content;
  min-width: 1120px;
}

.recursamiento-panel .enrollment-grid {
  grid-template-columns: minmax(180px, 260px) minmax(180px, 260px) minmax(260px, 1fr) auto;
}

.recursamiento-panel .recursamiento-search-row {
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr) minmax(160px, auto);
}

.recursamiento-xls-button {
  align-self: end;
  min-height: 44px;
  justify-content: center;
  background: #107c41 !important;
  border-color: #107c41 !important;
  color: #ffffff !important;
  font-weight: 900;
}

.recursamiento-xls-button:hover {
  background: #0b6a35 !important;
  border-color: #0b6a35 !important;
  color: #ffffff !important;
}

.recursamiento-subject-wrap {
  max-height: 430px;
}

.recursamiento-subject-wrap select {
  min-width: 90px;
}

.recursamiento-subject-wrap input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.recursamiento-subject-wrap tbody tr.status-na td {
  background: oklch(97.3% 0.071 103.193) !important;
  color: #7a4f00 !important;
}

body.is-authenticated .recursamiento-subject-wrap .catalog-table tbody tr.status-na td {
  background: oklch(97.3% 0.071 103.193) !important;
  color: #7a4f00 !important;
}

.recursamiento-subject-wrap tbody tr.status-np td {
  background: oklch(93.6% 0.032 17.717) !important;
  color: #8f1d18 !important;
}

body.is-authenticated .recursamiento-subject-wrap .catalog-table tbody tr.status-np td {
  background: oklch(93.6% 0.032 17.717) !important;
  color: #8f1d18 !important;
}

.recursamiento-subject-wrap tbody tr.status-na:hover td {
  background: oklch(90.5% 0.182 98) !important;
  color: #5f3b00 !important;
}

.recursamiento-subject-wrap tbody tr.status-np:hover td {
  background: oklch(84.8% 0.092 18.334) !important;
  color: #7f1d1d !important;
}

body.is-authenticated .recursamiento-subject-wrap .catalog-table tbody tr.status-na:hover td {
  background: oklch(90.5% 0.182 98) !important;
  color: #5f3b00 !important;
}

body.is-authenticated .recursamiento-subject-wrap .catalog-table tbody tr.status-np:hover td {
  background: oklch(84.8% 0.092 18.334) !important;
  color: #7f1d1d !important;
}

.recursamiento-materia-cursa-select {
  min-width: 220px;
}

.grade-student-row {
  cursor: pointer;
}

.grade-student-row td {
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grade-student-row:hover td,
.grade-detail-table tbody tr:hover td {
  background: oklch(92.9% 0.013 255.508);
}

.grade-student-row td:first-child::before {
  content: "+ ";
  font-weight: 900;
  color: var(--blue);
}

.grades-modal-wrap th:nth-child(1),
.grades-modal-wrap td:nth-child(1) { width: 76px; }
.grades-modal-wrap th:nth-child(2),
.grades-modal-wrap td:nth-child(2) { width: 52px; text-align: center; }
.grades-modal-wrap th:nth-child(3),
.grades-modal-wrap td:nth-child(3),
.grades-modal-wrap th:nth-child(4),
.grades-modal-wrap td:nth-child(4) { width: 62px; text-align: center; }
.grades-modal-wrap th:nth-child(5),
.grades-modal-wrap td:nth-child(5) { width: 150px; }
.grades-modal-wrap th:nth-child(6),
.grades-modal-wrap td:nth-child(6) { width: 92px; }
.grades-modal-wrap th:nth-child(7),
.grades-modal-wrap td:nth-child(7) { width: 250px; }
.grades-modal-wrap th:nth-child(8),
.grades-modal-wrap td:nth-child(8),
.grades-modal-wrap th:nth-child(9),
.grades-modal-wrap td:nth-child(9),
.grades-modal-wrap th:nth-child(10),
.grades-modal-wrap td:nth-child(10),
.grades-modal-wrap th:nth-child(11),
.grades-modal-wrap td:nth-child(11) { width: 62px; text-align: center; }

.grade-detail-table {
  table-layout: fixed;
  min-width: 1160px;
  width: 100%;
}

.grade-detail-modal-card {
  width: min(94vw, 1280px);
}

.grade-detail-wrap {
  max-height: calc(100vh - 190px);
}

.grade-detail-table th,
.grade-detail-table td {
  font-size: 12px;
  padding: 8px 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grade-detail-table th:nth-child(1),
.grade-detail-table td:nth-child(1) { width: 230px; }
.grade-detail-table th:nth-child(2),
.grade-detail-table td:nth-child(2) { width: 220px; }
.grade-detail-table th:nth-child(3),
.grade-detail-table td:nth-child(3) { width: 92px; }
.grade-detail-table th:nth-child(n+4):nth-child(-n+10),
.grade-detail-table td:nth-child(n+4):nth-child(-n+10) { width: 52px; }
.grade-detail-table th:nth-child(11),
.grade-detail-table td:nth-child(11) { width: 70px; }

.grade-detail-table th:nth-child(n+4),
.grade-detail-table td:nth-child(n+4) {
  text-align: center;
  vertical-align: middle;
}

.attendance-card {
  width: min(94vw, 760px);
  gap: 18px;
  padding: 22px;
  border: 1px solid #d8e4f1;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(60, 147, 250, 0.16), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f7fbff 52%, #eef8ff 100%);
  box-shadow: 0 24px 60px rgba(45, 63, 84, 0.22);
}

.attendance-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.attendance-card-top p {
  color: #006ECF;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.attendance-card-top h2 {
  margin-top: 6px;
  color: #2D3F54;
  font-size: 22px;
  line-height: 1.2;
}

.attendance-card-top span {
  display: inline-flex;
  margin-top: 8px;
  color: #52647A;
  font-size: 13px;
  font-weight: 800;
}

.attendance-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.attendance-metric {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 142px;
  padding: 16px;
  border: 1px solid #dceaf7;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(45, 63, 84, 0.1);
}

.attendance-metric-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: #eaf6ff;
  color: #004C94;
  font-size: 18px;
  font-weight: 900;
}

.attendance-metric h3 {
  color: #2D3F54;
  font-size: 15px;
  font-weight: 900;
}

.attendance-metric p {
  margin-top: 2px;
  color: #52647A;
  font-size: 12px;
  font-weight: 800;
}

.attendance-metric strong {
  grid-column: 1 / -1;
  color: #004C94;
  font-size: 34px;
  line-height: 1;
}

.attendance-metric small {
  grid-column: 1 / -1;
  color: #028183;
  font-size: 13px;
  font-weight: 900;
}

@media (max-width: 720px) {
  .attendance-card {
    padding: 16px;
  }

  .attendance-card-top {
    align-items: stretch;
    flex-direction: column;
  }

  .attendance-metrics {
    grid-template-columns: 1fr;
  }

  .attendance-metric {
    min-height: 118px;
  }
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.modal-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.papers-checklist {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 6px 0 4px;
}

.papers-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 8px 0 4px;
}

.papers-modal-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.papers-toggle-button {
  min-height: 36px;
  padding: 8px 14px;
}

.papers-checklist .paper-check-item {
  align-items: center;
  background: #f7fbff;
  border: 1px solid #d8e8f8;
  border-radius: 12px;
  color: var(--ink);
  display: flex;
  font-size: 13px;
  gap: 10px;
  letter-spacing: 0;
  line-height: 1.25;
  min-height: 48px;
  padding: 10px 12px;
}

.paper-check-item input {
  accent-color: #0057a8;
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
}

#enrollmentPapersObservation {
  min-height: 92px;
  resize: vertical;
  text-transform: uppercase;
}

#enrollmentPapersType {
  background: #fff;
  border: 1px solid #d8e2ef;
  border-radius: 12px;
  color: var(--ink);
  min-height: 42px;
  padding: 8px 10px;
  text-transform: uppercase;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.audit-filter-row {
  align-items: end;
  display: grid;
  column-gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.audit-filter-row .audit-field {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 6px;
  margin: 0;
  min-width: 0;
  text-transform: uppercase;
}

.audit-button-field {
  display: grid;
  gap: 6px;
  margin: 0;
  min-width: 0;
}

.audit-button-field > span {
  display: block;
  font-size: 12px;
  font-weight: 900;
  line-height: normal;
}

.audit-filter-row .audit-field > .catalog-search,
.audit-filter-row .audit-field > input[type="date"] {
  background: #fff;
  border: 1px solid #d8e2ef;
  border-radius: 12px;
  color: var(--ink);
  display: block;
  height: 46px;
  max-width: none;
  min-height: 46px;
  min-width: 0;
  padding: 9px 12px;
  width: 100%;
}

.audit-filter-row .audit-button-field > .login-button {
  align-self: end;
  height: 46px;
  min-height: 46px;
  width: 100%;
}

@media (max-width: 860px) {
  .audit-filter-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .main-stage {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-charts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .active-period-form {
    grid-template-columns: 1fr;
  }

  .period-year-form {
    grid-template-columns: 1fr;
  }

  .import-form {
    grid-template-columns: minmax(260px, 1fr) minmax(130px, 180px) minmax(110px, 150px) auto;
  }

  .teacher-import-form {
    grid-template-columns: 1fr 1fr;
  }

  .teacher-import-form label,
  .teacher-import-form [id$="Status"] {
    grid-column: 1 / -1;
  }

  .teacher-import-form button[type="submit"] {
    grid-column: 1 / -1;
  }

  .import-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .acta-paper {
    min-height: auto;
  }
}

@media (max-width: 860px) {
  .site-header-inner {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
  }

  .hamburger-button {
    display: grid;
  }

  .site-header .brand-lockup {
    min-width: 0;
  }

  .header-logo {
    width: clamp(72px, 22vw, 96px);
  }

  .site-header .brand-lockup > div:last-child {
    min-width: 0;
  }

  .site-header h1,
  .site-header .brand-domain,
  .site-header .system-version {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .global-search {
    grid-column: 1 / -1;
    order: 3;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .site-nav {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 28;
    width: min(86vw, 340px);
    overflow-y: auto;
    transform: translateX(-104%);
    transition: transform 180ms ease;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 18px 16px 28px;
    box-shadow: 18px 0 42px rgba(15, 23, 42, 0.18);
  }

  body.mobile-nav-open .site-nav {
    transform: translateX(0);
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 27;
    display: none;
    border: 0;
    background: rgba(15, 23, 42, 0.42);
  }

  body.mobile-nav-open .nav-backdrop {
    display: block;
  }

  .structured-menu {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .structured-menu > .menu-button {
    grid-column: auto;
  }

  .workspace,
  .acta-preview {
    padding: 16px;
  }

  .content-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .import-form {
    grid-template-columns: 1fr;
  }

  .teacher-import-form {
    grid-template-columns: 1fr;
  }

  .teacher-import-form label,
  .teacher-import-form [id$="Status"],
  .teacher-import-form button {
    grid-column: auto;
  }

  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-width: 0;
    width: 100%;
  }

  .dashboard-charts {
    grid-template-columns: 1fr;
  }

  .dashboard-summary-table,
  .report-table,
  .grade-detail-table,
  .grades-modal-wrap table {
    min-width: 760px;
  }
}

@media (max-width: 680px) {
  body {
    background: #eef3f8;
  }

  .site-header-inner {
    display: grid;
    gap: 12px;
    padding: 14px 12px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }

  .global-search {
    grid-template-columns: 1fr;
    border-radius: 16px;
    min-height: 44px;
  }

  .global-search span {
    display: none;
  }

  .site-nav {
    padding: 10px 12px;
  }

  .structured-menu {
    grid-template-columns: 1fr;
  }

  .main-stage {
    display: block;
  }

  .workspace,
  .acta-preview {
    padding: 10px;
  }

  .topbar {
    display: grid;
    gap: 12px;
  }

  .topbar-actions {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .session-chip {
    text-align: center;
    max-width: none;
  }

  h1 {
    font-size: 20px;
  }

  h2 {
    font-size: 18px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-hero {
    display: grid;
  }

  .dashboard-grid,
  .quick-actions {
    grid-template-columns: 1fr;
  }

  .stat {
    text-align: left;
  }

  .app-menu,
  .site-nav .app-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results {
    max-height: 260px;
  }

  .panel,
  .search-band {
    padding: 12px;
    border-radius: 10px;
  }

  .catalog-panel {
    min-height: auto;
  }

  .catalog-pager {
    justify-content: center;
  }

  .catalog-actions,
  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .modal-grid {
    grid-template-columns: 1fr;
  }

  .lookup-search-row,
  .lookup-search-row.has-add {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    max-height: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  #recordsTable tr {
    padding: 10px;
    border-bottom: 1px solid #e5ebf2;
  }

  #recordsTable tr:last-child {
    border-bottom: 0;
  }

  #recordsTable td {
    display: grid;
    grid-template-columns: 102px minmax(0, 1fr);
    gap: 8px;
    border: 0;
    padding: 5px 0;
    text-align: left;
  }

  #recordsTable td::before {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  #recordsTable td:nth-child(1)::before {
    content: "Materia";
  }

  #recordsTable td:nth-child(2)::before {
    content: "Docente";
  }

  #recordsTable td:nth-child(3)::before {
    content: "Calificación";
  }

  #recordsTable td:nth-child(4)::before {
    content: "Grupo";
  }

  #recordsTable td:nth-child(5) {
    display: block;
  }

  #recordsTable td:nth-child(3)::before {
    content: "P1";
  }

  #recordsTable td:nth-child(4)::before {
    content: "P2";
  }

  #recordsTable td:nth-child(5) {
    display: grid;
  }

  #recordsTable td:nth-child(5)::before {
    content: "P3";
  }

  #recordsTable td:nth-child(6)::before {
    content: "A1";
  }

  #recordsTable td:nth-child(7)::before {
    content: "A2";
  }

  #recordsTable td:nth-child(8)::before {
    content: "A3";
  }

  #recordsTable td:nth-child(9)::before {
    content: "TA";
  }

  #recordsTable td:nth-child(10)::before {
    content: "CAL";
  }

  #recordsTable td:nth-child(11) {
    display: block;
  }

  .catalog-table tr {
    padding: 10px;
    border-bottom: 1px solid #e5ebf2;
  }

  .catalog-table tr:last-child {
    border-bottom: 0;
  }

  .catalog-table td {
    display: grid;
    grid-template-columns: 102px minmax(0, 1fr);
    gap: 8px;
    border: 0;
    padding: 5px 0;
    text-align: left;
  }

  .catalog-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .choose-record,
  #printButton {
    width: 100%;
    min-height: 42px;
  }

  .acta-paper {
    padding: 20px;
    box-shadow: none;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .acta-header,
  .acta-meta,
  .signatures {
    display: grid;
    grid-template-columns: 1fr;
  }

  .acta-header h2 {
    font-size: 20px;
  }

  .acta-table tr,
  .acta-table th,
  .acta-table td {
    display: block;
    width: 100%;
  }

  .acta-table th {
    padding-bottom: 4px;
  }

  .acta-table td {
    padding-top: 4px;
  }
}

@media (max-width: 680px) {
  .dashboard-summary-table,
  .report-table,
  .grade-detail-table,
  .grades-modal-wrap table {
    display: table;
    min-width: 780px;
  }

  .dashboard-summary-table thead,
  .report-table thead,
  .grade-detail-table thead,
  .grades-modal-wrap thead {
    display: table-header-group;
  }

  .dashboard-summary-table tbody,
  .report-table tbody,
  .grade-detail-table tbody,
  .grades-modal-wrap tbody {
    display: table-row-group;
  }

  .dashboard-summary-table tr,
  .report-table tr,
  .grade-detail-table tr,
  .grades-modal-wrap tr {
    display: table-row;
  }

  .dashboard-summary-table th,
  .dashboard-summary-table td,
  .report-table th,
  .report-table td,
  .grade-detail-table th,
  .grade-detail-table td,
  .grades-modal-wrap th,
  .grades-modal-wrap td {
    display: table-cell;
  }

  .report-toolbar {
    display: grid;
    align-items: stretch;
  }

  .report-button-row {
    justify-content: stretch;
  }

  .report-button-row button {
    flex: 1 1 160px;
  }

  .modal-backdrop {
    padding: 8px;
    align-items: stretch;
  }

  .modal-card,
  .grades-modal-card,
  .grade-detail-modal-card {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    padding: 12px;
  }

  .grades-modal-wrap,
  .grade-detail-wrap {
    max-height: calc(100dvh - 150px);
  }
}

@media (max-width: 992px) {
  .site-header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .site-header .brand-lockup {
    display: grid;
    grid-template-columns: 40px 46px minmax(0, 1fr);
    gap: 10px;
    width: 100%;
  }

  .global-search,
  .topbar-actions {
    grid-column: 1 / -1;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .session-chip,
  .session-stack {
    width: 100%;
  }

  .logout-button {
    width: 38px;
    min-width: 38px;
    justify-self: end;
  }

  .workspace {
    width: 100%;
    min-width: 0;
  }

  .dashboard-grid,
  .dashboard-charts,
  .content-grid,
  .form-grid,
  .search-row,
  .active-period-form,
  .import-form,
  .teacher-import-form,
  .modal-grid {
    grid-template-columns: 1fr !important;
  }

  .stats,
  .import-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .site-header {
    position: sticky;
  }

  .site-header-inner {
    padding: 10px;
  }

  .site-header .brand-lockup {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .site-header .brand-mark {
    display: none;
  }

  .global-search {
    min-height: 42px;
    padding: 0 12px;
  }

  .app-page.active,
  .panel,
  .catalog-panel,
  .search-band,
  .dashboard-hero,
  .report-toolbar {
    border-radius: 10px !important;
  }

  .dashboard-card,
  .stat {
    border-radius: 10px;
  }

  .table-wrap {
    max-width: 100%;
    overflow-x: auto;
  }

  .table-wrap table:not(.catalog-table):not(#recordsTable),
  .report-table,
  .dashboard-summary-table,
  .grade-detail-table,
  .grades-modal-wrap table {
    display: table !important;
    width: max-content;
    min-width: 760px;
  }

  .table-wrap table:not(.catalog-table):not(#recordsTable) thead,
  .report-table thead,
  .dashboard-summary-table thead,
  .grade-detail-table thead,
  .grades-modal-wrap thead {
    display: table-header-group !important;
  }

  .table-wrap table:not(.catalog-table):not(#recordsTable) tbody,
  .report-table tbody,
  .dashboard-summary-table tbody,
  .grade-detail-table tbody,
  .grades-modal-wrap tbody {
    display: table-row-group !important;
  }

  .table-wrap table:not(.catalog-table):not(#recordsTable) tr,
  .report-table tr,
  .dashboard-summary-table tr,
  .grade-detail-table tr,
  .grades-modal-wrap tr {
    display: table-row !important;
  }

  .table-wrap table:not(.catalog-table):not(#recordsTable) th,
  .table-wrap table:not(.catalog-table):not(#recordsTable) td,
  .report-table th,
  .report-table td,
  .dashboard-summary-table th,
  .dashboard-summary-table td,
  .grade-detail-table th,
  .grade-detail-table td,
  .grades-modal-wrap th,
  .grades-modal-wrap td {
    display: table-cell !important;
  }

  .catalog-table,
  #recordsTable {
    width: 100%;
    min-width: 0;
  }

  .app-page[data-page="historial"] .catalog-table {
    display: table !important;
    width: max-content;
    min-width: 920px;
  }

  .app-page[data-page="historial"] .catalog-table thead {
    display: table-header-group !important;
  }

  .app-page[data-page="historial"] .catalog-table tbody {
    display: table-row-group !important;
  }

  .app-page[data-page="historial"] .catalog-table tr {
    display: table-row !important;
    padding: 0;
    border: 0;
    border-radius: 0;
  }

  .app-page[data-page="historial"] .catalog-table th,
  .app-page[data-page="historial"] .catalog-table td {
    display: table-cell !important;
  }

  .app-page[data-page="historial"] .catalog-table td::before {
    content: none !important;
  }

  .catalog-table tbody,
  #recordsTable tbody {
    display: grid;
    gap: 10px;
  }

  .catalog-table tr,
  #recordsTable tr {
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
  }

  .catalog-table td,
  #recordsTable td {
    grid-template-columns: minmax(92px, 38%) minmax(0, 1fr);
    align-items: start;
    word-break: break-word;
  }

  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-wrap {
    overflow-x: visible;
  }

  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-table {
    display: block !important;
    width: 100%;
    min-width: 0;
  }

  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-table thead {
    display: none !important;
  }

  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-table tbody {
    display: grid !important;
    gap: 12px;
  }

  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-table tr {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
  }

  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-table th,
  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-table td {
    display: grid !important;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 2px;
    padding: 4px 0;
    border: 0;
    text-align: center !important;
  }

  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-table td[data-label="Alumno"],
  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-table td[data-label="No. control"],
  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-table td[data-label="CURP"],
  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-table td[data-label="Acciones"] {
    grid-column: 1 / -1;
  }

  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-table td[data-label="Turno"],
  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-table td[data-label="Semestre"] {
    grid-column: span 3;
  }

  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-table td[data-label="Carrera"],
  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-table td[data-label="Grupo"],
  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-table td[data-label="Materias"],
  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-table td[data-label="A"],
  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-table td[data-label="NA"],
  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-table td[data-label="NP"] {
    grid-column: span 2;
  }

  body[data-profile="alumno"] .app-page[data-page="historial"] .catalog-table td::before {
    content: attr(data-label) !important;
    color: #52647A;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  body[data-profile="alumno"] .app-page[data-page="historial"] .kardex-detail-button {
    width: min(100%, 220px);
    min-width: 0;
    min-height: 38px;
    padding: 8px 14px;
    font-size: 12px;
  }

  #historialDetailModal .history-detail-wrap table {
    display: table !important;
    width: max-content;
    min-width: 900px;
  }

  #historialDetailModal .history-detail-wrap thead {
    display: table-header-group !important;
  }

  #historialDetailModal .history-detail-wrap tbody {
    display: table-row-group !important;
  }

  #historialDetailModal .history-detail-wrap tr {
    display: table-row !important;
  }

  #historialDetailModal .history-detail-wrap th,
  #historialDetailModal .history-detail-wrap td {
    display: table-cell !important;
  }

  #historialDetailModal .history-detail-wrap td::before {
    content: none !important;
  }

  .row-actions,
  .catalog-actions,
  .modal-actions,
  .report-button-row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .row-actions .icon-button,
  .catalog-actions button,
  .modal-actions button,
  .report-button-row button {
    width: 100%;
  }

  .modal-backdrop {
    padding: 6px;
  }

  .modal-card {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 10px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .site-header h1 {
    font-size: 16px;
  }

  .system-version,
  .brand-domain,
  .eyebrow {
    font-size: 11px;
  }

  .login-card {
    padding: 18px;
  }

  .workspace,
  .acta-preview {
    padding: 8px;
  }

  .stats,
  .import-summary {
    grid-template-columns: 1fr;
  }

  .catalog-table td,
  #recordsTable td {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

@media (max-width: 430px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
  }

  .site-header-inner {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
  }

  .site-header .brand-lockup {
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
  }

  .hamburger-button {
    width: 36px;
    height: 36px;
  }

  .site-header h1 {
    max-width: calc(100vw - 68px);
    font-size: 15px;
    line-height: 1.15;
  }

  .site-header .system-version {
    max-width: calc(100vw - 68px);
  }

  .global-search {
    width: 100%;
    min-height: 40px;
    padding: 0 10px;
  }

  .topbar-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .session-chip {
    min-height: 34px;
    padding: 7px 10px;
    overflow-wrap: anywhere;
  }

  .logout-button {
    justify-content: center;
    width: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .site-nav {
    width: min(92vw, 340px);
    padding: 12px 10px 20px;
  }

  .nav-title {
    margin: 0 8px 8px;
  }

  .site-nav .menu-button {
    min-height: 38px;
    padding: 7px 10px;
  }

  .workspace {
    padding: 8px;
  }

  .app-page.active,
  .dashboard-page,
  .panel,
  .catalog-panel,
  .search-band {
    width: 100%;
    max-width: 100%;
  }

  .dashboard-page {
    min-height: auto;
    padding: 4px;
    gap: 10px;
  }

  .dashboard-hero {
    padding: 12px;
  }

  .dashboard-hero h2 {
    font-size: 18px;
  }

  .dashboard-card {
    padding: 12px;
  }

  .dashboard-card strong {
    font-size: 22px;
  }

  .panel-head {
    display: grid;
    gap: 8px;
    align-items: start;
  }

  .panel-head h2 {
    font-size: 17px;
  }

  .catalog-search,
  .global-search input,
  input,
  select,
  textarea {
    min-width: 0;
  }

  .table-wrap {
    border-radius: 10px;
  }

  .catalog-table tr,
  #recordsTable tr {
    padding: 8px;
  }

  .catalog-table td,
  #recordsTable td {
    font-size: 14px;
  }

  .modal-card,
  .grades-modal-card,
  .grade-detail-modal-card {
    width: calc(100vw - 8px);
    max-height: calc(100dvh - 8px);
    padding: 10px;
  }

  .report-toolbar {
    padding: 10px;
  }

  .report-toolbar h3 {
    font-size: 16px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .workspace,
  .login-screen,
  .site-header,
  .site-nav,
  .mobile-tabs {
    display: none;
  }

  .app-shell,
  .acta-preview {
    display: block !important;
    padding: 0;
    min-height: 0;
    background: #fff;
  }

  .acta-paper {
    box-shadow: none;
    border: 0;
    min-height: 0;
    padding: 18mm;
  }
}

/* App dashboard theme inspired by Alina-style admin layouts */
body {
  background: #f4f8fc;
}

body.is-authenticated .site-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e8edf5 !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05) !important;
}

body.is-authenticated .site-header-inner {
  min-height: 74px;
  padding: 12px 24px;
}

body.is-authenticated .site-header h1,
.topbar h1 {
  color: #2D3F54;
  font-size: 18px;
  font-weight: 800;
}

body.is-authenticated .system-version {
  color: #7b8496;
  font-size: 12px;
  font-weight: 700;
}

body.is-authenticated .brand-domain {
  color: #028183;
  font-size: 12px;
}

body.is-authenticated .global-search {
  min-height: 44px;
  background: #f4f7fb;
  border: 1px solid #e4eaf2;
  color: #8a94a6;
  box-shadow: none !important;
}

body.is-authenticated .global-search:focus-within {
  background: #ffffff;
  border-color: #3C93FA;
  box-shadow: 0 10px 22px rgba(0, 110, 207, 0.12) !important;
}

body.is-authenticated .app-shell {
  grid-template-columns: 274px minmax(0, 1fr);
  min-height: calc(100vh - 74px);
  background: #f4f8fc;
}

body.is-authenticated .site-nav {
  margin: 18px 0 18px 18px;
  padding: 18px 14px;
  background: #2D3F54 !important;
  border-radius: 24px;
  box-shadow: 0 20px 45px rgba(17, 24, 39, 0.22);
}

body.is-authenticated .nav-title {
  margin: 0 12px 20px;
  color: #73CC80;
  font-size: 13px;
  letter-spacing: 0;
}

body.is-authenticated .nav-logo {
  filter: brightness(0) invert(1);
  opacity: 0.96;
}

body.is-authenticated .menu-group {
  padding-top: 4px;
}

body.is-authenticated .menu-group h2 {
  margin: 14px 12px 7px;
  color: #8d99ae;
  font-size: 12px;
  letter-spacing: 0;
}

body.is-authenticated .site-nav .menu-button,
body.is-authenticated .site-nav .structured-menu > .menu-button,
body.is-authenticated .site-nav .menu-button.active,
body.is-authenticated .site-nav .structured-menu > .menu-button.active {
  min-height: 42px;
  padding: 9px 12px;
  background: transparent;
  color: #cbd5e1;
  border-radius: 14px;
  box-shadow: none;
}

body.is-authenticated .site-nav .menu-button::before {
  background: rgba(255, 255, 255, 0.08);
  color: #00D4C6;
}

body.is-authenticated .site-nav .menu-button:hover {
  background: #52647A;
  color: #ffffff;
}

body.is-authenticated .site-nav .menu-button:hover::before {
  background: #00D4C6;
  color: #2D3F54;
}

body.is-authenticated .workspace {
  padding: 18px 24px 24px;
}

body.is-authenticated .dashboard-page,
body.is-authenticated .app-page.active:not(.dashboard-page),
body.is-authenticated .panel,
body.is-authenticated .catalog-panel,
body.is-authenticated .search-band,
body.is-authenticated .modal-card,
body.is-authenticated .acta-paper {
  background: #ffffff !important;
  border: 1px solid #e8edf5 !important;
  border-radius: 22px !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06) !important;
}

body.is-authenticated .dashboard-page {
  padding: 18px;
}

body.is-authenticated .dashboard-hero {
  background: linear-gradient(135deg, #eef8ff 0%, #ffffff 58%, #e8fff8 100%) !important;
  border: 1px solid #cfe7fb !important;
  border-radius: 22px;
}

body.is-authenticated .dashboard-hero h1,
body.is-authenticated .panel-head h2,
body.is-authenticated .catalog-panel h2 {
  color: #2D3F54;
  font-weight: 800;
}

body.is-authenticated .dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 14px;
}

body.is-authenticated .dashboard-hero h1 {
  font-size: 24px;
  line-height: 1.18;
  text-align: left;
}

body.is-authenticated .section-head-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 9px 14px rgba(45, 63, 84, 0.14));
}

body.is-authenticated .dashboard-card {
  border: 1px solid #e8edf5;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

body.is-authenticated .dashboard-card strong {
  color: #004C94;
}

body.is-authenticated .table-wrap {
  border: 1px solid #e8edf5 !important;
  border-radius: 18px !important;
  box-shadow: none !important;
}

body.is-authenticated .catalog-table th,
body.is-authenticated .report-table th {
  background: #f7f9fc !important;
  color: #526071 !important;
  border-bottom: 1px solid #e8edf5;
  font-size: 13px;
  font-weight: 800;
}

body.is-authenticated .catalog-table td,
body.is-authenticated .report-table td {
  border-bottom: 1px solid #eef2f7;
}

body.is-authenticated tbody tr:hover {
  background: #eaf6ff !important;
}

body.is-authenticated tr.status-risk td {
  background: oklch(97.1% 0.013 17.38) !important;
}

body.is-authenticated tr.status-risk:hover td {
  background: #f2e2df !important;
}

body.is-authenticated tr.status-downloaded td {
  background: #ecfdf3 !important;
  color: #14532d;
}

body.is-authenticated tr.status-downloaded:hover td {
  background: #bbf7d0 !important;
}

body.is-authenticated tr.status-missing td {
  background: #fef9c3 !important;
  color: #854d0e;
}

body.is-authenticated tr.status-missing:hover td {
  background: #facc15 !important;
}

body.is-authenticated .login-button,
body.is-authenticated .add-button {
  background: #004C94 !important;
  border-color: #004C94 !important;
  color: #ffffff !important;
}

body.is-authenticated .login-button:hover,
body.is-authenticated .add-button:hover {
  background: #006ECF !important;
}

body.is-authenticated .ghost-button,
body.is-authenticated .small-button {
  background: #f4f7fb !important;
  border: 1px solid #e4eaf2 !important;
  color: #344256 !important;
}

body.is-authenticated .logout-button {
  background: #2D3F54 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

body.is-authenticated .logout-button:hover {
  background: #004C94 !important;
}

body.is-authenticated input,
body.is-authenticated select,
body.is-authenticated textarea {
  border-color: #e0e6ef;
  border-radius: 14px;
  background: #fbfcfe;
}

body.is-authenticated input:focus,
body.is-authenticated select:focus,
body.is-authenticated textarea:focus {
  border-color: #3C93FA;
  box-shadow: 0 0 0 4px rgba(60, 147, 250, 0.18);
}

body.is-authenticated .stack-bar {
  background: #eef8ff;
  border-color: #cfe7fb;
}

/* Hoverable Table style */
body.is-authenticated .table-wrap {
  overflow: auto;
  background: #ffffff;
}

body.is-authenticated .catalog-table,
body.is-authenticated .report-table,
body.is-authenticated .dashboard-summary-table,
body.is-authenticated .grade-detail-table,
body.is-authenticated #recordsTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
}

body.is-authenticated .catalog-table thead th,
body.is-authenticated .report-table thead th,
body.is-authenticated .dashboard-summary-table thead th,
body.is-authenticated .grade-detail-table thead th,
body.is-authenticated #recordsTable thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 13px 14px;
  background: #f8fafc !important;
  color: #64748b !important;
  border-bottom: 1px solid #e5e7eb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

body.is-authenticated .catalog-table tbody td,
body.is-authenticated .report-table tbody td,
body.is-authenticated .dashboard-summary-table tbody td,
body.is-authenticated .grade-detail-table tbody td,
body.is-authenticated #recordsTable tbody td {
  padding: 13px 14px;
  background: #ffffff;
  border-bottom: 1px solid #edf1f5;
  color: #334155;
  vertical-align: middle;
  transition: background-color 140ms ease, color 140ms ease;
}

body.is-authenticated .catalog-table tbody tr,
body.is-authenticated .report-table tbody tr,
body.is-authenticated .dashboard-summary-table tbody tr,
body.is-authenticated .grade-detail-table tbody tr,
body.is-authenticated #recordsTable tbody tr {
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

body.is-authenticated .catalog-table tbody tr:hover td,
body.is-authenticated .report-table tbody tr:hover td,
body.is-authenticated .dashboard-summary-table tbody tr:hover td,
body.is-authenticated .grade-detail-table tbody tr:hover td,
body.is-authenticated #recordsTable tbody tr:hover td {
  background: #eaf6ff !important;
  color: #2D3F54;
}

body.is-authenticated .catalog-table tbody tr:last-child td,
body.is-authenticated .report-table tbody tr:last-child td,
body.is-authenticated .dashboard-summary-table tbody tr:last-child td,
body.is-authenticated .grade-detail-table tbody tr:last-child td,
body.is-authenticated #recordsTable tbody tr:last-child td {
  border-bottom: 0;
}

body.is-authenticated tr.status-risk td {
  background: oklch(97.1% 0.013 17.38) !important;
}

body.is-authenticated tr.status-risk:hover td {
  background: #f2e2df !important;
}

body.is-authenticated .report-table tbody tr.status-downloaded td {
  background: #ecfdf3 !important;
  color: #14532d !important;
}

body.is-authenticated .report-table tbody tr.status-downloaded:hover td {
  background: #bbf7d0 !important;
  color: #14532d !important;
}

body.is-authenticated .report-table tbody tr.status-missing td {
  background: #fef9c3 !important;
  color: #854d0e !important;
}

body.is-authenticated .report-table tbody tr.status-missing:hover td {
  background: #facc15 !important;
  color: #713f12 !important;
}

body.is-authenticated .grades-modal-card td.status-na,
body.is-authenticated .grades-modal-card tr.status-risk:hover td.status-na {
  background: oklch(97.3% 0.071 103.193) !important;
  color: #7a4f00 !important;
}

body.is-authenticated .grades-modal-card td.status-np,
body.is-authenticated .grades-modal-card tr.status-risk:hover td.status-np {
  background: oklch(93.6% 0.032 17.717) !important;
  color: #8f1d18 !important;
}

body.is-authenticated .grade-detail-table tbody tr.status-na td {
  background: oklch(97.3% 0.071 103.193) !important;
  color: #7a4f00 !important;
}

body.is-authenticated .grade-detail-table tbody tr.status-np td {
  background: oklch(93.6% 0.032 17.717) !important;
  color: #8f1d18 !important;
}

body.is-authenticated .grade-detail-table tbody tr.status-na:hover td {
  background: oklch(90.5% 0.182 98) !important;
}

body.is-authenticated .grade-detail-table tbody tr.status-np:hover td {
  background: oklch(84.8% 0.092 18.334) !important;
}

body.is-authenticated #historialDetailModal .history-detail-wrap tbody tr.status-na td {
  background: oklch(97.3% 0.071 103.193) !important;
  color: #7a4f00 !important;
}

body.is-authenticated #historialDetailModal .history-detail-wrap tbody tr.status-np td {
  background: oklch(93.6% 0.032 17.717) !important;
  color: #8f1d18 !important;
}

body.is-authenticated #historialDetailModal .history-detail-wrap tbody tr.status-na:hover td {
  background: oklch(90.5% 0.182 98) !important;
  color: #5f3b00 !important;
}

body.is-authenticated #historialDetailModal .history-detail-wrap tbody tr.status-np:hover td {
  background: oklch(84.8% 0.092 18.334) !important;
  color: #7f1d1d !important;
}

@media (max-width: 760px) {
  .enrollment-search-row,
  .enrollment-grid {
    grid-template-columns: 1fr;
  }

  .enrollment-section {
    padding: 12px;
  }

  .enrollment-actions {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .enrollment-actions .login-button,
  .enrollment-actions .control-school-action-button {
    width: 100%;
    justify-self: stretch;
  }
}

/* Session, icon buttons, forecast cards and blue charts */
body.is-authenticated .session-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

body.is-authenticated .session-chip {
  max-width: 280px;
  min-height: 0;
  padding: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  background: transparent;
  border: 0;
  color: #2D3F54;
  border-radius: 0;
  box-shadow: none;
  line-height: 1.08;
  text-align: left;
  white-space: normal;
}

body.is-authenticated .session-chip .session-user,
body.is-authenticated .session-chip .session-name,
body.is-authenticated .session-chip .session-email {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-authenticated .session-chip .session-name {
  color: #52647A;
  font-size: 11px;
  font-weight: 600;
}

body.is-authenticated .session-chip .session-email {
  color: #006ECF;
  font-size: 11px;
  font-weight: 600;
  text-transform: lowercase;
}

body.is-authenticated .logout-button {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #9f2241 !important;
  font-size: 12px;
  font-weight: 900;
  height: auto;
  min-height: 0;
  min-width: auto;
  padding: 0;
  text-decoration: underline;
  white-space: nowrap;
}

body.is-authenticated .dashboard-grid {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
}

body.is-authenticated .dashboard-card {
  position: relative;
  min-height: 128px;
  align-content: space-between;
  padding: 16px 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

body.is-authenticated .dashboard-card::before {
  content: none;
}

body.is-authenticated .dashboard-card::after {
  content: "";
  position: absolute;
  right: -16px;
  top: -18px;
  width: 70px;
  height: 70px;
  border-radius: 999px;
  background: rgba(60, 147, 250, 0.16);
}

body.is-authenticated .dashboard-card-icon {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 12px rgba(45, 63, 84, 0.12));
}

body.is-authenticated .panel-head-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 7px 10px rgba(45, 63, 84, 0.12));
}

body.is-authenticated .panel-head:has(.panel-head-icon),
body.is-authenticated .panel-head:has(.section-head-icon) {
  justify-content: flex-start;
  text-align: left;
}

body.is-authenticated .panel-head:has(.panel-head-icon) > h2,
body.is-authenticated .panel-head:has(.panel-head-icon) > h3,
body.is-authenticated .panel-head:has(.panel-head-icon) > div:not(.catalog-actions),
body.is-authenticated .panel-head:has(.section-head-icon) > div {
  text-align: left;
}

body.is-authenticated .panel-head:has(.panel-head-icon) .catalog-actions,
body.is-authenticated .panel-head:has(.panel-head-icon) > span:last-child {
  margin-left: auto;
}

body.is-authenticated .panel-title-block {
  margin-right: auto;
  text-align: left;
}

body.is-authenticated .active-period-panel #activePeriodStatus,
body.is-authenticated .active-period-panel #activeEnrollmentPeriodStatus,
body.is-authenticated .active-period-panel #activeTutorPeriodStatus {
  display: grid;
  gap: 2px;
  margin-left: auto;
  min-width: 150px;
  text-align: left;
  line-height: 1.12;
}

body.is-authenticated .active-period-panel #activePeriodStatus strong,
body.is-authenticated .active-period-panel #activeEnrollmentPeriodStatus strong,
body.is-authenticated .active-period-panel #activeTutorPeriodStatus strong {
  color: #2D3F54;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

body.is-authenticated .active-period-panel #activePeriodStatus span,
body.is-authenticated .active-period-panel #activeEnrollmentPeriodStatus span,
body.is-authenticated .active-period-panel #activeTutorPeriodStatus span {
  color: #004C94;
  font-size: 13px;
  font-weight: 900;
}

body.is-authenticated .dashboard-chart .panel-head,
body.is-authenticated .active-period-panel .panel-head {
  align-items: center;
}

body.is-authenticated .dashboard-chart .panel-head h3 {
  font-size: 15px;
}

.button-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.button-with-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.label-with-icon {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
}

.label-with-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.label-with-icon input {
  grid-column: 1 / -1;
}

body.is-authenticated .dashboard-card span {
  position: relative;
  z-index: 1;
  color: #64748b;
  font-size: 12px;
}

body.is-authenticated .dashboard-card strong {
  position: relative;
  z-index: 1;
  color: #004C94;
  font-size: 24px;
}

body.is-authenticated .dashboard-card small {
  position: relative;
  z-index: 1;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.25;
}

body.is-authenticated .icon-button,
body.is-authenticated .report-icon-button,
body.is-authenticated .row-actions .icon-button,
body.is-authenticated .catalog-pager .icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0 !important;
  border-radius: 14px !important;
  background: #eef8ff !important;
  border: 1px solid #cfe7fb !important;
  color: #004C94 !important;
  box-shadow: none !important;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

body.is-authenticated .icon-button:hover,
body.is-authenticated .report-icon-button:hover,
body.is-authenticated .row-actions .icon-button:hover,
body.is-authenticated .catalog-pager .icon-button:hover {
  background: #006ECF !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

body.is-authenticated .excel-icon-button {
  background: #ecfdf3 !important;
  border-color: #bbf7d0 !important;
  color: #107c41 !important;
}

body.is-authenticated .excel-icon-button:hover {
  background: #107c41 !important;
  border-color: #107c41 !important;
  color: #ffffff !important;
}

body.is-authenticated .report-icon-button {
  width: 46px !important;
  min-width: 46px !important;
  height: 42px !important;
}

body.is-authenticated .danger-icon {
  background: #fff1f2 !important;
  border-color: #ffe4e6 !important;
  color: #be123c !important;
}

body.is-authenticated .danger-icon:hover {
  background: #be123c !important;
  color: #ffffff !important;
}

body.is-authenticated .stack-bar {
  background: #eef8ff;
  border-color: #cfe7fb;
}

body.is-authenticated .shift-tm {
  background: #3C93FA;
  color: #ffffff;
}

body.is-authenticated .shift-tv {
  background: #004C94;
  color: #ffffff;
}

body.is-authenticated .chart-label span,
body.is-authenticated .chart-legend-inline {
  color: #475569;
}

body.is-authenticated .dashboard-summary-panel,
body.is-authenticated .dashboard-charts {
  margin-top: 0;
}

body[data-profile="alumno"] #enrollmentLookupButton {
  display: none !important;
}

.enrollment-active-period-panel {
  display: none;
}

body[data-profile="administrador"] .enrollment-active-period-panel {
  display: grid;
}

.averages-panel .panel-head {
  align-items: center;
}

.student-averages-table th,
.student-averages-table td {
  text-align: center;
  white-space: nowrap;
}

.document-search-form {
  display: none;
  margin-bottom: 16px;
}

body[data-profile="administrador"] .document-search-form,
body[data-profile="jefe-departamento"] .document-search-form {
  display: grid;
}

.document-search-status {
  color: #52647a;
  font-size: 13px;
  font-weight: 700;
}

.student-certificate-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.student-certificate-actions span {
  color: #52647a;
  font-weight: 700;
}

.student-document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.student-document-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 18px;
  border: 1px solid #dbe6f2;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 14px 30px rgba(45, 63, 84, 0.08);
}

.student-document-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #eaf4ff;
}

.student-document-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.student-document-card h3 {
  margin: 0 0 5px;
  color: #2D3F54;
  font-size: 17px;
  font-weight: 900;
  text-transform: uppercase;
}

.student-document-card p {
  margin: 0;
  color: #52647a;
  font-size: 13px;
  line-height: 1.35;
}

.student-document-card .login-button,
.student-document-card span {
  grid-column: 1 / -1;
}

.student-document-card span {
  color: #52647a;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 860px) {
  body.is-authenticated .site-nav {
    margin: 0;
    border-radius: 0 24px 24px 0;
  }

  body.is-authenticated .app-shell {
    grid-template-columns: 1fr;
  }
}

body.is-authenticated .session-stack {
  flex-direction: row;
  align-items: center;
}

body.is-authenticated .session-chip.has-notices {
  width: auto;
  max-width: none;
  min-height: 42px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.is-authenticated .logout-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
}

/* Horizontal navigation inspired by classic website nav bars */
body.is-authenticated .app-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - 74px);
  background: #f4f8fc;
}

body.is-authenticated .site-nav {
  position: sticky;
  top: 74px;
  z-index: 11;
  width: 100%;
  height: 62px;
  min-height: 62px;
  max-height: 62px;
  margin: 0;
  padding: 10px clamp(10px, 2vw, 24px);
  overflow: visible;
  background: #2D3F54 !important;
  border-radius: 0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

body.is-authenticated .structured-menu {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: 100%;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  overflow: visible;
  scrollbar-width: thin;
}

body.is-authenticated .structured-menu::-webkit-scrollbar {
  height: 6px;
}

body.is-authenticated .structured-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.24);
  border-radius: 999px;
}

body.is-authenticated .menu-group h2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 0;
  padding: 0 14px;
  white-space: nowrap;
  border-radius: 14px;
  color: #eaf1fb;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

body.is-authenticated .menu-group h2:hover,
body.is-authenticated .menu-group:focus-within h2,
body.is-authenticated .menu-group:has(.menu-button.active) h2 {
  background: #52647A;
  color: #ffffff;
}

body.is-authenticated .menu-group {
  position: relative;
  flex: 0 0 auto;
  padding: 0;
}

body.is-authenticated .menu-group::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;
  display: none;
}

body.is-authenticated .menu-group h2::after {
  content: "v";
  margin-left: 8px;
  color: #73CC80;
  font-size: 13px;
  transform: none;
}

body.is-authenticated .menu-group.is-collapsed h2::after {
  transform: none;
}

body.is-authenticated .menu-panel {
  position: absolute;
  top: 46px;
  left: 0;
  z-index: 12;
  display: none;
  min-width: max(220px, 100%);
  padding: 10px;
  max-height: min(70vh, 420px);
  overflow: auto;
  background: #ffffff;
  border: 1px solid #e4eaf2;
  border-radius: 16px;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.18);
}

body.is-authenticated .menu-group:hover::after {
  display: block;
}

body.is-authenticated .menu-group:hover .menu-panel,
body.is-authenticated .menu-group:hover .menu-panel .menu-button {
  display: flex;
}

body.is-authenticated .menu-group:hover .menu-panel {
  display: grid;
  gap: 6px;
}

body.is-authenticated.menu-selection-closing .menu-group:hover::after,
body.is-authenticated.menu-selection-closing .menu-group:hover .menu-panel,
body.is-authenticated.menu-selection-closing .menu-group:hover .menu-panel .menu-button {
  display: none !important;
}

body.is-authenticated .menu-group .menu-button {
  position: static;
  display: flex;
  align-items: center;
  z-index: 13;
  width: 100%;
  min-width: 200px;
  min-height: 38px;
  margin: 0;
  padding: 8px 12px;
  color: #314257;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: none;
}

body.is-authenticated .site-nav .menu-button[hidden],
body.is-authenticated .menu-group[hidden] {
  display: none !important;
}

body.is-authenticated .site-nav .menu-button:hover {
  background: #eaf1fb;
  color: #2D3F54;
}

body.is-authenticated .site-nav .menu-button.active {
  background: #d8ecff;
  color: #004C94;
}

body.is-authenticated .site-nav .menu-button::before {
  background: rgba(0, 110, 207, 0.1);
  color: #006ECF;
}

body.is-authenticated .main-stage {
  display: block;
}

body.is-authenticated .workspace {
  width: 100%;
  max-width: none;
  padding: 18px clamp(10px, 2vw, 24px) 24px;
}

.site-footer {
  display: none;
}

body.is-authenticated .site-footer {
  display: grid;
  justify-items: center;
  gap: 18px;
  margin-top: 24px;
  padding: 24px;
  text-align: center;
  color: #dce8f5;
  background: #2D3F54;
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.site-footer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(2, minmax(180px, 1fr));
  justify-items: center;
  gap: 20px;
  width: 100%;
  max-width: 1100px;
  text-align: center;
}

.site-footer h2,
.site-footer h3,
.site-footer p {
  margin: 0;
}

.site-footer h2,
.site-footer h3 {
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
}

.site-footer p {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.35;
}

.site-footer a {
  color: inherit;
  font-weight: 400;
  text-decoration: none;
}

.site-footer a:hover {
  color: #73CC80;
  text-decoration: underline;
}

.site-footer-bottom {
  display: grid;
  justify-items: center;
  gap: 3px;
  width: 100%;
  max-width: 1100px;
  padding-top: 10px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #b9c8d8;
}

.site-footer-bottom p {
  width: 100%;
}

.site-footer-bottom p:first-child {
  color: #ffffff;
  font-weight: 900;
}

@media (max-width: 760px) {
  .active-period-row {
    grid-template-columns: 1fr;
  }

  .student-document-grid {
    grid-template-columns: 1fr;
  }

  .site-footer-grid {
    grid-template-columns: 1fr;
  }
}

body.is-authenticated .hamburger-button,
body.mobile-nav-open .nav-backdrop {
  display: none;
}

@media (max-width: 860px) {
  body.is-authenticated .site-nav {
    position: sticky;
    inset: auto;
    top: 74px;
    width: 100%;
    max-width: 100vw;
    transform: none;
    padding: 8px 10px;
    border-radius: 0;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
  }

  body.is-authenticated .structured-menu {
    flex-wrap: nowrap;
    overflow: visible;
  }

  body.is-authenticated .menu-group h2 {
    min-height: 40px;
    padding: 0 12px;
    font-size: 12px;
  }

  body.is-authenticated .menu-panel {
    width: min(260px, calc(100vw - 20px));
  }

  body.is-authenticated .menu-group .menu-button {
    min-width: min(236px, calc(100vw - 44px));
  }
}

@media (max-width: 680px) {
  body:not(.is-authenticated) {
    overflow-x: hidden;
    overflow-y: auto;
  }

  body:not(.is-authenticated) .site-header,
  body:not(.is-authenticated) .site-nav,
  body:not(.is-authenticated) .app-shell,
  body:not(.is-authenticated) .site-footer {
    display: none !important;
  }

  body:not(.is-authenticated) .login-screen {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: block;
    min-height: 100dvh;
    height: 100dvh;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body:not(.is-authenticated) .login-card {
    width: min(100%, 390px);
    max-width: calc(100vw - 24px);
    min-height: auto;
    margin: 0 auto;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
  }

  body:not(.is-authenticated) .login-logo {
    width: min(170px, 58vw);
  }

  body:not(.is-authenticated) .login-card h1 {
    font-size: clamp(22px, 7vw, 26px);
    line-height: 1.05;
  }

  body:not(.is-authenticated) .login-subtitle {
    font-size: clamp(14px, 4.5vw, 17px);
    line-height: 1.15;
  }

  body:not(.is-authenticated) .login-copy,
  body:not(.is-authenticated) .login-card label,
  body:not(.is-authenticated) .brand-domain,
  body:not(.is-authenticated) .system-version {
    font-size: 12px;
  }

  body:not(.is-authenticated) .login-card input {
    width: 100%;
    min-height: 42px;
  }

  body:not(.is-authenticated) .login-button {
    width: 100%;
    min-height: 42px;
  }
}

@media (max-width: 380px), (max-height: 640px) {
  body:not(.is-authenticated) .login-card {
    gap: 8px;
    padding: 12px;
  }

  body:not(.is-authenticated) .login-logo {
    width: min(140px, 52vw);
  }

  body:not(.is-authenticated) .login-card h1 {
    font-size: 21px;
  }

  body:not(.is-authenticated) .login-subtitle {
    font-size: 13px;
  }
}

@media (max-width: 680px) {
  body[data-profile="docente"].is-authenticated .site-header {
    min-height: auto;
  }

  body[data-profile="docente"].is-authenticated .site-header-inner {
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 12px;
  }

  body[data-profile="docente"].is-authenticated .site-logo {
    width: 54px;
    height: auto;
  }

  body[data-profile="docente"].is-authenticated .brand-block h1 {
    font-size: 17px;
    line-height: 1.1;
  }

  body[data-profile="docente"].is-authenticated .session-meta {
    font-size: 11px;
    line-height: 1.2;
  }

  body[data-profile="docente"].is-authenticated .session-stack {
    align-self: start;
    gap: 6px;
  }

  body[data-profile="docente"].is-authenticated .logout-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  body[data-profile="docente"].is-authenticated .site-nav {
    top: 74px;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 8px 10px;
  }

  body[data-profile="docente"].is-authenticated .structured-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    height: auto;
    min-height: 0;
    max-height: none;
    gap: 6px;
  }

  body[data-profile="docente"].is-authenticated .menu-group h2 {
    min-height: 36px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 11px;
  }

  body[data-profile="docente"].is-authenticated .menu-panel {
    top: 40px;
    width: min(260px, calc(100vw - 20px));
    max-height: min(62vh, 360px);
  }

  body[data-profile="docente"].is-authenticated .workspace {
    padding: 10px;
  }

  body[data-profile="docente"] .app-page.active,
  body[data-profile="docente"] .panel,
  body[data-profile="docente"] .catalog-panel,
  body[data-profile="docente"] .search-band,
  body[data-profile="docente"] .main-panel,
  body[data-profile="docente"] .form-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body[data-profile="docente"] .app-page[data-page="actas"] {
    display: grid;
    gap: 12px;
  }

  body[data-profile="docente"] .search-band,
  body[data-profile="docente"] .content-grid,
  body[data-profile="docente"] .form-grid,
  body[data-profile="docente"] .grade-change-grid,
  body[data-profile="docente"] .teacher-import-form,
  body[data-profile="docente"] .import-form,
  body[data-profile="docente"] .active-period-form,
  body[data-profile="docente"] .report-toolbar {
    grid-template-columns: 1fr !important;
  }

  body[data-profile="docente"] .search-row,
  body[data-profile="docente"] .panel-head,
  body[data-profile="docente"] .catalog-actions,
  body[data-profile="docente"] .form-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 8px;
  }

  body[data-profile="docente"] .panel-head .panel-title-block,
  body[data-profile="docente"] .panel-head h2,
  body[data-profile="docente"] .panel-head span {
    min-width: 0;
  }

  body[data-profile="docente"] .search-row input,
  body[data-profile="docente"] .search-row select,
  body[data-profile="docente"] .catalog-search,
  body[data-profile="docente"] .teacher-import-form label,
  body[data-profile="docente"] .teacher-import-form button,
  body[data-profile="docente"] .form-actions button,
  body[data-profile="docente"] .login-button,
  body[data-profile="docente"] .add-button {
    width: 100%;
    min-width: 0;
  }

  body[data-profile="docente"] .results {
    max-height: 42vh;
    overflow-y: auto;
  }

  body[data-profile="docente"] .result-card,
  body[data-profile="docente"] .grade-change-grid > div {
    min-width: 0;
  }

  body[data-profile="docente"] .acta-info-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  body[data-profile="docente"] #recordsTable td {
    display: grid !important;
    grid-template-columns: minmax(84px, 35%) minmax(0, 1fr);
    gap: 8px;
  }

  body[data-profile="docente"] #recordsTable td::before {
    content: attr(data-label) !important;
    color: #52647A;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  body[data-profile="docente"] #recordsTable td:last-child {
    grid-template-columns: 1fr;
  }

  body[data-profile="alumno"] .app-page[data-page="promedios"] .student-averages-table {
    display: block !important;
    width: 100%;
    min-width: 0;
  }

  body[data-profile="alumno"] .app-page[data-page="promedios"] .student-averages-table thead {
    display: none !important;
  }

  body[data-profile="alumno"] .app-page[data-page="promedios"] .student-averages-table tbody {
    display: grid !important;
    gap: 12px;
  }

  body[data-profile="alumno"] .app-page[data-page="promedios"] .student-averages-table tr {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    padding: 0 14px 14px;
    overflow: hidden;
    border: 1px solid #d9e7f5;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 12px 26px rgba(45, 63, 84, 0.1);
  }

  body[data-profile="alumno"] .app-page[data-page="promedios"] .student-averages-table tr::before {
    content: "SEMESTRE " attr(data-semester);
    display: grid;
    grid-column: 1 / -1;
    place-items: center;
    margin: 0 -14px 4px;
    padding: 12px 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #004C94, #006ECF);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0;
  }

  body[data-profile="alumno"] .app-page[data-page="promedios"] .student-averages-table td {
    display: grid !important;
    grid-template-columns: 1fr !important;
    justify-items: center;
    gap: 2px;
    padding: 6px 4px;
    border: 0;
    text-align: center !important;
    font-size: 13px;
  }

  body[data-profile="alumno"] .app-page[data-page="promedios"] .student-averages-table td::before {
    content: attr(data-label) !important;
    color: #52647A;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  body[data-profile="alumno"] .app-page[data-page="promedios"] .student-averages-table td[data-label="Semestre"],
  body[data-profile="alumno"] .app-page[data-page="promedios"] .student-averages-table td[data-label="Materias"] {
    grid-column: 1 / -1;
  }

  body[data-profile="alumno"] .app-page[data-page="promedios"] .student-averages-table td[data-label="Semestre"] {
    display: none !important;
  }

  body[data-profile="alumno"] .app-page[data-page="promedios"] .student-averages-table td[data-label="Asignaturas"] {
    grid-column: 1 / -1;
  }

  body[data-profile="alumno"] .app-page[data-page="promedios"] .student-averages-table td[data-label="A"],
  body[data-profile="alumno"] .app-page[data-page="promedios"] .student-averages-table td[data-label="NA"],
  body[data-profile="alumno"] .app-page[data-page="promedios"] .student-averages-table td[data-label="NP"] {
    grid-column: span 2;
  }

  body[data-profile="alumno"] .app-page[data-page="promedios"] .student-averages-table td[data-label="EXTRA"],
  body[data-profile="alumno"] .app-page[data-page="promedios"] .student-averages-table td[data-label="INTER"],
  body[data-profile="alumno"] .app-page[data-page="promedios"] .student-averages-table td[data-label="MOD"] {
    grid-column: span 2;
  }

  body[data-profile="alumno"] .app-page[data-page="promedios"] .student-averages-table .subject-detail-button {
    width: min(100%, 220px);
    min-width: 0;
    min-height: 38px;
    padding: 8px 14px;
    font-size: 12px;
  }

  body[data-profile="alumno"] .app-page[data-page="promedios"] .subject-detail-button .desktop-label {
    display: none;
  }

  body[data-profile="alumno"] .app-page[data-page="promedios"] .subject-detail-button .mobile-label {
    display: inline;
  }
}

.acta-print-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

body[data-active-menu="panel"] .app-page:not([data-page="panel"]) {
  display: none !important;
}

body.is-authenticated .dashboard-card {
  justify-items: center;
  text-align: center;
}

body.is-authenticated .dashboard-card span,
body.is-authenticated .dashboard-card strong,
body.is-authenticated .dashboard-card small {
  text-align: center;
}

body.is-authenticated .active-period-panel {
  text-align: center;
}

body.is-authenticated .active-period-panel .panel-head {
  justify-content: center;
  text-align: center;
}

body.is-authenticated .active-period-panel .panel-title-block {
  margin: 0;
  text-align: center;
}

body.is-authenticated .active-period-panel #activePeriodStatus,
body.is-authenticated .active-period-panel #activeEnrollmentPeriodStatus {
  margin: 0;
  min-width: 0;
  text-align: center;
}

body.is-authenticated .active-period-panel .active-period-form {
  align-items: end;
}

@media (max-width: 680px) {
  body[data-profile="docente"].is-authenticated .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
    margin-bottom: 10px;
  }

  body[data-profile="docente"].is-authenticated .topbar > div:first-child {
    min-width: 0;
    text-align: left;
  }

  body[data-profile="docente"].is-authenticated .topbar h1,
  body[data-profile="docente"].is-authenticated .topbar .system-version,
  body[data-profile="docente"].is-authenticated .topbar .brand-domain {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  body[data-profile="docente"].is-authenticated .topbar h1 {
    font-size: 17px;
    line-height: 1.15;
  }

  body[data-profile="docente"].is-authenticated .topbar-actions {
    display: block;
    width: 100%;
  }

  body[data-profile="docente"].is-authenticated .session-stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 8px;
    align-items: start;
    justify-content: stretch;
    width: 100%;
  }

  body[data-profile="docente"].is-authenticated .session-chip {
    width: 100%;
    max-width: none;
    min-width: 0;
    overflow: visible;
  }

  body[data-profile="docente"].is-authenticated .session-chip .session-user,
  body[data-profile="docente"].is-authenticated .session-chip .session-name,
  body[data-profile="docente"].is-authenticated .session-chip .session-email {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body[data-profile="docente"].is-authenticated .site-header-inner {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px 10px;
  }

  body[data-profile="docente"].is-authenticated .site-header .brand-lockup {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: 100%;
    min-width: 0;
  }

  body[data-profile="docente"].is-authenticated .site-header .header-logo {
    width: 64px;
    max-width: 64px;
  }

  body[data-profile="docente"].is-authenticated .site-header h1 {
    font-size: 16px;
    line-height: 1.15;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  body[data-profile="docente"].is-authenticated .site-header .system-version,
  body[data-profile="docente"].is-authenticated .site-header .brand-domain {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    font-size: 11px;
    line-height: 1.2;
  }

  body[data-profile="docente"].is-authenticated .site-header .topbar-actions {
    display: block;
    grid-column: auto;
    width: 100%;
    min-width: 0;
  }

  body[data-profile="docente"].is-authenticated .site-header .session-stack {
    grid-template-columns: minmax(0, 1fr) 38px;
  }

  body[data-profile="docente"].is-authenticated .site-nav {
    top: auto;
  }

  body[data-profile="docente"] .app-page[data-page="actas"] {
    display: none !important;
  }

  body[data-profile="docente"] .app-page[data-page="actas"].active {
    display: grid !important;
    gap: 12px;
  }

  body[data-profile="docente"] .acta-print-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  body[data-profile="docente"] #printButton {
    width: 100%;
  }

  body.is-authenticated .dashboard-grid {
    grid-template-columns: 1fr;
  }

  body.is-authenticated .active-period-panel .panel-head {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
  }

  body.is-authenticated .active-period-panel .panel-head-icon {
    margin: 0 auto;
  }

  body.is-authenticated .active-period-form {
    grid-template-columns: 1fr !important;
  }
}

.view-students-button,
.view-report-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 94px;
  min-height: 34px;
  padding: 7px 12px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 900;
}

.view-students-button {
  min-width: 126px;
}

body.is-authenticated .dashboard-chart .panel-head {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

body.is-authenticated .dashboard-chart .panel-head h3,
body.is-authenticated .dashboard-chart .panel-head span {
  width: 100%;
  text-align: center;
}

body.is-authenticated .chart-label,
body.is-authenticated .chart-legend-inline {
  justify-content: center;
  text-align: center;
}

body.is-authenticated .chart-label {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}

body.is-authenticated .chart-label strong {
  white-space: normal;
  text-align: center;
}

body.is-authenticated .chart-legend-inline {
  flex-wrap: wrap;
}

body.is-authenticated .active-period-panel .panel-head,
body.is-authenticated .active-period-panel .panel-title-block,
body.is-authenticated .active-period-panel label,
body.is-authenticated .active-period-panel #activePeriodStatus,
body.is-authenticated .active-period-panel #activeEnrollmentPeriodStatus {
  justify-items: center;
  text-align: center !important;
}

body.is-authenticated .active-period-panel #activePeriodStatus strong,
body.is-authenticated .active-period-panel #activePeriodStatus span,
body.is-authenticated .active-period-panel #activeEnrollmentPeriodStatus strong,
body.is-authenticated .active-period-panel #activeEnrollmentPeriodStatus span {
  display: block;
  text-align: center;
}

body[data-active-menu="avisos"] .panel-head .panel-head-icon {
  display: none;
}

body[data-active-menu="avisos"] #avisosTable td {
  text-align: center;
  vertical-align: middle;
}

body[data-active-menu="avisos"] #avisosTable .notice-message-preview {
  text-align: center;
}

body[data-active-menu="reportesDocentes"] .report-button-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
}

body[data-active-menu="reportesDocentes"] .report-button-row button {
  flex: 0 0 46px;
}

body[data-active-menu="reportesDocentes"] .report-button-row .excel-icon-button {
  flex-basis: 46px;
}

body.is-authenticated .report-table,
body.is-authenticated .grades-modal-wrap table {
  display: table !important;
  width: max-content;
}

body.is-authenticated .report-table thead,
body.is-authenticated .grades-modal-wrap thead {
  display: table-header-group !important;
}

body.is-authenticated .report-table tbody,
body.is-authenticated .grades-modal-wrap tbody {
  display: table-row-group !important;
}

body.is-authenticated .report-table tr,
body.is-authenticated .grades-modal-wrap tr {
  display: table-row !important;
}

body.is-authenticated .report-table th,
body.is-authenticated .report-table td,
body.is-authenticated .grades-modal-wrap th,
body.is-authenticated .grades-modal-wrap td {
  display: table-cell !important;
}

body.is-authenticated .report-table td::before,
body.is-authenticated .grades-modal-wrap td::before {
  content: none !important;
}

@media (max-width: 680px) {
  body[data-profile="docente"].is-authenticated .workspace > .topbar {
    display: none !important;
  }

  body[data-active-menu="alumnos"] .catalog-table {
    display: table !important;
    width: max-content;
    min-width: 900px;
  }

  body[data-active-menu="alumnos"] .catalog-table thead {
    display: table-header-group !important;
  }

  body[data-active-menu="alumnos"] .catalog-table tbody {
    display: table-row-group !important;
  }

  body[data-active-menu="alumnos"] .catalog-table tr {
    display: table-row !important;
    padding: 0;
    border-radius: 0;
  }

  body[data-active-menu="alumnos"] .catalog-table th,
  body[data-active-menu="alumnos"] .catalog-table td {
    display: table-cell !important;
  }

  body[data-active-menu="alumnos"] .catalog-table td::before {
    content: none !important;
  }

  body[data-active-menu="carreras"] .catalog-table,
  body[data-active-menu="grupos"] .catalog-table {
    display: block !important;
    width: 100%;
    min-width: 0;
  }

  body[data-active-menu="carreras"] .catalog-table thead,
  body[data-active-menu="grupos"] .catalog-table thead {
    display: none !important;
  }

  body[data-active-menu="carreras"] .catalog-table tbody,
  body[data-active-menu="grupos"] .catalog-table tbody {
    display: grid !important;
    gap: 12px;
  }

  body[data-active-menu="carreras"] .catalog-table tr,
  body[data-active-menu="grupos"] .catalog-table tr {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 14px;
    border: 1px solid #d9e7f5;
    border-radius: 16px;
    background: #ffffff;
  }

  body[data-active-menu="carreras"] .catalog-table td,
  body[data-active-menu="grupos"] .catalog-table td {
    display: grid !important;
    grid-template-columns: 1fr !important;
    justify-items: center;
    gap: 2px;
    padding: 5px 3px;
    border: 0;
    text-align: center !important;
  }

  body[data-active-menu="carreras"] .catalog-table td::before,
  body[data-active-menu="grupos"] .catalog-table td::before {
    content: attr(data-label) !important;
    color: #52647A;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  body[data-active-menu="carreras"] .catalog-table td[data-label="Periodo"],
  body[data-active-menu="grupos"] .catalog-table td[data-label="Periodo"],
  body[data-active-menu="carreras"] .catalog-table td[data-label="Acciones"],
  body[data-active-menu="grupos"] .catalog-table td[data-label="Acciones"] {
    grid-column: 1 / -1;
  }

  body[data-active-menu="carreras"] .catalog-table td[data-label="Carrera"],
  body[data-active-menu="carreras"] .catalog-table td[data-label="Turno"],
  body[data-active-menu="carreras"] .catalog-table td[data-label="Alumnos"],
  body[data-active-menu="carreras"] .catalog-table td[data-label="Riesgo"],
  body[data-active-menu="grupos"] .catalog-table td[data-label="Semestre"],
  body[data-active-menu="grupos"] .catalog-table td[data-label="Grupo"],
  body[data-active-menu="grupos"] .catalog-table td[data-label="Carrera"],
  body[data-active-menu="grupos"] .catalog-table td[data-label="Turno"],
  body[data-active-menu="grupos"] .catalog-table td[data-label="Alumnos"],
  body[data-active-menu="grupos"] .catalog-table td[data-label="Riesgo"] {
    grid-column: span 2;
  }

  body[data-active-menu="grupos"] .catalog-table td[data-label="Carrera"] {
    grid-column: span 4;
  }

  body[data-active-menu="carreras"] .view-students-button,
  body[data-active-menu="grupos"] .view-students-button {
    width: min(100%, 220px);
  }
}

.period-label-mobile-docente,
.view-students-button span,
.view-report-button .mobile-view-label {
  display: none;
}

body.is-authenticated .dashboard-chart .panel-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

body.is-authenticated .dashboard-chart .panel-head h3,
body.is-authenticated .dashboard-chart .panel-head span {
  width: auto;
  text-align: left;
}

body.is-authenticated .chart-label {
  display: flex;
  grid-template-columns: none;
  justify-content: space-between;
  text-align: left;
}

body.is-authenticated .chart-label strong {
  white-space: nowrap;
  text-align: left;
}

body.is-authenticated .chart-legend-inline {
  justify-content: flex-start;
  text-align: left;
}

body.is-authenticated .active-period-panel .panel-head {
  justify-content: flex-start;
  text-align: left;
}

body.is-authenticated .active-period-panel .panel-title-block,
body.is-authenticated .active-period-panel label,
body.is-authenticated .active-period-panel #activePeriodStatus,
body.is-authenticated .active-period-panel #activeEnrollmentPeriodStatus {
  justify-items: initial;
  text-align: left !important;
}

body.is-authenticated .active-period-panel #activePeriodStatus strong,
body.is-authenticated .active-period-panel #activePeriodStatus span,
body.is-authenticated .active-period-panel #activeEnrollmentPeriodStatus strong,
body.is-authenticated .active-period-panel #activeEnrollmentPeriodStatus span {
  text-align: left;
}

body[data-active-menu="avisos"] .panel-head .panel-head-icon {
  display: block;
}

body[data-active-menu="avisos"] #avisosTable td {
  text-align: inherit;
}

body[data-active-menu="avisos"] #avisosTable .notice-message-preview {
  text-align: left;
}

@media (max-width: 680px) {
  body[data-profile="docente"] .period-label-default {
    display: none;
  }

  body[data-profile="docente"] .period-label-mobile-docente {
    display: inline;
  }

  body[data-profile="docente"] .view-students-button img,
  body[data-profile="docente"] .view-report-button .desktop-eye {
    display: none;
  }

  body[data-profile="docente"] .view-students-button span,
  body[data-profile="docente"] .view-report-button .mobile-view-label {
    display: inline;
  }

  body[data-profile="docente"] .view-students-button,
  body[data-profile="docente"] .view-report-button {
    width: auto;
    min-width: 94px;
    padding-inline: 12px !important;
  }

  body[data-profile="docente"] .view-students-button {
    min-width: 126px;
  }

  body[data-profile="docente"].is-authenticated .dashboard-chart .panel-head {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  body[data-profile="docente"].is-authenticated .dashboard-chart .panel-head .panel-head-icon {
    display: none;
  }

  body[data-profile="docente"].is-authenticated .dashboard-chart .panel-head h3,
  body[data-profile="docente"].is-authenticated .dashboard-chart .panel-head span,
  body[data-profile="docente"].is-authenticated .chart-label,
  body[data-profile="docente"].is-authenticated .chart-label strong,
  body[data-profile="docente"].is-authenticated .chart-legend-inline {
    width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

  body[data-profile="docente"].is-authenticated .chart-label {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
  }

  body[data-profile="docente"].is-authenticated .chart-legend-inline {
    flex-wrap: wrap;
  }

  body[data-profile="docente"].is-authenticated .active-period-panel .panel-head,
  body[data-profile="docente"].is-authenticated .active-period-panel .panel-title-block,
  body[data-profile="docente"].is-authenticated .active-period-panel label,
  body[data-profile="docente"].is-authenticated .active-period-panel #activePeriodStatus,
  body[data-profile="docente"].is-authenticated .active-period-panel #activeEnrollmentPeriodStatus {
    justify-items: center;
    text-align: center !important;
  }

  body[data-profile="docente"][data-active-menu="avisos"] .panel-head .panel-head-icon {
    display: none;
  }

  body[data-profile="docente"][data-active-menu="avisos"] #avisosTable td,
  body[data-profile="docente"][data-active-menu="avisos"] #avisosTable .notice-message-preview {
    text-align: center;
  }
}

.chart-label-mobile-docente {
  display: none;
}

@media (max-width: 680px) {
  body[data-profile="docente"] .active-period-panel #activePeriodStatus,
  body[data-profile="docente"] .active-period-panel #activeEnrollmentPeriodStatus {
    display: none !important;
  }

  body[data-profile="docente"] .chart-label-default,
  body[data-profile="docente"] .chart-total-default {
    display: none;
  }

  body[data-profile="docente"] .chart-label-mobile-docente {
    display: inline;
  }

  body[data-profile="docente"] .chart-label strong {
    font-size: 13px;
    line-height: 1.25;
  }

  body[data-profile="docente"][data-active-menu="carreras"] .catalog-table,
  body[data-profile="docente"][data-active-menu="grupos"] .catalog-table,
  body[data-profile="docente"][data-active-menu="alumnos"] .catalog-table,
  body[data-profile="docente"][data-active-menu="materias"] .catalog-table {
    display: table !important;
    width: max-content;
    min-width: 860px;
  }

  body[data-profile="docente"][data-active-menu="carreras"] .catalog-table thead,
  body[data-profile="docente"][data-active-menu="grupos"] .catalog-table thead,
  body[data-profile="docente"][data-active-menu="alumnos"] .catalog-table thead,
  body[data-profile="docente"][data-active-menu="materias"] .catalog-table thead {
    display: table-header-group !important;
  }

  body[data-profile="docente"][data-active-menu="carreras"] .catalog-table tbody,
  body[data-profile="docente"][data-active-menu="grupos"] .catalog-table tbody,
  body[data-profile="docente"][data-active-menu="alumnos"] .catalog-table tbody,
  body[data-profile="docente"][data-active-menu="materias"] .catalog-table tbody {
    display: table-row-group !important;
  }

  body[data-profile="docente"][data-active-menu="carreras"] .catalog-table tr,
  body[data-profile="docente"][data-active-menu="grupos"] .catalog-table tr,
  body[data-profile="docente"][data-active-menu="alumnos"] .catalog-table tr,
  body[data-profile="docente"][data-active-menu="materias"] .catalog-table tr {
    display: table-row !important;
    padding: 0;
    border-radius: 0;
  }

  body[data-profile="docente"][data-active-menu="carreras"] .catalog-table th,
  body[data-profile="docente"][data-active-menu="carreras"] .catalog-table td,
  body[data-profile="docente"][data-active-menu="grupos"] .catalog-table th,
  body[data-profile="docente"][data-active-menu="grupos"] .catalog-table td,
  body[data-profile="docente"][data-active-menu="alumnos"] .catalog-table th,
  body[data-profile="docente"][data-active-menu="alumnos"] .catalog-table td,
  body[data-profile="docente"][data-active-menu="materias"] .catalog-table th,
  body[data-profile="docente"][data-active-menu="materias"] .catalog-table td {
    display: table-cell !important;
  }

  body[data-profile="docente"][data-active-menu="carreras"] .catalog-table td::before,
  body[data-profile="docente"][data-active-menu="grupos"] .catalog-table td::before,
  body[data-profile="docente"][data-active-menu="alumnos"] .catalog-table td::before,
  body[data-profile="docente"][data-active-menu="materias"] .catalog-table td::before {
    content: none !important;
  }

  body[data-profile="docente"] .grades-modal-card .panel-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
  }

  body[data-profile="docente"] #gradesModalClose {
    width: auto;
    min-width: 82px;
    min-height: 34px;
    padding: 6px 10px;
    font-size: 12px;
  }

  body[data-profile="docente"] #gradesNameFilter {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 13px;
  }
}

body.is-authenticated .recursamiento-xls-button,
body.is-authenticated .recursamiento-panel .recursamiento-xls-button,
body.is-authenticated button.recursamiento-xls-button {
  background: #107c41 !important;
  border-color: #107c41 !important;
  color: #ffffff !important;
}

body.is-authenticated .recursamiento-xls-button:hover,
body.is-authenticated .recursamiento-panel .recursamiento-xls-button:hover,
body.is-authenticated button.recursamiento-xls-button:hover {
  background: #0b6a35 !important;
  border-color: #0b6a35 !important;
  color: #ffffff !important;
}

body.is-authenticated .active-period-panel .panel-head {
  justify-content: flex-start !important;
  text-align: left !important;
}

body.is-authenticated .active-period-panel .panel-title-block {
  margin: 0 !important;
  text-align: left !important;
}

body.is-authenticated .active-period-panel .panel-title-block h2,
body.is-authenticated .active-period-panel .panel-title-block span {
  text-align: left !important;
}

@media (min-width: 681px) {
  body.is-authenticated .active-period-panel .panel-head {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center !important;
  }

  body.is-authenticated .active-period-panel #activePeriodStatus {
    justify-self: end;
    text-align: right !important;
  }

  body.is-authenticated .active-period-panel #activePeriodStatus strong,
  body.is-authenticated .active-period-panel #activePeriodStatus span {
    display: inline-block;
    text-align: right !important;
  }
}

@media (max-width: 680px) {
  body.is-authenticated .site-header .header-logo {
    display: none !important;
  }

  body.is-authenticated .site-header-inner {
    grid-template-columns: minmax(0, 1fr) !important;
    padding-bottom: 0 !important;
  }

  body.is-authenticated .site-header .brand-lockup {
    grid-template-columns: auto minmax(0, 1fr) !important;
    padding-right: 0 !important;
  }

  body.is-authenticated .site-header .topbar-actions {
    position: fixed !important;
    top: 116px !important;
    left: 10px !important;
    z-index: 1100 !important;
    width: auto !important;
  }

  body.is-authenticated .site-header .session-stack {
    display: flex !important;
    width: auto !important;
  }

  body.is-authenticated .site-header .session-chip {
    display: none !important;
  }

  body.is-authenticated .site-header .logout-button {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border-radius: 10px !important;
  }

  body.is-authenticated .topbar .topbar-actions {
    display: none !important;
  }

  body.is-authenticated .site-nav {
    padding-left: 56px !important;
  }
}

@media (min-width: 681px) {
  body.is-authenticated .active-period-panel,
  body.is-authenticated .active-period-panel .panel-head,
  body.is-authenticated .active-period-panel .panel-title-block,
  body.is-authenticated .active-period-panel .panel-title-block h2,
  body.is-authenticated .active-period-panel .panel-title-block span,
  body.is-authenticated .active-period-panel label {
    justify-content: flex-start !important;
    justify-items: start !important;
    text-align: left !important;
  }
}

/* Tema CBTIS62 definitivo */
html body,
html body.is-authenticated {
  background:
    radial-gradient(circle at top left, rgba(188, 149, 92, 0.12), transparent 34%),
    linear-gradient(180deg, #faf8f4 0%, #f3f6f9 44%, #eef3f7 100%) !important;
  color: #172132 !important;
  font-family: Arial, Helvetica, sans-serif !important;
}

html body.is-authenticated .site-header {
  background: rgba(250, 248, 244, 0.97) !important;
  border-bottom: 1px solid rgba(188, 149, 92, 0.35) !important;
  box-shadow: 0 8px 22px rgba(23, 50, 77, 0.08) !important;
}

html body.is-authenticated .site-header::after {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #611232 0%, #9f2241 46%, #bc955c 100%) !important;
}

html body.is-authenticated .site-nav {
  background: linear-gradient(180deg, #611232 0%, #3b0b1f 100%) !important;
  box-shadow: 10px 0 24px rgba(97, 18, 50, 0.16) !important;
}

html body.is-authenticated .site-nav .menu-button,
html body.is-authenticated .site-nav .structured-menu > .menu-button {
  border-radius: 12px !important;
  color: #edf3f9 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

html body.is-authenticated .menu-panel {
  background: #ffffff !important;
  border: 1px solid rgba(188, 149, 92, 0.28) !important;
  border-radius: 12px !important;
  box-shadow: 0 18px 34px rgba(23, 50, 77, 0.16) !important;
}

html body.is-authenticated .menu-panel .menu-button {
  color: #611232 !important;
}

html body.is-authenticated .site-nav .menu-button:hover,
html body.is-authenticated .site-nav .menu-button.active,
html body.is-authenticated .menu-panel .menu-button:hover,
html body.is-authenticated .menu-panel .menu-button.active {
  background: rgba(188, 149, 92, 0.18) !important;
}

html body.is-authenticated .panel,
html body.is-authenticated .catalog-panel,
html body.is-authenticated .form-panel,
html body.is-authenticated .enrollment-panel,
html body.is-authenticated .modal-card,
html body.is-authenticated .grades-modal-card,
html body.is-authenticated .grade-detail-modal-card,
html body.is-authenticated .dashboard-summary-panel,
html body.is-authenticated .active-period-panel {
  background: #ffffff !important;
  border: 1px solid rgba(97, 18, 50, 0.12) !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 34px rgba(97, 18, 50, 0.10) !important;
}

html body.is-authenticated .panel-head h2,
html body.is-authenticated .panel-head h3,
html body.is-authenticated .catalog-panel h2,
html body.is-authenticated .topbar h1,
html body.is-authenticated .site-header h1,
html body.is-authenticated .report-toolbar h3,
html body.is-authenticated .dashboard-card strong {
  color: #611232 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

html body.is-authenticated .dashboard-card,
html body.is-authenticated .report-toolbar,
html body.is-authenticated .student-document-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,254,0.96)) !important;
  border: 1px solid rgba(97, 18, 50, 0.12) !important;
  border-top: 3px solid #bc955c !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 26px rgba(97, 18, 50, 0.10) !important;
}

html body.is-authenticated .login-button,
html body.is-authenticated button.login-button,
html body.is-authenticated .number-icon-button,
html body.is-authenticated .small-button,
html body.is-authenticated .icon-button:not(.excel-icon-button):not(.pdf-icon-button) {
  background: #9f2241 !important;
  border-color: #9f2241 !important;
  color: #ffffff !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
}

html body.is-authenticated .login-button:hover,
html body.is-authenticated button.login-button:hover,
html body.is-authenticated .number-icon-button:hover,
html body.is-authenticated .small-button:hover,
html body.is-authenticated .icon-button:not(.excel-icon-button):not(.pdf-icon-button):hover {
  background: #9f2241 !important;
  border-color: #9f2241 !important;
}

html body.is-authenticated .ghost-button,
html body.is-authenticated button.ghost-button {
  background: #ffffff !important;
  border: 1px solid #d9e1ea !important;
  color: #611232 !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
}

html body.is-authenticated .logout-button {
  background: #9f2241 !important;
  color: #ffffff !important;
}

html body.is-authenticated input,
html body.is-authenticated select,
html body.is-authenticated textarea,
html body:not(.is-authenticated) input,
html body:not(.is-authenticated) select,
html body:not(.is-authenticated) textarea {
  background: #ffffff !important;
  border: 1px solid #d9e1ea !important;
  color: #2f2428 !important;
  border-radius: 10px !important;
}

html body.is-authenticated input:focus,
html body.is-authenticated select:focus,
html body.is-authenticated textarea:focus,
html body:not(.is-authenticated) input:focus,
html body:not(.is-authenticated) select:focus,
html body:not(.is-authenticated) textarea:focus {
  border-color: #bc955c !important;
  box-shadow: 0 0 0 3px rgba(188, 149, 92, 0.18) !important;
  outline: 0 !important;
}

html body.is-authenticated th,
html body.is-authenticated .catalog-table th,
html body.is-authenticated .report-table th,
html body.is-authenticated .records-table th,
html body.is-authenticated .dashboard-summary-table th,
html body.is-authenticated .grade-detail-table th {
  background: #611232 !important;
  color: #ffffff !important;
  border-bottom: 1px solid #3b0b1f !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

html body.is-authenticated td,
html body.is-authenticated .catalog-table td,
html body.is-authenticated .report-table td,
html body.is-authenticated .records-table td,
html body.is-authenticated .dashboard-summary-table td,
html body.is-authenticated .grade-detail-table td {
  border-bottom: 1px solid #e8edf3 !important;
  color: #2f2428;
  font-size: 13px !important;
}

html body.is-authenticated tbody tr:hover td,
html body.is-authenticated .catalog-table tbody tr:hover td,
html body.is-authenticated .report-table tbody tr:hover td,
html body.is-authenticated .records-table tbody tr:hover td {
  background: #f7efe2 !important;
}

/* Capa final definitiva: sin guinda, base #2D3F54 */
html body,
html body.is-authenticated {
  color: var(--ui-base) !important;
  background: linear-gradient(180deg, #ffffff 0%, var(--ui-page) 48%, #e9eff6 100%) !important;
}

html body.is-authenticated .site-header,
html body.is-authenticated .topbar,
html body.is-authenticated .catalog-panel,
html body.is-authenticated .dashboard-card,
html body.is-authenticated .dashboard-chart,
html body.is-authenticated .active-period-panel,
html body.is-authenticated .report-toolbar,
html body.is-authenticated .modal-content,
html body.is-authenticated .form-card,
html body.is-authenticated .document-card,
html body.is-authenticated .notice-card,
html body.is-authenticated .menu-panel {
  background: rgba(255, 255, 255, 0.97) !important;
  border-color: var(--ui-line) !important;
  box-shadow: 0 18px 42px var(--ui-shadow) !important;
}

html body.is-authenticated .site-nav {
  background: linear-gradient(180deg, var(--ui-base) 0%, var(--ui-primary) 100%) !important;
}

html body.is-authenticated .site-header::after,
html body.is-authenticated .dashboard-card::before,
html body.is-authenticated .report-toolbar::before {
  background: linear-gradient(180deg, var(--ui-base) 0%, var(--ui-primary) 100%) !important;
}

html body.is-authenticated .topbar h1,
html body.is-authenticated .site-header h1,
html body.is-authenticated .panel-head h2,
html body.is-authenticated .panel-head h3,
html body.is-authenticated .catalog-panel h2,
html body.is-authenticated .report-toolbar h3,
html body.is-authenticated .dashboard-card strong,
html body.is-authenticated .catalog-pager,
html body.is-authenticated .reportes-count,
html body.is-authenticated #enrollmentReportCount,
html body.is-authenticated #reportesCount,
html body.is-authenticated .menu-panel .menu-button {
  color: var(--ui-base) !important;
}

html body.is-authenticated .dashboard-card span,
html body.is-authenticated .dashboard-card small,
html body.is-authenticated .panel-head span,
html body.is-authenticated .panel-head p,
html body.is-authenticated .catalog-sub,
html body.is-authenticated .report-toolbar p,
html body.is-authenticated .system-version,
html body.is-authenticated .session-chip,
html body.is-authenticated .brand-domain {
  color: var(--ui-muted) !important;
}

html body.is-authenticated .login-button,
html body.is-authenticated button.login-button,
html body.is-authenticated .number-icon-button,
html body.is-authenticated .small-button,
html body.is-authenticated .icon-button:not(.excel-icon-button):not(.pdf-icon-button):not(.pdf-button):not(.danger-icon) {
  background: var(--ui-primary) !important;
  border-color: var(--ui-primary) !important;
  color: #ffffff !important;
}

html body.is-authenticated .login-button:hover,
html body.is-authenticated button.login-button:hover,
html body.is-authenticated .number-icon-button:hover,
html body.is-authenticated .small-button:hover,
html body.is-authenticated .icon-button:not(.excel-icon-button):not(.pdf-icon-button):not(.pdf-button):not(.danger-icon):hover,
html body.is-authenticated .logout-button {
  background: var(--ui-base) !important;
  border-color: var(--ui-base) !important;
  color: #ffffff !important;
}

html body.is-authenticated .ghost-button,
html body.is-authenticated button.ghost-button {
  background: #ffffff !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-primary) !important;
}

html body.is-authenticated th,
html body.is-authenticated .catalog-table th,
html body.is-authenticated .report-table th,
html body.is-authenticated .records-table th,
html body.is-authenticated .dashboard-summary-table th,
html body.is-authenticated .grade-detail-table th {
  background: var(--ui-base) !important;
  border-color: var(--ui-base) !important;
  color: #ffffff !important;
}

html body.is-authenticated tbody tr:hover td,
html body.is-authenticated .catalog-table tbody tr:hover td,
html body.is-authenticated .report-table tbody tr:hover td,
html body.is-authenticated .records-table tbody tr:hover td {
  background: rgba(0, 76, 148, 0.10) !important;
}

html body.is-authenticated .danger,
html body.is-authenticated .danger-icon,
html body.is-authenticated .control-school-button,
html body.is-authenticated button[data-tone="danger"],
html body.is-authenticated .recursamiento-save-status[data-tone="error"],
html body.is-authenticated #importStatus.status-error,
html body.is-authenticated #enrollmentStatus[data-tone="error"] {
  background-color: var(--ui-alert) !important;
  border-color: var(--ui-alert) !important;
  color: #ffffff !important;
}

html body:not(.is-authenticated) .login-screen {
  background: linear-gradient(135deg, #ffffff 0%, var(--ui-soft) 58%, #e7eef6 100%) !important;
}

html body:not(.is-authenticated) .login-card {
  border-top: 5px solid var(--ui-base) !important;
  box-shadow: 0 24px 60px rgba(45, 63, 84, 0.18) !important;
}

html body:not(.is-authenticated) .login-card h1 {
  color: var(--ui-base) !important;
}

html body:not(.is-authenticated) .login-subtitle,
html body:not(.is-authenticated) .brand-domain {
  color: var(--ui-primary) !important;
}

html body:not(.is-authenticated) .login-button,
html body:not(.is-authenticated) button.login-button {
  background: var(--ui-primary) !important;
  border-color: var(--ui-primary) !important;
  color: #ffffff !important;
}

/* Ajuste de menú: sólido, sin línea superior ni flechas */
html body.is-authenticated .site-nav {
  background: var(--ui-base) !important;
  background-image: none !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

html body.is-authenticated .site-header::after {
  display: none !important;
  content: none !important;
  height: 0 !important;
  background: transparent !important;
}

html body.is-authenticated .menu-group h2::after,
html body.is-authenticated .structured-menu > .menu-group > h2::after {
  display: none !important;
  content: none !important;
}

html body.is-authenticated .menu-group h2,
html body.is-authenticated .structured-menu > .menu-group > h2 {
  padding-right: 0 !important;
}

/* Ajustes finales solicitados */
html body.is-authenticated .site-footer h2,
html body.is-authenticated .site-footer h3 {
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

html body.is-authenticated .site-footer-grid p,
html body.is-authenticated .site-footer-grid a {
  font-weight: 400 !important;
}

html body.is-authenticated .site-footer-bottom p:first-child {
  color: #ffffff !important;
  font-weight: 900 !important;
}

html body.is-authenticated .site-footer-bottom {
  gap: 2px !important;
}

html body.is-authenticated .site-nav {
  padding: 10px 18px !important;
}

html body.is-authenticated .structured-menu {
  align-items: center !important;
  gap: 10px !important;
}

html body.is-authenticated .structured-menu > .menu-group > h2 {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border-radius: 12px !important;
}

html body.is-authenticated .menu-panel .menu-button,
html body.is-authenticated .site-nav .menu-button {
  min-height: 40px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
}

html body.is-authenticated .menu-panel .menu-button.active {
  background: rgba(0, 76, 148, 0.14) !important;
  color: var(--ui-primary) !important;
}

html body.is-authenticated #emailImportForm {
  grid-template-columns: minmax(260px, 420px) minmax(150px, auto) minmax(120px, 1fr) minmax(150px, auto) minmax(150px, auto) !important;
  align-items: end !important;
}

html body.is-authenticated #emailImportForm .template-download-button,
html body.is-authenticated #emailImportForm .add-user-button {
  min-width: 150px !important;
  height: 44px !important;
  justify-self: stretch !important;
}

html body.is-authenticated .papers-report-button {
  min-width: 96px !important;
  padding-right: 14px !important;
  padding-left: 14px !important;
}

html body.is-authenticated .grade-detail-table th:nth-child(n+3):nth-child(-n+10),
html body.is-authenticated .grade-detail-table td:nth-child(n+3):nth-child(-n+10) {
  width: 56px !important;
  min-width: 56px !important;
  max-width: 56px !important;
  padding-right: 6px !important;
  padding-left: 6px !important;
  text-align: center !important;
}

@media (max-width: 760px) {
  html body.is-authenticated #emailImportForm {
    grid-template-columns: 1fr !important;
  }
}

/* Tema final solicitado: base #2D3F54 con soporte #004C94, #52647A y alerta #F24F4F */
:root {
  --ui-base: #2D3F54;
  --ui-primary: #004C94;
  --ui-muted: #52647A;
  --ui-alert: #F24F4F;
  --ui-page: #f4f7fb;
  --ui-soft: #eef3f8;
  --ui-line: rgba(45, 63, 84, 0.14);
  --ui-shadow: rgba(45, 63, 84, 0.14);
}

html body,
html body.is-authenticated {
  color: var(--ui-base) !important;
  background: linear-gradient(180deg, #ffffff 0%, var(--ui-page) 48%, #e9eff6 100%) !important;
}

html body.is-authenticated .site-header,
html body.is-authenticated .topbar,
html body.is-authenticated .catalog-panel,
html body.is-authenticated .dashboard-card,
html body.is-authenticated .dashboard-chart,
html body.is-authenticated .active-period-panel,
html body.is-authenticated .report-toolbar,
html body.is-authenticated .modal-content,
html body.is-authenticated .form-card,
html body.is-authenticated .document-card,
html body.is-authenticated .notice-card,
html body.is-authenticated .menu-panel {
  background: rgba(255, 255, 255, 0.97) !important;
  border-color: var(--ui-line) !important;
  box-shadow: 0 18px 42px var(--ui-shadow) !important;
}

html body.is-authenticated .site-nav {
  background: linear-gradient(180deg, var(--ui-base) 0%, var(--ui-primary) 100%) !important;
}

html body.is-authenticated .site-header::after,
html body.is-authenticated .dashboard-card::before,
html body.is-authenticated .report-toolbar::before {
  background: linear-gradient(180deg, var(--ui-base) 0%, var(--ui-primary) 100%) !important;
}

html body.is-authenticated .topbar h1,
html body.is-authenticated .site-header h1,
html body.is-authenticated .panel-head h2,
html body.is-authenticated .panel-head h3,
html body.is-authenticated .catalog-panel h2,
html body.is-authenticated .report-toolbar h3,
html body.is-authenticated .dashboard-card strong,
html body.is-authenticated .catalog-pager,
html body.is-authenticated .reportes-count,
html body.is-authenticated #enrollmentReportCount,
html body.is-authenticated #reportesCount,
html body.is-authenticated .menu-panel .menu-button {
  color: var(--ui-base) !important;
}

html body.is-authenticated .dashboard-card span,
html body.is-authenticated .dashboard-card small,
html body.is-authenticated .panel-head span,
html body.is-authenticated .panel-head p,
html body.is-authenticated .catalog-sub,
html body.is-authenticated .report-toolbar p,
html body.is-authenticated .system-version,
html body.is-authenticated .session-chip,
html body.is-authenticated .brand-domain {
  color: var(--ui-muted) !important;
}

html body.is-authenticated .site-nav .menu-button,
html body.is-authenticated .site-nav .structured-menu > .menu-button {
  color: #ffffff !important;
}

html body.is-authenticated .structured-menu > .menu-group > h2 {
  color: rgba(255, 255, 255, 0.82) !important;
}

html body.is-authenticated .site-nav .menu-button:hover,
html body.is-authenticated .site-nav .menu-button.active {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
}

html body.is-authenticated .menu-panel .menu-button:hover,
html body.is-authenticated .menu-panel .menu-button.active {
  background: rgba(0, 76, 148, 0.12) !important;
  color: var(--ui-primary) !important;
}

html body.is-authenticated .site-nav .menu-button::before,
html body.is-authenticated .quick-actions button::before,
html body.is-authenticated .module-list button::before {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
}

html body.is-authenticated .login-button,
html body.is-authenticated button.login-button,
html body.is-authenticated .number-icon-button,
html body.is-authenticated .small-button,
html body.is-authenticated .icon-button:not(.excel-icon-button):not(.pdf-icon-button):not(.pdf-button):not(.danger-icon) {
  background: var(--ui-primary) !important;
  border-color: var(--ui-primary) !important;
  color: #ffffff !important;
}

html body.is-authenticated .login-button:hover,
html body.is-authenticated button.login-button:hover,
html body.is-authenticated .number-icon-button:hover,
html body.is-authenticated .small-button:hover,
html body.is-authenticated .icon-button:not(.excel-icon-button):not(.pdf-icon-button):not(.pdf-button):not(.danger-icon):hover {
  background: var(--ui-base) !important;
  border-color: var(--ui-base) !important;
  color: #ffffff !important;
}

html body.is-authenticated .ghost-button,
html body.is-authenticated button.ghost-button {
  background: #ffffff !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-primary) !important;
}

html body.is-authenticated .ghost-button:hover,
html body.is-authenticated button.ghost-button:hover {
  background: rgba(0, 76, 148, 0.08) !important;
  border-color: var(--ui-primary) !important;
  color: var(--ui-base) !important;
}

html body.is-authenticated .logout-button {
  background: var(--ui-base) !important;
  border-color: var(--ui-base) !important;
  color: #ffffff !important;
}

html body.is-authenticated .danger,
html body.is-authenticated .danger-icon,
html body.is-authenticated .control-school-button,
html body.is-authenticated button[data-tone="danger"] {
  background: var(--ui-alert) !important;
  border-color: var(--ui-alert) !important;
  color: #ffffff !important;
}

html body.is-authenticated .danger:hover,
html body.is-authenticated .danger-icon:hover,
html body.is-authenticated .control-school-button:hover,
html body.is-authenticated button[data-tone="danger"]:hover {
  background: #d94444 !important;
  border-color: #d94444 !important;
}

html body.is-authenticated input,
html body.is-authenticated select,
html body.is-authenticated textarea,
html body:not(.is-authenticated) input,
html body:not(.is-authenticated) select,
html body:not(.is-authenticated) textarea {
  border-color: var(--ui-line) !important;
  color: var(--ui-base) !important;
}

html body.is-authenticated input:focus,
html body.is-authenticated select:focus,
html body.is-authenticated textarea:focus,
html body:not(.is-authenticated) input:focus,
html body:not(.is-authenticated) select:focus,
html body:not(.is-authenticated) textarea:focus {
  border-color: var(--ui-primary) !important;
  box-shadow: 0 0 0 3px rgba(0, 76, 148, 0.18) !important;
}

html body.is-authenticated th,
html body.is-authenticated .catalog-table th,
html body.is-authenticated .report-table th,
html body.is-authenticated .records-table th,
html body.is-authenticated .dashboard-summary-table th,
html body.is-authenticated .grade-detail-table th {
  background: var(--ui-base) !important;
  border-bottom-color: var(--ui-primary) !important;
  color: #ffffff !important;
}

html body.is-authenticated td,
html body.is-authenticated .catalog-table td,
html body.is-authenticated .report-table td,
html body.is-authenticated .records-table td,
html body.is-authenticated .dashboard-summary-table td,
html body.is-authenticated .grade-detail-table td {
  border-bottom-color: rgba(82, 100, 122, 0.16) !important;
  color: var(--ui-base) !important;
}

html body.is-authenticated tbody tr:hover td,
html body.is-authenticated .catalog-table tbody tr:hover td,
html body.is-authenticated .report-table tbody tr:hover td,
html body.is-authenticated .records-table tbody tr:hover td,
html body.is-authenticated .grade-detail-table tbody tr:hover td {
  background: rgba(0, 76, 148, 0.10) !important;
}

html body.is-authenticated .status-na,
html body.is-authenticated td.status-na,
html body.is-authenticated tr.status-na td {
  background: rgba(82, 100, 122, 0.16) !important;
}

html body.is-authenticated .status-np,
html body.is-authenticated td.status-np,
html body.is-authenticated tr.status-np td,
html body.is-authenticated tr.status-risk td {
  background: rgba(242, 79, 79, 0.18) !important;
}

html body.is-authenticated tr.status-np:hover td,
html body.is-authenticated tr.status-risk:hover td {
  background: rgba(242, 79, 79, 0.28) !important;
}

html body.is-authenticated .status-missing td,
html body.is-authenticated tr.status-missing td {
  background: rgba(242, 79, 79, 0.14) !important;
}

html body.is-authenticated .status-missing:hover td,
html body.is-authenticated tr.status-missing:hover td {
  background: rgba(242, 79, 79, 0.24) !important;
}

html body.is-authenticated .status-downloaded td,
html body.is-authenticated tr.status-downloaded td {
  background: rgba(0, 76, 148, 0.10) !important;
}

html body.is-authenticated .status-downloaded:hover td,
html body.is-authenticated tr.status-downloaded:hover td {
  background: rgba(0, 76, 148, 0.18) !important;
}

html body.is-authenticated .recursamiento-save-status[data-tone="error"],
html body.is-authenticated .period-year-form .status-error,
html body.is-authenticated #teacherImportStatus.status-error,
html body.is-authenticated #tutorImportStatus.status-error,
html body.is-authenticated #userImportStatus.status-error,
html body.is-authenticated #adminAlumnosImportStatus.status-error,
html body.is-authenticated #directorImportStatus.status-error,
html body.is-authenticated #subjectImportStatus.status-error,
html body.is-authenticated #importStatus.status-error,
html body.is-authenticated #enrollmentStatus[data-tone="error"] {
  color: var(--ui-alert) !important;
}

html body.is-authenticated #importStatus.status-ok,
html body.is-authenticated #activePeriodStatus,
html body.is-authenticated #teacherImportStatus.status-ok,
html body.is-authenticated #tutorImportStatus.status-ok,
html body.is-authenticated #userImportStatus.status-ok,
html body.is-authenticated #adminAlumnosImportStatus.status-ok,
html body.is-authenticated #directorImportStatus.status-ok,
html body.is-authenticated #subjectImportStatus.status-ok,
html body.is-authenticated #enrollmentStatus[data-tone="ok"] {
  color: var(--ui-primary) !important;
}

html body:not(.is-authenticated) .login-screen {
  background: linear-gradient(135deg, #ffffff 0%, var(--ui-soft) 58%, #e7eef6 100%) !important;
}

html body:not(.is-authenticated) .login-card {
  border-top: 5px solid var(--ui-base) !important;
  box-shadow: 0 24px 60px rgba(45, 63, 84, 0.18) !important;
}

html body:not(.is-authenticated) .login-card h1 {
  color: var(--ui-base) !important;
}

html body:not(.is-authenticated) .login-subtitle,
html body:not(.is-authenticated) .brand-domain {
  color: var(--ui-primary) !important;
}

html body:not(.is-authenticated) .login-button,
html body:not(.is-authenticated) button.login-button {
  background: var(--ui-primary) !important;
  border-color: var(--ui-primary) !important;
  color: #ffffff !important;
}

html body:not(.is-authenticated) .login-button:hover,
html body:not(.is-authenticated) button.login-button:hover {
  background: var(--ui-base) !important;
  border-color: var(--ui-base) !important;
}

/* Tema final: paleta solicitada */
:root {
  --palette-ink: #2D3F54;
  --palette-muted: #52647A;
  --palette-green: #73CC80;
  --palette-blue: #004C94;
  --palette-sky: #006ECF;
  --palette-light-blue: #3C93FA;
  --palette-aqua: #00D4C6;
  --palette-teal: #0FA69D;
  --palette-deep-teal: #028183;
  --palette-page: #f4f8fc;
  --palette-soft: #eef7fb;
  --palette-line: rgba(45, 63, 84, 0.14);
  --palette-shadow: rgba(45, 63, 84, 0.13);
}

html body,
html body.is-authenticated {
  color: var(--palette-ink) !important;
  background:
    radial-gradient(circle at top left, rgba(0, 212, 198, 0.16), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, var(--palette-page) 46%, #eaf4f9 100%) !important;
}

html body.is-authenticated .site-header {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom-color: var(--palette-line) !important;
  box-shadow: 0 10px 26px var(--palette-shadow) !important;
}

html body.is-authenticated .site-header::after,
html body.is-authenticated .dashboard-card::before,
html body.is-authenticated .report-toolbar::before {
  background: linear-gradient(180deg, var(--palette-blue) 0%, var(--palette-sky) 48%, var(--palette-aqua) 100%) !important;
}

html body.is-authenticated .site-nav {
  background: linear-gradient(180deg, var(--palette-ink) 0%, var(--palette-blue) 100%) !important;
}

html body.is-authenticated .structured-menu > .menu-group > h2 {
  color: rgba(255, 255, 255, 0.82) !important;
}

html body.is-authenticated .site-nav .menu-button,
html body.is-authenticated .site-nav .structured-menu > .menu-button,
html body.is-authenticated .menu-panel .menu-button {
  color: #ffffff !important;
}

html body.is-authenticated .site-nav .menu-button:hover,
html body.is-authenticated .site-nav .menu-button.active,
html body.is-authenticated .menu-panel .menu-button:hover {
  background: rgba(0, 212, 198, 0.16) !important;
  color: #ffffff !important;
}

html body.is-authenticated .site-nav .menu-button::before,
html body.is-authenticated .quick-actions button::before,
html body.is-authenticated .module-list button::before {
  background: rgba(0, 212, 198, 0.16) !important;
  color: var(--palette-aqua) !important;
}

html body.is-authenticated .menu-panel {
  background: #ffffff !important;
  border-color: var(--palette-line) !important;
  box-shadow: 0 18px 34px var(--palette-shadow) !important;
}

html body.is-authenticated .menu-panel .menu-button {
  color: var(--palette-ink) !important;
}

html body.is-authenticated .menu-panel .menu-button:hover,
html body.is-authenticated .menu-panel .menu-button.active {
  background: rgba(60, 147, 250, 0.14) !important;
  color: var(--palette-blue) !important;
}

html body.is-authenticated .topbar,
html body.is-authenticated .catalog-panel,
html body.is-authenticated .dashboard-card,
html body.is-authenticated .dashboard-chart,
html body.is-authenticated .active-period-panel,
html body.is-authenticated .report-toolbar,
html body.is-authenticated .modal-content,
html body.is-authenticated .form-card,
html body.is-authenticated .document-card,
html body.is-authenticated .notice-card {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: var(--palette-line) !important;
  box-shadow: 0 18px 42px var(--palette-shadow) !important;
}

html body.is-authenticated .topbar h1,
html body.is-authenticated .site-header h1,
html body.is-authenticated .panel-head h2,
html body.is-authenticated .panel-head h3,
html body.is-authenticated .catalog-panel h2,
html body.is-authenticated .report-toolbar h3,
html body.is-authenticated .dashboard-card strong,
html body.is-authenticated .catalog-pager,
html body.is-authenticated .reportes-count,
html body.is-authenticated #enrollmentReportCount,
html body.is-authenticated #reportesCount {
  color: var(--palette-ink) !important;
}

html body.is-authenticated .dashboard-card span,
html body.is-authenticated .dashboard-card small,
html body.is-authenticated .panel-head span,
html body.is-authenticated .panel-head p,
html body.is-authenticated .catalog-sub,
html body.is-authenticated .report-toolbar p,
html body.is-authenticated .system-version,
html body.is-authenticated .session-chip,
html body.is-authenticated .brand-domain {
  color: var(--palette-muted) !important;
}

html body.is-authenticated .login-button,
html body.is-authenticated button.login-button,
html body.is-authenticated .number-icon-button,
html body.is-authenticated .small-button,
html body.is-authenticated .icon-button:not(.excel-icon-button):not(.pdf-icon-button) {
  background: var(--palette-blue) !important;
  border-color: var(--palette-blue) !important;
  color: #ffffff !important;
}

html body.is-authenticated .login-button:hover,
html body.is-authenticated button.login-button:hover,
html body.is-authenticated .number-icon-button:hover,
html body.is-authenticated .small-button:hover,
html body.is-authenticated .icon-button:not(.excel-icon-button):not(.pdf-icon-button):hover {
  background: var(--palette-sky) !important;
  border-color: var(--palette-sky) !important;
  color: #ffffff !important;
}

html body.is-authenticated .ghost-button,
html body.is-authenticated button.ghost-button {
  background: #ffffff !important;
  border-color: var(--palette-line) !important;
  color: var(--palette-blue) !important;
}

html body.is-authenticated .ghost-button:hover,
html body.is-authenticated button.ghost-button:hover {
  background: rgba(0, 212, 198, 0.12) !important;
  border-color: var(--palette-aqua) !important;
  color: var(--palette-deep-teal) !important;
}

html body.is-authenticated .logout-button {
  background: var(--palette-deep-teal) !important;
  border-color: var(--palette-deep-teal) !important;
}

html body.is-authenticated input,
html body.is-authenticated select,
html body.is-authenticated textarea,
html body:not(.is-authenticated) input,
html body:not(.is-authenticated) select,
html body:not(.is-authenticated) textarea {
  border-color: var(--palette-line) !important;
  color: var(--palette-ink) !important;
}

html body.is-authenticated input:focus,
html body.is-authenticated select:focus,
html body.is-authenticated textarea:focus,
html body:not(.is-authenticated) input:focus,
html body:not(.is-authenticated) select:focus,
html body:not(.is-authenticated) textarea:focus {
  border-color: var(--palette-aqua) !important;
  box-shadow: 0 0 0 3px rgba(0, 212, 198, 0.2) !important;
}

html body.is-authenticated th,
html body.is-authenticated .catalog-table th,
html body.is-authenticated .report-table th,
html body.is-authenticated .records-table th,
html body.is-authenticated .dashboard-summary-table th,
html body.is-authenticated .grade-detail-table th {
  background: var(--palette-ink) !important;
  border-bottom-color: var(--palette-blue) !important;
  color: #ffffff !important;
}

html body.is-authenticated td,
html body.is-authenticated .catalog-table td,
html body.is-authenticated .report-table td,
html body.is-authenticated .records-table td,
html body.is-authenticated .dashboard-summary-table td,
html body.is-authenticated .grade-detail-table td {
  border-bottom-color: rgba(82, 100, 122, 0.16) !important;
  color: var(--palette-ink) !important;
}

html body.is-authenticated tbody tr:hover td,
html body.is-authenticated .catalog-table tbody tr:hover td,
html body.is-authenticated .report-table tbody tr:hover td,
html body.is-authenticated .records-table tbody tr:hover td,
html body.is-authenticated .grade-detail-table tbody tr:hover td {
  background: rgba(60, 147, 250, 0.12) !important;
}

html body.is-authenticated .risk-row td,
html body.is-authenticated tr.risk-row:hover td {
  background: oklch(97.1% 0.013 17.38) !important;
}

html body.is-authenticated .status-na,
html body.is-authenticated td.status-na {
  background: oklch(97.3% 0.071 103.193) !important;
}

html body.is-authenticated .status-np,
html body.is-authenticated td.status-np {
  background: oklch(93.6% 0.032 17.717) !important;
}

html body.is-authenticated .chart-bar,
html body.is-authenticated .progress-bar {
  background: linear-gradient(90deg, var(--palette-blue), var(--palette-light-blue), var(--palette-aqua)) !important;
}

html body:not(.is-authenticated) .login-screen {
  background:
    radial-gradient(circle at top, rgba(0, 212, 198, 0.18), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #eef7fb 52%, #dff8f7 100%) !important;
}

html body:not(.is-authenticated) .login-card {
  border-top: 5px solid var(--palette-blue) !important;
  box-shadow: 0 24px 60px rgba(45, 63, 84, 0.18) !important;
}

html body:not(.is-authenticated) .login-card h1 {
  color: var(--palette-ink) !important;
}

html body:not(.is-authenticated) .login-subtitle,
html body:not(.is-authenticated) .brand-domain {
  color: var(--palette-blue) !important;
}

html body:not(.is-authenticated) .login-button,
html body:not(.is-authenticated) button.login-button {
  background: var(--palette-blue) !important;
  border-color: var(--palette-blue) !important;
  color: #ffffff !important;
}

html body:not(.is-authenticated) .login-button:hover,
html body:not(.is-authenticated) button.login-button:hover {
  background: var(--palette-sky) !important;
  border-color: var(--palette-sky) !important;
}

/* Tema DGETI/SEP oficial */
:root {
  --dgeti-guinda: #611232;
  --dgeti-vino: #9d2449;
  --dgeti-dorado: #b38e5d;
  --dgeti-verde: #235b4e;
  --dgeti-gris: #6f7271;
  --dgeti-tinta: #2b2427;
  --dgeti-fondo: #f8f7f3;
  --dgeti-panel: #ffffff;
  --dgeti-linea: #ded8ce;
}

html body,
html body.is-authenticated {
  background:
    radial-gradient(circle at top left, rgba(179, 142, 93, 0.14), transparent 34%),
    linear-gradient(180deg, #fbfaf7 0%, #f8f7f3 48%, #eee9df 100%) !important;
  color: var(--dgeti-tinta) !important;
  font-family: Montserrat, Arial, Helvetica, sans-serif !important;
  font-size: 14px !important;
}

html body h1,
html body h2,
html body h3,
html body h4,
html body h5,
html body h6,
html body.is-authenticated .site-header h1,
html body.is-authenticated .topbar h1,
html body.is-authenticated .panel-head h2,
html body.is-authenticated .panel-head h3,
html body.is-authenticated .catalog-panel h2,
html body.is-authenticated .report-toolbar h3 {
  color: var(--dgeti-guinda) !important;
  font-family: Montserrat, Arial, Helvetica, sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

html body h1,
html body.is-authenticated .site-header h1,
html body.is-authenticated .topbar h1 {
  font-size: clamp(18px, 1.7vw, 24px) !important;
  line-height: 1.18 !important;
}

html body h2,
html body.is-authenticated .panel-head h2,
html body.is-authenticated .catalog-panel h2 {
  font-size: clamp(17px, 1.35vw, 21px) !important;
}

html body h3,
html body.is-authenticated .report-toolbar h3 {
  font-size: 15px !important;
  line-height: 1.25 !important;
}

html body.is-authenticated .site-header {
  background: rgba(251, 250, 247, 0.98) !important;
  border-bottom: 1px solid rgba(179, 142, 93, 0.42) !important;
  box-shadow: 0 8px 22px rgba(97, 18, 50, 0.08) !important;
}

html body.is-authenticated .site-header::after {
  background: linear-gradient(90deg, var(--dgeti-guinda) 0%, var(--dgeti-vino) 42%, var(--dgeti-dorado) 100%) !important;
}

html body.is-authenticated .site-nav {
  background: linear-gradient(180deg, var(--dgeti-guinda) 0%, #3b0b1f 100%) !important;
  box-shadow: 10px 0 24px rgba(97, 18, 50, 0.18) !important;
}

html body.is-authenticated .structured-menu > .menu-group > h2 {
  color: rgba(255, 255, 255, 0.76) !important;
  font-size: 11px !important;
}

html body.is-authenticated .site-nav .menu-button,
html body.is-authenticated .site-nav .structured-menu > .menu-button {
  color: #fff8ef !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
}

html body.is-authenticated .site-nav .menu-button::before {
  background: #fff8ef !important;
  color: var(--dgeti-guinda) !important;
}

html body.is-authenticated .menu-panel {
  background: var(--dgeti-panel) !important;
  border: 1px solid rgba(179, 142, 93, 0.35) !important;
  box-shadow: 0 18px 34px rgba(97, 18, 50, 0.16) !important;
}

html body.is-authenticated .menu-panel .menu-button {
  color: var(--dgeti-guinda) !important;
}

html body.is-authenticated .site-nav .menu-button:hover,
html body.is-authenticated .site-nav .menu-button.active,
html body.is-authenticated .menu-panel .menu-button:hover,
html body.is-authenticated .menu-panel .menu-button.active {
  background: rgba(179, 142, 93, 0.22) !important;
}

html body.is-authenticated .panel,
html body.is-authenticated .catalog-panel,
html body.is-authenticated .form-panel,
html body.is-authenticated .enrollment-panel,
html body.is-authenticated .modal-card,
html body.is-authenticated .grades-modal-card,
html body.is-authenticated .grade-detail-modal-card,
html body.is-authenticated .dashboard-summary-panel,
html body.is-authenticated .active-period-panel {
  background: var(--dgeti-panel) !important;
  border: 1px solid rgba(97, 18, 50, 0.12) !important;
  border-radius: 12px !important;
  box-shadow: 0 14px 28px rgba(97, 18, 50, 0.10) !important;
}

html body.is-authenticated .dashboard-card,
html body.is-authenticated .report-toolbar,
html body.is-authenticated .student-document-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfaf7 100%) !important;
  border: 1px solid rgba(97, 18, 50, 0.12) !important;
  border-top: 3px solid var(--dgeti-dorado) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 22px rgba(97, 18, 50, 0.10) !important;
}

html body.is-authenticated .dashboard-card::before,
html body.is-authenticated .report-toolbar::before {
  background: linear-gradient(180deg, var(--dgeti-guinda) 0%, var(--dgeti-vino) 54%, var(--dgeti-dorado) 100%) !important;
}

html body.is-authenticated .dashboard-card strong,
html body.is-authenticated .catalog-pager,
html body.is-authenticated .reportes-count,
html body.is-authenticated #enrollmentReportCount,
html body.is-authenticated #reportesCount {
  color: var(--dgeti-guinda) !important;
}

html body.is-authenticated .dashboard-card span,
html body.is-authenticated .dashboard-card small,
html body.is-authenticated .panel-head span,
html body.is-authenticated .panel-head p,
html body.is-authenticated .catalog-sub,
html body.is-authenticated .report-toolbar p,
html body.is-authenticated .system-version,
html body.is-authenticated .session-chip {
  color: var(--dgeti-gris) !important;
  font-size: 12px !important;
}

html body.is-authenticated .login-button,
html body.is-authenticated button.login-button,
html body.is-authenticated .number-icon-button,
html body.is-authenticated .small-button,
html body.is-authenticated .icon-button:not(.excel-icon-button):not(.pdf-icon-button) {
  background: var(--dgeti-guinda) !important;
  border-color: var(--dgeti-guinda) !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

html body.is-authenticated .login-button:hover,
html body.is-authenticated button.login-button:hover,
html body.is-authenticated .number-icon-button:hover,
html body.is-authenticated .small-button:hover,
html body.is-authenticated .icon-button:not(.excel-icon-button):not(.pdf-icon-button):hover {
  background: var(--dgeti-vino) !important;
  border-color: var(--dgeti-vino) !important;
}

html body.is-authenticated .ghost-button,
html body.is-authenticated button.ghost-button {
  background: #ffffff !important;
  border-color: var(--dgeti-linea) !important;
  color: var(--dgeti-guinda) !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

html body.is-authenticated .logout-button {
  background: var(--dgeti-vino) !important;
}

html body.is-authenticated input,
html body.is-authenticated select,
html body.is-authenticated textarea,
html body:not(.is-authenticated) input,
html body:not(.is-authenticated) select,
html body:not(.is-authenticated) textarea {
  border-color: var(--dgeti-linea) !important;
  border-radius: 8px !important;
  color: var(--dgeti-tinta) !important;
  font-size: 14px !important;
}

html body.is-authenticated input:focus,
html body.is-authenticated select:focus,
html body.is-authenticated textarea:focus,
html body:not(.is-authenticated) input:focus,
html body:not(.is-authenticated) select:focus,
html body:not(.is-authenticated) textarea:focus {
  border-color: var(--dgeti-dorado) !important;
  box-shadow: 0 0 0 3px rgba(179, 142, 93, 0.22) !important;
}

html body.is-authenticated th,
html body.is-authenticated .catalog-table th,
html body.is-authenticated .report-table th,
html body.is-authenticated .records-table th,
html body.is-authenticated .dashboard-summary-table th,
html body.is-authenticated .grade-detail-table th {
  background: var(--dgeti-guinda) !important;
  color: #ffffff !important;
  border-bottom-color: #3b0b1f !important;
  font-size: 11.5px !important;
}

html body.is-authenticated td,
html body.is-authenticated .catalog-table td,
html body.is-authenticated .report-table td,
html body.is-authenticated .records-table td,
html body.is-authenticated .dashboard-summary-table td,
html body.is-authenticated .grade-detail-table td {
  border-bottom-color: #eee7db !important;
  color: var(--dgeti-tinta) !important;
  font-size: 13px !important;
}

html body.is-authenticated tbody tr:hover td,
html body.is-authenticated .catalog-table tbody tr:hover td,
html body.is-authenticated .report-table tbody tr:hover td,
html body.is-authenticated .records-table tbody tr:hover td {
  background: #f3eadb !important;
}

html body:not(.is-authenticated) .login-screen {
  background:
    radial-gradient(circle at top, rgba(179, 142, 93, 0.18), transparent 34%),
    linear-gradient(135deg, #fbfaf7 0%, #f3eadb 58%, #eee7db 100%) !important;
}

html body:not(.is-authenticated) .login-card {
  border-top: 5px solid var(--dgeti-guinda) !important;
}

html body:not(.is-authenticated) .login-card h1 {
  color: var(--dgeti-guinda) !important;
  font-size: 30px !important;
}

html body:not(.is-authenticated) .login-subtitle {
  color: var(--dgeti-vino) !important;
}

html body:not(.is-authenticated) .login-screen {
  background:
    radial-gradient(circle at top, rgba(188, 149, 92, 0.18), transparent 34%),
    linear-gradient(135deg, #faf8f4 0%, #f7efe2 58%, #efe7db 100%) !important;
}

html body:not(.is-authenticated) .login-card {
  border-top: 5px solid #9f2241 !important;
  box-shadow: 0 24px 60px rgba(97, 18, 50, 0.16) !important;
}

html body:not(.is-authenticated) .login-card h1 {
  color: #611232 !important;
}

html body:not(.is-authenticated) .login-subtitle {
  color: #9f2241 !important;
  font-weight: 900 !important;
}

/* Ajuste final sin azul: paleta institucional guinda/dorado */
html body,
html body.is-authenticated {
  color: #2f2428 !important;
  background:
    radial-gradient(circle at top left, rgba(188, 149, 92, 0.15), transparent 34%),
    linear-gradient(180deg, #faf8f4 0%, #f7efe2 48%, #efe7db 100%) !important;
}

html body.is-authenticated .site-header {
  box-shadow: 0 8px 22px rgba(97, 18, 50, 0.08) !important;
}

html body.is-authenticated .menu-panel {
  box-shadow: 0 18px 34px rgba(97, 18, 50, 0.16) !important;
}

html body.is-authenticated .menu-panel .menu-button,
html body.is-authenticated .ghost-button,
html body.is-authenticated button.ghost-button,
html body.is-authenticated .panel-head h2,
html body.is-authenticated .panel-head h3,
html body.is-authenticated .catalog-panel h2,
html body.is-authenticated .topbar h1,
html body.is-authenticated .site-header h1,
html body.is-authenticated .report-toolbar h3,
html body.is-authenticated .dashboard-card strong,
html body.is-authenticated .catalog-pager,
html body.is-authenticated .reportes-count,
html body.is-authenticated #enrollmentReportCount,
html body.is-authenticated #reportesCount {
  color: #611232 !important;
}

html body.is-authenticated .site-nav {
  background: linear-gradient(180deg, #611232 0%, #3b0b1f 100%) !important;
}

html body.is-authenticated .site-header::after,
html body.is-authenticated .dashboard-card::before,
html body.is-authenticated .report-toolbar::before {
  background: linear-gradient(180deg, #611232 0%, #9f2241 54%, #bc955c 100%) !important;
}

html body.is-authenticated .login-button,
html body.is-authenticated button.login-button,
html body.is-authenticated .number-icon-button,
html body.is-authenticated .small-button,
html body.is-authenticated .icon-button:not(.excel-icon-button):not(.pdf-icon-button),
html body.is-authenticated th,
html body.is-authenticated .catalog-table th,
html body.is-authenticated .report-table th,
html body.is-authenticated .records-table th,
html body.is-authenticated .dashboard-summary-table th,
html body.is-authenticated .grade-detail-table th {
  background: #611232 !important;
  border-color: #611232 !important;
  color: #ffffff !important;
}

html body.is-authenticated .login-button:hover,
html body.is-authenticated button.login-button:hover,
html body.is-authenticated .number-icon-button:hover,
html body.is-authenticated .small-button:hover,
html body.is-authenticated .icon-button:not(.excel-icon-button):not(.pdf-icon-button):hover,
html body.is-authenticated .logout-button {
  background: #9f2241 !important;
  border-color: #9f2241 !important;
  color: #ffffff !important;
}

html body.is-authenticated tbody tr:hover td,
html body.is-authenticated .catalog-table tbody tr:hover td,
html body.is-authenticated .report-table tbody tr:hover td,
html body.is-authenticated .records-table tbody tr:hover td {
  background: #f7efe2 !important;
}

/* Capa final definitiva: sin guinda, base #2D3F54 */
html body,
html body.is-authenticated {
  color: var(--ui-base) !important;
  background: linear-gradient(180deg, #ffffff 0%, var(--ui-page) 48%, #e9eff6 100%) !important;
}

html body.is-authenticated .site-header,
html body.is-authenticated .topbar,
html body.is-authenticated .catalog-panel,
html body.is-authenticated .dashboard-card,
html body.is-authenticated .dashboard-chart,
html body.is-authenticated .active-period-panel,
html body.is-authenticated .report-toolbar,
html body.is-authenticated .modal-content,
html body.is-authenticated .form-card,
html body.is-authenticated .document-card,
html body.is-authenticated .notice-card,
html body.is-authenticated .menu-panel {
  background: rgba(255, 255, 255, 0.97) !important;
  border-color: var(--ui-line) !important;
  box-shadow: 0 18px 42px var(--ui-shadow) !important;
}

html body.is-authenticated .site-nav {
  background: linear-gradient(180deg, var(--ui-base) 0%, var(--ui-primary) 100%) !important;
}

html body.is-authenticated .site-header::after,
html body.is-authenticated .dashboard-card::before,
html body.is-authenticated .report-toolbar::before {
  background: linear-gradient(180deg, var(--ui-base) 0%, var(--ui-primary) 100%) !important;
}

html body.is-authenticated .topbar h1,
html body.is-authenticated .site-header h1,
html body.is-authenticated .panel-head h2,
html body.is-authenticated .panel-head h3,
html body.is-authenticated .catalog-panel h2,
html body.is-authenticated .report-toolbar h3,
html body.is-authenticated .dashboard-card strong,
html body.is-authenticated .catalog-pager,
html body.is-authenticated .reportes-count,
html body.is-authenticated #enrollmentReportCount,
html body.is-authenticated #reportesCount,
html body.is-authenticated .menu-panel .menu-button {
  color: var(--ui-base) !important;
}

html body.is-authenticated .dashboard-card span,
html body.is-authenticated .dashboard-card small,
html body.is-authenticated .panel-head span,
html body.is-authenticated .panel-head p,
html body.is-authenticated .catalog-sub,
html body.is-authenticated .report-toolbar p,
html body.is-authenticated .system-version,
html body.is-authenticated .session-chip,
html body.is-authenticated .brand-domain {
  color: var(--ui-muted) !important;
}

html body.is-authenticated .login-button,
html body.is-authenticated button.login-button,
html body.is-authenticated .number-icon-button,
html body.is-authenticated .small-button,
html body.is-authenticated .icon-button:not(.excel-icon-button):not(.pdf-icon-button):not(.pdf-button):not(.danger-icon) {
  background: var(--ui-primary) !important;
  border-color: var(--ui-primary) !important;
  color: #ffffff !important;
}

html body.is-authenticated .login-button:hover,
html body.is-authenticated button.login-button:hover,
html body.is-authenticated .number-icon-button:hover,
html body.is-authenticated .small-button:hover,
html body.is-authenticated .icon-button:not(.excel-icon-button):not(.pdf-icon-button):not(.pdf-button):not(.danger-icon):hover,
html body.is-authenticated .logout-button {
  background: var(--ui-base) !important;
  border-color: var(--ui-base) !important;
  color: #ffffff !important;
}

html body.is-authenticated .ghost-button,
html body.is-authenticated button.ghost-button {
  background: #ffffff !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-primary) !important;
}

html body.is-authenticated th,
html body.is-authenticated .catalog-table th,
html body.is-authenticated .report-table th,
html body.is-authenticated .records-table th,
html body.is-authenticated .dashboard-summary-table th,
html body.is-authenticated .grade-detail-table th {
  background: var(--ui-base) !important;
  border-color: var(--ui-base) !important;
  color: #ffffff !important;
}

html body.is-authenticated tbody tr:hover td,
html body.is-authenticated .catalog-table tbody tr:hover td,
html body.is-authenticated .report-table tbody tr:hover td,
html body.is-authenticated .records-table tbody tr:hover td {
  background: rgba(0, 76, 148, 0.10) !important;
}

html body.is-authenticated .danger,
html body.is-authenticated .danger-icon,
html body.is-authenticated .control-school-button,
html body.is-authenticated button[data-tone="danger"] {
  background-color: var(--ui-alert) !important;
  border-color: var(--ui-alert) !important;
  color: #ffffff !important;
}

html body:not(.is-authenticated) .login-screen {
  background: linear-gradient(135deg, #ffffff 0%, var(--ui-soft) 58%, #e7eef6 100%) !important;
}

html body:not(.is-authenticated) .login-card {
  border-top: 5px solid var(--ui-base) !important;
  box-shadow: 0 24px 60px rgba(45, 63, 84, 0.18) !important;
}

html body:not(.is-authenticated) .login-card h1 {
  color: var(--ui-base) !important;
}

html body:not(.is-authenticated) .login-subtitle,
html body:not(.is-authenticated) .brand-domain {
  color: var(--ui-primary) !important;
}

html body:not(.is-authenticated) .login-button,
html body:not(.is-authenticated) button.login-button {
  background: var(--ui-primary) !important;
  border-color: var(--ui-primary) !important;
  color: #ffffff !important;
}

/* Ajuste final de menu: solido, sin linea superior ni flechas */
html body.is-authenticated .site-nav {
  background: var(--ui-base) !important;
  background-image: none !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

html body.is-authenticated .site-header::after {
  display: none !important;
  content: none !important;
  height: 0 !important;
  background: transparent !important;
}

html body.is-authenticated .menu-group h2::after,
html body.is-authenticated .structured-menu > .menu-group > h2::after {
  display: none !important;
  content: none !important;
}

html body.is-authenticated .menu-group h2,
html body.is-authenticated .structured-menu > .menu-group > h2 {
  padding-right: 0 !important;
}

/* Capa final solicitada */
html body.is-authenticated .site-footer h2,
html body.is-authenticated .site-footer h3 {
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

html body.is-authenticated .site-footer-grid p,
html body.is-authenticated .site-footer-grid a {
  font-weight: 400 !important;
}

html body.is-authenticated .site-footer-bottom p:first-child {
  color: #ffffff !important;
  font-weight: 900 !important;
}

html body.is-authenticated .site-footer-bottom {
  gap: 2px !important;
}

html body.is-authenticated .site-nav {
  padding: 10px 18px !important;
}

html body.is-authenticated .structured-menu {
  align-items: center !important;
  gap: 10px !important;
}

html body.is-authenticated .structured-menu > .menu-group > h2 {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border-radius: 12px !important;
}

html body.is-authenticated .menu-panel .menu-button,
html body.is-authenticated .site-nav .menu-button {
  min-height: 40px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
}

html body.is-authenticated .menu-panel .menu-button.active {
  background: rgba(0, 76, 148, 0.14) !important;
  color: var(--ui-primary) !important;
}

html body.is-authenticated #emailImportForm {
  grid-template-columns: minmax(260px, 420px) minmax(150px, auto) minmax(120px, 1fr) minmax(150px, auto) minmax(150px, auto) !important;
  align-items: end !important;
}

html body.is-authenticated #emailImportForm .template-download-button,
html body.is-authenticated #emailImportForm .add-user-button {
  min-width: 150px !important;
  height: 44px !important;
  justify-self: stretch !important;
}

html body.is-authenticated .grade-detail-table th:nth-child(n+3):nth-child(-n+10),
html body.is-authenticated .grade-detail-table td:nth-child(n+3):nth-child(-n+10) {
  width: 56px !important;
  min-width: 56px !important;
  max-width: 56px !important;
  padding-right: 6px !important;
  padding-left: 6px !important;
  text-align: center !important;
}

@media (max-width: 760px) {
  html body.is-authenticated #emailImportForm {
    grid-template-columns: 1fr !important;
  }
}

/* Tipografia global final: Inter + jerarquia H1-H5 */
html,
html body,
html body * {
  font-family: "Inter", Arial, Helvetica, sans-serif !important;
}

html body h1,
html body h2,
html body h3,
html body h4,
html body h5 {
  margin-top: 0;
  letter-spacing: 0 !important;
  line-height: 1.18 !important;
  color: var(--ui-base, #2D3F54);
}

html body h1 {
  font-size: clamp(1.55rem, 1.2rem + 1.15vw, 2.25rem) !important;
  font-weight: 900 !important;
}

html body h2 {
  font-size: clamp(1.25rem, 1.05rem + 0.75vw, 1.75rem) !important;
  font-weight: 850 !important;
}

html body h3 {
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.28rem) !important;
  font-weight: 800 !important;
}

html body h4 {
  font-size: clamp(0.96rem, 0.92rem + 0.18vw, 1.08rem) !important;
  font-weight: 750 !important;
}

html body h5 {
  font-size: clamp(0.88rem, 0.84rem + 0.12vw, 0.96rem) !important;
  font-weight: 700 !important;
}

html body.is-authenticated .structured-menu > .menu-group > h2,
html body.is-authenticated .menu-group h2 {
  font-size: 0.78rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

html body.is-authenticated .menu-panel .menu-button {
  font-size: 0.92rem !important;
}

html body.is-authenticated #emailImportForm .add-user-button[data-add="correos"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

html body.is-authenticated .papers-report-button {
  min-width: 46px !important;
  width: 46px !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
  text-align: center !important;
}

html body.is-authenticated .report-summary-image-button {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 8px !important;
  border-radius: 12px !important;
}

html body.is-authenticated .report-summary-image-button img {
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  object-fit: contain !important;
}


html body.is-authenticated .catalog-actions:has(#enrollmentReportCount) {
  align-items: center !important;
  gap: 10px !important;
}

@media (min-width: 761px) {
  html body.is-authenticated .grades-modal-wrap {
    text-align: center !important;
  }

  html body.is-authenticated .grades-modal-wrap table {
    width: auto !important;
    min-width: min(980px, 100%) !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }
}

html body.is-authenticated .site-footer h2,
html body.is-authenticated .site-footer h3 {
  color: #ffffff !important;
  font-size: 15px !important;
}

@media (max-width: 680px) {
  html body h1 {
    font-size: 1.35rem !important;
  }

  html body h2 {
    font-size: 1.16rem !important;
  }

  html body h3 {
    font-size: 1rem !important;
  }
}

html body.is-authenticated .session-stack {
  align-items: flex-start !important;
  flex-direction: column !important;
  gap: 4px !important;
  justify-content: flex-start !important;
  max-width: 280px !important;
  width: 280px !important;
}

html body.is-authenticated .logout-button.logout-text-button {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #9f2241 !important;
  display: flex !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  height: auto !important;
  justify-content: flex-start !important;
  min-height: 0 !important;
  min-width: auto !important;
  padding: 0 !important;
  text-align: left !important;
  text-decoration: underline !important;
  width: 100% !important;
}

html body.is-authenticated .header-logout-inline.logout-text-button {
  display: inline-flex !important;
  justify-content: flex-start !important;
  margin: 2px 0 4px 0 !important;
  text-align: left !important;
  width: auto !important;
}

#enrollmentPapersTypeLabel,
.enrollment-papers-observation-label {
  color: var(--ink) !important;
  font-weight: 900 !important;
}

@media (max-width: 640px) {
  .papers-checklist {
    grid-template-columns: 1fr;
  }

  .papers-toolbar {
    justify-content: stretch;
  }

  .papers-toggle-button {
    width: 100%;
  }
}

html body.is-authenticated .dashboard-page > .active-period-row {
  grid-template-columns: 1fr;
  width: 100%;
}

html body.is-authenticated [data-page="parametros"] .active-period-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

html body.is-authenticated [data-page="parametros"] .active-period-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 180px !important;
  width: 100% !important;
}

html body.is-authenticated [data-page="parametros"] .active-period-form .button-with-icon {
  justify-content: flex-start;
  white-space: nowrap;
  width: 100%;
}

html body.is-authenticated [data-page="parametros"] .active-period-form label,
html body.is-authenticated [data-page="parametros"] .active-period-form select {
  max-width: none !important;
  min-width: 0 !important;
  width: 100% !important;
}

html body.is-authenticated [data-page="parametros"] .active-period-panel {
  min-width: 0;
  width: 100%;
}

html body.is-authenticated .active-period-panel #activePeriodStatus,
html body.is-authenticated .active-period-panel #activeEnrollmentPeriodStatus,
html body.is-authenticated .active-period-panel #activeTutorPeriodStatus,
html body.is-authenticated .active-period-panel #activeRecursamientoPeriodStatus,
html body.is-authenticated .active-period-panel #activeReincorporadoPeriodStatus {
  display: grid;
  gap: 2px;
  margin-left: auto;
  min-width: 160px;
  text-align: left;
  line-height: 1.12;
}

html body.is-authenticated .active-period-panel #activePeriodStatus strong,
html body.is-authenticated .active-period-panel #activeEnrollmentPeriodStatus strong,
html body.is-authenticated .active-period-panel #activeTutorPeriodStatus strong,
html body.is-authenticated .active-period-panel #activeRecursamientoPeriodStatus strong,
html body.is-authenticated .active-period-panel #activeReincorporadoPeriodStatus strong {
  color: #2D3F54;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

html body.is-authenticated .active-period-panel #activePeriodStatus span,
html body.is-authenticated .active-period-panel #activeEnrollmentPeriodStatus span,
html body.is-authenticated .active-period-panel #activeTutorPeriodStatus span,
html body.is-authenticated .active-period-panel #activeRecursamientoPeriodStatus span,
html body.is-authenticated .active-period-panel #activeReincorporadoPeriodStatus span {
  color: #004C94;
  font-size: 13px;
  font-weight: 900;
}

html body.is-authenticated .embedded-catalog-panel .catalog-table th.cell-left,
html body.is-authenticated .embedded-catalog-panel .catalog-table td.cell-left {
  text-align: left !important;
}

html body.is-authenticated .embedded-catalog-panel .catalog-table th.cell-center,
html body.is-authenticated .embedded-catalog-panel .catalog-table td.cell-center {
  text-align: center !important;
}

/* Capa final: todos los botones PDF deben usar tema rojo */
html body.is-authenticated .pdf-icon-button,
html body.is-authenticated button.pdf-icon-button,
html body.is-authenticated .pdf-report-button,
html body.is-authenticated button.pdf-report-button,
html body.is-authenticated .enrollment-pdf-button,
html body.is-authenticated button.enrollment-pdf-button,
html body.is-authenticated #exportCertificateReportPdfButton,
html body.is-authenticated #downloadCertificateButton,
html body.is-authenticated #downloadCompletionLetterButton,
html body.is-authenticated button[data-enrollment-pdf],
html body.is-authenticated button[data-certificate-row-pdf],
html body.is-authenticated button[data-recursamiento-pdf],
html body.is-authenticated button[data-admission-document] {
  background: #F24F4F !important;
  background-image: none !important;
  border-color: #F24F4F !important;
  color: #ffffff !important;
  box-shadow: 0 10px 18px rgba(242, 79, 79, 0.18) !important;
}

html body.is-authenticated .pdf-icon-button:hover,
html body.is-authenticated button.pdf-icon-button:hover,
html body.is-authenticated .pdf-report-button:hover,
html body.is-authenticated button.pdf-report-button:hover,
html body.is-authenticated .enrollment-pdf-button:hover,
html body.is-authenticated button.enrollment-pdf-button:hover,
html body.is-authenticated #exportCertificateReportPdfButton:hover,
html body.is-authenticated #downloadCertificateButton:hover,
html body.is-authenticated #downloadCompletionLetterButton:hover,
html body.is-authenticated button[data-enrollment-pdf]:hover,
html body.is-authenticated button[data-certificate-row-pdf]:hover,
html body.is-authenticated button[data-recursamiento-pdf]:hover,
html body.is-authenticated button[data-admission-document]:hover {
  background: #C93A3A !important;
  background-image: none !important;
  border-color: #C93A3A !important;
  color: #ffffff !important;
  box-shadow: 0 12px 22px rgba(201, 58, 58, 0.24) !important;
}

html body.is-authenticated .pdf-icon-button:disabled,
html body.is-authenticated button.pdf-icon-button:disabled,
html body.is-authenticated .pdf-report-button:disabled,
html body.is-authenticated button.pdf-report-button:disabled,
html body.is-authenticated .enrollment-pdf-button:disabled,
html body.is-authenticated button.enrollment-pdf-button:disabled,
html body.is-authenticated #exportCertificateReportPdfButton:disabled,
html body.is-authenticated #downloadCertificateButton:disabled,
html body.is-authenticated #downloadCompletionLetterButton:disabled,
html body.is-authenticated button[data-enrollment-pdf]:disabled,
html body.is-authenticated button[data-certificate-row-pdf]:disabled,
html body.is-authenticated button[data-recursamiento-pdf]:disabled,
html body.is-authenticated button[data-admission-document]:disabled {
  background: #F8B4B4 !important;
  background-image: none !important;
  border-color: #F8B4B4 !important;
  color: #ffffff !important;
  opacity: 0.72 !important;
  box-shadow: none !important;
}
