:root {
  --bg: #eef5fb;
  --panel: #ffffff;
  --edge: #c8d9ea;
  --edge-strong: #adc6df;
  --text: #1f3551;
  --muted: #59718d;
  --accent: #1761ae;
  --accent-strong: #0f4a87;
  --success: #4f9a2f;
  --danger: #b04040;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(90, 173, 72, 0.16) 0, transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(23, 97, 174, 0.14) 0, transparent 35%),
    var(--bg);
}

.shell {
  width: min(1180px, 95vw);
  margin: 1.1rem auto 2rem;
  display: grid;
  gap: 0.9rem;
}

.title-logo {
  display: block;
  grid-area: title;
  width: min(980px, 118%);
  max-height: none;
  object-fit: contain;
  object-position: left center;
  height: auto;
  justify-self: start;
  margin: -192px 0 -272px -150px;
}

.subtitle {
  margin: -0.32rem 0 0;
  color: #2f1b0f;
  font-family: "Segoe Script", "Lucida Handwriting", "Brush Script MT", "Palatino Linotype", cursive;
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: 0.01em;
  text-transform: none;
  text-shadow: 0 1px 0 rgba(255, 248, 236, 0.7);
  width: min(980px, 118%);
  justify-self: start;
  margin-left: -150px;
  text-align: center;
}

.top {
  display: grid;
  grid-template-columns: max-content 1fr;
  grid-template-areas:
    "brand title"
    "brand subtitle"
    "session session";
  gap: 0 0.85rem;
  align-items: start;
}

.top .subtitle {
  grid-area: subtitle;
}

.session-bar {
  grid-area: session;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.session-bar p {
  margin: 0;
}

.brand-photo {
  display: block;
  grid-area: brand;
  width: auto;
  max-width: none;
  height: 220px;
  margin: 0;
  justify-self: start;
  align-self: stretch;
  object-fit: contain;
  object-position: center top;
  border-radius: 12px;
  border: 1px solid var(--edge-strong);
  box-shadow: 0 8px 20px rgba(95, 63, 27, 0.22);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tab-btn {
  border: 1px solid #c2a676;
  background: #fff8ed;
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(170px, 210px) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}

.app-sidebar {
  padding: 0.8rem;
  position: sticky;
  top: 0.85rem;
}

.app-sidebar-nav {
  display: grid;
  gap: 0.55rem;
}

.app-sidebar-nav .tab-btn {
  width: 100%;
  text-align: center;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  font-weight: 600;
}

.app-main {
  min-width: 0;
  display: grid;
  gap: 0.9rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(24, 33, 20, 0.08);
}

.auth-shell {
  min-height: calc(100vh - 2rem);
  align-content: start;
  justify-items: stretch;
  grid-template-columns: minmax(0, 1fr);
}

.auth-top {
  grid-column: auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "title"
    "subtitle";
  gap: 0;
  justify-items: start;
  text-align: left;
  padding: 0.7rem 1rem;
}

.auth-top .brand-photo {
  display: none;
}

.auth-top .title-logo {
  grid-area: title;
  width: min(730px, 100%);
  max-height: 146px;
  height: auto;
  margin: 0;
  justify-self: start;
}

.auth-top .subtitle {
  grid-area: subtitle;
  width: min(520px, calc(100% - 210px));
  margin: 0;
  margin-top: -0.12rem;
  margin-left: 69px;
  justify-self: start;
  text-align: center;
  font-size: 0.9rem;
  color: #5f7087;
  text-shadow: none;
}

.auth-panel {
  grid-column: auto;
  max-width: 420px;
  justify-self: center;
  width: min(100%, 420px);
  margin-top: 0.4rem;
  margin-left: 0;
  transform: none;
}

.auth-card {
  display: grid;
  gap: 0.85rem;
  justify-items: center;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid #dbe5f0;
  border-radius: 20px;
  padding: 1rem 1rem 1.05rem;
  box-shadow: 0 18px 38px rgba(31, 47, 69, 0.08);
}

.auth-form {
  display: grid;
  grid-template-columns: 1fr !important;
  width: min(100%, 310px);
  justify-items: center;
  margin: 0 auto;
}

.auth-form label {
  width: 100%;
  text-align: left;
}

.auth-form button {
  justify-self: center;
}

.status-text {
  margin: 0;
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
  background: #f6f1e7;
  border: 1px solid #d2c3a8;
}

.status-text.error {
  background: #f9eceb;
  border-color: #d8a5a5;
  color: #6f2323;
}

.status-text.success {
  background: #edf6ed;
  border-color: #bfd6bf;
  color: #234b23;
}

.status-text.info {
  background: #edf4fb;
  border-color: #c7d8ea;
  color: #35516e;
}

.callout {
  margin: 0;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d8cfbf;
}

.callout-warn {
  background: #fff4df;
  border-color: #ddb777;
}

.read-only-note {
  margin-bottom: 0.6rem;
}

.hidden {
  display: none !important;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

h2,
h3 {
  margin-top: 0;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 0.7rem;
}

.kpi {
  border: 1px solid #e1cfad;
  border-radius: 10px;
  background: linear-gradient(150deg, #fff8ee, #f6e8d4);
  padding: 0.65rem;
  text-align: center;
}

.kpi-label {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.kpi-value {
  margin: 0.35rem 0 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.progress-wrap {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.progress-title {
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 14px;
  border: 1px solid #d6c3a0;
  border-radius: 999px;
  background: #f3e8d6;
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #5aad48);
  transition: width 240ms ease;
}

.administration-subtabs {
  margin-bottom: 0.85rem;
}

.administration-tab-panel {
  display: grid;
  gap: 0.85rem;
}

.administration-intro-card,
.administration-config-card,
.administration-transition-card,
.administration-preview-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,250,253,0.98));
  box-shadow: var(--shadow-soft);
}

.administration-intro-card,
.administration-config-card,
.administration-transition-card {
  padding: 1rem 1.1rem;
}

.administration-intro-card h3,
.administration-config-card h4,
.administration-transition-card h4 {
  margin: 0 0 0.35rem;
}

.administration-config-form {
  display: grid;
  gap: 0.85rem;
}

.administration-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.55rem 1rem;
}

.administration-config-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem 1rem;
}

.administration-config-grid .checklist-row {
  border: 1px solid #dbe6f2;
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  background: #fff;
}

.administration-config-actions {
  justify-content: flex-start;
}

.dashboard-visibility-group + .dashboard-visibility-group {
  margin-top: 0.9rem;
}

.dashboard-visibility-group h5 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.dashboard-chip-card {
  width: 100%;
  text-align: left;
  border: 1px solid #dbe6f2;
  background: #fff;
  cursor: pointer;
}

.dashboard-chip-card:hover {
  border-color: #b8cee8;
  box-shadow: 0 10px 22px rgba(34, 72, 112, 0.08);
}

.dashboard-link-btn {
  white-space: nowrap;
}

.school-day-dashboard-return {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 0.85rem;
}

.school-day-dashboard-return.hidden {
  display: none;
}

#administration-workspace-config-message {
  margin-top: 0.15rem;
  font-weight: 600;
}

.administration-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.administration-preview-card {
  padding: 0.9rem 1rem;
}

.administration-preview-label {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.administration-preview-value {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}

.administration-transition-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

.muted {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.grid-form,
.inline-form,
.quarter-grid {
  display: grid;
  gap: 0.5rem;
}

.grid-form {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  margin-bottom: 0.6rem;
}

.inline-form {
  grid-template-columns: 1fr auto;
}

.quarter-grid {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  margin-bottom: 0.75rem;
}

#school-year-form > button,
#quarters-form > button,
#holiday-form > button,
#daily-break-form > button {
  align-self: end;
  justify-self: start;
  width: auto;
  min-width: 0;
  height: calc(1em + 0.84rem + 2px);
  padding: 0.42rem 0.8rem;
}

label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.9rem;
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  align-self: end;
}

.checkbox-field input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.checkbox-field-stacked {
  display: grid;
  justify-items: center;
  align-self: start;
  align-content: start;
  gap: 0.35rem;
  text-align: center;
  font-size: inherit;
}

.checkbox-field-stacked input[type="checkbox"] {
  margin-top: calc((1em + 0.84rem + 2px - 13px) / 2);
}

input,
select,
button {
  font: inherit;
}

input:not([type="checkbox"]):not([type="radio"]),
select {
  border: 1px solid #ccb48d;
  border-radius: 8px;
  padding: 0.42rem 0.55rem;
  background: #fff;
  min-height: calc(1em + 0.84rem + 2px);
}

button {
  border: 0;
  border-radius: 8px;
  padding: 0.48rem 0.8rem;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
}

button:hover {
  filter: brightness(1.05);
}

button.secondary-btn {
  background: #6c5847;
}

.weekday-set {
  border: 1px solid #ccd9c5;
  border-radius: 8px;
  padding: 0.45rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.weekday-set legend {
  padding: 0 0.25rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.weekday-set label {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
}

.checklist-vertical {
  display: grid;
  gap: 0.3rem;
  min-width: 220px;
}

.checklist-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.checklist-row label {
  display: inline;
  cursor: pointer;
}

.multi-select-dropdown {
  border: 1px solid #ccb48d;
  border-radius: 8px;
  padding: 0;
  background: #fff;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
}

.multi-select-dropdown summary {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  padding: 0.42rem 0.55rem;
  line-height: 1.2;
  min-height: calc(1em + 0.84rem + 2px);
  box-sizing: border-box;
  list-style-position: inside;
}

.multi-select-dropdown[open] .checklist-vertical {
  margin-top: 0.45rem;
  max-height: 190px;
  overflow: auto;
  padding: 0 0.55rem 0.45rem;
}

.attendance-student-field {
  align-self: stretch;
}

.trend-student-field {
  align-self: stretch;
}

.volume-student-field {
  align-self: stretch;
}

.work-student-field {
  align-self: stretch;
}

.student-performance-grade-method-field {
  align-self: stretch;
  margin: 0;
  padding: 0;
  border: 0;
}

#student-performance-filter-form {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  margin-bottom: 0.75rem;
  column-gap: 1rem;
  row-gap: 0.6rem;
}

.student-performance-grade-method-field legend {
  margin-bottom: 0;
  padding: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
}

.student-performance-grade-method-field {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.student-performance-grade-method-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

#student-performance-filter-form > label,
#student-instructional-hours-filter-form > label {
  display: grid;
  gap: 0.2rem;
  align-items: start;
  min-width: 0;
}

#student-performance-filter-form .multi-select-dropdown,
#student-instructional-hours-filter-form .multi-select-dropdown {
  min-width: 250px;
  width: fit-content;
}

#student-performance-filter-form .multi-select-dropdown summary,
#student-instructional-hours-filter-form .multi-select-dropdown summary {
  min-width: 250px;
}

