﻿/* Ajuste final del Compendio UTP. Carga al final para no ser pisado por otros temas. */
body.is-authenticated .utp-view-hidden,
body.is-authenticated #module-utp .utp-view-hidden {
  display: none !important;
}

body.is-authenticated #module-utp.module.active {
  padding-top: 66px !important;
}

body.is-authenticated #module-utp.module.active > .module-head.module-compact-head,
body.visual-modern.is-authenticated #module-utp.module.active > .module-head.module-compact-head {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1000 !important;
  display: grid !important;
  grid-template-columns: minmax(180px, .65fr) auto auto !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 56px !important;
  padding: 7px 14px !important;
  border: 0 !important;
  border-bottom: 3px solid #facc15 !important;
  border-radius: 0 !important;
  background: #0f4384 !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(15, 44, 82, .18) !important;
}

body.is-authenticated #module-utp .module-head.module-compact-head .module-compact-title h1 {
  margin: 0 !important;
  color: #fff !important;
  font-size: 1.18rem !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
}

body.is-authenticated #module-utp .module-head.module-compact-head .module-compact-title p,
body.is-authenticated #module-utp .module-head.module-compact-head .module-badge {
  display: none !important;
}

body.is-authenticated #module-utp .module-head.module-compact-head .module-compact-actions,
body.is-authenticated #module-utp .module-head.module-compact-head .module-compact-session {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 7px !important;
  min-width: 0 !important;
}

body.is-authenticated #module-utp .module-head.module-compact-head .module-compact-actions :is(button,a),
body.is-authenticated #module-utp .module-head.module-compact-head .module-compact-session :is(button,a),
body.is-authenticated #module-utp .module-head.module-compact-head .module-year-control {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 5px 9px !important;
  border: 1px solid rgba(255,255,255,.35) !important;
  border-radius: 7px !important;
  background: rgba(255,255,255,.09) !important;
  color: #fff !important;
  font-size: .74rem !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

body.is-authenticated #module-utp .module-head.module-compact-head .module-year-control {
  gap: 6px !important;
}

body.is-authenticated #module-utp .module-head.module-compact-head .module-year-control select {
  width: 76px !important;
  min-width: 76px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #0b245f !important;
}

body.is-authenticated #module-utp .module-head.module-compact-head .module-year-control label,
body.is-authenticated #module-utp .module-head.module-compact-head .module-year-control span {
  color: #fff !important;
  font-size: .72rem !important;
  font-weight: 900 !important;
}

body.is-authenticated #module-utp .utp-compact-shell.utp-reference-layout {
  display: grid !important;
  grid-template-columns: 180px minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: start !important;
  width: min(100%, 1760px) !important;
  max-width: 1760px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
}

body.is-authenticated #module-utp .utp-side-menu {
  position: sticky !important;
  top: 72px !important;
  z-index: 30 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
  min-height: calc(100vh - 88px) !important;
  padding: 12px !important;
  border: 1px solid #1d5fa8 !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #103f7d 0%, #0b315f 100%) !important;
  box-shadow: 0 16px 32px rgba(15, 44, 82, .16) !important;
}

body.is-authenticated #module-utp .utp-side-menu strong,
body.is-authenticated #module-utp .utp-side-menu button {
  display: flex !important;
  width: 100% !important;
  min-height: 34px !important;
  align-items: center !important;
  gap: 9px !important;
  padding: 7px 9px !important;
  border-radius: 7px !important;
  color: #fff !important;
  font-size: .78rem !important;
  font-weight: 850 !important;
  text-align: left !important;
  text-decoration: none !important;
}

body.is-authenticated #module-utp .utp-side-menu strong {
  justify-content: center !important;
  margin-bottom: 5px !important;
  border: 1px solid rgba(255,255,255,.4) !important;
  background: rgba(255,255,255,.08) !important;
  text-transform: uppercase !important;
}

body.is-authenticated #module-utp .utp-side-menu button {
  border: 0 !important;
  background: rgba(255,255,255,.08) !important;
  cursor: pointer !important;
}

body.is-authenticated #module-utp .utp-side-menu button:hover,
body.is-authenticated #module-utp .utp-side-menu button:focus-visible {
  background: #145fca !important;
}

