/* Solo presentación del Libro de asistencia existente. */
@media screen {
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia {--att-blue:#123d78;--att-ink:#10243f;--att-yellow:#ffdc62;--att-line:#dbe5f0}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-platform-panel {display:grid!important;grid-template-columns:minmax(180px,1.5fr) minmax(130px,1fr) 110px!important;gap:14px!important;padding:20px!important;background:#fff!important;border:1px solid var(--att-line)!important;border-radius:14px 14px 0 0!important;box-shadow:none!important;margin-bottom:0!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-heading {grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:12px;border-bottom:1px solid var(--att-line)}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-heading h3 {margin:0 0 5px!important;font:750 22px/1.2 "Segoe UI",Arial,sans-serif!important;color:var(--att-blue)!important;-webkit-text-fill-color:var(--att-blue)!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-heading p {margin:0;color:#425c7e!important;font-size:14px}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-student-count {padding:8px 12px;background:#eaf2ff;color:var(--att-blue)!important;border-radius:20px;white-space:nowrap;font-size:12px;font-weight:700}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-platform-panel label {color:var(--att-ink)!important;font-size:12px!important;font-weight:700!important;min-width:0}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-platform-panel select {height:38px!important;background:#fff!important;border:1px solid #bfcee1!important;color:var(--att-ink)!important;-webkit-text-fill-color:var(--att-ink)!important;font:13px "Segoe UI",Arial,sans-serif!important;border-radius:7px!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia :is(.attendance-platform-actions,.attendance-platform-utility) {grid-column:1/-1!important;display:flex!important;flex-direction:row!important;align-items:end!important;justify-content:flex-start!important;flex-wrap:wrap!important;gap:8px!important;padding:0!important;background:transparent!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-platform-panel button {width:auto!important;min-width:0!important;max-width:none!important;flex:0 0 auto!important;min-height:38px!important;padding:9px 14px!important;border-radius:7px!important;font:700 12px/1.2 "Segoe UI",Arial,sans-serif!important;color:var(--att-ink)!important;-webkit-text-fill-color:var(--att-ink)!important;background:#eff5fd!important;border:1px solid #c5d5eb!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia #dailyAttendanceSave {background:var(--att-yellow)!important;border-color:#dbb737!important;margin-left:auto!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-platform-panel button:disabled {opacity:.5!important;cursor:not-allowed!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-platform-sheet {padding:0!important;background:#fff!important;border:1px solid var(--att-line)!important;border-top:0!important;border-radius:0 0 14px 14px!important;overflow:hidden!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-attendance-table-wrap {width:100%!important;min-width:0!important;max-width:100%!important;max-height:min(65vh,720px)!important;overflow:auto!important;scrollbar-width:thin;scrollbar-color:#9eb4d3 #edf3fa}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-attendance-table {width:100%!important;min-width:calc(36px + 220px + var(--attendance-days,31)*30px + 174px)!important;max-width:none!important;border-collapse:separate!important;border-spacing:0!important;table-layout:fixed!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-attendance-table :is(th,td) {width:auto!important;min-width:0!important;max-width:none!important;padding:7px 2px!important;text-align:center!important;border:0!important;border-bottom:1px solid #e3ebf5!important;color:var(--att-ink)!important;-webkit-text-fill-color:var(--att-ink)!important;font:12px/1.35 "Segoe UI",Arial,sans-serif!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-attendance-table thead th {position:sticky!important;top:0!important;z-index:5!important;height:45px!important;background:var(--att-blue)!important;color:#fff!important;-webkit-text-fill-color:#fff!important;font-weight:700!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-day-head :is(b,small) {display:block!important;color:inherit!important;-webkit-text-fill-color:inherit!important;font-size:11px!important;line-height:1.3!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-attendance-table :is(th,td):first-child {width:36px!important;position:sticky!important;left:0!important;z-index:3!important;background:#fff!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-attendance-table :is(th,td):nth-child(2) {width:220px!important;position:sticky!important;left:36px!important;z-index:3!important;background:#fff!important;text-align:left!important;padding:8px 12px!important;white-space:normal!important;font-weight:600!important;box-shadow:3px 0 5px #123d7810}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-attendance-table thead th:nth-child(-n+2) {z-index:8!important;background:var(--att-blue)!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-attendance-table :is(th,td):nth-last-child(-n+3) {width:58px!important;font-weight:700!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-attendance-input {display:block!important;width:26px!important;min-width:0!important;max-width:100%!important;height:28px!important;min-height:28px!important;padding:0!important;margin:0 auto!important;border:1px solid #bdcce0!important;border-radius:5px!important;background:#fff!important;color:var(--att-ink)!important;-webkit-text-fill-color:var(--att-ink)!important;text-align:center!important;font:700 12px "Segoe UI",Arial,sans-serif!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-attendance-input:focus {outline:2px solid #2563eb!important;outline-offset:1px}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-att-cell.is-present {background:#e4efff!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-att-cell.is-absent {background:#fff0d5!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-att-cell.is-justified {background:#fff8c2!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia :is(.daily-day-head,.daily-att-cell).is-blocked {background:repeating-linear-gradient(135deg,#f0f3f7 0,#f0f3f7 5px,#e5eaf0 5px,#e5eaf0 10px)!important;color:#52647c!important;-webkit-text-fill-color:#52647c!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-day-head.is-future:not(.is-blocked) {background:#dce8f8!important;color:var(--att-blue)!important;-webkit-text-fill-color:var(--att-blue)!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-att-cell.is-future:not(.is-present):not(.is-absent):not(.is-justified):not(.is-blocked) {background:#f5f7fa!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-future-label {display:block;font-size:9px!important;margin-top:3px;color:#52647c!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-total {background:#eef4fc!important;color:var(--att-blue)!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-attendance-table tfoot td {position:static!important;background:#fff4c7!important;font-weight:700!important;text-align:right!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-platform-legend {display:flex!important;flex-wrap:wrap;gap:12px;padding:14px 18px!important;background:#fff!important;color:var(--att-ink)!important;font-size:12px!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .legend-dot.present {background:#dceaff!important;color:#123d78!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .legend-dot.absent {background:#fff0d5!important;color:#734600!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .legend-dot.justified {background:#fff8c2!important;color:#645000!important}
}
@media screen and (max-width:640px) {
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-platform-panel {grid-template-columns:1fr 1fr!important;padding:12px!important;gap:10px!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-platform-panel > label:first-of-type {grid-column:1/-1}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-heading {align-items:start;flex-wrap:wrap}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia #dailyAttendanceSave {margin-left:0!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-attendance-table {min-width:calc(36px + 160px + var(--attendance-days,31)*30px + 174px)!important}
html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-attendance-table :is(th,td):nth-child(2) {width:160px!important}
}
@media screen { html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .daily-attendance-table thead th:nth-last-child(-n+3) {font-size:10px!important;white-space:nowrap!important;overflow-wrap:normal!important} }

/* Controles ajustados a su contenido y resumen junto a las acciones. */
@media screen {
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-platform-panel {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px) !important;
    gap: 14px 20px !important;
    padding: 16px !important;
    align-items: start !important;
  }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
    min-width: 0;
  }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-controls > label {
    display: grid !important;
    gap: 4px !important;
    width: auto !important;
    flex: 0 0 auto;
  }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-controls > label:nth-child(1) { width: 240px !important; max-width: 100%; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-controls > label:nth-child(2) { width: 145px !important; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-controls > label:nth-child(3) { width: 100px !important; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-controls > div { width: 100% !important; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-platform-utility label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
    width: auto !important;
    white-space: nowrap !important;
  }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia #dailyAttendanceBlockDay {
    width: 180px !important;
    max-width: 100% !important;
  }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia #dailyImportBlankMode {
    width: 210px !important;
    max-width: 100% !important;
  }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia #dailyAttendanceSave {
    margin-left: 0 !important;
  }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-platform-utility small {
    flex-basis: 100%;
    font-size: 11px !important;
    color: #425c7e !important;
    line-height: 1.4;
  }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
  }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-summary-card {
    display: grid;
    align-content: start;
    gap: 5px;
    margin: 0 !important;
    padding: 12px !important;
    background: #edf4ff !important;
    border: 1px solid #c9daef !important;
    border-radius: 10px !important;
    color: #123d78 !important;
  }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-summary-yellow {
    background: #fff7d7 !important;
    border-color: #ead791 !important;
  }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-summary-card span {
    font: 700 12px/1.3 "Segoe UI", Arial, sans-serif !important;
    color: #123d78 !important;
    -webkit-text-fill-color: #123d78 !important;
  }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-summary-card strong {
    font: 750 24px/1.1 "Segoe UI", Arial, sans-serif !important;
    color: #123d78 !important;
    -webkit-text-fill-color: #123d78 !important;
  }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-summary-card small {
    font: 11px/1.3 "Segoe UI", Arial, sans-serif !important;
    color: #425c7e !important;
  }
}
@media screen and (max-width: 1100px) {
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-platform-panel { grid-template-columns: minmax(0, 1fr) !important; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media screen and (max-width: 640px) {
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-controls { grid-template-columns: minmax(0, 1fr) 100px; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-controls > label:first-child { grid-column: 1 / -1; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-controls > label:nth-child(1) { width: 100% !important; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Flujo continuo: los controles comparten filas según el espacio disponible. */
@media screen {
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia #attendanceHistoricalImport { background: #ffdc62 !important; border-color: #dbb737 !important; color: #10243f !important; -webkit-text-fill-color: #10243f !important; }
}
@media screen {
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-platform-panel {
    padding: 12px !important;
    gap: 10px 14px !important;
    grid-template-columns: minmax(0, 1fr) 290px !important;
  }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-heading { padding-bottom: 8px; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-controls { gap: 7px; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-controls > div { display: contents !important; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-controls > label:nth-child(1) { width: 200px !important; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-controls > label:nth-child(2) { width: 115px !important; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-controls > label:nth-child(3) { width: 82px !important; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-platform-panel :is(select, button) { min-height: 32px !important; height: 32px !important; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-platform-panel button { padding: 6px 9px !important; font-size: 11px !important; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia #dailyAttendanceBlockDay { width: 135px !important; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia #dailyImportBlankMode { width: 185px !important; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-platform-utility small { flex: 1 1 300px !important; font-size: 10px !important; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-summary { gap: 7px; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-summary-card { padding: 8px !important; gap: 3px; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-summary-card span { font-size: 11px !important; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-summary-card strong { font-size: 22px !important; }
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-summary-card small { font-size: 10px !important; }
}
@media screen and (max-width: 1100px) {
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-platform-panel { grid-template-columns: minmax(0, 1fr) !important; }
}
@media screen and (max-width: 640px) {
  html body.is-authenticated:not(.report-print-body) #module-asistencia#module-asistencia .attendance-book-controls > label:nth-child(1) { width: 160px !important; }
}