#student-instructional-hours-filter-form {
  grid-template-columns: auto;
  align-items: center;
  margin-bottom: 0.75rem;
}

.student-performance-grade-method-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-weight: 600;
  color: var(--text);
}

.student-performance-grade-method-chip input[type="checkbox"] {
  margin: 0;
}

#daily-break-form {
  grid-template-columns: minmax(250px, 1.7fr) 180px 180px;
  align-items: end;
  column-gap: 0.5rem;
}

#daily-break-type,
#daily-break-start-time {
  max-width: 180px;
}

#daily-break-duration {
  max-width: 140px;
}

.daily-break-student-field {
  min-width: 250px;
  grid-column: 1;
  grid-row: 1;
}

.daily-break-type-field,
.daily-break-start-field,
.daily-break-duration-field,
.daily-break-weekdays-field,
.daily-break-submit-btn {
  justify-self: start;
}

.daily-break-type-field,
.daily-break-start-field {
  width: 180px;
}

.daily-break-type-field {
  grid-column: 2;
  grid-row: 1;
}

.daily-break-start-field {
  grid-column: 3;
  grid-row: 1;
}

.daily-break-duration-field {
  width: 140px;
}

.daily-break-weekdays-field {
  margin: 0;
  width: max-content;
}

#daily-break-description-wrap {
  grid-column: 1 / span 3;
  max-width: 360px;
}

.daily-break-secondary-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.daily-break-submit-btn,
#daily-break-cancel-edit-btn {
  align-self: end;
}

#trend-filter-form {
  grid-template-columns: minmax(260px, 2.2fr) minmax(90px, 0.6fr) minmax(140px, 1fr) minmax(140px, 1fr) auto;
  align-items: end;
}

#gpa-trend-filter-form {
  grid-template-columns: minmax(260px, 2.2fr) minmax(90px, 0.6fr) minmax(140px, 1fr) minmax(140px, 1fr) auto;
  align-items: end;
}

#instruction-hours-trend-filter-form {
  grid-template-columns: minmax(260px, 2.2fr) minmax(90px, 0.6fr) minmax(140px, 1fr) auto;
  align-items: end;
}

#volume-filter-form {
  grid-template-columns: minmax(260px, 2.2fr) minmax(90px, 0.6fr) minmax(140px, 1fr) minmax(140px, 1fr) auto;
  align-items: end;
}

#work-filter-form {
  grid-template-columns: minmax(220px, 2fr) minmax(120px, 1fr) auto;
  align-items: end;
  column-gap: 0.7rem;
}

#trend-filter-form label {
  min-width: 0;
}

#gpa-trend-filter-form label {
  min-width: 0;
}

#instruction-hours-trend-filter-form label {
  min-width: 0;
}

#volume-filter-form label {
  min-width: 0;
}

#work-filter-form label {
  min-width: 0;
}

#trend-filter-quarter {
  max-width: 110px;
}

#gpa-trend-filter-quarter {
  max-width: 110px;
}

#instruction-hours-trend-filter-quarter {
  max-width: 110px;
}

#volume-filter-quarter {
  max-width: 110px;
}

#work-filter-quarter {
  max-width: none;
}

#trend-filter-subject,
#trend-filter-grade-type {
  max-width: 220px;
}

#gpa-trend-filter-subject,
#gpa-trend-filter-grade-type {
  max-width: 220px;
}

#instruction-hours-trend-filter-subject {
  max-width: 220px;
}

#volume-filter-subject,
#volume-filter-grade-type {
  max-width: 220px;
}

#trend-filter-form > button,
#gpa-trend-filter-form > button,
#instruction-hours-trend-filter-form > button,
#volume-filter-form > button,
#work-filter-form > button {
  align-self: end;
  justify-self: start;
  width: auto;
  height: calc(1em + 0.84rem + 2px);
  padding: 0.42rem 0.8rem;
}

@media (max-width: 900px) {
  #student-performance-filter-form {
    grid-template-columns: 1fr;
  }

  #student-performance-filter-form > label,
  #student-instructional-hours-filter-form > label,
  .student-performance-grade-method-field {
    align-items: flex-start;
    flex-direction: column;
  }

  #trend-filter-form {
    grid-template-columns: 1fr 1fr;
  }

  #gpa-trend-filter-form {
    grid-template-columns: 1fr 1fr;
  }

  #instruction-hours-trend-filter-form {
    grid-template-columns: 1fr 1fr;
  }

  #volume-filter-form {
    grid-template-columns: 1fr 1fr;
  }

  #work-filter-form {
    grid-template-columns: 1fr 1fr;
  }

  #trend-filter-quarter,
  #trend-filter-subject,
  #trend-filter-grade-type {
    max-width: none;
  }

  #gpa-trend-filter-quarter,
  #gpa-trend-filter-subject,
  #gpa-trend-filter-grade-type {
    max-width: none;
  }

  #instruction-hours-trend-filter-quarter,
  #instruction-hours-trend-filter-subject {
    max-width: none;
  }

  #volume-filter-quarter,
  #volume-filter-subject,
  #volume-filter-grade-type {
    max-width: none;
  }

  #work-filter-quarter,
  #work-filter-quarter {
    max-width: none;
  }
}