body.is-authenticated #module-utp .utp-main-board {
  display: grid !important;
  gap: 10px !important;
  min-width: 0 !important;
}

body.is-authenticated #module-utp .utp-main-board > .utp-compact-title {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 8px 12px !important;
  border: 1px solid #d7e5f4 !important;
  border-left: 5px solid #145fca !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 8px 18px rgba(15, 44, 82, .06) !important;
}

body.is-authenticated #module-utp .utp-main-board > .utp-compact-title h2 {
  margin: 0 !important;
  color: #0b245f !important;
  font-size: 1.15rem !important;
}

body.is-authenticated #module-utp .utp-main-board > .utp-compact-title span {
  color: #52616b !important;
  font-size: .8rem !important;
  font-weight: 850 !important;
}

body.is-authenticated #module-utp .utp-reference-layout .utp-risk-filter-bar {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(160px, 1fr)) !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 8px !important;
  border: 1px solid #d7e5f4 !important;
  border-radius: 8px !important;
  background: #fff !important;
}

body.is-authenticated #module-utp .utp-reference-layout .utp-risk-filter-bar label {
  min-width: 0 !important;
  color: #0b245f !important;
  font-size: .72rem !important;
  font-weight: 900 !important;
}

body.is-authenticated #module-utp .utp-reference-layout .utp-risk-filter-bar select {
  width: 100% !important;
  min-height: 32px !important;
}

body.is-authenticated #module-utp .utp-board-row {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: start !important;
  scroll-margin-top: 76px !important;
}

body.is-authenticated #module-utp .utp-step {
  display: grid !important;
  width: 30px !important;
  height: 30px !important;
  place-items: center !important;
  margin-top: 12px !important;
  border-radius: 999px !important;
  background: #145fca !important;
  color: #fff !important;
  font-size: .9rem !important;
  font-weight: 950 !important;
  box-shadow: 0 8px 18px rgba(20, 95, 202, .24) !important;
}

body.is-authenticated #module-utp .utp-board-content {
  min-width: 0 !important;
  padding: 10px !important;
  border: 1px solid #d7e5f4 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 10px 24px rgba(15, 44, 82, .06) !important;
}

body.is-authenticated #module-utp .utp-compact-section-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 8px !important;
}

body.is-authenticated #module-utp .utp-compact-section-head h3 {
  margin: 0 !important;
  color: #0b245f !important;
  font-size: .95rem !important;
  font-weight: 950 !important;
}

body.is-authenticated #module-utp .utp-compact-section-head small {
  color: #52616b !important;
  font-size: .72rem !important;
  font-weight: 800 !important;
}

body.is-authenticated #module-utp .utp-reference-layout .utp-simple-metrics {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(112px, 1fr)) !important;
  gap: 9px !important;
}

body.is-authenticated #module-utp .utp-reference-layout .utp-simple-metrics article {
  position: relative !important;
  display: grid !important;
  align-content: center !important;
  min-height: 74px !important;
  padding: 10px 42px 10px 12px !important;
  border: 1px solid #dbe7f3 !important;
  border-radius: 8px !important;
  background: #fff !important;
  overflow: hidden !important;
}

body.is-authenticated #module-utp .utp-reference-layout .utp-simple-metrics article span {
  color: #102536 !important;
  font-size: .74rem !important;
  font-weight: 850 !important;
}

body.is-authenticated #module-utp .utp-reference-layout .utp-simple-metrics article b {
  color: #0b245f !important;
  font-size: 1.45rem !important;
  line-height: 1.05 !important;
}

body.is-authenticated #module-utp .utp-reference-layout .utp-simple-metrics article.danger b {
  color: #dc2626 !important;
}

body.is-authenticated #module-utp .utp-reference-layout .utp-simple-metrics article.warning b {
  color: #f97316 !important;
}

body.is-authenticated #module-utp .utp-reference-layout .utp-simple-metrics article i {
  position: absolute !important;
  right: 10px !important;
  bottom: 10px !important;
  display: grid !important;
  width: 30px !important;
  height: 30px !important;
  place-items: center !important;
  border-radius: 8px !important;
  background: #e8f2ff !important;
  color: #145fca !important;
}

