/*
 * schedule.css
 *
 * Mapa de leitura (na ordem da cascata):
 * 01. Agenda: intervalos e edição
 * 02. Agenda: cartões de aula
 * 03. Responsividade e preferências de movimento
 * 04. Variações de tema
 * 05. Agenda: small scale increase to improve readability without changing its visual weight.
 * 06. Profile: make uploaded avatar images fill the circular avatars (sidebar + topbar).
 * 07. Cada horário comporta aulas simultâneas de todas as turmas.
 * 08. Padrão recuperado da agenda por turma no modo Supabase.
 * 09. Etapa 1: navegação e cabeçalho no padrão do protótipo.
 * 10. Etapa 2: conta e preferências, seguindo a composição do protótipo.
 * 11. Etapa 3 — agenda real: a turma define a tabela e cada faixa mantém seu ID.
 * 12. Professor: edição preserva identidade e disponibilidades por dia.
 * 13. Refinamento aprovado: matérias com o mesmo check da disponibilidade.
 *
 * A ordem das regras, declarações e ajustes posteriores é intencional.
 * Consulte docs/interface/ORGANIZACAO-CSS.md antes de mover blocos.
 */

/* === Agenda: intervalos e edição === */
.break-time {
  height: 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 8px;
  color: #a0aaa4;
  background: #fafbf9;
}
.editable-schedule {
  cursor: pointer;
}
.editable-schedule:hover {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}
.time-cell.editable-schedule,
.break-time.editable-schedule {
  position: relative;
  padding-left: 14px;
  padding-right: 14px;
}
.schedule-edit-icon {
  font-size: 9px;
  line-height: 1;
  color: #91a198;
  opacity: 0.75;
  text-decoration: none;
}
.time-cell > .schedule-edit-icon,
.break-time > .schedule-edit-icon {
  position: absolute;
  right: 5px;
  top: 11px;
}
.break-time > .schedule-edit-icon {
  top: auto;
}
.break-banner .schedule-edit-icon {
  margin-left: 5px;
  vertical-align: 1px;
}
.editable-schedule:hover .schedule-edit-icon {
  color: var(--green);
  opacity: 1;
}
.time-cell.editable-schedule {
  font-size: 10px;
  font-weight: 600;
  color: #69776f;
}
.break-time.editable-schedule {
  font-size: 9px;
  font-weight: 600;
  color: #77857c;
}
.break-banner {
  font-size: 10px;
}
.break-banner strong {
  font-size: 10px;
  font-weight: 700;
}
.break-banner > span:last-child {
  font-size: 9px;
  font-weight: 500;
}

/* === Agenda: cartões de aula === */
.lesson-card[draggable='true'] {
  cursor: grab;
  user-select: none;
}
.lesson-card[draggable='true']:active {
  cursor: grabbing;
}
.lesson-card.dragging {
  opacity: 0.45;
}
.schedule-grid.is-dragging .empty-cell {
  border-color: #c5d9cc;
  background: #f7faf7;
}
.lesson-cell.drag-over {
  background: #eef5ef;
}
.lesson-cell.drag-over .empty-cell {
  border-color: #6ea487;
  background: #eaf4ed;
}
.empty-cell {
  display: grid;
  place-items: center;
  border: 1px dashed #e0e8e2;
  color: #9eada3;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.empty-cell span {
  font-size: 18px;
  line-height: 1;
  font-weight: 400;
}
.empty-cell:hover {
  border-color: #8fb69f;
  background: #f3f8f4;
  color: var(--green);
}
.break-banner {
  grid-column: span 5;
  height: 32px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  background: #f7f8f5;
  color: #849188;
  font-size: 9px;
}
.break-banner strong {
  font-weight: 600;
  color: #65736b;
}
.break-banner > span:first-child {
  color: #bd8d59;
}
.break-banner.lunch {
  background: #faf7f1;
}
.break-banner.lunch > span:first-child {
  color: #c38d51;
}
.teacher-modal {
  max-height: calc(100vh - 40px);
  overflow: auto;
}
.teacher-modal form {
  padding-bottom: 16px;
}
.availability-field {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 13px 0 0;
  margin: 17px 0 0;
}
.availability-field legend {
  padding: 0 8px 0 0;
  font-size: 11px;
  color: #45534b;
  font-weight: 700;
}
.availability-field > p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
}
.availability-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}
.availability-option {
  position: relative;
  display: flex !important;
  min-height: 34px;
  flex-direction: row !important;
  align-items: center;
  justify-content: center;
  gap: 0 !important;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  overflow: hidden;
}
.availability-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.availability-option span {
  font-size: 9px;
  color: #68766e;
  font-weight: 700;
}
.availability-option:has(input:checked) {
  border-color: #b3d0c0;
  background: #edf5f0;
}
.availability-option:has(input:checked) span {
  color: var(--green-dark);
}
.availability-option:has(input:focus-visible) {
  outline: 3px solid rgba(67, 134, 103, 0.2);
}
.slot-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.slot-option {
  min-height: 43px;
  justify-content: flex-start;
  padding: 6px 8px;
}
.slot-option span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.slot-option strong {
  font-size: 9px;
}
.slot-option small {
  font-size: 8px;
  color: #8b9790;
  font-weight: 400;
}
.slot-option:has(input:checked) small {
  color: #688273;
}
#lessonTeacher:disabled {
  color: #a45e54;
  background: #fbf4f2;
}
.modal-footer .close-modal {
  width: auto;
  height: auto;
  padding: 10px 14px;
  border: 1px solid #c77f79;
  border-radius: 8px;
  background: #f8eeee;
  color: #9d5650;
  font:
    600 12px 'DM Sans',
    sans-serif;
}
.modal-footer .close-modal:hover {
  background: #f3e2e1;
}

/* === Responsividade e preferências de movimento === */
@media (max-width: 500px) {
  .availability-options {
    gap: 5px;
  }
  .slot-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.grade-header {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: #fcfdfb;
}
.grade-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.grade-caption {
  font-size: 9px;
  color: #909b94;
}
.grade-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  max-width: 72%;
  padding: 2px;
}
.grade-tab {
  height: 31px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #6f7c74;
  font:
    600 10px 'DM Sans',
    sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
.grade-tab:hover {
  background: #f1f5f1;
}
.grade-tab.active {
  border-color: #c9ddd1;
  background: #edf5f0;
  color: var(--green-dark);
}
.grade-edit-mark {
  display: inline-block;
  margin-left: 7px;
  font-size: 10px;
  opacity: 0.7;
}
.grade-tab.active:hover .grade-edit-mark {
  opacity: 1;
}
.class-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.class-action-edit,
.class-action-delete {
  border: 0;
  background: none;
  padding: 4px 0;
  color: var(--green);
  font:
    600 9px 'DM Sans',
    sans-serif;
  cursor: pointer;
}
.class-action-delete {
  margin-left: auto;
  color: #b36a64;
}
.class-action-edit:hover,
.class-action-delete:hover {
  text-decoration: underline;
}
.add-grade-button {
  height: 31px;
  padding: 0 11px;
  border: 1px dashed #9db9a8;
  border-radius: 7px;
  background: white;
  color: var(--green);
  font:
    700 10px 'DM Sans',
    sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
.add-grade-button:hover {
  background: #edf5f0;
  border-style: solid;
}
.add-grade-button span {
  font-size: 15px;
  vertical-align: -1px;
  margin-right: 3px;
}
@media (max-width: 760px) {
  .grade-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .grade-tabs {
    max-width: 100%;
    width: 100%;
  }
}
.teacher-row {
  grid-template-columns: minmax(220px, 1.5fr) minmax(140px, 1fr) 80px 104px;
}
.teacher-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
}
.edit-teacher {
  border: 0;
  background: none;
  color: var(--green);
  font:
    600 10px 'DM Sans',
    sans-serif;
  cursor: pointer;
}
.edit-teacher:hover {
  text-decoration: underline;
}
.teacher-actions .delete-teacher {
  font-size: 19px;
  padding: 2px 5px;
}
.profile-trigger {
  border: 0;
  cursor: pointer;
  font:
    700 11px 'DM Sans',
    sans-serif;
  transition:
    background 0.15s,
    transform 0.15s;
}
.profile-trigger:hover {
  background: #dce8df;
  transform: translateY(-1px);
}
.profile-panel {
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  overflow: hidden;
}
.profile-panel-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
}
.profile-large-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e8eee9;
  color: var(--green);
  font:
    700 14px Manrope,
    sans-serif;
}
.profile-large-avatar {
  overflow: hidden;
}
.profile-large-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.profile-avatar-field {
  grid-column: 1/-1;
  display: grid;
  gap: 7px;
}
.profile-avatar-preview {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e8eee9;
  color: var(--green);
  font:
    700 15px Manrope,
    sans-serif;
}