.table-wrap {
  overflow: auto;
}

.calendar-filter-panel,
.calendar-surface {
  border: 1px solid #d8cfbf;
  border-radius: 10px;
  background: #f6f1e7;
  border-color: #d2c3a8;
}

.calendar-filter-panel {
  padding: 0.7rem;
  margin-bottom: 0.65rem;
}

.calendar-surface {
  padding: 0.75rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid #e1e8dd;
  padding: 0.45rem;
  font-size: 0.92rem;
}

.table-action-row {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.student-table-actions {
  white-space: nowrap;
  width: 1%;
}

#schedule-block-form {
  grid-template-columns: minmax(220px, 1.6fr) 180px;
  align-items: end;
  column-gap: 0.5rem;
}

.schedule-block-name-field {
  min-width: 220px;
  grid-column: 1;
  grid-row: 1;
}

.schedule-block-type-field {
  width: 180px;
  grid-column: 2;
  grid-row: 1;
}

#schedule-block-description-wrap {
  grid-column: 1 / span 2;
  max-width: 360px;
}

.schedule-block-secondary-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.schedule-block-duration-field {
  width: 160px;
}

.schedule-block-weekdays-field {
  margin: 0;
  width: max-content;
}

.schedule-block-submit-btn,
#schedule-block-cancel-edit-btn {
  align-self: end;
}

.checklist-group-label {
  margin: 0.35rem 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.schedule-actions-cell {
  white-space: nowrap;
  width: 1%;
  min-width: 130px;
}

.schedule-actions-cell .table-action-row {
  display: inline-flex;
  flex-wrap: nowrap;
  width: max-content;
}

.schedule-actions-cell .table-action-row button {
  white-space: nowrap;
}

.calendar-actions-cell {
  white-space: nowrap;
  width: 1%;
  min-width: 160px;
}

.calendar-actions-cell .table-action-row {
  display: inline-flex;
  flex-wrap: nowrap;
  width: max-content;
}

.calendar-actions-cell .table-action-row button {
  white-space: nowrap;
}

.calendar-actions-cell .table-action-row button,
.school-day-actions-wrap .table-action-row button {
  padding: 0.34rem 0.62rem;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(154, 98, 44, 0.16);
}

.calendar-actions-cell .table-action-row button:hover,
.school-day-actions-wrap .table-action-row button:hover {
  box-shadow: 0 10px 18px rgba(154, 98, 44, 0.18);
}

.school-day-reorder-controls {
  display: inline-flex;
  flex-direction: column;
  gap: 0.18rem;
  margin-right: 0.35rem;
  flex: 0 0 auto;
}

.school-day-reorder-btn {
  min-width: 1.6rem;
  width: 1.6rem;
  height: 1.3rem;
  padding: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
}

.school-day-hour-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
}

.student-avg-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border-radius: 999px;
  margin-right: 0.35rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  overflow: hidden;
}

.student-avg-toggle-glyph {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Segoe UI Symbol", "Arial Unicode MS", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  line-height: 1;
  text-align: center;
  width: 100%;
  height: 100%;
  transform: translateY(-0.02em);
}

.student-avg-detail-row td {
  background: #fbf7f0;
}

.student-avg-subject-cell {
  padding-left: 2.2rem;
}

.student-avg-subtoggle {
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  margin-right: 0.35rem;
}

.student-avg-subtoggle .student-avg-toggle-glyph {
  font-size: 0.82rem;
}

.student-avg-type-row td {
  background: #fdfaf5;
}

.student-avg-type-cell {
  padding-left: 4.2rem;
  color: var(--muted);
}

.instructional-hours-cell {
  white-space: nowrap;
}

.instructional-hours-notation {
  margin: -0.25rem 0 0.75rem;
}

.warning-text {
  color: #8b2f1e;
  font-weight: 600;
}

.warning-row td {
  background: #fff0ea;
}

.dashboard-section-student-performance th,
.dashboard-section-student-performance td,
.dashboard-section-student-attendance th,
.dashboard-section-student-attendance td,
.dashboard-section-student-instructional-hours th,
.dashboard-section-student-instructional-hours td {
  text-align: center;
}

.dashboard-section-student-performance th:first-child,
.dashboard-section-student-performance td:first-child,
.dashboard-section-student-attendance th:first-child,
.dashboard-section-student-attendance td:first-child,
.dashboard-section-student-instructional-hours th:first-child,
.dashboard-section-student-instructional-hours td:first-child {
  text-align: left;
}

.student-avg-detail-empty {
  padding: 0.3rem 0.15rem;
}

.chart-wrap {
  border: 1px solid #e1cfad;
  border-radius: 10px;
  background: #fffaf1;
  padding: 0.35rem 0.35rem 0.15rem;
}

.trend-chart {
  display: block;
  width: 100%;
  height: auto;
}

.trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  margin: 0.2rem 0 0.95rem;
  padding: 0 0.3rem;
}

.trend-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.trend-legend-line {
  display: inline-block;
  width: 18px;
  height: 3px;
  border-radius: 999px;
}

.volume-legend-box {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.pie-wrap {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
}

.pie-chart {
  width: min(620px, 100%);
  height: auto;
}

.pie-total {
  font-size: 0.9rem;
  color: var(--muted);
}

.pie-slice-label {
  font-size: 10px;
  font-weight: 600;
  fill: #000;
  stroke: none;
}

.work-dist-filter {
  margin: 0.15rem 0 0.6rem;
}

.work-dist-filter-title {
  margin: 0 0 0.3rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.work-dist-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
}

.work-dist-option {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
}

.trend-axis {
  stroke: #9a845f;
  stroke-width: 1;
}

.trend-grid {
  stroke: #eadfcf;
  stroke-width: 1;
}

.trend-line {
  stroke: var(--accent);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-point {
  fill: #b67a31;
  stroke: var(--accent);
  stroke-width: 1;
}

.trend-axis-label {
  fill: #6c5847;
  font-size: 11px;
}

.trend-axis-title {
  fill: #2f1f14;
  font-size: 12px;
  font-weight: 600;
}

.trend-empty {
  fill: #6c5847;
  font-size: 13px;
}

.trend-value-label {
  fill: #5a3a1a;
  font-size: 10px;
  font-weight: 600;
}

.item-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.8rem;
  display: grid;
  gap: 0.4rem;
}

.item-list li {
  border: 1px solid #e3d2b5;
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  background: #fffaf1;
}

.item-list button {
  background: var(--danger);
  padding: 0.3rem 0.5rem;
  font-size: 0.82rem;
}

.detail-panel {
  border: 1px solid #d6e1d0;
  border-radius: 10px;
  padding: 0.7rem;
  background: #fafdF9;
}

.detail-title {
  margin-top: 0;
  font-weight: 700;
}

#student-detail-panel .detail-title {
  margin: 0;
}

#student-detail-panel h4 {
  margin: 0;
}

#student-detail-panel h4 + h4 {
  margin-top: 0.45rem;
}

#student-detail-panel .table-wrap + h4 {
  margin-top: 0.45rem;
}

.student-detail-section {
  border: 1px solid #d8cfbf;
  border-radius: 10px;
  padding: 0.55rem 0.6rem;
}

.student-detail-section + .student-detail-section {
  margin-top: 0.5rem;
}

.student-detail-section-profile {
  background: #f6f1e7;
  border-color: #d2c3a8;
}

.student-detail-section-schedule {
  background: #eef5ec;
  border-color: #c6d8bf;
}

.student-detail-section-attendance {
  background: #f3efe8;
  border-color: #d8cdbd;
}

.student-detail-section-hours {
  background: #eef5ec;
  border-color: #c6d8bf;
}