body.is-authenticated #module-utp .utp-reference-layout .utp-simple-metrics article.warning i {
  background: #fff7ed !important;
  color: #f97316 !important;
}

body.is-authenticated #module-utp .utp-reference-layout .utp-simple-metrics article.danger i {
  background: #fee2e2 !important;
  color: #dc2626 !important;
}

body.is-authenticated #module-utp .utp-reference-layout .utp-achievement-levels {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 9px !important;
}

body.is-authenticated #module-utp .utp-reference-layout .utp-achievement-levels article {
  display: grid !important;
  place-items: center !important;
  min-height: 78px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
}

body.is-authenticated #module-utp .utp-achievement-levels .level-i { background: #fef2f2 !important; }
body.is-authenticated #module-utp .utp-achievement-levels .level-e { background: #fffbeb !important; }
body.is-authenticated #module-utp .utp-achievement-levels .level-a { background: #eff6ff !important; }
body.is-authenticated #module-utp .utp-achievement-levels .level-d { background: #f0fdf4 !important; }
body.is-authenticated #module-utp .utp-achievement-levels .level-i :is(span,b,small) { color: #dc2626 !important; }
body.is-authenticated #module-utp .utp-achievement-levels .level-e :is(span,b,small) { color: #d97706 !important; }
body.is-authenticated #module-utp .utp-achievement-levels .level-a :is(span,b,small) { color: #0b57b7 !important; }
body.is-authenticated #module-utp .utp-achievement-levels .level-d :is(span,b,small) { color: #15803d !important; }

body.is-authenticated #module-utp .utp-critical-table-wrap {
  overflow-x: auto !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
}

body.is-authenticated #module-utp .utp-critical-table {
  width: 100% !important;
  min-width: 760px !important;
  border-collapse: collapse !important;
}

body.is-authenticated #module-utp .utp-critical-table th,
body.is-authenticated #module-utp .utp-critical-table td {
  padding: 8px 10px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  font-size: .78rem !important;
  text-align: left !important;
}

body.is-authenticated #module-utp .utp-critical-table th {
  background: #f8fafc !important;
  color: #0b245f !important;
  font-weight: 950 !important;
}

body.is-authenticated #module-utp .utp-critical-table tr.danger td { color: #991b1b !important; }
body.is-authenticated #module-utp .utp-critical-table tr.warning td { color: #92400e !important; }

body.is-authenticated #module-utp .utp-risk-tag {
  display: inline-flex !important;
  min-height: 24px !important;
  align-items: center !important;
  padding: 4px 8px !important;
  border-radius: 999px !important;
  font-size: .68rem !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

body.is-authenticated #module-utp .utp-risk-tag.red { background: #fee2e2 !important; color: #b91c1c !important; }
body.is-authenticated #module-utp .utp-risk-tag.yellow { background: #fef3c7 !important; color: #92400e !important; }

body.is-authenticated #module-utp .utp-alert-subject-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .45fr) !important;
  gap: 12px !important;
  align-items: stretch !important;
}

body.is-authenticated #module-utp .utp-alert-cards {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.is-authenticated #module-utp .utp-alert-cards article,
body.is-authenticated #module-utp .utp-low-subjects {
  min-width: 0 !important;
  padding: 12px !important;
  border: 1px solid #d7e5f4 !important;
  border-radius: 8px !important;
  background: #fff !important;
}

body.is-authenticated #module-utp .utp-alert-cards article {
  display: grid !important;
  grid-template-columns: 42px auto minmax(0, 1fr) !important;
  gap: 7px 10px !important;
  align-items: center !important;
}

body.is-authenticated #module-utp .utp-alert-cards i {
  grid-row: span 2 !important;
  display: grid !important;
  width: 42px !important;
  height: 42px !important;
  place-items: center !important;
  border-radius: 8px !important;
  background: #fee2e2 !important;
  color: #dc2626 !important;
  font-size: 1.15rem !important;
}

body.is-authenticated #module-utp .utp-alert-cards article.orange i {
  background: #ffedd5 !important;
  color: #f97316 !important;
}

body.is-authenticated #module-utp .utp-alert-cards b {
  color: #dc2626 !important;
  font-size: 1.55rem !important;
  line-height: 1 !important;
}