/* === Variações de tema === */
body[data-theme='dark'] .profile-large-avatar,
body[data-theme='dark'] .profile-avatar-preview {
  background: #2c3b32;
  color: #a3d5b9;
}
.profile-panel-heading > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-panel-heading strong {
  font:
    700 14px Manrope,
    sans-serif;
}
.profile-panel-heading span {
  font-size: 10px;
  color: var(--muted);
}
.profile-form {
  padding: 21px 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.profile-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 10px;
  color: #657269;
  font-weight: 600;
}
.profile-form input {
  height: 39px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  font:
    11px 'DM Sans',
    sans-serif;
  color: #435047;
}
.profile-form input:focus {
  border-color: #8db5a0;
  box-shadow: 0 0 0 3px rgba(67, 134, 103, 0.1);
  outline: 0;
}
.profile-form-footer {
  grid-column: 1/-1;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.profile-form-footer > span {
  font-size: 9px;
  color: #909b94;
}
#teacherSubmitLabel {
  font-size: 12px;
  line-height: normal;
}
.lesson-card strong {
  font-size: 11px;
}
.lesson-card .lesson-detail {
  font-size: 9px;
  font-weight: 600;
  line-height: 12px;
  color: #64756b;
}
.lesson-card .lesson-room {
  margin-top: 0;
}
.lesson-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  margin-top: 0;
}
.lesson-card-footer .lesson-room {
  min-width: 0;
  flex: 1;
}
.lesson-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  min-width: 0;
  margin-bottom: 4px;
}
.lesson-card-heading strong {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 10px;
}
.lesson-edited {
  flex: none;
  color: #98714e;
  font-size: 6px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  white-space: nowrap;
}
.lesson-flag {
  flex: none;
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 5px;
  border-radius: 4px;
  background: #f7e8d5;
  color: #986333 !important;
  font-size: 8px !important;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  letter-spacing: 0.25px;
}
.lesson-details-modal {
  width: min(570px, calc(100% - 30px));
}
.lesson-flag-field {
  grid-column: 1/-1;
}
.lesson-flag-field small {
  font-size: 9px;
  color: #8b9790;
  font-weight: 400;
}
.lesson-details-footer {
  justify-content: space-between;
  align-items: center;
}
.lesson-details-footer > div {
  display: flex;
  gap: 8px;
}
.lesson-remove-button {
  border: 0;
  background: none;
  padding: 8px 2px;
  color: #ad5d57;
  font:
    600 11px 'DM Sans',
    sans-serif;
  cursor: pointer;
}
.lesson-remove-button:hover {
  text-decoration: underline;
}
.schedule-grid.day-view {
  min-width: 470px;
  grid-template-columns: 76px minmax(300px, 1fr);
}
.schedule-grid:not(.day-view) {
  min-width: 960px;
  grid-template-columns: 72px repeat(7, minmax(125px, 1fr));
}
.break-banner {
  grid-column: span 7;
}
.availability-options {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.teacher-subject-field {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 13px 0 0;
  margin: 14px 0 0;
}
.teacher-subject-field legend {
  padding: 0 8px 0 0;
  font-size: 11px;
  color: #45534b;
  font-weight: 700;
}
.teacher-subject-field > p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
}
.teacher-subject-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.teacher-subject-field .teacher-subject-tag {
  position: relative;
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 3px 5px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}
.teacher-subject-field .teacher-subject-tag:has(input:checked) {
  border-color: #b3d0c0;
  background: #edf5f0;
}
.teacher-subject-tag input {
  grid-column: 1;
  grid-row: 1/3;
  width: 14px !important;
  height: 14px !important;
  margin: 0;
  padding: 0 !important;
  accent-color: var(--green);
}
.teacher-subject-tag span {
  grid-column: 2;
  grid-row: 1;
  font-size: 10px;
  color: #45534b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.teacher-subject-tag small {
  grid-column: 2;
  grid-row: 2;
  font-size: 8px;
  color: #89958e;
  font-weight: 400;
}
.matter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 12px;
}
.matter-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  min-width: 0;
}
.matter-card-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.matter-card-heading strong {
  font:
    700 12px Manrope,
    sans-serif;
  color: #334139;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.matter-color-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: #59947d;
}
.matter-color-dot.gold {
  background: #d39555;
}
.matter-color-dot.lilac {
  background: #9583bc;
}
.matter-color-dot.blue {
  background: #6d94b0;
}
.matter-color-dot.rose {
  background: #c77f79;
}
.matter-discipline {
  display: inline-flex;
  margin-top: 9px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #edf5f0;
  color: #487762;
  font-size: 9px;
  font-weight: 700;
}
.matter-discipline.gold {
  background: #fbf2e8;
  color: #a16c35;
}
.matter-discipline.lilac {
  background: #f2eff7;
  color: #79689d;
}
.matter-discipline.blue {
  background: #edf3f7;
  color: #5e8098;
}
.matter-discipline.rose {
  background: #f8eeee;
  color: #a36661;
}
.matter-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px solid #f0f2ef;
}
.matter-color-hint {
  margin: 13px 0 0;
  padding: 9px 11px;
  border-radius: 7px;
  background: #f4f7f4;
  color: #738078;
  font-size: 10px;
}
.matter-color-hint::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: #59947d;
}
.matter-color-hint[data-color='gold']::before {
  background: #d39555;
}
.matter-color-hint[data-color='lilac']::before {
  background: #9583bc;
}
.matter-color-hint[data-color='blue']::before {
  background: #6d94b0;
}
.matter-color-hint strong {
  color: var(--green-dark);
}
.empty-state.compact {
  padding: 15px 8px;
  font-size: 10px;
}
.teacher-modal .modal-footer {
  margin-top: 17px;
}
.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.week-nav .button-light {
  width: auto;
  height: 30px;
  min-width: 48px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1;
}
.day-view .break-banner {
  grid-column: span 1;
}
.open-day {
  cursor: pointer;
}
.open-day:hover strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.day-empty-state {
  padding: 48px 20px;
  text-align: center;
  color: #829087;
  font-size: 12px;
}
.schedule-filter-value {
  max-width: 180px;
}
.schedule-toolbar {
  height: auto;
  min-height: 58px;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.toolbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 700px) {
  .schedule-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .toolbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 6px;
  }
  .toolbar-actions .select-control {
    max-width: none;
    width: 100%;
    min-width: 0;
  }
  .week-nav {
    width: 100%;
    gap: 7px;
  }
  .week-nav strong {
    min-width: 0;
    flex: 1;
    text-align: center;
    font-size: 10px;
    white-space: normal;
  }
  .week-nav .button-light {
    min-width: 48px;
    padding: 0 9px;
  }
  .schedule-grid.day-view {
    min-width: 440px;
  }
}
@media (max-width: 500px) {
  .teacher-subject-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.dashboard-current-strip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 17px;
  margin-bottom: 14px;
  border: 1px solid #dce9df;
  border-radius: 11px;
  background: #f0f6f1;
}
.dashboard-live-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: #43a277;
  box-shadow: 0 0 0 4px rgba(67, 162, 119, 0.12);
}
.dashboard-current-strip > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dashboard-current-strip > div strong {
  font:
    700 12px Manrope,
    sans-serif;
  color: #334a3e;
}
.dashboard-current-strip > div span,
.dashboard-panel-note {
  font-size: 10px;
  color: #75847a;
}
.dashboard-live-count {
  margin-left: auto;
  font:
    700 12px Manrope,
    sans-serif;
  color: var(--green-dark);
}
.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.dashboard-kpi,
.dashboard-panel {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}
.dashboard-kpi {
  padding: 15px 17px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.dashboard-kpi > span {
  font-size: 10px;
  color: var(--muted);
}
.dashboard-kpi strong {
  font:
    700 23px Manrope,
    sans-serif;
  color: #2d3b34;
}
.dashboard-kpi small {
  font-size: 9px;
  color: #9aa49e;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.dashboard-panel {
  padding: 17px;
  min-width: 0;
}
.dashboard-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.dashboard-panel-heading h2 {
  font:
    700 15px Manrope,
    sans-serif;
  letter-spacing: -0.3px;
  margin: 5px 0 0;
  color: #334139;
}
.dashboard-live-lesson {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #f0f2ef;
}
.dashboard-live-time {
  font-size: 10px;
  font-weight: 700;
  color: var(--green-dark);
}
.dashboard-live-lesson > div:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.dashboard-live-lesson > div:nth-child(2) strong {
  font-size: 11px;
  color: #334a3e;
}
.dashboard-live-lesson > div:nth-child(2) span,
.dashboard-live-lesson > small {
  font-size: 9px;
  color: #829087;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-upcoming {
  display: grid;
}
.dashboard-upcoming-row {
  display: grid;
  grid-template-columns: 48px minmax(70px, 0.7fr) minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  border-top: 1px solid #f0f2ef;
}
.dashboard-upcoming-row time {
  font-size: 10px;
  font-weight: 700;
  color: var(--green-dark);
}
.dashboard-upcoming-row strong {
  font-size: 10px;
  color: #334a3e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-upcoming-row span {
  font-size: 9px;
  color: #829087;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-chart {
  display: grid;
  gap: 13px;
}
.dashboard-day-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 9px;
}
.dashboard-day-row > span,
.dashboard-subject-row > div:first-child span {
  font-size: 10px;
  color: #68766e;
}
.dashboard-day-row > strong,
.dashboard-subject-row > div:first-child strong {
  font-size: 10px;
  color: #53635a;
  text-align: right;
}
.dashboard-bar-track {
  height: 7px;
  border-radius: 8px;
  background: #f0f3ef;
  overflow: hidden;
}
.dashboard-bar-track i {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: 8px;
  background: #5f9b7e;
}
.dashboard-subject-row {
  display: grid;
  gap: 6px;
}
.dashboard-subject-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.dashboard-bar-track i.color-1 {
  background: #d39555;
}
.dashboard-bar-track i.color-2 {
  background: #9583bc;
}
.dashboard-bar-track i.color-3 {
  background: #6d94b0;
}
.dashboard-bar-track i.color-4 {
  background: #c77f79;
}
.dashboard-empty {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 20px 0;
  color: #87928b;
}
.dashboard-empty strong {
  font:
    600 11px 'DM Sans',
    sans-serif;
  color: #53635a;
}
.dashboard-empty span {
  font-size: 9px;
}
.dashboard-empty.compact {
  padding: 12px 0;
}
@media (max-width: 900px) {
  .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-live-lesson {
    grid-template-columns: 90px minmax(0, 1fr);
  }
  .dashboard-live-lesson > small {
    grid-column: 2;
  }
}
@media (max-width: 650px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-current-strip {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .dashboard-live-count {
    width: 100%;
    margin: 3px 0 0 20px;
  }
  .dashboard-upcoming-row {
    grid-template-columns: 45px minmax(65px, 0.7fr) minmax(0, 1fr);
  }
}
@media (max-width: 700px) {
  .teacher-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .teacher-actions {
    grid-column: 2;
    grid-row: 1;
  }
  .profile-form {
    grid-template-columns: 1fr;
  }
  .profile-form-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
.top-profile {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.breadcrumb {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-actions {
  flex: none;
}
.top-profile .top-avatar {
  width: 42px;
  height: 42px;
  flex: none;
  font-size: 12px;
}
.top-profile-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.top-profile-meta strong {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font:
    700 12px Manrope,
    sans-serif;
  color: #303c35;
}
.top-profile-meta span {
  font-size: 11px;
  color: var(--muted);
}
.profile-menu-wrap {
  position: relative;
  margin-left: 4px;
}
.profile-menu-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #78867e;
  font:
    700 21px 'DM Sans',
    sans-serif;
  letter-spacing: 2px;
  cursor: pointer;
}
.profile-menu-toggle:hover,
.profile-menu-toggle[aria-expanded='true'] {
  background: #f1f5f1;
  color: var(--green-dark);
}
.profile-menu {
  position: absolute;
  z-index: 20;
  right: 0;
  top: calc(100% + 9px);
  width: 170px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(32, 55, 43, 0.14);
}
.profile-menu[hidden] {
  display: none;
}
.profile-menu button {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  color: #45534b;
  font:
    500 11px 'DM Sans',
    sans-serif;
  cursor: pointer;
}
.profile-menu button:hover {
  background: #f4f7f4;
}
.profile-menu .profile-menu-logout {
  border-top: 1px solid #f0f2ef;
  border-radius: 0 0 6px 6px;
  margin-top: 3px;
  padding-top: 11px;
  color: #a85e57;
}
@media (max-width: 700px) {
  .top-profile {
    gap: 7px;
  }
  .top-profile .top-avatar {
    width: 36px;
    height: 36px;
  }
  .top-profile-meta strong {
    max-width: 115px;
    font-size: 11px;
  }
  .top-profile-meta span {
    font-size: 10px;
  }
  .profile-menu-wrap {
    margin-left: 0;
  }
}
.profile-menu {
  width: 190px;
  padding: 5px;
}
.help-contact-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font:
    700 11px 'DM Sans',
    sans-serif;
}
.help-contact-label > span {
  font-size: 13px;
}
.settings-contact {
  display: grid;
  gap: 9px;
  margin-top: 8px;
  padding: 11px 9px 7px;
  border-top: 1px solid var(--line);
}
.settings-contact > strong {
  margin-bottom: 1px;
  color: #334139;
  font:
    700 11px Manrope,
    sans-serif;
}
.settings-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #637168;
  font-size: 10px;
  line-height: 1.3;
}
.settings-page-panel {
  max-width: 760px;
  padding: 0 22px;
}
.settings-theme-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
}
.settings-theme-section > div {
  display: grid;
  gap: 5px;
}
.settings-theme-section > div strong {
  font:
    700 13px Manrope,
    sans-serif;
  color: #334139;
}
.settings-theme-section > div span {
  font-size: 10px;
  color: #87938b;
}
.settings-theme-section select {
  width: min(240px, 48%);
  height: 39px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #435047;
  font:
    11px 'DM Sans',
    sans-serif;
}
.settings-contact-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: #45534b;
  text-align: left;
  font:
    600 12px 'DM Sans',
    sans-serif;
  cursor: pointer;
}
.settings-contact-option:hover,
.settings-contact-option.expanded {
  color: var(--green-dark);
}
.settings-contact-option > span {
  font-size: 17px;
  transition: transform 0.15s;
}
.settings-contact-option.expanded > span {
  transform: rotate(90deg);
}
.settings-contact {
  padding: 5px 0 18px;
}
.settings-contact[hidden] {
  display: none;
}
.settings-contact > strong {
  font-size: 12px;
}
.settings-contact-item {
  font-size: 11px;
}
.contact-icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: var(--green);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.whatsapp-icon {
  stroke: #32976e;
}
.email-icon {
  stroke: #75867c;
}
body[data-theme='ocean'] {
  --canvas: #f0f6f8;
  --line: #dce8ec;
  --green: #397d91;
  --green-dark: #286579;
  --mint: #e4f1f4;
  --ink: #26383e;
  --muted: #71868e;
}
body[data-theme='lavender'] {
  --canvas: #f5f2f8;
  --line: #e7e0ed;
  --green: #786493;
  --green-dark: #624e7d;
  --mint: #eee8f4;
  --ink: #342d3d;
  --muted: #847b8e;
}
body[data-theme='dark'] {
  color-scheme: dark;
  --canvas: #141a17;
  --line: #303b35;
  --green: #78b99a;
  --green-dark: #96ceb0;
  --mint: #263a30;
  --ink: #e4ebe6;
  --muted: #9ca9a1;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.24);
  background: var(--canvas);
  color: var(--ink);
}
body[data-theme='dark'] .sidebar,
body[data-theme='dark'] .topbar,
body[data-theme='dark'] .school-switch,
body[data-theme='dark'] .help-card,
body[data-theme='dark'] .directory-panel,
body[data-theme='dark'] .schedule-panel,
body[data-theme='dark'] .class-card,
body[data-theme='dark'] .matter-card,
body[data-theme='dark'] .profile-panel,
body[data-theme='dark'] .dashboard-kpi,
body[data-theme='dark'] .dashboard-panel,
body[data-theme='dark'] .modal,
body[data-theme='dark'] .profile-menu {
  background: #1d2621;
  color: var(--ink);
  border-color: var(--line);
}
body[data-theme='dark'] .breadcrumb,
body[data-theme='dark'] .school-meta span,
body[data-theme='dark'] .profile-meta span,
body[data-theme='dark'] .top-profile-meta span,
body[data-theme='dark'] .page-heading p,
body[data-theme='dark'] .simple-heading p,
body[data-theme='dark'] .teacher-person small,
body[data-theme='dark'] .class-card p,
body[data-theme='dark'] .settings-contact-item,
body[data-theme='dark'] .theme-setting {
  color: #a6b3aa;
}
body[data-theme='dark'] .breadcrumb strong,
body[data-theme='dark'] .top-profile-meta strong,
body[data-theme='dark'] .directory-top strong,
body[data-theme='dark'] .teacher-person strong,
body[data-theme='dark'] .class-card h3,
body[data-theme='dark'] .profile-panel-heading strong,
body[data-theme='dark'] .settings-contact > strong,
body[data-theme='dark'] .grid-head strong,
body[data-theme='dark'] .dashboard-panel-heading h2 {
  color: #e1e9e3;
}
body[data-theme='dark'] .nav-item {
  color: #b1beb5;
}
body[data-theme='dark'] .nav-item.active {
  color: var(--green-dark);
  background: #293c32;
}
body[data-theme='dark'] .nav-count,
body[data-theme='dark'] .profile-avatar,
body[data-theme='dark'] .top-avatar,
body[data-theme='dark'] .teacher-initial {
  background: #2c3b32;
  color: #a3d5b9;
}
body[data-theme='dark'] .search-input,
body[data-theme='dark'] input,
body[data-theme='dark'] select,
body[data-theme='dark'] .theme-setting select {
  background: #19211d;
  color: #e2e9e3;
  border-color: #3a4840;
}
body[data-theme='dark'] .teacher-subject-field .teacher-subject-tag {
  background: #19211d;
  border-color: #3a4840;
}
body[data-theme='dark'] .teacher-subject-field .teacher-subject-tag:has(input:checked) {
  background: #263a30;
  border-color: #527b64;
}
body[data-theme='dark'] .subject-pill,
body[data-theme='dark'] .matter-color-hint,
body[data-theme='dark'] .dashboard-current-strip {
  background: #26342c;
  color: #bdc9c0;
  border-color: #3a4840;
}
body[data-theme='dark'] .dashboard-day-row > span,
body[data-theme='dark'] .dashboard-subject-row > div:first-child span,
body[data-theme='dark'] .dashboard-kpi > span,
body[data-theme='dark'] .dashboard-empty,
body[data-theme='dark'] .time-cell,
body[data-theme='dark'] .grid-head span {
  color: #a0ada4;
}
body[data-theme='dark'] .dashboard-bar-track {
  background: #303b35;
}
body[data-theme='dark'] .schedule-toolbar,
body[data-theme='dark'] .grid-head,
body[data-theme='dark'] .teacher-row,
body[data-theme='dark'] .class-card-foot,
body[data-theme='dark'] .settings-contact,
body[data-theme='dark'] .profile-menu .profile-menu-logout {
  border-color: #303b35;
}
body[data-theme='dark'] .profile-menu button {
  color: #d4ded7;
}
body[data-theme='dark'] .profile-menu button:hover {
  background: #29362f;
}
body[data-theme='dark'] .profile-menu .profile-menu-logout {
  color: #e29b94;
}
body[data-theme='dark'] .week-nav button,
body[data-theme='dark'] .select-control,
body[data-theme='dark'] .view-toggle {
  background: #19211d;
  color: #d3ddd6;
  border-color: #3a4840;
}
body[data-theme='dark'] .view-toggle button.selected {
  background: #293c32;
  color: #a6d5bb;
}
body[data-theme='dark'] .empty-cell:hover {
  background: #202b24;
  border-color: #527b64;
}
body[data-theme='dark'] .schedule-legend {
  color: #a5b1a9;
}
body[data-theme='dark'] .settings-theme-section > div strong {
  color: #e1e9e3;
}
body[data-theme='dark'] .settings-theme-section > div span {
  color: #a6b3aa;
}
body[data-theme='dark'] .settings-contact-option {
  color: #d4ded7;
}
@media (max-width: 560px) {
  .settings-page-panel {
    padding: 0 16px;
  }
  .settings-theme-section {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .settings-theme-section select {
    width: 100%;
    max-width: none;
  }
}
body[data-theme='ocean'] .lesson-card {
  background: #e8f1f2;
  border-left-color: #5c9294;
}
body[data-theme='ocean'] .lesson-card.gold {
  background: #f4f0e6;
  border-left-color: #b9915d;
}
body[data-theme='ocean'] .lesson-card.lilac {
  background: #efedf5;
  border-left-color: #9287ad;
}
body[data-theme='ocean'] .lesson-card.blue {
  background: #e7f0f5;
  border-left-color: #6c96ae;
}
body[data-theme='ocean'] .lesson-card.rose {
  background: #f5eceb;
  border-left-color: #bc827e;
}
body[data-theme='lavender'] .lesson-card {
  background: #efedf3;
  border-left-color: #82739b;
}
body[data-theme='lavender'] .lesson-card.gold {
  background: #f5efe6;
  border-left-color: #ad8758;
}
body[data-theme='lavender'] .lesson-card.lilac {
  background: #eee9f4;
  border-left-color: #9180ab;
}
body[data-theme='lavender'] .lesson-card.blue {
  background: #e9edf4;
  border-left-color: #708da6;
}
body[data-theme='lavender'] .lesson-card.rose {
  background: #f5eaea;
  border-left-color: #b77e80;
}
body[data-theme='dark'] .summary-card,
body[data-theme='dark'] .grade-header {
  background: #1d2621;
  border-color: var(--line);
  color: var(--ink);
}
body[data-theme='dark'] .summary-icon {
  background: #293a31;
  color: #9ed0b4;
}
body[data-theme='dark'] .summary-icon.amber {
  background: #3b3025;
  color: #e6b77c;
}
body[data-theme='dark'] .summary-text strong,
body[data-theme='dark'] .dashboard-kpi strong {
  color: #e4ebe6;
}
body[data-theme='dark'] .summary-text span,
body[data-theme='dark'] .summary-note,
body[data-theme='dark'] .grade-caption {
  color: #a3b0a7;
}
body[data-theme='dark'] .grade-tab {
  color: #c3cec6;
}
body[data-theme='dark'] .grade-tab:hover {
  background: #29362f;
}
body[data-theme='dark'] .grade-tab.active {
  background: #263a30;
  border-color: #496b57;
  color: #a7d5bb;
}
body[data-theme='dark'] .add-grade-button {
  background: #1a221e;
  color: #a7d5bb;
  border-color: #537862;
}
body[data-theme='dark'] .add-grade-button:hover {
  background: #263a30;
}
body[data-theme='dark'] .break-banner,
body[data-theme='dark'] .break-banner.lunch {
  background: #202b25;
  color: #b1beb5;
  border-color: #303b35;
}
body[data-theme='dark'] .break-banner strong {
  color: #e0e8e2;
}
body[data-theme='dark'] .break-banner > span:first-child,
body[data-theme='dark'] .break-banner.lunch > span:first-child {
  color: #d5aa75;
}
body[data-theme='dark'] .break-time,
body[data-theme='dark'] .time-cell {
  background: #19211d;
  color: #b3c0b7;
  border-color: #303b35;
}
body[data-theme='dark'] .grid-head.first {
  background: #19211d;
  color: #a5b2a9;
}
body[data-theme='dark'] .grid-head.today strong {
  color: #92c8a8;
}
body[data-theme='dark'] .lesson-cell {
  background: #171e1a;
  border-color: #303b35;
}
body[data-theme='dark'] .lesson-card,
body[data-theme='dark'] .lesson-card.green {
  background: #263b31;
  border-left-color: #69a98c;
}
body[data-theme='dark'] .lesson-card.gold {
  background: #403529;
  border-left-color: #c79a67;
}
body[data-theme='dark'] .lesson-card.lilac {
  background: #352f40;
  border-left-color: #a491c9;
}
body[data-theme='dark'] .lesson-card.blue {
  background: #293943;
  border-left-color: #80acc4;
}
body[data-theme='dark'] .lesson-card.rose {
  background: #432f32;
  border-left-color: #cb8984;
}
body[data-theme='dark'] .lesson-card strong {
  color: #edf4ef;
}
body[data-theme='dark'] .lesson-card .lesson-detail {
  color: #c4d2c9;
}
body[data-theme='dark'] .lesson-card .lesson-room {
  color: #aebeb4;
}
body[data-theme='dark'] .lesson-edited {
  color: #e3bd8e;
}
body[data-theme='dark'] .lesson-flag {
  background: #59432d;
  color: #f1d2a6 !important;
}
body[data-theme='dark'] .empty-cell {
  border-color: #34413a;
  color: #a0b2a7;
}
body[data-theme='dark'] .empty-cell:hover,
body[data-theme='dark'] .schedule-grid.is-dragging .empty-cell {
  background: #202d25;
  border-color: #5a8068;
}
body[data-theme='dark'] .lesson-cell.drag-over {
  background: #26382e;
}
body[data-theme='dark'] .lesson-cell.drag-over .empty-cell {
  background: #2b4435;
  border-color: #78ad8b;
}

/* Agenda: small scale increase to improve readability without changing its visual weight. */
.schedule-grid.day-view {
  min-width: 500px;
  grid-template-columns: 82px minmax(320px, 1fr);
}
.schedule-grid:not(.day-view) {
  min-width: 1008px;
  grid-template-columns: 78px repeat(7, minmax(132px, 1fr));
}
.grid-head {
  height: 58px;
  gap: 5px;
}
.grid-head.first {
  font-size: 10px;
  padding-left: 18px;
}
.grid-head strong {
  font-size: 11px;
}
.grid-head span {
  font-size: 10px;
}
.time-cell {
  height: 98px;
  padding-top: 13px;
}
.time-cell.editable-schedule {
  font-size: 11px;
  font-weight: 700;
}
.break-time {
  height: 35px;
}
.break-time.editable-schedule {
  font-size: 10px;
}
.break-banner {
  height: 35px;
  font-size: 11px;
  gap: 8px;
  padding: 0 14px;
}
.break-banner strong {
  font-size: 11px;
}
.break-banner > span:last-child {
  font-size: 10px;
}
.lesson-cell {
  height: 98px;
  padding: 8px;
}
.lesson-card {
  padding: 9px 9px 7px 11px;
  border-radius: 8px;
}
.lesson-card-heading {
  margin-bottom: 5px;
}
.lesson-card-heading strong {
  font-size: 11.5px;
}
.lesson-card .lesson-detail {
  font-size: 10px;
  line-height: 14px;
}
.lesson-edited {
  font-size: 7px;
}
.lesson-flag {
  max-width: 58px;
  font-size: 8.5px !important;
}
.empty-cell span {
  font-size: 20px;
}
.schedule-legend {
  font-size: 10px;
  padding: 15px 20px;
}
.schedule-legend .legend-dot {
  width: 8px;
  height: 8px;
}
.grade-header {
  padding: 15px 20px;
}
.grade-caption {
  font-size: 10px;
}
.grade-tab,
.add-grade-button {
  height: 34px;
  font-size: 11px;
}
.schedule-toolbar {
  min-height: 64px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.week-nav {
  gap: 11px;
}
.week-nav strong {
  font-size: 13px;
}
.week-nav button {
  width: 30px;
  height: 30px;
}
.week-nav .button-light {
  height: 32px;
  font-size: 11px;
}
.select-control {
  height: 32px;
  font-size: 11px;
}
.view-toggle button {
  font-size: 11px;
  padding: 5px 9px;
}
.page-content:has(.schedule-panel) .summary-card {
  padding: 15px 17px;
}
.page-content:has(.schedule-panel) .summary-text span {
  font-size: 11px;
}
.page-content:has(.schedule-panel) .summary-text strong {
  font-size: 22px;
}
@media (max-width: 700px) {
  .schedule-grid.day-view {
    min-width: 480px;
  }
  .schedule-toolbar {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .week-nav strong {
    font-size: 11px;
  }
}

.school-selector-wrap {
  position: relative;
  margin-bottom: 30px;
  z-index: 6;
}
.school-switch {
  width: 100%;
  min-width: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.school-switch:hover,
.school-switch[aria-expanded='true'] {
  border-color: #c8d9ce;
  background: #fbfdfb;
}
.school-switch .school-meta strong,
.school-switch .school-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.school-switch .school-meta strong {
  max-width: 150px;
}
.school-switch .school-meta span {
  max-width: 150px;
}
.school-switch .chevron {
  flex: none;
  transition: transform 0.15s;
}
.school-switch[aria-expanded='true'] .chevron {
  transform: rotate(180deg);
}
.school-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(300px, calc(100vw - 80px));
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(32, 55, 43, 0.15);
  z-index: 20;
}
.school-menu-heading {
  display: block;
  padding: 7px 9px 8px;
  color: #8a9790;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.school-option,
.school-menu-action {
  width: 100%;
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #46554c;
  text-align: left;
  font:
    500 11px 'DM Sans',
    sans-serif;
  cursor: pointer;
}
.school-option:hover,
.school-menu-action:hover {
  background: #f4f7f4;
}
.school-option[aria-current='true'] {
  background: #edf5f0;
  color: var(--green-dark);
}
.school-option .school-avatar {
  width: 31px;
  height: 31px;
  flex: none;
  font-size: 10px;
}
.school-option-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.school-option-copy strong,
.school-option-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.school-option-copy strong {
  font-size: 11px;
}
.school-option-copy small {
  font-size: 9px;
  color: #8b9790;
}
.school-option-check {
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
}
.school-menu-action {
  min-height: 37px;
  color: var(--green);
  font-weight: 700;
}
.school-menu-settings {
  justify-content: space-between;
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  margin-top: 4px;
  padding-top: 10px;
}
.school-dialog {
  width: min(500px, calc(100% - 30px));
}
.school-dialog form {
  display: grid;
  gap: 14px;
}
.school-dialog .modal-heading {
  margin-bottom: 3px;
}
.school-dialog label {
  font-size: 11px;
}
.school-dialog input {
  height: 42px;
  font-size: 12px;
}
.optional-label {
  color: #99a49d;
  font-weight: 400;
}
body[data-theme='dark'] .school-switch:hover,
body[data-theme='dark'] .school-switch[aria-expanded='true'] {
  background: #202b25;
  border-color: #496b57;
}
body[data-theme='dark'] .school-menu {
  background: #1d2621;
  border-color: #35443b;
}
body[data-theme='dark'] .school-menu-heading,
body[data-theme='dark'] .school-option-copy small {
  color: #a6b3aa;
}
body[data-theme='dark'] .school-option,
body[data-theme='dark'] .school-menu-action {
  color: #d7e2da;
}
body[data-theme='dark'] .school-option:hover,
body[data-theme='dark'] .school-menu-action:hover {
  background: #26352d;
}
body[data-theme='dark'] .school-option[aria-current='true'] {
  background: #263a30;
  color: #a7d5bb;
}
body[data-theme='dark'] .school-menu-settings {
  border-color: #35443b;
}
@media (max-width: 700px) {
  .school-selector-wrap {
    width: 44px;
    margin: 0 auto 20px;
  }
  .school-switch {
    width: 44px;
    height: 44px;
    justify-content: center;
    padding: 6px;
  }
  .school-switch .school-avatar {
    flex-shrink: 0;
  }
  .school-menu {
    left: 53px;
    top: 0;
    width: min(290px, calc(100vw - 75px));
  }
}
.school-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-width: 0;
}
.school-logo-field {
  display: grid;
  gap: 7px;
}
.school-logo-label {
  font-size: 11px;
  color: #657269;
  font-weight: 600;
}
.school-field-heading {
  display: flex;
  align-items: center;
  gap: 5px;
}
.school-field-heading .optional-label {
  font-size: 9px;
}
.school-logo-control {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfa;
}
.school-logo-preview {
  width: 48px;
  height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: #f4eadc;
  color: #90673e;
  font-size: 12px;
  font-weight: 700;
}
.school-logo-preview img,
.school-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.school-logo-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.school-logo-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: #46554c;
}
.school-logo-copy small {
  font-size: 9px;
  color: #8c9891;
  line-height: 1.4;
}
.school-logo-upload {
  position: relative;
  flex: none;
  padding: 8px 10px;
  white-space: nowrap;
  font-size: 10px;
  cursor: pointer;
}
.school-logo-upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.school-logo-remove {
  flex: none;
  padding: 6px;
  border: 0;
  background: none;
  color: #a45e54;
  font:
    600 9px 'DM Sans',
    sans-serif;
  cursor: pointer;
}
.school-logo-remove:hover {
  text-decoration: underline;
}
.school-switch .school-avatar {
  overflow: hidden;
}
body[data-theme='dark'] .school-logo-control {
  background: #19211d;
  border-color: #35443b;
}
body[data-theme='dark'] .school-logo-copy strong {
  color: #d7e2da;
}
body[data-theme='dark'] .school-logo-copy small {
  color: #a6b3aa;
}
@media (max-width: 520px) {
  .school-contact-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .school-logo-control {
    flex-wrap: wrap;
  }
  .school-logo-copy {
    flex-basis: calc(100% - 70px);
  }
  .school-logo-upload {
    margin-left: 59px;
  }
}
/* Profile: make uploaded avatar images fill the circular avatars (sidebar + topbar). */
.profile-avatar,
.top-avatar {
  overflow: hidden;
}
.profile-avatar img,
.top-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.school-logo-preview.profile-avatar-preview {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

/* Cada horário comporta aulas simultâneas de todas as turmas. */
.schedule-grid .lesson-cell {
  height: auto;
  min-height: 98px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.schedule-grid .lesson-card {
  height: auto;
  min-height: 80px;
  flex-shrink: 0;
}
.schedule-grid .time-cell {
  height: auto;
  min-height: 98px;
}
.schedule-grid .empty-cell {
  width: 100%;
  min-height: 80px;
  font: inherit;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  flex: 1;
}
.schedule-grid .add-parallel-lesson {
  min-height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  flex: 0;
}
.add-parallel-lesson small {
  font-size: 10px;
}

.lesson-note-field {
  grid-column: 1/-1;
}
.modal textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  resize: vertical;
}
.modal label[hidden] {
  display: none !important;
}
.schedule-grid .note-card,
body[data-theme='dark'] .schedule-grid .note-card {
  background: var(--note-color);
  border-left-color: var(--note-color);
  color: #17251e;
}
.note-card p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
}
.schedule-grid .note-card strong,
body[data-theme='dark'] .schedule-grid .note-card strong {
  color: #17251e;
  background: #ffffffc9;
  border-radius: 4px;
  padding: 3px 5px;
  display: inline-block;
}
.note-card p {
  background: #ffffffc9;
  border-radius: 4px;
  padding: 5px;
}

.modal .note-color-select {
  color: #17251e;
  font-weight: 700;
  border: 2px solid #ffffff;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--line);
}
.modal .note-color-select option {
  background: #fff;
  color: #17251e;
}

#scheduleEditForm label[hidden] {
  display: none !important;
}
.schedule-edit-error {
  font-size: 12px;
  color: #bd4138;
  line-height: 1.5;
}
body[data-theme='dark'] .schedule-edit-error {
  color: #ffaaa0;
}

.add-schedule-row {
  padding: 14px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

/* Padrão recuperado da agenda por turma no modo Supabase. */
[data-source='supabase-test'] .schedule-period {
  padding-top: 20px;
}
[data-source='supabase-test'] .schedule-period-heading {
  padding: 0 24px 16px;
}
[data-source='supabase-test'] .schedule-period-heading h2 {
  margin: 0;
  font-size: 18px;
}
[data-source='supabase-test'] .schedule-period-empty {
  margin: 0 24px 20px;
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
}
[data-source='supabase-test'] .schedule-grid .lesson-cell {
  min-height: 96px;
  justify-content: center;
}
[data-source='supabase-test'] .schedule-grid .lesson-card {
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
[data-source='supabase-test'] .schedule-grid .empty-cell {
  height: 74px;
  min-height: 74px;
  flex: 0 0 auto;
}
[data-source='supabase-test'] .schedule-grid .time-cell {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
}
[data-source='supabase-test'] .time-cell > .schedule-edit-icon {
  top: 50%;
  transform: translateY(-50%);
}
[data-source='supabase-test'] .schedule-grid .note-card strong {
  background: none;
  padding: 0;
}
[data-source='supabase-test'] .schedule-grid .note-card p {
  background: none;
  padding: 0;
  margin: 6px 0 0;
  font-size: 13px;
}

/* Etapa 1: navegação e cabeçalho no padrão do protótipo. */
.sidebar {
  width: 224px;
  padding: 30px 18px 20px;
  background: var(--paper);
}
.sidebar > .brand {
  margin: 0;
  font-size: 29px;
  gap: 10px;
  letter-spacing: -1.7px;
}
.sidebar .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: 27px;
}
.school-selector-wrap {
  margin: 37px 0 28px;
}
.sidebar .school-switch {
  min-height: 42px;
  width: 100%;
  margin: 0;
  padding: 0 6px;
  gap: 10px;
  border: 0;
  background: transparent;
  border-radius: 8px;
}
.sidebar .school-avatar {
  width: 34px;
  height: 34px;
  background: var(--mint);
  color: var(--green);
  font-size: 12px;
  flex-shrink: 0;
}
.sidebar .school-meta strong {
  font-size: 12px;
  max-width: 130px;
}
.sidebar .school-meta span {
  font-size: 11px;
  max-width: 130px;
}
.sidebar .chevron {
  font-size: 20px;
}
.main-nav {
  gap: 5px;
}
.sidebar .nav-item {
  height: 44px;
  padding: 12px 13px;
  gap: 12px;
  font-size: 13px;
  border-radius: 8px;
  width: 100%;
}
.nav-icon svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-count {
  font-size: 11px;
  background: transparent;
  padding: 0;
  margin-left: auto;
}
.sidebar-bottom {
  display: none;
}
.topbar {
  height: 74px;
  padding: 0 36px;
  background: var(--paper);
}
.breadcrumb {
  font-size: 12px;
  min-width: 0;
}
.top-profile-meta strong {
  font-size: 12px;
}
.top-profile-meta span {
  font-size: 11px;
}
.top-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green);
  font-size: 11px;
}
.profile-menu-toggle {
  font-size: 19px;
  width: 28px;
  height: 34px;
  border: 0;
  background: transparent;
}
.navigation-toggle {
  display: none;
}
.school-switch:focus-visible,
.nav-item:focus-visible,
.profile-menu-toggle:focus-visible,
.navigation-toggle:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
@media (max-width: 760px) {
  .sidebar {
    position: fixed;
    z-index: 70;
    inset: 0 auto 0 0;
    height: 100svh;
    overflow-y: auto;
    width: 224px;
    transform: translateX(-100%);
    transition: transform 0.18s;
    border-right: 1px solid var(--line);
  }
  body.navigation-open .sidebar {
    transform: translateX(0);
  }
  .main-content {
    min-width: 0;
    width: 100%;
  }
  .navigation-toggle {
    display: grid;
    place-items: center;
    background: var(--paper);
    color: var(--ink);
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    flex-shrink: 0;
  }
  .topbar {
    padding: 0 16px;
    gap: 12px;
  }
  .top-actions {
    gap: 8px;
  }
  .breadcrumb {
    flex: 1;
  }
  .breadcrumb > span:first-child {
    display: none;
  }
  .sidebar .school-meta,
  .sidebar .school-meta strong,
  .sidebar .school-meta span {
    display: flex;
  }
  .sidebar .nav-item {
    justify-content: flex-start;
  }
  .sidebar .nav-item > .nav-icon {
    display: block;
  }
  .school-selector-wrap {
    width: 100%;
    margin: 37px 0 28px;
  }
  .sidebar .school-switch {
    width: 100%;
    justify-content: flex-start;
  }
  .school-menu {
    left: 0;
    top: 100%;
    width: 100%;
  }
  .top-profile-meta {
    display: none;
  }
  .top-profile {
    gap: 6px;
  }
  .topbar > .top-actions > .icon-button {
    display: none;
  }
  .sidebar .nav-item {
    font-size: 13px;
  }
  .sidebar .nav-item .nav-count {
    display: block;
  }
  .sidebar .main-nav {
    display: grid;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar {
    transition: none;
  }
}
/* Etapa 2: conta e preferências, seguindo a composição do protótipo. */
.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: start;
  max-width: 1160px;
}
.account-layout .profile-panel {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 18px;
}
.account-layout h2 {
  font-size: 18px;
  margin: 0 0 8px;
}
.account-layout p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.account-layout .profile-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 24px;
}
.account-layout label {
  min-width: 0;
}
.account-layout input {
  width: 100%;
  min-width: 0;
}
.account-layout input[readonly] {
  color: var(--muted);
  background: var(--canvas);
}
.account-layout .profile-avatar-field,
.account-layout .profile-form-footer {
  grid-column: 1/-1;
}
.account-layout .profile-form-footer {
  flex-wrap: wrap;
  gap: 14px;
}
.account-security {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.account-themes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}
.account-theme {
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.account-theme[aria-pressed='true'] {
  border: 2px solid var(--green);
  padding: 11px;
  background: var(--mint);
}
.theme-preview {
  height: 64px;
  display: grid;
  grid-template-columns: 20% 1fr;
  gap: 7px;
  padding: 8px;
  background: #f5f7f4;
  border-radius: 6px;
  margin-bottom: 12px;
}
.theme-preview i {
  grid-row: span 2;
  background: #28745f;
  border-radius: 3px;
}
.theme-preview b {
  background: #e0e9e3;
  border-radius: 3px;
}
.account-theme[data-account-theme='dark'] .theme-preview {
  background: #1e2925;
}
.account-theme[data-account-theme='dark'] b {
  background: #42534a;
}
.account-theme[data-account-theme='ocean'] .theme-preview {
  background: #eef6fa;
}
.account-theme[data-account-theme='ocean'] i {
  background: #287b96;
}
.account-theme[data-account-theme='ocean'] b {
  background: #d0e5ef;
}
.account-theme[data-account-theme='lavender'] .theme-preview {
  background: #f3eff8;
}
.account-theme[data-account-theme='lavender'] i {
  background: #786597;
}
.account-theme[data-account-theme='lavender'] b {
  background: #e0d8eb;
}
.account-theme:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
.account-password-dialog {
  max-width: 460px;
}
.account-password-dialog label {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  font-size: 13px;
}
.account-password-dialog input {
  width: 100%;
}
.account-password-dialog p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
#accountPasswordError {
  color: var(--ink);
  padding: 12px;
  border-left: 3px solid #c85c40;
  background: var(--canvas);
}
@media (max-width: 1000px) {
  .account-layout {
    grid-template-columns: 1fr;
  }
  .account-themes {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 560px) {
  .account-layout .profile-panel {
    padding: 20px;
  }
  .account-layout .profile-form {
    grid-template-columns: 1fr;
  }
  .account-themes {
    grid-template-columns: 1fr 1fr;
  }
  .account-layout .school-logo-control {
    flex-wrap: wrap;
  }
  .account-layout .profile-form-footer .button {
    width: 100%;
  }
}
/* Etapa 3 — agenda real: a turma define a tabela e cada faixa mantém seu ID. */
[data-source='supabase-test'] .page-heading h1 {
  font-size: 28px;
  letter-spacing: -0.8px;
}
[data-source='supabase-test'] .page-heading p {
  font-size: 13px;
  line-height: 1.6;
}
[data-source='supabase-test'] .summary-row {
  gap: 0;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  overflow: hidden;
}
[data-source='supabase-test'] .summary-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 16px 22px;
  gap: 12px;
  min-width: 0;
}
[data-source='supabase-test'] .summary-card + .summary-card {
  border-left: 1px solid var(--line);
}
[data-source='supabase-test'] .summary-text strong {
  font-size: 24px;
  color: var(--ink);
}
[data-source='supabase-test'] .summary-text span,
[data-source='supabase-test'] .summary-note {
  color: var(--muted);
  font-size: 11px;
}
[data-source='supabase-test'] .schedule-panel {
  background: var(--paper);
  border-radius: 16px;
  overflow: hidden;
}
[data-source='supabase-test'] .grade-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  background: var(--paper);
}
[data-source='supabase-test'] .grade-heading {
  flex: 1;
  min-width: 180px;
}
[data-source='supabase-test'] .grade-heading .eyebrow {
  font:
    600 13px Manrope,
    sans-serif;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
[data-source='supabase-test'] .grade-caption {
  font-size: 11px;
  color: var(--muted);
  white-space: normal;
  max-width: 44ch;
  line-height: 1.5;
}
[data-source='supabase-test'] .grade-tabs {
  width: auto;
  max-width: 100%;
  flex: 1;
  justify-content: flex-end;
  gap: 8px;
}
[data-source='supabase-test'] .grade-tab,
[data-source='supabase-test'] .add-grade-button {
  height: 38px;
  font-size: 12px;
  flex-shrink: 0;
}
[data-source='supabase-test'] .add-grade-button {
  background: var(--paper);
  color: var(--green);
  border-color: var(--green);
}
[data-source='supabase-test'] .grade-tab.active {
  background: var(--mint);
  color: var(--green-dark);
  border-color: var(--line);
}
[data-source='supabase-test'] .schedule-toolbar {
  padding: 18px 24px;
  align-items: center;
  gap: 16px;
  background: var(--paper);
  flex-wrap: wrap;
}
[data-source='supabase-test'] .week-nav {
  gap: 8px;
  flex-wrap: wrap;
}
[data-source='supabase-test'] .week-nav strong {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
}
[data-source='supabase-test'] .week-nav button,
[data-source='supabase-test'] .select-control,
[data-source='supabase-test'] .view-toggle button {
  height: 38px;
  font-size: 12px;
  background: var(--paper);
  color: var(--ink);
}
[data-source='supabase-test'] .toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
[data-source='supabase-test'] .schedule-filter-value {
  max-width: 220px;
  min-width: 150px;
}
[data-source='supabase-test'] .view-toggle {
  background: var(--paper);
}
[data-source='supabase-test'] .view-toggle button.selected {
  background: var(--mint);
  color: var(--green-dark);
}
[data-source='supabase-test'] .schedule-period {
  padding-top: 24px;
}
[data-source='supabase-test'] .schedule-period + .schedule-period {
  border-top: 1px solid var(--line);
}
[data-source='supabase-test'] .schedule-period-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 24px 18px;
}
[data-source='supabase-test'] .schedule-period-heading h2 {
  font:
    700 18px Manrope,
    sans-serif;
  color: var(--ink);
}
[data-source='supabase-test'] .schedule-period-heading > span {
  font-size: 12px;
  color: var(--muted);
}
[data-source='supabase-test'] .schedule-wrap {
  overflow-x: auto;
  background: var(--paper);
}
[data-source='supabase-test'] .schedule-grid:not(.day-view) {
  grid-template-columns: 94px repeat(5, minmax(136px, 1fr));
  min-width: 774px;
  background: var(--paper);
}
[data-source='supabase-test'] .schedule-grid.day-view {
  grid-template-columns: 94px minmax(240px, 1fr);
  min-width: 334px;
  background: var(--paper);
}
[data-source='supabase-test'] .grid-head {
  height: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  background: var(--paper);
  color: var(--muted);
}
[data-source='supabase-test'] .grid-head strong {
  font-size: 12px;
  color: var(--ink);
}
[data-source='supabase-test'] .grid-head span {
  font-size: 11px;
}
[data-source='supabase-test'] .grid-head.today {
  background: var(--mint);
}
[data-source='supabase-test'] .schedule-grid .time-cell,
[data-source='supabase-test'] .schedule-grid .lesson-cell {
  min-height: 96px;
  height: auto;
  background: var(--paper);
  align-self: stretch;
}
[data-source='supabase-test'] .schedule-grid .lesson-cell {
  padding: 11px;
  gap: 8px;
  justify-content: center;
  min-width: 0;
}
[data-source='supabase-test'] .schedule-time-range {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
[data-source='supabase-test'] .schedule-time-range strong {
  font-size: 13px;
  color: var(--ink);
}
[data-source='supabase-test'] .schedule-time-range small {
  font-size: 10px;
  color: var(--muted);
}
[data-source='supabase-test'] .schedule-grid .lesson-card,
[data-source='supabase-test'] .schedule-grid .empty-cell {
  min-height: 74px;
  height: auto;
  padding: 12px;
  border-radius: 10px;
  flex: none;
  width: 100%;
  margin: 0;
}
[data-source='supabase-test'] .lesson-card-heading {
  margin: 0 0 5px;
}
[data-source='supabase-test'] .lesson-card-heading strong {
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
[data-source='supabase-test'] .lesson-card .lesson-detail {
  font-size: 12px;
  line-height: 1.5;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
[data-source='supabase-test'] .schedule-grid .empty-cell {
  border-color: var(--line);
  color: var(--muted);
  background: transparent;
}
[data-source='supabase-test'] .empty-cell:hover {
  background: var(--mint);
  border-color: var(--green);
  color: var(--green-dark);
}
[data-source='supabase-test'] .break-time,
[data-source='supabase-test'] .break-banner {
  height: auto;
  min-height: 42px;
  background: var(--canvas);
  color: var(--muted);
}
[data-source='supabase-test'] .break-banner {
  padding: 10px 14px;
  flex-wrap: wrap;
  gap: 6px 12px;
}
[data-source='supabase-test'] .break-banner strong {
  font-size: 12px;
  color: var(--ink);
}
[data-source='supabase-test'] .break-banner > span:last-child {
  font-size: 11px;
}
[data-source='supabase-test'] .schedule-legend {
  padding: 16px 24px;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--paper);
  font-size: 11px;
  color: var(--muted);
}
[data-source='supabase-test'] .schedule-grid [role='button']:focus-visible,
[data-source='supabase-test'] .empty-cell:focus-visible,
[data-source='supabase-test'] .grade-tab:focus-visible,
[data-source='supabase-test'] .add-grade-button:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: -3px;
}
[data-source='supabase-test'] .schedule-grid.is-dragging .empty-cell,
[data-source='supabase-test'] .lesson-cell.drag-over {
  background: var(--mint);
}
@media (max-width: 1000px) {
  [data-source='supabase-test'] .summary-note {
    display: none;
  }
  [data-source='supabase-test'] .schedule-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  [data-source='supabase-test'] .toolbar-actions {
    width: 100%;
    justify-content: space-between;
  }
}
@media (max-width: 600px) {
  [data-source='supabase-test'] .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  [data-source='supabase-test'] .page-heading h1 {
    font-size: 24px;
  }
  [data-source='supabase-test'] .summary-card {
    padding: 14px;
    gap: 8px;
  }
  [data-source='supabase-test'] .summary-icon {
    display: none;
  }
  [data-source='supabase-test'] .summary-text strong {
    font-size: 22px;
  }
  [data-source='supabase-test'] .summary-text span {
    font-size: 10px;
  }
  [data-source='supabase-test'] .grade-header {
    padding: 18px;
    flex-direction: row;
  }
  [data-source='supabase-test'] .grade-heading {
    flex-basis: 100%;
  }
  [data-source='supabase-test'] .grade-tabs {
    justify-content: flex-start;
    flex-basis: 100%;
  }
  [data-source='supabase-test'] .add-grade-button {
    margin-left: 0;
  }
  [data-source='supabase-test'] .schedule-toolbar {
    padding: 16px 18px;
  }
  [data-source='supabase-test'] .week-nav {
    display: grid;
    grid-template-columns: 38px 38px minmax(0, 1fr) auto;
    width: 100%;
  }
  [data-source='supabase-test'] .week-nav strong {
    text-align: center;
    font-size: 11px;
  }
  [data-source='supabase-test'] .toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  [data-source='supabase-test'] .schedule-filter-value {
    flex: 1;
    min-width: 120px;
    max-width: none;
  }
  [data-source='supabase-test'] .schedule-period-heading {
    padding: 0 18px 16px;
  }
  [data-source='supabase-test'] .schedule-legend {
    padding: 16px 18px;
  }
  [data-source='supabase-test'] .summary-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* Professor: edição preserva identidade e disponibilidades por dia. */
.teacher-modal.modal {
  width: min(860px, calc(100% - 32px));
  max-width: 860px;
  max-height: calc(100dvh - 40px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
}
.teacher-modal form {
  padding: 28px;
}
.teacher-modal .modal-heading {
  align-items: flex-start;
  margin-bottom: 24px;
}
.teacher-modal .modal-heading h2 {
  font:
    700 24px Manrope,
    sans-serif;
  letter-spacing: -0.6px;
  color: var(--ink);
}
.teacher-dialog-intro {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted);
}
.teacher-modal form > label {
  font-size: 13px;
  color: var(--ink);
  gap: 8px;
}
.teacher-modal #teacherName {
  height: 44px;
  font-size: 14px;
  background: var(--paper);
  color: var(--ink);
}
.teacher-modal fieldset {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.teacher-modal legend {
  font:
    700 15px Manrope,
    sans-serif;
  color: var(--ink);
}
.teacher-modal fieldset > p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 14px;
  max-width: 75ch;
}
.teacher-modal .teacher-subject-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.teacher-modal .teacher-subject-tag {
  padding: 12px;
  background: var(--paper);
  border-color: var(--line);
  border-radius: 10px;
}
.teacher-modal .teacher-subject-tag span {
  font-size: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--ink);
}
.teacher-modal .teacher-subject-tag small {
  font-size: 10px;
  color: var(--muted);
}
.teacher-modal .teacher-subject-tag:has(input:checked),
.teacher-modal .availability-option:has(input:checked) {
  background: var(--mint);
  border-color: var(--green);
}
.teacher-modal #teacherDays {
  gap: 8px;
}
.teacher-modal #teacherDays label {
  min-height: 38px;
  border-color: var(--line);
  border-radius: 8px;
}
.teacher-modal #teacherDays span {
  font-size: 11px;
  color: var(--ink);
}
.teacher-modal #teacherSlots:has(.teacher-time-table) {
  display: block;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.teacher-time-table {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(7, 52px);
  min-width: 560px;
  align-items: stretch;
  background: var(--paper);
}
.teacher-time-head {
  padding: 12px 8px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}