.students-toolbar,
.students-detail-toolbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

.students-helper-text {
  margin: 0 0 0.7rem;
}

.students-detail-toolbar {
  width: 100%;
  justify-content: flex-start;
}

.students-section {
  border: 1px solid #d8cfbf;
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
}

.students-section-manage {
  background: #f6f1e7;
  border-color: #d2c3a8;
}

#tab-students .split {
  grid-template-columns: minmax(500px, 0.95fr) minmax(540px, 1.05fr);
}

#tab-students th,
#tab-students td {
  text-align: center;
}

#tab-students th:first-child,
#tab-students td:first-child {
  text-align: left;
}

.schedule-section {
  border: 1px solid #d8cfbf;
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
}

.schedule-section + .schedule-section {
  margin-top: 0.6rem;
}

.schedule-section h3 {
  margin: 0 0 0.35rem;
}

.schedule-section-school-year {
  background: #f6f1e7;
  border-color: #d2c3a8;
}

.schedule-section-quarters {
  background: #edf4f7;
  border-color: #c2d3dd;
}

#schedule-quarters-wrap table th:nth-child(5),
#schedule-quarters-wrap table td:nth-child(5) {
  text-align: center;
}

.quarter-summary-total-label,
.quarter-summary-total-value {
  text-align: center;
}

.schedule-section-daily-breaks {
  background: #f5eee3;
  border-color: #d8c8b4;
}

.schedule-section-holidays {
  background: #eff6ed;
  border-color: #c7d8bf;
}

.schedule-section-plans {
  background: #f3efe8;
  border-color: #d8cdbd;
}

#plan-form > button {
  align-self: end;
  justify-self: start;
  width: auto;
  height: calc(1em + 0.84rem + 2px);
  padding: 0.42rem 0.8rem;
}

.attendance-section,
.grades-section {
  border: 1px solid #d8cfbf;
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
}

.attendance-section + .attendance-section,
.grades-section + .grades-section {
  margin-top: 0.6rem;
}

.attendance-section h3,
.grades-section h3 {
  margin: 0 0 0.35rem;
}

.attendance-section-tracker {
  background: #f6f1e7;
  border-color: #d2c3a8;
}

.attendance-section-filters {
  background: #edf4f7;
  border-color: #c2d3dd;
}

.attendance-section-records {
  background: #eff6ed;
  border-color: #c7d8bf;
}

.grades-section-filters {
  background: #f6f1e7;
  border-color: #d2c3a8;
}

.grades-section-entry {
  background: #edf4f7;
  border-color: #c2d3dd;
}

.grades-section-records {
  background: #f3efe8;
  border-color: #d8cdbd;
}

#grade-entry-wrap {
  overflow-x: hidden;
}

#grade-entry-wrap table {
  table-layout: fixed;
}

#grade-entry-wrap th,
#grade-entry-wrap td {
  padding: 0.45rem 0.4rem;
  vertical-align: middle;
}

#grade-entry-wrap th:nth-child(1),
#grade-entry-wrap td:nth-child(1) {
  width: 11%;
}

#grade-entry-wrap th:nth-child(2),
#grade-entry-wrap td:nth-child(2) {
  width: 16%;
}

#grade-entry-wrap th:nth-child(3),
#grade-entry-wrap td:nth-child(3) {
  width: 12%;
}

#grade-entry-wrap th:nth-child(4),
#grade-entry-wrap td:nth-child(4) {
  width: 16%;
}

#grade-entry-wrap th:nth-child(5),
#grade-entry-wrap td:nth-child(5) {
  width: 12%;
}

#grade-entry-wrap th:nth-child(6),
#grade-entry-wrap td:nth-child(6) {
  width: 9%;
}

#grade-entry-wrap th:nth-child(7),
#grade-entry-wrap td:nth-child(7) {
  width: 23%;
}

#grade-entry-wrap input,
#grade-entry-wrap select {
  width: 100%;
  min-width: 0;
}

.grade-row-value {
  text-align: center;
}

.grade-entry-actions {
  display: grid;
  grid-template-columns: 62px 70px 58px;
  justify-content: flex-start;
  align-items: center;
  gap: 0.22rem;
  white-space: nowrap;
}

.grade-entry-actions button {
  padding: 0.3rem 0.34rem;
  font-size: 0.76rem;
  width: 100%;
  justify-content: center;
}

.grade-calc-row td {
  padding-top: 0.15rem;
  padding-bottom: 0.55rem;
  background: transparent;
}

.grade-calc-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.7rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #d7e2ee;
  border-radius: 12px;
  background: #f8fbff;
}

.grade-calc-panel label {
  display: grid;
  gap: 0.24rem;
  min-width: 78px;
  max-width: 92px;
}

.grade-calc-panel label span {
  font-size: 0.84rem;
  font-weight: 600;
  color: #58708e;
}

.grade-calc-panel input {
  width: 100%;
}

.grade-calc-actions {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.management-section {
  border: 1px solid #d8cfbf;
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
}

#user-form {
  grid-template-columns: 1fr 1fr;
  align-items: end;
}

#user-form > button {
  height: calc(1em + 0.84rem + 2px);
  width: auto;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#user-student-wrap.student-link-disabled {
  opacity: 0.6;
}

.readonly-lock {
  opacity: 0.6;
  pointer-events: none;
}

.users-section {
  border: 1px solid #d8cfbf;
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
}

.users-section h3 {
  margin: 0 0 0.35rem;
}

.users-toolbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 0.65rem;
}

.users-section-form {
  background: #f6f1e7;
  border-color: #d2c3a8;
}

.users-section-list {
  background: #edf4f7;
  border-color: #c2d3dd;
}

.users-actions-cell {
  white-space: nowrap;
  width: 1%;
}

.users-section-list .table-action-row {
  gap: 0.35rem;
}

@media (max-width: 1180px) {
  #user-form {
    grid-template-columns: 1fr;
  }
}

#tab-users .split {
  grid-template-columns: minmax(320px, 0.8fr) minmax(520px, 1.2fr);
}

.management-section + .management-section {
  margin-top: 0.6rem;
}

.subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.school-day-section + .school-day-section {
  margin-top: 0.8rem;
}

.school-day-section-shell {
  margin-bottom: 0.35rem;
}

.school-day-form {
  grid-template-columns: minmax(160px, 0.9fr) minmax(220px, 1fr) minmax(220px, 1fr) minmax(220px, 1fr);
  align-items: center;
  gap: 0.55rem 0.8rem;
  margin-bottom: 0.35rem;
}

.school-day-form > label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  white-space: nowrap;
  overflow: visible;
}

.school-day-form > label > input,
.school-day-form > label > details {
  min-width: 0;
}

#school-day-form .calendar-filter-field {
  position: relative;
  align-self: start;
}

#school-day-form .multi-select-dropdown {
  position: relative;
  overflow: visible;
}

#school-day-form .multi-select-dropdown summary {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#school-day-form .multi-select-dropdown[open] {
  z-index: 30;
}

#school-day-form .multi-select-dropdown[open] .checklist-vertical {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: min(440px, 70vw);
  margin-top: 0;
  padding: 0.5rem 0.6rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--edge-strong);
  border-radius: 14px;
  box-shadow: 0 16px 32px rgba(26, 44, 69, 0.16);
  z-index: 40;
}

.school-day-nav-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.school-day-quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0;
}

.school-day-subtabs {
  margin-bottom: 0;
  margin-left: auto;
  justify-content: flex-end;
}

.school-day-quick-filter-btn {
  border: 1px solid #c8d7e8;
  background: #f7fbff;
  color: #35516e;
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  cursor: pointer;
  font-weight: 700;
}

.school-day-quick-filter-btn.active {
  background: #2f5885;
  border-color: #2f5885;
  color: #fff;
}

#school-day-reset-student-btn,
#school-day-reset-day-btn {
  border: 1px solid #c8d7e8;
  background: #f7fbff;
  color: #35516e;
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  font-weight: 700;
  box-shadow: none;
}