body.is-authenticated #module-utp .utp-alert-cards span {
  color: #0b245f !important;
  font-size: .78rem !important;
  font-weight: 900 !important;
}

body.is-authenticated #module-utp .utp-alert-cards small {
  grid-column: 2 / -1 !important;
  color: #52616b !important;
  font-weight: 800 !important;
}

body.is-authenticated #module-utp .utp-low-subjects h3 {
  margin: 0 0 8px !important;
  color: #0b57b7 !important;
  font-size: .9rem !important;
  text-transform: uppercase !important;
}

body.is-authenticated #module-utp .utp-low-subjects ol {
  display: grid !important;
  gap: 7px !important;
  margin: 0 !important;
  padding-left: 18px !important;
}

body.is-authenticated #module-utp .utp-low-subjects li {
  color: #102536 !important;
  font-size: .78rem !important;
  font-weight: 850 !important;
}

body.is-authenticated #module-utp .utp-low-subjects li b {
  float: right !important;
  color: #dc2626 !important;
  font-size: .72rem !important;
}

@media (max-width: 1180px) {
  body.is-authenticated #module-utp.module.active > .module-head.module-compact-head,
  body.visual-modern.is-authenticated #module-utp.module.active > .module-head.module-compact-head {
    grid-template-columns: 1fr !important;
    position: sticky !important;
  }

  body.is-authenticated #module-utp .utp-compact-shell.utp-reference-layout {
    grid-template-columns: 1fr !important;
  }

  body.is-authenticated #module-utp .utp-side-menu {
    position: static !important;
    min-height: 0 !important;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
  }

  body.is-authenticated #module-utp .utp-reference-layout .utp-simple-metrics,
  body.is-authenticated #module-utp .utp-alert-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.is-authenticated #module-utp .utp-alert-subject-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  body.is-authenticated #module-utp .utp-board-row,
  body.is-authenticated #module-utp .utp-reference-layout .utp-risk-filter-bar,
  body.is-authenticated #module-utp .utp-reference-layout .utp-simple-metrics,
  body.is-authenticated #module-utp .utp-reference-layout .utp-achievement-levels,
  body.is-authenticated #module-utp .utp-alert-cards {
    grid-template-columns: 1fr !important;
  }
}


/* Asistencia diaria: formulario en 5 filas y sin vista mensual visible. */
body.is-authenticated #module-asistencia .attendance-tabs-daily-only {
  display: flex !important;
  gap: 8px !important;
  margin: 0 0 10px !important;
}

body.is-authenticated #module-asistencia .attendance-tabs-daily-only button {
  border: 1px solid #16a34a !important;
  border-radius: 8px !important;
  background: #f0fdf4 !important;
  color: #14532d !important;
  font-weight: 950 !important;
}

body.is-authenticated #module-asistencia .daily-attendance-panel.monthly-attendance-panel {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 6px !important;
  padding: 8px 10px !important;
  border: 1px solid #b7e0c5 !important;
  border-radius: 8px !important;
  background: #f8fff9 !important;
  box-shadow: none !important;
}

body.is-authenticated #module-asistencia .daily-attendance-panel label,
body.is-authenticated #module-asistencia .daily-attendance-panel .daily-attendance-actions {
  width: 100% !important;
  min-width: 0 !important;
}

body.is-authenticated #module-asistencia .daily-attendance-panel label {
  display: grid !important;
  gap: 3px !important;
  color: #052e16 !important;
  font-size: .78rem !important;
  font-weight: 950 !important;
}

body.is-authenticated #module-asistencia .daily-attendance-panel select {
  width: 100% !important;
  min-height: 32px !important;
  height: 32px !important;
  padding: 5px 10px !important;
  border: 1px solid #a7d7b8 !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: #0f172a !important;
  font-size: .82rem !important;
  font-weight: 850 !important;
}

body.is-authenticated #module-asistencia .daily-attendance-panel .daily-attendance-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  padding-top: 2px !important;
}

body.is-authenticated #module-asistencia .daily-attendance-panel .daily-attendance-actions button {
  min-height: 32px !important;
  padding: 6px 10px !important;
  border-radius: 7px !important;
  font-size: .78rem !important;
  font-weight: 900 !important;
}

