﻿html {
  font-size: 14px;
}

body {
  margin: 0;
  background: #bfbfbf;
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
}

.app-container {
  width: min(1600px, calc(100vw - 32px));
  margin: 24px auto;
}

.navbar-brand {
  font-weight: 700;
}

.app-brand {
  display: flex;
  flex: 0 1 auto;
  margin-right: 20px;
  padding: 4px 0;
}

.app-brand img {
  display: block;
  height: 42px;
  max-width: min(470px, 42vw);
  object-fit: contain;
  object-position: left center;
  width: auto;
}

.nav-user {
  color: #444;
  font-size: 0.9rem;
}

.year-badge {
  background: #fff7cc;
  border: 1px solid #b59b2a;
  border-radius: 4px;
  color: #111;
  font-weight: 700;
  padding: 3px 8px;
}

.readonly-field {
  background: #f4f4f4;
  border: 1px solid #999;
  border-radius: 4px;
  display: grid;
  gap: 4px;
  padding: 8px 10px;
}

.access-denied {
  max-width: 680px;
}

.page-heading,
.print-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-heading h1,
.print-header h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #26425f;
}

.muted {
  color: #555;
}

.login-shell {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
}

.login-panel,
.table-panel,
.editor-side {
  background: #efefef;
  border: 2px solid #111;
  border-radius: 4px;
  padding: 18px;
}

.login-panel {
  width: min(460px, 100%);
}

.login-logo {
  display: block;
  height: auto;
  margin: 0 0 18px;
  max-width: 100%;
  width: 410px;
}

.stack-form,
.editor-side {
  display: grid;
  gap: 14px;
}

.demo-users {
  display: grid;
  gap: 4px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #bbb;
  color: #333;
}

.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.summary-grid div {
  background: #fff;
  border: 1px solid #111;
  border-radius: 4px;
  padding: 10px;
}

.summary-grid strong {
  display: block;
  font-size: 1.4rem;
}

.summary-grid span {
  color: #333;
  font-size: 0.86rem;
}

.simple-heading {
  align-items: flex-start;
}

.quick-actions {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 18px;
}

.task-tile {
  background: #fff;
  border: 2px solid #111;
  border-radius: 6px;
  color: #111;
  display: grid;
  gap: 6px;
  min-height: 108px;
  padding: 18px;
  text-decoration: none;
}

.task-tile:hover {
  background: #eef4fb;
  color: #111;
}

.task-tile.primary {
  background: #e8f4ed;
  border-color: #1f6f43;
}

.task-tile strong {
  font-size: 1.25rem;
}

.task-tile span {
  color: #333;
}

.status-strip {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 18px;
}

.status-strip div {
  background: #fff;
  border: 1px solid #111;
  border-radius: 6px;
  padding: 14px;
}

.status-strip strong,
.status-strip span {
  display: block;
}

.status-strip strong {
  font-size: 1.5rem;
}

.compact-panel {
  margin-bottom: 16px;
}

.simple-filter-bar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.simple-filter-bar label {
  display: grid;
  font-weight: 700;
  gap: 5px;
  min-width: 180px;
}

.general-schedule-grid {
  min-width: 1120px;
}

.general-schedule-grid th:first-child {
  min-width: 210px;
}

.general-schedule-grid th:first-child span,
.general-schedule-grid th:first-child small,
.general-schedule-grid th:first-child em {
  display: block;
  font-style: normal;
}

.general-schedule-grid td {
  min-width: 170px;
  vertical-align: top;
}

.general-schedule-entry {
  background: #fff;
  border: 1px solid #b8b8b8;
  border-left: 6px solid #91c9f7;
  border-radius: 4px;
  display: grid;
  gap: 2px;
  margin-bottom: 6px;
  padding: 6px 8px;
}

.general-schedule-entry strong,
.general-schedule-entry span {
  font-size: 0.82rem;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.editor-main {
  min-width: 0;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.config-grid label,
.editor-side label {
  display: grid;
  gap: 4px;
  font-weight: 700;
}

.config-grid label span,
.editor-side label span {
  color: #444;
  font-size: 0.78rem;
  font-weight: 400;
}

.weekday-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr));
  gap: 0;
  margin-bottom: 16px;
  border: 2px solid #111;
  background: #d9d9d9;
}