#school-day-reset-student-btn:hover,
#school-day-reset-day-btn:hover {
  background: #e9f2fb;
}

.school-day-section-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.45rem;
}

.school-day-section-header h3 {
  margin: 0;
}

.school-day-date-nav {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 0.8rem;
  justify-self: center;
}

.school-day-date-nav button {
  padding: 0.28rem 0.72rem;
  min-height: 2rem;
  border-radius: 999px;
  background: #edf4fb;
  border: 1px solid #c7d8ea;
  color: #35516e;
  box-shadow: none;
}

.school-day-date-nav button:hover {
  background: #ddebf8;
}

.school-day-date-title {
  margin: 0;
  min-width: 8.5rem;
  text-align: center;
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--text);
}

.school-day-attendance-toolbar {
  margin-bottom: 0.45rem;
}

.school-day-callout-title {
  margin: 0 0 0.25rem;
  font-weight: 700;
}

.school-day-override-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  background: #e7f0fb;
  color: #47698a;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
}

.school-day-row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.2rem 0 0.2rem;
}

#school-day-table tr.school-day-row-needs-attendance td:first-child,
#school-day-table tr.school-day-row-needs-grade td:first-child,
#school-day-table tr.school-day-row-needs-completion td:first-child,
#school-day-table tr.school-day-row-completed td:first-child {
  position: relative;
}

#school-day-table tr.school-day-row-needs-attendance td:first-child::before,
#school-day-table tr.school-day-row-needs-grade td:first-child::before,
#school-day-table tr.school-day-row-needs-completion td:first-child::before,
#school-day-table tr.school-day-row-completed td:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 4px;
  border-radius: 999px;
}

#school-day-table tr.school-day-row-needs-attendance td:first-child::before,
#school-day-table tr.school-day-row-needs-grade td:first-child::before,
#school-day-table tr.school-day-row-needs-completion td:first-child::before {
  background: #1761ae;
}

#school-day-table tr.school-day-row-completed td:first-child::before {
  background: #3f8a63;
}

#school-day-table tr.school-day-row-needs-attendance td,
#school-day-table tr.school-day-row-needs-grade td,
#school-day-table tr.school-day-row-needs-completion td {
  background: #f7fbff;
}

#school-day-table tr.school-day-row-completed td {
  background: #fbfffc;
}

.school-day-row-badges .school-day-override-badge {
  margin-left: 0;
}

.school-day-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.school-day-status-badge.success {
  background: #e7f6ee;
  color: #336a4f;
}

.school-day-status-badge.warning {
  background: #e7f2ff;
  color: #1761ae;
}

.school-day-status-badge.complete {
  background: #e8f6ee;
  color: #2f6a4a;
}

.school-day-status-badge.info {
  background: #e7f0fb;
  color: #47698a;
}

.school-day-status-badge.muted {
  background: #eef3f8;
  color: #627a97;
}

.school-day-actions-wrap {
  display: grid;
  gap: 0.35rem;
  justify-items: start;
}

.school-day-complete-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #516b89;
}

.school-day-inline-grade-row td {
  background: #f8fbff;
}

.school-day-inline-grade-wrap {
  margin-top: 0.2rem;
}

.school-day-inline-grade-wrap table {
  margin: 0;
}

.school-day-inline-grade-wrap tr[data-school-day-inline-grade] .grade-entry-action-row {
  display: flex;
  gap: 0.32rem;
  justify-content: flex-start;
}

.school-day-inline-grade-wrap tr[data-school-day-inline-grade] .grade-entry-action-row button,
.school-day-inline-grade-wrap .school-day-inline-grade-action-table-row .grade-entry-action-row button {
  width: auto;
  min-width: 0;
}

.school-day-inline-grade-wrap .school-day-inline-grade-action-table-row td {
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
  background: #f8fbff;
}

.school-day-inline-grade-wrap .grade-entry-inline-placeholder {
  min-height: 1rem;
}

.calendar-inline-editor {
  min-width: 9rem;
}

.school-day-start-editor {
  min-width: 8.6rem;
}

.calendar-inline-label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #5e7695;
}

.calendar-inline-label input {
  width: 100%;
}

#school-day-table .school-day-hour-column {
  width: 19%;
}

#school-day-table .school-day-student-column {
  width: 14%;
}

#school-day-table .school-day-planned-column {
  width: 31%;
}

#school-day-table .school-day-instructor-column {
  width: 14%;
}

#school-day-table .school-day-minutes-column {
  width: 10%;
}

#school-day-table .school-day-actions-column {
  width: 12%;
}

.school-day-planned-copy {
  font-weight: 500;
}

.school-day-editing-row .school-day-planned-column {
  min-width: 16rem;
}

.school-day-editing-row .school-day-instructor-column,
.school-day-editing-row .school-day-minutes-column {
  vertical-align: middle;
}

.school-day-instructor-editor {
  width: 100%;
  min-width: 8rem;
  max-width: 10rem;
}

.school-day-minutes-editor {
  width: 100%;
  min-width: 5.2rem;
  max-width: 6rem;
}

.school-day-editing-row .calendar-actions-cell {
  min-width: 7.2rem;
}

@media (max-width: 900px) {
  #school-day-table .school-day-hour-column,
  #school-day-table .school-day-student-column,
  #school-day-table .school-day-planned-column,
  #school-day-table .school-day-instructor-column,
  #school-day-table .school-day-minutes-column,
  #school-day-table .school-day-actions-column {
    width: auto;
  }

  .school-day-editing-row .school-day-planned-column {
    min-width: 0;
  }

  .school-day-instructor-editor,
  .school-day-minutes-editor,
  .school-day-start-editor {
    max-width: none;
  }
}

.school-day-attendance-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.school-day-summary-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.school-day-summary-copy .muted {
  margin: 0;
}

.school-day-hours-summary {
  font-size: 0.88rem;
  font-weight: 600;
}

.school-day-student-summaries {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.65rem;
  margin: 0 0 0.7rem;
}

.school-day-student-summaries-header {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.5rem;
}

.school-day-student-summaries-header h4 {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #627a97;
}

.school-day-student-summaries-toggle {
  width: 1.85rem;
  min-width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #c8d7e8;
  background: #fff;
  color: #2f5885;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}

.school-day-student-summaries-toggle:hover {
  background: #eef5fc;
}

.school-day-student-summary-card {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid #dfe8f2;
  border-radius: 14px;
  background: #f8fbff;
  padding: 0.7rem 0.8rem;
  box-shadow: 0 10px 22px rgba(31, 47, 69, 0.06);
  cursor: pointer;
}

.school-day-student-summary-card:hover {
  border-color: #b8cde4;
  background: #f3f8fd;
}

.school-day-student-summary-card.active {
  border-color: #5f88b4;
  background: #eaf3fc;
  box-shadow: 0 12px 26px rgba(47, 88, 133, 0.14);
}

.school-day-student-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.school-day-card-student {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.school-day-card-student-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b84a0;
}

.school-day-card-student h4 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.2;
  color: #18324d;
}

.school-day-student-summary-header h4 {
  margin: 0;
  font-size: 0.98rem;
}

.school-day-student-summary-stats {
  display: grid;
  gap: 0.2rem;
  font-size: 0.85rem;
  color: #5a6f87;
}

.school-day-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.7rem;
  margin: 0 0 0.8rem;
}

.school-day-overview-card {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid #dfe8f2;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 0.75rem 0.85rem;
  box-shadow: 0 10px 24px rgba(31, 47, 69, 0.07);
  cursor: pointer;
}

.school-day-overview-card:hover {
  border-color: #b8cde4;
  background: #f4f9ff;
}

.school-day-overview-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.school-day-overview-card-header h4 {
  margin: 0;
  font-size: 1rem;
}

.school-day-overview-card-header span {
  font-size: 0.78rem;
  font-weight: 700;
  color: #627a97;
}