body.is-authenticated #module-asistencia .monthly-attendance-sheet.daily-attendance-sheet {
  margin-top: 10px !important;
}


/* Detalle inline Alumnos Criticos UTP. */
body.is-authenticated #module-utp .utp-critical-split{display:grid!important;grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr)!important;gap:10px!important;align-items:start!important}
body.is-authenticated #module-utp .utp-critical-table tr[data-student]{cursor:pointer!important}
body.is-authenticated #module-utp .utp-critical-table tr.is-selected td{background:#eff6ff!important;box-shadow:inset 4px 0 0 #145fca!important}
body.is-authenticated #module-utp .utp-critical-detail-wrap{min-width:0!important}
body.is-authenticated #module-utp .utp-critical-detail-card{display:grid!important;gap:9px!important;padding:10px!important;border:1px solid #bfd7f0!important;border-radius:8px!important;background:#f8fbff!important}
body.is-authenticated #module-utp .utp-critical-detail-card header{display:flex!important;justify-content:space-between!important;gap:10px!important;align-items:flex-start!important}
body.is-authenticated #module-utp .utp-critical-detail-card header span{color:#0b57b7!important;font-size:.68rem!important;font-weight:950!important;text-transform:uppercase!important}
body.is-authenticated #module-utp .utp-critical-detail-card h4{margin:2px 0!important;color:#0b245f!important;font-size:.98rem!important}
body.is-authenticated #module-utp .utp-critical-detail-card small,body.is-authenticated #module-utp .utp-critical-detail-card p{margin:0!important;color:#52616b!important;font-size:.74rem!important;font-weight:800!important}
body.is-authenticated #module-utp .utp-critical-subject-grid{display:grid!important;gap:7px!important;max-height:330px!important;overflow:auto!important;padding-right:3px!important}
body.is-authenticated #module-utp .utp-critical-subject-card{display:grid!important;grid-template-columns:minmax(120px,1fr) minmax(120px,1.2fr) 52px!important;gap:8px!important;align-items:center!important;min-width:0!important;padding:8px!important;border:1px solid #dbe7f3!important;border-radius:8px!important;background:#fff!important}
body.is-authenticated #module-utp .utp-critical-subject-card.danger{border-color:#fecaca!important;background:#fff5f5!important}
body.is-authenticated #module-utp .utp-critical-subject-card.warning{border-color:#fde68a!important;background:#fffbeb!important}
body.is-authenticated #module-utp .utp-critical-subject-card.ok{border-color:#bbf7d0!important;background:#f8fff9!important}
body.is-authenticated #module-utp .utp-critical-subject-card b{display:block!important;color:#0b245f!important;font-size:.78rem!important;line-height:1.2!important}
body.is-authenticated #module-utp .utp-critical-subject-card small{color:#52616b!important;font-size:.68rem!important}
body.is-authenticated #module-utp .utp-critical-subject-card.danger small,body.is-authenticated #module-utp .utp-critical-subject-card.danger strong{color:#dc2626!important}
body.is-authenticated #module-utp .utp-critical-subject-card.warning small,body.is-authenticated #module-utp .utp-critical-subject-card.warning strong{color:#d97706!important}
body.is-authenticated #module-utp .utp-critical-subject-grades{display:flex!important;flex-wrap:wrap!important;gap:4px!important}
body.is-authenticated #module-utp .utp-subject-grade{display:inline-flex!important;align-items:center!important;min-height:22px!important;padding:3px 6px!important;border-radius:999px!important;background:#e8f2ff!important;color:#0b57b7!important;font-size:.68rem!important;font-weight:900!important}
body.is-authenticated #module-utp .utp-subject-grade.low{background:#fee2e2!important;color:#b91c1c!important}
body.is-authenticated #module-utp .utp-subject-grade.empty{background:#f1f5f9!important;color:#64748b!important}
body.is-authenticated #module-utp .utp-critical-subject-card strong{justify-self:end!important;color:#0b245f!important;font-size:1rem!important}
@media(max-width:1180px){body.is-authenticated #module-utp .utp-critical-split{grid-template-columns:1fr!important}}
