/* Asistencia: composicion visual inspirada en la referencia, sin alterar logica. */
@media screen {
  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia {
    --attendance-ref-blue: #236dcc;
    --attendance-ref-navy: #14213d;
    --attendance-ref-muted: #60708b;
    --attendance-ref-line: #dce4ef;
    --attendance-ref-surface: #fff;
    --attendance-ref-bg: #f5f7fb;
    min-width: 0 !important;
    color: var(--attendance-ref-navy) !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain#appMain #module-asistencia#module-asistencia .module-head {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain#appMain #module-asistencia#module-asistencia .module-head h2 {
    color: #101b31 !important;
    -webkit-text-fill-color: #101b31 !important;
    font-size: clamp(1.55rem, 2.2vw, 2rem) !important;
    line-height: 1.1 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain#appMain #module-asistencia#module-asistencia .module-head p {
    color: var(--attendance-ref-muted) !important;
    -webkit-text-fill-color: var(--attendance-ref-muted) !important;
    font-size: .95rem !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain#appMain #module-asistencia#module-asistencia .module-head > button,
  html body.is-authenticated:not(.report-print-body) #appMain#appMain #module-asistencia#module-asistencia .module-head .module-actions-inline > button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 38px !important;
    padding: 8px 13px !important;
    border-color: #bfd0e4 !important;
    border-radius: 7px !important;
    background: #fff !important;
    color: #29415f !important;
    -webkit-text-fill-color: #29415f !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-tabs {
    margin: 0 0 12px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-tabs button {
    min-height: 36px !important;
    padding: 7px 12px !important;
    border: 1px solid #bfd3ef !important;
    border-radius: 8px !important;
    background: #eaf3ff !important;
    color: #165cae !important;
    font-weight: 750 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-platform-panel {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 16px !important;
    padding: 18px !important;
    border: 1px solid var(--attendance-ref-line) !important;
    border-radius: 14px !important;
    background: var(--attendance-ref-surface) !important;
    box-shadow: 0 8px 24px rgba(31, 58, 95, .06) !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-heading {
    display: flex !important;
    grid-column: 1 / -1 !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px 18px !important;
    min-width: 0 !important;
    padding: 0 0 13px !important;
    border-bottom: 1px solid #e7edf5 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-heading h3 {
    margin: 0 0 3px !important;
    color: var(--attendance-ref-navy) !important;
    font-size: 1.15rem !important;
    line-height: 1.2 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-heading p {
    margin: 0 !important;
    color: var(--attendance-ref-muted) !important;
    font-size: .82rem !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-heading-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 7px !important;
    min-width: 0 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-student-count {
    padding: 6px 10px !important;
    border-radius: 999px !important;
    background: #eaf3ff !important;
    color: #255d9d !important;
    font-size: .72rem !important;
    font-weight: 800 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia #attendanceHistoricalImport {
    min-height: 34px !important;
    height: auto !important;
    padding: 7px 11px !important;
    border-color: #1f63bd !important;
    border-radius: 7px !important;
    background: linear-gradient(180deg, #3482e1, #236dcc) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-size: .74rem !important;
    box-shadow: 0 4px 10px rgba(35, 109, 204, .16) !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-controls {
    display: grid !important;
    grid-template-columns: minmax(220px, 1.6fr) minmax(130px, .8fr) minmax(100px, .55fr) !important;
    align-items: end !important;
    gap: 10px 12px !important;
    min-width: 0 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-controls > label {
    display: grid !important;
    gap: 5px !important;
    width: auto !important;
    min-width: 0 !important;
    color: #23314d !important;
    font-size: .75rem !important;
    font-weight: 750 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-controls > label :is(select, input) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 7px 10px !important;
    border: 1px solid #cbd6e4 !important;
    border-radius: 7px !important;
    background: #fff !important;
    color: #18243b !important;
    font-size: .82rem !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03) !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-controls > :is(.attendance-platform-actions, .attendance-platform-utility) {
    display: flex !important;
    grid-column: 1 / -1 !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 8px 0 0 !important;
    border-top: 1px solid #eef2f7 !important;
    background: transparent !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-controls > .attendance-platform-actions {
    padding-top: 10px !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-controls > .attendance-platform-utility {
    color: var(--attendance-ref-muted) !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-controls .attendance-platform-utility label {
    display: inline-flex !important;
    flex: 0 1 auto !important;
    align-items: center !important;
    gap: 6px !important;
    width: auto !important;
    min-width: 0 !important;
    white-space: normal !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-controls .attendance-platform-utility label select {
    width: auto !important;
    min-width: 125px !important;
    max-width: min(220px, 100%) !important;
    height: 32px !important;
    min-height: 32px !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-platform-panel button {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 34px !important;
    height: auto !important;
    padding: 7px 10px !important;
    border: 1px solid #cbd8e8 !important;
    border-radius: 7px !important;
    background: #fff !important;
    color: #29415f !important;
    -webkit-text-fill-color: #29415f !important;
    font-size: .72rem !important;
    font-weight: 750 !important;
    line-height: 1.15 !important;
    box-shadow: none !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia #dailyAttendanceSave {
    margin-left: auto !important;
    border-color: #1f63bd !important;
    background: linear-gradient(180deg, #3482e1, #236dcc) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    box-shadow: 0 4px 10px rgba(35, 109, 204, .16) !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-platform-utility small {
    flex: 1 1 280px !important;
    min-width: 180px !important;
    color: #718096 !important;
    font-size: .67rem !important;
    line-height: 1.3 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-summary {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-column: 1 / -1 !important;
    gap: 12px !important;
    min-width: 0 !important;
    margin: 2px 0 0 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-summary-card {
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr) !important;
    grid-template-areas: "icon label" "icon value" "icon detail" !important;
    align-items: center !important;
    gap: 1px 10px !important;
    min-width: 0 !important;
    min-height: 96px !important;
    margin: 0 !important;
    padding: 13px !important;
    border: 1px solid #e3e9f1 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--attendance-ref-navy) !important;
    box-shadow: 0 4px 14px rgba(31, 58, 95, .045) !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-summary-card::before {
    content: "%";
    grid-area: icon;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #dcecff;
    color: #2f76cf;
    font-size: 1.15rem;
    font-weight: 850;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-summary-card:nth-child(1)::before {
    content: "✓";
    background: #dff6e9;
    color: #20945a;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-summary-card:nth-child(2)::before {
    content: "!";
    background: #ffe1e1;
    color: #d44545;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-summary-card:nth-child(4)::before {
    content: "D";
    background: #fff0c5;
    color: #bc7900;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-summary-card span {
    grid-area: label;
    min-width: 0 !important;
    color: #394863 !important;
    font-size: .75rem !important;
    font-weight: 750 !important;
    line-height: 1.2 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-summary-card strong {
    grid-area: value;
    color: #15213a !important;
    font-size: 1.55rem !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    font-variant-numeric: tabular-nums;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-summary-card small {
    grid-area: detail;
    min-width: 0 !important;
    color: #697890 !important;
    font-size: .68rem !important;
    line-height: 1.25 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-platform-sheet {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 14px !important;
    overflow: hidden !important;
    border: 1px solid var(--attendance-ref-line) !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 8px 24px rgba(31, 58, 95, .06) !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .daily-attendance-table-wrap {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    max-height: min(68vh, 720px) !important;
    overflow: auto !important;
    border: 1px solid #e1e7ef !important;
    border-radius: 8px !important;
    background: #fff !important;
    scrollbar-width: thin;
    scrollbar-color: #aec1d9 #eef3f8;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .daily-attendance-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    table-layout: fixed !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .daily-attendance-table :is(th, td) {
    height: auto !important;
    padding: 5px 2px !important;
    border-right: 1px solid #e7edf4 !important;
    border-bottom: 1px solid #e7edf4 !important;
    color: #17243d !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    text-align: center !important;
    vertical-align: middle !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .daily-attendance-table thead th {
    height: 42px !important;
    border-color: #d9e2ed !important;
    background: #f4f7fb !important;
    color: #1b2943 !important;
    -webkit-text-fill-color: #1b2943 !important;
    font-weight: 800 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .daily-attendance-table tbody tr:nth-child(even) td {
    background-color: #fbfcfe !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .daily-attendance-table :is(th, td):first-child {
    width: 38px !important;
    left: 0 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .daily-attendance-table :is(th, td):nth-child(2) {
    width: 230px !important;
    left: 38px !important;
    padding-inline: 9px !important;
    text-align: left !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .daily-attendance-table thead th:nth-child(-n+2) {
    background: #edf3fa !important;
    color: #17243d !important;
    -webkit-text-fill-color: #17243d !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .daily-attendance-table :is(th, td):nth-last-child(-n+3) {
    width: 66px !important;
    background: #f1f7ff !important;
    color: #145fca !important;
    font-weight: 800 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .daily-attendance-input {
    width: 27px !important;
    height: 28px !important;
    min-height: 28px !important;
    margin: 0 auto !important;
    padding: 1px !important;
    border: 1px solid #cbd6e4 !important;
    border-radius: 5px !important;
    background: #fff !important;
    text-align: center !important;
    font-size: 11px !important;
    font-weight: 800 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .daily-att-cell.is-present .daily-attendance-input {
    border-color: #a9dfbd !important;
    background: #e7f7ed !important;
    color: #157347 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .daily-att-cell.is-absent .daily-attendance-input {
    border-color: #f1b7b7 !important;
    background: #ffe6e6 !important;
    color: #bd3131 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .daily-att-cell.is-justified .daily-attendance-input {
    border-color: #edd38a !important;
    background: #fff4cf !important;
    color: #9b6500 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .daily-student-name .student-risk-badges {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2px !important;
    min-width: 0 !important;
    margin-top: 3px !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .daily-student-name .student-risk-badges > :only-child {
    grid-column: 1 / -1 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .daily-student-name :is(.student-risk-badge, .repetition-risk-mark) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 18px !important;
    padding: 2px 4px !important;
    font-size: 9px !important;
    line-height: 1.05 !important;
    white-space: normal !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-platform-legend {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px 14px !important;
    padding: 12px 2px 0 !important;
    background: transparent !important;
    color: #5f6f87 !important;
    font-size: .72rem !important;
  }
}

@media screen and (max-width: 1100px) {
  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media screen and (max-width: 760px) {
  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-platform-panel,
  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-platform-sheet {
    padding: 12px !important;
    border-radius: 11px !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-heading {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-heading-actions {
    justify-content: flex-start !important;
    width: 100% !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-controls {
    grid-template-columns: minmax(0, 1fr) minmax(105px, .55fr) !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-controls > label:first-child {
    grid-column: 1 / -1 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia #dailyAttendanceSave {
    margin-left: 0 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .daily-attendance-table :is(th, td):nth-child(2) {
    width: 175px !important;
  }
}

@media screen and (max-width: 520px) {
  html body.is-authenticated:not(.report-print-body) #appMain#appMain #module-asistencia#module-asistencia .module-head {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain#appMain #module-asistencia#module-asistencia .module-head > button,
  html body.is-authenticated:not(.report-print-body) #appMain#appMain #module-asistencia#module-asistencia .module-head .module-actions-inline,
  html body.is-authenticated:not(.report-print-body) #appMain#appMain #module-asistencia#module-asistencia .module-head .module-actions-inline > button {
    width: 100% !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-heading-actions .student-status-filters {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    flex: 1 0 100% !important;
    width: 100% !important;
    min-width: min(100%, 260px) !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-heading-actions .student-status-filters button {
    width: 100% !important;
    min-width: 0 !important;
    padding-inline: 5px !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-summary,
  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-controls {
    grid-template-columns: 1fr !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-summary-card {
    min-height: 82px !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-controls > label,
  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-controls > label:first-child {
    grid-column: 1 !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia#module-asistencia .attendance-book-controls > label:nth-child(n) {
    width: 100% !important;
    max-width: 100% !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-controls > :is(.attendance-platform-actions, .attendance-platform-utility) {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-platform-panel button,
  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-controls .attendance-platform-utility label,
  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .attendance-book-controls .attendance-platform-utility label select {
    width: 100% !important;
    max-width: 100% !important;
  }

  html body.is-authenticated:not(.report-print-body) #appMain #module-asistencia .daily-attendance-table :is(th, td):nth-child(2) {
    width: 150px !important;
  }
}

@media print {
  #module-asistencia .attendance-platform-panel,
  #module-asistencia .attendance-platform-sheet {
    box-shadow: none !important;
  }
}