.school-day-overview-body {
  display: grid;
  gap: 0.28rem;
  max-height: 15.5rem;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.school-day-overview-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.2rem 0;
}

.school-day-overview-time {
  font-size: 0.8rem;
  font-weight: 700;
  color: #446484;
}

.school-day-overview-course {
  min-width: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: #20344f;
}

.school-day-overview-status {
  justify-self: end;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}

.school-day-overview-status.complete {
  background: #e8f6ee;
  color: #2f6a4a;
}

.school-day-overview-status.needs-grade {
  background: #ffe7bf;
  color: #8f4e00;
}

.school-day-overview-status.open {
  background: #eef3f8;
  color: #627a97;
}


.school-day-grades-callout {
  margin-top: 0.85rem;
}

.subtab-btn {
  border: 1px solid #c2a676;
  background: #fff8ed;
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  font-weight: 600;
}

.subtab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.reports-section {
  border: 1px solid #d8cfbf;
  border-radius: 10px;
  background: #f6f1e7;
  padding: 0.75rem;
}

#reports-form {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 0.85rem;
  margin-bottom: 0;
}

.reports-filter-group {
  border: 1px solid #d8cfbf;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  padding: 0.8rem;
}

.reports-filter-group h3 {
  margin: 0 0 0.65rem;
}

.reports-criteria-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(180px, 0.9fr) minmax(180px, 0.9fr);
  gap: 0.8rem;
  align-items: end;
}

.reports-student-field {
  align-self: stretch;
}

#reports-form .reports-criteria-grid > label > select,
#reports-form .reports-criteria-grid .multi-select-dropdown summary {
  height: 42px;
  line-height: 1.2;
}

.reports-content-checklist {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.45rem 0.9rem;
}

#reports-form > button {
  width: auto;
  justify-self: start;
  align-self: end;
  height: calc(1em + 0.84rem + 2px);
  padding: 0.42rem 0.8rem;
}

#reports-message {
  margin-top: 0.65rem;
}

.management-section h3 {
  margin: 0 0 0.35rem;
}

.management-section-subjects {
  background: #f6f1e7;
  border-color: #d2c3a8;
}

.management-section-courses {
  background: #edf4f7;
  border-color: #c2d3dd;
}

.management-section-grade-types {
  background: #eff6ed;
  border-color: #c7d8bf;
}

.management-section-grading-criteria {
  background: #f4efe7;
  border-color: #d5c7b4;
}

.subsection-toggle-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin: 0.15rem 0 0.35rem;
}

.subsection-toggle-row h4 {
  margin: 0;
}

.subsection-toggle-row h3 {
  margin: 0;
}

.subsection-toggle-btn {
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border-radius: 999px;
  position: relative;
  display: inline-block;
  vertical-align: middle;
  font-size: 0;
  font-weight: 700;
}

.subsection-toggle-btn::before,
.subsection-toggle-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border-radius: 999px;
}

.subsection-toggle-btn::before {
  width: 0.62rem;
  height: 2px;
}

.subsection-toggle-btn::after {
  width: 2px;
  height: 0.62rem;
}

.subsection-toggle-btn[aria-expanded="true"]::after {
  display: none;
}

.dashboard-section {
  border: 1px solid #d8cfbf;
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
}

.dashboard-section + .dashboard-section {
  margin-top: 0.6rem;
}

.dashboard-section h3 {
  margin: 0 0 0.35rem;
}

.dashboard-subtabs {
  margin-bottom: 0.85rem;
}

.dashboard-section-placeholder {
  padding: 0.95rem 1rem;
}

.dashboard-section-overview {
  background: #f6f1e7;
  border-color: #d2c3a8;
}

.dashboard-section-execution-detail {
  background: #f7f3eb;
  border-color: #d9ccb6;
}

.dashboard-section-compliance-detail {
  background: #eef3f9;
  border-color: #c9d5e8;
}

.dashboard-section-student-performance {
  background: #edf4f7;
  border-color: #c2d3dd;
}

.dashboard-section-student-attendance {
  background: #eff6ed;
  border-color: #c7d8bf;
}

.dashboard-section-student-instructional-hours {
  background: #edf4f7;
  border-color: #c2d3dd;
}

.dashboard-section-trending {
  background: #f3efe8;
  border-color: #d8cdbd;
}

.dashboard-section-volume {
  background: #f7f2e9;
  border-color: #ddcfbb;
}

.dashboard-section-gpa-trending {
  background: #eef3f0;
  border-color: #c7d5cc;
}

.dashboard-section-instruction-hours-trending {
  background: #edf1f8;
  border-color: #c5d1e3;
}

.dashboard-section-work-distribution {
  background: #eef3f0;
  border-color: #c7d5cc;
}

#student-detail-panel .table-wrap {
  margin-top: 0;
}

#student-form,
#student-enrollment-form {
  align-items: end;
}

#student-form {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  column-gap: 0.85rem;
  row-gap: 0.6rem;
}

#student-form label {
  min-width: 0;
}

#student-form > button,
#student-enrollment-form > button {
  justify-self: start;
  align-self: end;
  padding: 0.48rem 0.8rem;
  font-size: 0.92rem;
}

#student-form > button {
  grid-column: 2;
}

#student-enrollment-form > button {
  grid-column: 2;
  margin-left: 0.45rem;
}

#student-enrollment-form {
  grid-template-columns: minmax(260px, 1fr) auto;
}

#student-enrollment-form label {
  min-width: 0;
}

#student-enrollment-form .student-enrollment-course-field,
#student-enrollment-form .multi-select-dropdown,
#student-enrollment-form .multi-select-dropdown summary {
  width: 100%;
}

#student-enrollment-form .multi-select-dropdown[open] {
  padding-bottom: 0.1rem;
}

.student-schedule-order-select {
  width: 100%;
  min-width: 88px;
}

#course-form {
  grid-template-columns: minmax(180px, 1.45fr) minmax(120px, 0.72fr) minmax(120px, 0.82fr) 96px 86px;
  align-items: end;
  column-gap: 0.85rem;
  row-gap: 0.6rem;
}

#course-form label {
  min-width: 0;
}

#course-form button {
  height: calc(1em + 0.84rem + 2px);
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.course-form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
}

#course-form .checkbox-field {
  min-height: calc(1em + 0.84rem + 2px);
  padding-bottom: 0.08rem;
  white-space: nowrap;
}

.course-exclusive-field {
  display: inline-grid;
  grid-template-columns: auto;
  grid-template-rows: auto 1fr;
  gap: 0.18rem;
  grid-column: 5;
  align-self: start;
  justify-self: center;
  width: 86px;
  min-width: 86px;
  white-space: nowrap;
  padding-top: 0;
  padding-bottom: 0;
  text-align: center;
  align-items: start;
  justify-items: center;
}

.course-exclusive-field span,
.course-exclusive-field,
.course-exclusive-field label {
  overflow: visible;
}

.course-hours-field {
  grid-column: 4;
}

#course-hours {
  max-width: 96px;
}

.course-exclusive-field input[type="checkbox"] {
  width: auto;
  margin: 0;
  justify-self: center;
  align-self: center;
  margin-top: 0.45rem;
}

#grade-type-form {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto auto;
  align-items: end;
  column-gap: 0.6rem;
}

#grade-type-submit-btn {
  grid-column: 3;
  width: auto;
  justify-self: start;
  align-self: end;
}

#grade-type-cancel-edit-btn {
  grid-column: 4;
  width: auto;
  justify-self: start;
  align-self: end;
}

.grade-types-apply-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.4rem;
}

#grading-criteria-form {
  display: grid;
  gap: 0.75rem;
}

.grading-criteria-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.4fr) minmax(220px, 0.8fr);
  gap: 0.8rem;
}

.grading-criteria-card {
  border: 1px solid #dbcdb9;
  border-radius: 10px;
  background: rgba(255, 251, 243, 0.82);
  padding: 0.8rem;
}