.weekday-grid label {
  display: grid;
  gap: 4px;
  padding: 8px;
  text-align: center;
  font-weight: 700;
  border-right: 1px solid #111;
}

.weekday-grid label:last-child {
  border-right: 0;
}

.calendar-scroll {
  overflow: auto;
  border: 2px solid #111;
  background: #fff;
}

.calendar-grid {
  width: 100%;
  min-width: 1050px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.calendar-grid th,
.calendar-grid td {
  border: 1px solid #111;
  height: 26px;
  padding: 3px 6px;
  text-align: center;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-grid,
.calendar-grid th,
.calendar-grid td {
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.calendar-grid thead th,
.calendar-grid tbody th {
  background: #a6a6a6;
  font-weight: 700;
}

.calendar-grid td.fim_semana {
  color: #000;
}

.calendar-grid td.feriado,
.calendar-grid td.interrupcao,
.calendar-grid td.falta_professor {
  color: #003bb3;
}

.calendar-grid td.calendar-cell-info {
  cursor: help;
}

.calendar-cell-tooltip .tooltip-inner {
  max-width: 340px;
  padding: 9px 11px;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
  white-space: pre-wrap;
}

.mono {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.86rem;
}

.serializer-field {
  display: none;
}

.compact-panel {
  margin-bottom: 16px;
}

.valid-from {
  display: inline-block;
  margin-bottom: 10px;
  max-width: 220px;
}

.compact-panel h2,
.grid-editor h2 {
  font-size: 1rem;
  margin: 0;
}

.grid-editor {
  background: #efefef;
  border: 2px solid #111;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.grid-editor-title {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.editable-grid {
  margin: 0;
  table-layout: fixed;
}

.editable-grid th {
  background: #bfbfbf;
  border: 1px solid #111;
  font-size: 0.78rem;
  text-align: center;
}

.editable-grid td {
  border: 1px solid #111;
  padding: 3px;
  vertical-align: middle;
}

.editable-grid .form-control,
.editable-grid .form-select {
  border-radius: 0;
  font-size: 0.8rem;
  min-height: 30px;
  padding: 3px 5px;
}

.editable-grid .form-control-color {
  min-width: 44px;
  padding: 2px;
}

.color-swatch {
  border: 1px solid #111;
  display: inline-block;
  height: 18px;
  width: 42px;
}

.schedule-panel {
  display: grid;
  gap: 14px;
}

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

.visual-schedule-scroll {
  overflow-x: auto;
}

.visual-schedule-grid {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
  min-width: 980px;
}

.visual-schedule-grid th,
.visual-schedule-grid td {
  border: 1px solid #111;
}

.visual-schedule-grid thead th {
  background: #bfbfbf;
  text-align: center;
}

.visual-schedule-grid thead span,
.visual-schedule-grid thead small {
  display: block;
}

.schedule-time-head,
.schedule-time {
  width: 74px;
}

.schedule-time {
  background: #eeeeee;
  text-align: center;
  vertical-align: middle;
}

.schedule-time span,
.schedule-time strong {
  display: block;
}

.schedule-time-input {
  font-size: 0.78rem;
  margin: 3px auto 0;
  max-width: 72px;
  min-height: 26px;
  padding: 2px 3px;
  text-align: center;
}

.schedule-cell {
  height: 86px;
  padding: 4px;
  vertical-align: top;
}

.schedule-select {
  border-radius: 0;
  font-size: 0.76rem;
  min-height: 28px;
  padding: 2px 4px;
}

.schedule-cell-text {
  display: grid;
  gap: 2px;
  font-size: 0.75rem;
  line-height: 1.15;
  margin-top: 4px;
}

.schedule-cell-text strong {
  font-size: 0.76rem;
}

.schedule-cell-text small,
.schedule-empty {
  color: #333;
}

.schedule-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.update-button {
  height: 82px;
  font-size: 1.2rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.admin-menu a {
  display: grid;
  gap: 6px;
  min-height: 72px;
  padding: 14px 16px;
  background: #efefef;
  border: 2px solid #111;
  border-radius: 4px;
  color: #111;
  text-decoration: none;
}

.admin-menu a strong {
  font-weight: 700;
}

.admin-menu a span {
  color: #333;
  font-size: 0.88rem;
}

.admin-card-link {
  background: #efefef;
  border: 2px solid #111;
  border-radius: 4px;
  color: #111;
  display: grid;
  gap: 6px;
  min-height: 72px;
  padding: 14px 16px;
  text-decoration: none;
}

.admin-card-link span {
  color: #333;
  font-size: 0.88rem;
}

.cronograma-actions {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 16px;
}

.admin-dashboard {
  display: grid;
  gap: 16px;
}

.admin-band {
  background: #fff;
  border: 2px solid #111;
  padding: 14px;
}

.admin-band h2 {
  font-size: 1.2rem;
  margin: 0 0 4px;
}

.admin-band p {
  color: #333;
  margin: 0 0 12px;
}

.holiday-form {
  display: grid;
  grid-template-columns: 80px 80px 1fr auto;
  gap: 8px;
  margin-bottom: 12px;
}

.maintenance-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(110px, 160px) auto;
  gap: 8px;
  margin-bottom: 12px;
}

.maintenance-form.wide {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.maintenance-form select {
  grid-column: 1 / -1;
}

.form-mode {
  align-items: center;
  background: #e9eef7;
  border: 2px solid #111;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 10px 12px;
}

.form-mode h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.admin-tab {
  background: #efefef;
  border: 2px solid #111;
  border-radius: 4px 4px 0 0;
  color: #111;
  font-weight: 700;
  padding: 9px 14px;
}

.admin-tab.active {
  background: #fff7cc;
  border-bottom-color: #fff7cc;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.update-only-form {
  background: #f8fbff;
  border: 1px solid #7d91b8;
  margin-bottom: 14px;
  padding: 10px;
}

.form-command {
  display: flex;
  align-items: end;
}

.inline-form {
  display: inline;
}

.year-note {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #fff7cc;
  border: 1px solid #b59b2a;
  border-radius: 4px;
  font-weight: 700;
}

.screen-version {
  background: #d7f5d8;
  border: 1px solid #267a2e;
  color: #0f4d17;
  display: inline-block;
  font-size: 0.86rem;
  font-weight: 700;
  margin: 6px 0;
  padding: 5px 8px;
}

.print-header {
  background: #fff;
  border: 2px solid #111;
  padding: 12px;
}

.print-header div {
  display: grid;
}

@media (max-width: 1000px) {
  .editor-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .config-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: #fff;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .navbar,
  .no-print,
  .btn {
    display: none !important;
  }

  .app-container {
    width: 100%;
    margin: 0;
  }

  .calendar-grid {
    font-size: 8px;
  }

  .calendar-grid th,
  .calendar-grid td {
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  .visual-schedule-grid {
    font-size: 8px;
    min-width: 0;
  }

  .visual-schedule-grid th,
  .visual-schedule-grid td,
  .schedule-cell {
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  .schedule-select {
    display: none !important;
  }
}

.holiday-form label,
.maintenance-form label:not(.check-row) {
  display: grid;
  font-weight: 700;
  gap: 5px;
}


.notification-settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.notification-settings label {
  display: grid;
  gap: 5px;
}

.notification-settings .settings-wide {
  grid-column: 1 / -1;
}

.smtp-status {
  background: #f4f6f8;
  border: 1px solid #9ca3af;
  margin-top: 12px;
  padding: 10px;
}

.module-alert-modal {
  border: 2px solid #111;
  border-radius: 4px;
}

.module-alert-list {
  display: grid;
  gap: 10px;
}

.module-alert-list article {
  align-items: start;
  background: #fff7cc;
  border: 1px solid #9a7b00;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.module-alert-list article .btn {
  justify-self: start;
  margin-top: 4px;
}


.notification-settings {
  display: grid;
  gap: 14px;
}

.settings-section {
  background: #fff;
  border: 1px solid #606b78;
  padding: 14px;
}

.settings-section h2 {
  font-size: 1.05rem;
  margin: 0 0 4px;
}

.settings-section > p {
  color: #333;
  margin: 0 0 12px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.field-label {
  display: grid;
  gap: 5px;
  font-weight: 700;
}

.field-label small {
  color: #4b5563;
  font-weight: 400;
}

.settings-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.settings-actions span {
  color: #333;
  font-size: .9rem;
}


.form-save-actions {
  align-items: center;
  background: #e9f2ff;
  border: 1px solid #5d7fa8;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 12px;
  padding: 10px;
}

.form-save-actions span {
  color: #24364b;
  margin-right: auto;
}

.form-save-actions .btn {
  min-width: 190px;
}


.access-filter-form {
  align-items: end;
  background: #eef4fb;
  border: 1px solid #6f8299;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  margin: 12px 0;
  padding: 12px;
}

.access-filter-form label {
  display: grid;
  font-weight: 700;
  gap: 5px;
}

.access-filter-form .filter-actions {
  display: flex;
  gap: 8px;
}

.filter-result-note {
  margin: 8px 0;
}

.client-filter-panel {
  align-items: end;
  background: #eef4fb;
  border: 1px solid #6f8299;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin: 12px 0;
  padding: 12px;
}

.client-filter-panel label {
  display: grid;
  font-weight: 700;
  gap: 5px;
}

.client-filter-summary {
  align-self: center;
  margin: 0;
}

.password-field {
  display: grid;
  gap: 5px;
}

.password-input-row {
  align-items: stretch;
  display: flex;
  gap: 6px;
}

.password-input-row .form-control {
  min-width: 0;
}

.password-input-row .btn {
  white-space: nowrap;
}

.table-pagination {
  align-items: center;
  border-top: 1px solid #b8b8b8;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 10px;
}

.table-pagination-info {
  color: #333;
  margin-right: auto;
}

.table-pagination-pages {
  align-items: center;
  display: flex;
  gap: 4px;
}

.table-pagination .btn {
  min-width: 38px;
}

.table-pagination .btn[aria-current="page"] {
  background: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}

.table-page-size {
  align-items: center;
  display: flex;
  gap: 6px;
}

.table-page-size select {
  min-width: 72px;
}

@media (max-width: 1000px) {
  .access-filter-form {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 600px) {
  .app-brand img {
    height: 35px;
    max-width: 68vw;
  }

  .login-logo {
    width: 100%;
  }

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

  .password-input-row {
    align-items: stretch;
    flex-direction: column;
  }

  .table-pagination {
    align-items: stretch;
    justify-content: center;
  }

  .table-pagination-info {
    flex-basis: 100%;
    margin-right: 0;
    text-align: center;
  }
}
.school-brand-header,
.school-brand-footer { text-align: center; background: #fff; }
.school-brand-header img { width: 100%; max-height: 120px; object-fit: contain; }
.school-brand-footer img { width: 100%; max-height: 90px; object-fit: contain; }
.school-brand-preview { display: block; max-width: 100%; max-height: 160px; object-fit: contain; border: 1px solid #d7dde5; }
.teacher-occupancy-panel { margin-top: 1.5rem; }
.teacher-occupancy-grid th:first-child { min-width: 170px; position: sticky; left: 0; background: #fff; z-index: 1; }
.teacher-occupancy-detail th:first-child { min-width: 170px; }
.teacher-occupancy-detail td:nth-child(2),
.teacher-occupancy-detail td:nth-child(3),
.teacher-occupancy-detail td:nth-child(4) { white-space: nowrap; }
.teacher-occupancy-detail td:last-child span { display: block; min-width: 190px; padding: .35rem .5rem; border-radius: .3rem; }
.teacher-occupancy-detail .free { background: #dff3e4; color: #185c2a; }
.teacher-occupancy-detail .current-subject { background: #dbeafe; color: #174ea6; }
.teacher-occupancy-detail .other-occupation { background: #fff0cc; color: #7a4a00; }
.teacher-occupancy-detail .unavailable { background: #f8d7da; color: #842029; }
.weekly-schedule-form > .serializer-field { display: none; }
.weekly-schedule-fields { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(190px, .6fr) minmax(280px, 1.4fr); gap: 12px; }
.weekly-schedule-fields label { display: grid; font-weight: 700; gap: 5px; }
.block-picker-help,
.block-picker-host,
.weekly-schedule-form > .form-save-actions { grid-column: 1 / -1; }
.block-picker-host { width: 100%; }
.visual-schedule-grid.block-picker { font-size: .74rem; min-width: 680px; width: 100%; }
.block-picker th:first-child { width: 86px; }
.block-picker th small { display: block; font-size: .68rem; font-weight: 400; white-space: nowrap; }
.block-picker-cell { min-width: 0; padding: .25rem .3rem !important; vertical-align: middle; }
.block-picker-cell label { display: grid; gap: .12rem; cursor: pointer; margin: 0; font-size: .72rem; line-height: 1.1; overflow-wrap: anywhere; }
.block-picker-cell input { width: 1rem; height: 1rem; margin: 0; }
.block-picker-cell.livre { background: #e7f6eb; }
.block-picker-cell.selecionado { background: #dbeafe; }
.block-picker-cell.ocupado_turma,
.block-picker-cell.ocupado_professor { background: #fff0cc; }
.block-picker-cell.indisponivel { background: #f8d7da; }
.block-picker-cell:has(input:checked) { background: #b9dcff; box-shadow: inset 0 0 0 2px #0d6efd; }
@media (max-width: 700px) {
  .weekly-schedule-fields { grid-template-columns: 1fr; }
}
.occupancy-days { display: grid; gap: .25rem; min-width: 150px; }
.occupancy-days span { display: block; padding: .25rem .4rem; border-radius: .3rem; font-size: .75rem; }
.occupancy-days .free { background: #dff3e4; color: #185c2a; }
.occupancy-days .current-subject { background: #dbeafe; color: #174ea6; }
.occupancy-days .other-occupation { background: #fff0cc; color: #7a4a00; }
.occupancy-days .unavailable { background: #f8d7da; color: #842029; }
.occupancy-legend { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .65rem; }
.occupancy-legend span { padding: .3rem .55rem; border-radius: .35rem; font-size: .78rem; font-weight: 600; }
.occupancy-legend .current-subject { background: #dbeafe; color: #174ea6; }
.occupancy-legend .other-occupation { background: #fff0cc; color: #7a4a00; }
.occupancy-legend .unavailable { background: #f8d7da; color: #842029; }
.occupancy-legend .free { background: #dff3e4; color: #185c2a; }

@media print {
    .school-brand-header img, .school-brand-footer img { max-height: 70px; }
}
.availability-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    cursor: pointer;
    min-height: 2.5rem;
}

.availability-cell input:checked + span {
    color: #a61b1b;
    font-weight: 700;
}

.manual-layout { display: grid; gap: 1.5rem; grid-template-columns: minmax(220px, .7fr) minmax(0, 2fr); }
.manual-index { align-self: start; background: #eef4fb; border: 1px solid #c5d2df; border-radius: .5rem; padding: 1rem; position: sticky; top: 1rem; }
.manual-index nav { display: grid; gap: .35rem; }
.manual-index nav a { background: #fff; border-radius: .3rem; padding: .5rem .65rem; text-decoration: none; }
.manual-content { display: grid; gap: 1rem; }
.manual-content article { background: #fff; border: 1px solid #d7dde5; border-radius: .5rem; padding: 1.2rem; scroll-margin-top: 1rem; }
.manual-content li { margin-bottom: .45rem; }
@media (max-width: 800px) { .manual-layout { grid-template-columns: 1fr; } .manual-index { position: static; } }