.teacher-time-head:first-child {
  text-align: left;
  padding-left: 16px;
}
.teacher-time-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.teacher-time-label strong {
  font-size: 12px;
  color: var(--ink);
}
.teacher-time-label small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.teacher-time-check {
  position: relative;
  display: grid !important;
  place-items: center;
  margin: 0 !important;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  min-height: 64px;
}
.teacher-time-check input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  margin: 0;
}
.teacher-time-check span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: transparent;
  background: var(--paper);
}
.teacher-time-check:has(input:checked) span {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.teacher-time-check:has(input:disabled) {
  opacity: 0.35;
  cursor: default;
}
.teacher-time-check:has(input:focus-visible) {
  outline: 3px solid var(--green);
  outline-offset: -3px;
}
.teacher-time-empty {
  font-size: 12px;
  color: var(--muted);
  grid-column: 1/-1;
}
.teacher-modal .modal-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.teacher-modal .modal-footer button {
  font-size: 12px;
  min-height: 42px;
}
.teacher-modal #teacherSubmitLabel {
  font-size: 12px;
}
@media (max-width: 600px) {
  .teacher-modal form {
    padding: 20px;
  }
  .teacher-modal .modal-heading h2 {
    font-size: 22px;
  }
  .teacher-modal .teacher-subject-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .teacher-modal #teacherDays {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .teacher-modal .modal-footer {
    flex-wrap: wrap;
    gap: 10px;
  }
  .teacher-modal .modal-footer button {
    flex: 1;
  }
  .teacher-modal .modal-footer button[type='submit'] {
    flex-basis: 100%;
  }
}
.teacher-modal .modal-footer .close-modal {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}
.teacher-modal .close-modal:hover {
  background: var(--mint);
  color: var(--green-dark);
}
.teacher-modal .teacher-subject-tag:has(input:focus-visible) {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}
/* Refinamento aprovado: matérias com o mesmo check da disponibilidade. */
.teacher-modal #teacherDays {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.teacher-time-table {
  grid-template-columns: minmax(140px, 1fr) repeat(5, 52px);
  min-width: 400px;
}
.teacher-modal .teacher-subject-field .teacher-subject-tag {
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 4px 12px;
  min-height: 76px;
  padding: 14px;
  border-radius: 12px;
}
.teacher-modal .teacher-subject-tag input {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.teacher-modal .teacher-subject-tag .teacher-matter-check {
  grid-column: 1;
  grid-row: 1/3;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: transparent;
  font-size: 13px;
  font-style: normal;
}
.teacher-modal .teacher-subject-tag:has(input:checked) .teacher-matter-check {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.teacher-modal .teacher-subject-tag span {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
}
.teacher-modal .teacher-subject-tag small {
  font-size: 11px;
  line-height: 1.4;
}
.teacher-modal .teacher-subject-tag:hover {
  border-color: var(--green);
}
@media (max-width: 600px) {
  .teacher-modal .teacher-subject-field .teacher-subject-tag {
    padding: 12px;
    gap: 4px 9px;
  }
  .teacher-modal #teacherDays {
    gap: 5px;
  }
}
[data-source='supabase-test'] .week-nav button:disabled {
  opacity: 0.35;
  cursor: default;
}
@media (max-width: 600px) {
  [data-source='supabase-test'] .week-nav {
    grid-template-columns: 38px 38px minmax(0, 1fr);
  }
}
.sidebar .brand {
  gap: 7px;
}