.grading-criteria-card h4 {
  margin: 0 0 0.4rem;
}

.grading-criteria-card .muted {
  margin-top: 0;
}

.letter-grade-scale-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 0.6rem 0.75rem;
}

#grading-gpa-scale,
#grading-gpa-other {
  max-width: 180px;
}

.grading-criteria-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.55rem;
}

#grading-criteria-edit-btn,
#grading-criteria-submit-btn,
#grading-criteria-cancel-btn {
  width: auto;
}

#attendance-filter-form > button {
  align-self: end;
  justify-self: start;
  width: auto;
  height: calc(1em + 0.84rem + 2px);
  padding: 0.42rem 0.8rem;
}

#attendance-filter-form {
  grid-template-columns: minmax(180px, 1.35fr) minmax(155px, 0.95fr) minmax(145px, 0.95fr) minmax(145px, 0.95fr) auto;
  align-items: end;
}

#grades-filter-form > button {
  justify-self: start;
  width: auto;
}

#plan-filter-form > button {
  align-self: end;
  justify-self: start;
  width: auto;
  height: calc(1em + 0.84rem + 2px);
  padding: 0.42rem 0.8rem;
}

#calendar-form {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  margin-bottom: 0;
  align-items: end;
}

#calendar-form > label > input,
#calendar-form > label > select,
#calendar-form .multi-select-dropdown summary {
  height: 42px;
}

#calendar-form > label > input,
#calendar-form > label > select,
#calendar-form .multi-select-dropdown summary {
  line-height: 1.2;
}

#calendar-form .calendar-filter-field {
  align-self: start;
}

#calendar-form .multi-select-dropdown summary {
  width: 100%;
}

#calendar-form .multi-select-dropdown[open] {
  height: auto;
}

.calendar-month-view {
  display: grid;
  gap: 0.55rem;
  overflow-x: auto;
}

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.calendar-month-title {
  margin: 0;
  font-weight: 700;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
  min-width: 840px;
}

.calendar-weekdays div {
  border: 1px solid #d6e1d0;
  border-radius: 8px;
  background: #f2f8ef;
  padding: 0.3rem 0.45rem;
  font-weight: 600;
  text-align: center;
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
  min-width: 840px;
}

.calendar-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
  min-width: 840px;
}

.calendar-day {
  min-height: 155px;
  border: 1px solid #d8cfbf;
  border-radius: 10px;
  background: #fffaf2;
  padding: 0.35rem;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.35rem;
}

.calendar-day.muted-day {
  background: #efe7d9;
  opacity: 0.75;
}

.calendar-day-header {
  font-size: 0.9rem;
  font-weight: 700;
}

.calendar-day-items {
  display: grid;
  gap: 0.3rem;
  align-content: start;
  max-height: 115px;
  overflow: auto;
}

.calendar-day-item {
  border: 1px solid #dccdb6;
  border-radius: 7px;
  background: #fff;
  padding: 0.2rem 0.3rem;
  font-size: 0.76rem;
  line-height: 1.25;
}

.calendar-table-wrap {
  background: #f3efe8;
  border: 1px solid #d8cdbd;
  border-radius: 10px;
  padding: 0.25rem;
}

.calendar-day-item .name {
  font-weight: 600;
}

.calendar-student-link {
  border: 0;
  background: none;
  color: var(--text);
  padding: 0;
  margin: 0;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
}

.calendar-student-link:hover {
  color: #5f3414;
}

#calendar-week-view .calendar-day {
  min-height: 280px;
}

#calendar-week-view .calendar-day-items {
  max-height: 240px;
}

@media (max-width: 980px) {
  #calendar-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 980px) {
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .grid-form {
    grid-template-columns: 1fr 1fr;
  }

  .quarter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .grading-criteria-grid {
    grid-template-columns: 1fr;
  }

  #reports-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  #calendar-form {
    grid-template-columns: 1fr;
  }

  .reports-criteria-grid {
    grid-template-columns: 1fr;
  }

  .grid-form,
  .quarter-grid,
  .kpi-grid,
  .progress-wrap {
    grid-template-columns: 1fr;
  }

  .top {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "title"
      "subtitle"
      "session";
  }

  .session-bar {
    justify-content: flex-start;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    padding: 0.75rem;
  }

  .app-sidebar-nav {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  .brand-photo {
    width: min(170px, 45vw);
    height: auto;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    grid-column: 1;
    transform: none;
  }

  .letter-grade-scale-grid {
    grid-template-columns: 1fr;
  }

  #reports-form {
    grid-template-columns: 1fr;
  }

}

/* Reversible modern polish pass: preserves app structure, refines finish layer. */
:root {
  --bg: #edf3f8;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-soft: rgba(248, 251, 255, 0.95);
  --edge: #d9e2ee;
  --edge-strong: #c9d5e6;
  --text: #1f2f45;
  --muted: #627389;
  --accent: #1761ae;
  --accent-strong: #0f4a87;
  --accent-soft: #f4e6d4;
  --danger: #b04040;
  --shadow-soft: 0 18px 42px rgba(31, 47, 69, 0.08);
  --shadow-float: 0 24px 56px rgba(31, 47, 69, 0.12);
}

body {
  background:
    radial-gradient(circle at top left, rgba(181, 212, 239, 0.28), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 233, 205, 0.38), transparent 28%),
    linear-gradient(180deg, #f7fafc 0%, #edf3f8 52%, #e8eef5 100%);
  color: var(--text);
}

.shell {
  width: min(1280px, 96vw);
  gap: 1rem;
}

.top {
  gap: 0 1rem;
  padding: 0.72rem 1rem 0.62rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(217, 226, 238, 0.95);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  align-items: center;
}

#app-shell .app-brand-lockup {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  flex: 0 1 auto;
}

#app-shell .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-self: stretch;
  padding: 0.78rem 1rem;
  min-height: 0;
  gap: 1rem;
  border-radius: 24px;
}

#app-shell .top .subtitle {
  grid-area: auto;
}

.brand-photo {
  height: 172px;
  border-radius: 18px;
  border-color: #d8e1ec;
  box-shadow: 0 16px 38px rgba(31, 47, 69, 0.14);
}

#app-shell .app-brand-lockup .title-logo {
  width: min(760px, 60vw);
  height: 96px;
  max-height: 96px;
  margin: 0;
  filter: none;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.session-bar {
  margin-top: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  align-self: center;
  text-align: right;
  gap: 0.55rem;
  flex: 1 1 auto;
  min-width: 0;
}

.session-bar .muted {
  font-size: 0.86rem;
  font-weight: 500;
  white-space: nowrap;
}

.app-layout {
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 1rem;
}

.panel,
.calendar-filter-panel,
.calendar-surface,
.reports-section,
.students-section,
.users-section,
.management-section,
.schedule-section,
.attendance-section,
.grades-section,
.dashboard-section,
.detail-panel,
.student-detail-section {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: 1.2rem 1.3rem;
}

.app-sidebar {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(217, 226, 238, 0.95);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.app-sidebar-nav {
  gap: 0.65rem;
}

.tabs,
.subtabs {
  gap: 0.55rem;
}

.tab-btn,
.subtab-btn {
  border: 1px solid var(--edge-strong);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  border-radius: 14px;
  padding: 0.62rem 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.tab-btn:hover,
.subtab-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(31, 47, 69, 0.08);
  border-color: #bcc9dc;
}

.app-sidebar-nav .tab-btn {
  padding: 0.78rem 0.9rem;
  border-radius: 16px;
}

.tab-btn.active,
.subtab-btn.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: transparent;
  box-shadow: 0 16px 30px rgba(23, 97, 174, 0.24);
  color: #fff;
}

h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.7rem, 2vw, 2.15rem);
  letter-spacing: -0.03em;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
}

h4 {
  letter-spacing: -0.01em;
}

.muted {
  color: var(--muted);
}

.dashboard-section,
.students-section,
.users-section,
.management-section,
.schedule-section,
.attendance-section,
.grades-section,
.reports-section,
.student-detail-section {
  padding: 1rem 1.05rem;
}

.dashboard-section + .dashboard-section,
.students-section + .students-section,
.users-section + .users-section,
.management-section + .management-section,
.schedule-section + .schedule-section,
.attendance-section + .attendance-section,
.grades-section + .grades-section,
.student-detail-section + .student-detail-section {
  margin-top: 0.75rem;
}

.dashboard-section-overview,
.dashboard-section-student-performance,
.dashboard-section-student-attendance,
.dashboard-section-student-instructional-hours,
.dashboard-section-trending,
.dashboard-section-volume,
.dashboard-section-gpa-trending,
.dashboard-section-instruction-hours-trending,
.dashboard-section-work-distribution,
.management-section-subjects,
.management-section-courses,
.management-section-grade-types,
.management-section-grading-criteria,
.schedule-section-school-year,
.schedule-section-quarters,
.schedule-section-daily-breaks,
.schedule-section-holidays,
.schedule-section-plans,
.attendance-section-tracker,
.attendance-section-filters,
.attendance-section-records,
.grades-section-filters,
.grades-section-entry,
.grades-section-records,
.users-section-form,
.users-section-list,
.students-section-manage,
.student-detail-section-profile,
.student-detail-section-schedule,
.student-detail-section-attendance,
.student-detail-section-hours,
.reports-section,
.calendar-filter-panel,
.calendar-surface,
.calendar-table-wrap {
  background: var(--panel);
  border-color: var(--edge);
}

.kpi-grid {
  gap: 0.9rem;
}

.kpi {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid var(--edge);
  border-radius: 22px;
  padding: 0.95rem 1rem;
  text-align: left;
  box-shadow: 0 16px 30px rgba(31, 47, 69, 0.06);
}

.kpi-label {
  color: #73849a;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kpi-value {
  margin-top: 0.5rem;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.dashboard-section-overview .kpi-grid {
  gap: 0.65rem;
}

.dashboard-section-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-pill-metric {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 0.45rem 0.75rem;
  border: 1px solid #c7d8ea;
  border-radius: 999px;
  background: #f4f9ff;
  color: var(--accent-strong);
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-pill-metric.ahead {
  border-color: #b8d5c6;
  background: #edf8f0;
  color: #266b3e;
}

.dashboard-pill-metric.behind {
  border-color: #e6c5b8;
  background: #fff1eb;
  color: #9a4a28;
}

.dashboard-pill-metric.on-pace,
.dashboard-pill-metric.starting {
  border-color: #c7d8ea;
  background: #f4f9ff;
  color: var(--accent-strong);
}

.dashboard-summary-grid,
.dashboard-pace-grid,
.dashboard-chip-grid {
  display: grid;
  gap: 0.75rem;
}

.dashboard-summary-grid,
.dashboard-pace-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 0.9rem;
}

.dashboard-chip-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-top: 0.9rem;
}

.dashboard-summary-card,
.dashboard-chip-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--edge);
  border-radius: 18px;
  padding: 0.85rem 0.95rem;
}

.dashboard-summary-card-tight {
  min-height: 0;
}

.dashboard-summary-label,
.dashboard-chip-label {
  margin: 0;
  color: #73849a;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-summary-value,
.dashboard-chip-value {
  margin: 0.32rem 0 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.dashboard-summary-note {
  margin: 0.32rem 0 0;
}

.dashboard-metric-progress {
  margin-top: 0.9rem;
}

.dashboard-section-overview .kpi {
  border-radius: 18px;
  padding: 0.62rem 0.78rem;
  min-height: 0;
}

.dashboard-section-overview .kpi-label {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.dashboard-section-overview .kpi-value {
  margin-top: 0.28rem;
  font-size: 1.08rem;
  line-height: 1.2;
}

.progress-bar {
  height: 12px;
  border: 0;
  background: #e8eef6;
}

.progress-fill {
  background: linear-gradient(90deg, #5aad48 0%, #1761ae 100%);
}

input:not([type="checkbox"]):not([type="radio"]),
select,
.multi-select-dropdown,
.multi-select-dropdown summary {
  border-color: var(--edge-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
}

input:not([type="checkbox"]):not([type="radio"]),
select {
  padding: 0.62rem 0.78rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
.multi-select-dropdown[open],
button:focus-visible {
  outline: none;
  border-color: #9db4d1;
  box-shadow: 0 0 0 4px rgba(103, 143, 196, 0.16);
}

button {
  border-radius: 14px;
  padding: 0.62rem 0.96rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 12px 24px rgba(23, 97, 174, 0.22);
  font-weight: 600;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  filter: none;
  box-shadow: 0 16px 30px rgba(23, 97, 174, 0.25);
}

button.secondary-btn {
  background: linear-gradient(135deg, #6d7d92 0%, #55657c 100%);
  box-shadow: 0 12px 24px rgba(85, 101, 124, 0.22);
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 0.8rem 0.75rem;
  border-bottom: 1px solid #e8eef5;
  vertical-align: middle;
}

th {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6c7b8f;
  background: #f8fbfe;
}

thead th:first-child {
  border-top-left-radius: 14px;
}

thead th:last-child {
  border-top-right-radius: 14px;
}

tbody tr {
  background: rgba(255, 255, 255, 0.9);
}

tbody tr:nth-child(even) {
  background: rgba(247, 250, 254, 0.95);
}

tbody tr:hover {
  background: #f3f7fc;
}

.table-wrap {
  border: 1px solid #e5ecf5;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.table-action-row {
  gap: 0.5rem;
}

.table-action-row button,
.students-toolbar button,
.users-toolbar button,
.students-detail-toolbar button {
  box-shadow: none;
}

.chart-wrap {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-color: #e0e9f4;
  border-radius: 18px;
  padding: 0.7rem 0.75rem 0.4rem;
}

.calendar-weekdays div {
  border: 1px solid #e1e9f3;
  background: #f7fbff;
  color: #5c6f86;
}

.calendar-day {
  border: 1px solid #e3eaf3;
  border-radius: 18px;
  background: #fff;
  padding: 0.55rem;
}

.calendar-day.muted-day {
  background: #f3f6fa;
  opacity: 0.82;
}

.calendar-day-item {
  border: 1px solid #e5ecf5;
  border-radius: 12px;
  background: #f8fbff;
  padding: 0.32rem 0.42rem;
}

.detail-panel {
  padding: 0.95rem;
}

.students-toolbar,
.students-detail-toolbar,
.users-toolbar {
  margin-bottom: 0.85rem;
}

.students-helper-text {
  margin-bottom: 0.95rem;
  padding: 0.82rem 0.95rem;
  border: 1px solid #e4ebf4;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
}

.reports-filter-group,
.grading-criteria-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
  border-color: #e3eaf3;
  border-radius: 18px;
}

.status-text,
.callout {
  border-radius: 16px;
}

@media (max-width: 980px) {
  .top {
    padding: 0.68rem 0.9rem 0.58rem;
  }

  #app-shell .top {
    padding: 0.58rem 0.75rem;
  }

  #app-shell .app-brand-lockup .title-logo {
    width: min(640px, 72vw);
    height: 88px;
    max-height: 88px;
  }
}

@media (max-width: 640px) {
  .top {
    padding: 0.72rem 0.82rem;
  }

  #app-shell .top {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.65rem 0.75rem;
  }

  .brand-photo {
    width: min(150px, 44vw);
    height: auto;
    justify-self: center;
  }

  #app-shell .app-brand-lockup .title-logo {
    width: min(100%, 440px);
    height: 78px;
    max-height: 78px;
    margin: 0;
  }

  .session-bar {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    gap: 0.45rem;
  }

  .app-sidebar {
    backdrop-filter: none;
  }

  .panel {
    padding: 1rem;
  }
}
