.teacher-dashboard-page {
  min-height: 100vh;
  padding: 26px;
  background: #edf3ee;
}

.teacher-dashboard-shell {
  width: min(100%, 1280px);
  margin: 0 auto;
}

.teacher-dashboard-header,
.dashboard-status,
.dashboard-section-heading,
.calendar-heading,
.month-controls,
.dashboard-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.teacher-dashboard-header {
  padding: 12px 0 24px;
}

.teacher-dashboard-brand {
  color: #203d35;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
}

.teacher-dashboard-brand span {
  color: #c85e47;
}

.teacher-dashboard-header .eyebrow {
  margin: 18px 0 5px;
  color: #527166;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.teacher-dashboard-header h1,
.dashboard-section h2,
.dashboard-status h2,
.payment-estimate-panel h2,
.monthly-submit-panel h2 {
  margin: 0;
  color: #203d35;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
}

.teacher-dashboard-header h1 {
  font-size: 2.2rem;
}

.dashboard-email {
  margin: 5px 0 0;
  color: #66776f;
  font-size: 0.82rem;
}

.dashboard-link,
.dashboard-signout,
.month-step {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #bacbc2;
  border-radius: 5px;
  background: transparent;
  color: #244b3e;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.dashboard-link,
.dashboard-signout {
  box-sizing: border-box;
  display: inline-flex;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.dashboard-signout {
  margin: 0;
}

.dashboard-status {
  margin-bottom: 20px;
  padding: 22px 26px;
  border: 1px solid #d2dfd8;
  border-left: 4px solid #d5a941;
  background: #fff;
}

.dashboard-status[data-status="approved"] { border-left-color: #43836a; }
.dashboard-status[data-status="rejected"] { border-left-color: #bc5948; }
.dashboard-status .eyebrow,
.dashboard-section .eyebrow,
.payment-estimate-panel .eyebrow,
.monthly-submit-panel .eyebrow {
  margin: 0 0 5px;
  color: #668076;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-status h2 { font-size: 1.45rem; }
.dashboard-status-copy { margin: 5px 0 0; color: #5f7169; font-size: 0.86rem; line-height: 1.55; }

.teacher-message-center { margin-bottom: 20px; }
.teacher-message-layout { display: grid; grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr); gap: 24px; }
.teacher-message-compose { display: grid; align-content: start; gap: 10px; }
.teacher-message-compose label,
.teacher-message-inbox h3 { margin: 0; color: #29483d; font-size: 0.84rem; font-weight: 800; }
.teacher-message-compose textarea {
  width: 100%;
  min-height: 132px;
  padding: 12px;
  border: 1px solid #cbd8d0;
  border-radius: 5px;
  color: #263b33;
  background: #fff;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.5;
  resize: vertical;
}
.teacher-message-compose .dashboard-primary-button { justify-self: start; }
.teacher-message-inbox { min-width: 0; }
.teacher-message-inbox h3 { margin-bottom: 10px; }
.teacher-message-list {
  display: grid;
  align-content: start;
  box-sizing: border-box;
  min-height: 190px;
  height: 190px;
  max-height: 190px;
  gap: 10px;
  margin: 0;
  padding: 8px;
  border: 1px solid #cbd8d0;
  border-radius: 5px;
  background: #fff;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  list-style: none;
}
.teacher-unread-badge:not([hidden]) {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: 5px;
  padding: 0 5px;
  place-items: center;
  border-radius: 10px;
  background: #a33d2c;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}
.teacher-message-item { max-width: 92%; padding: 11px 13px; border: 1px solid #d6e2db; border-radius: 5px; background: #f7faf7; }
.teacher-message-item.from-admin { border-left: 3px solid #c79131; background: #fffaf0; }
.teacher-message-item.from-teacher { justify-self: end; border-left: 3px solid #43836a; }
.teacher-message-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; color: #52685d; font-size: 0.7rem; }
.teacher-message-meta time { color: #75857c; }
.teacher-message-item p { margin: 7px 0 0; color: #2c4037; font-size: 0.82rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.teacher-message-empty { padding: 15px; color: #718078; font-size: 0.8rem; }

.status-badge {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 4px;
  background: #f2e8c9;
  color: #6b531c;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: capitalize;
}

.status-badge[data-status="approved"] { background: #dcece3; color: #245b43; }
.status-badge[data-status="rejected"] { background: #f7e2de; color: #853d31; }
.approved-dashboard[hidden],
.dashboard-header-actions [hidden] { display: none !important; }

.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 20px;
}

.dashboard-primary-column { display: grid; gap: 20px; min-width: 0; }
.dashboard-section,
.monthly-submit-panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid #d2dfd8;
  background: #fff;
}

.dashboard-section h2,
.monthly-submit-panel h2 { font-size: 1.55rem; }
.dashboard-section-heading { align-items: flex-end; margin-bottom: 20px; }
.dashboard-section-heading .helper { margin: 0; text-align: right; }

.matched-student-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.matched-student-list li {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border-left: 3px solid #d5a941;
  background: #f3f6f3;
  color: #344f44;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.matched-student-name { font-weight: 700; }
.matched-student-class { color: #52675c; font-size: 0.76rem; }
.matched-student-schedule { color: #687a71; font-size: 0.76rem; }
.matched-student-meet-link { width: max-content; color: #285a45; font-size: 0.76rem; font-weight: 700; }
.matched-student-recurring {
  display: inline-flex;
  width: max-content;
  padding: 3px 7px;
  border: 1px solid #c9dfd2;
  border-radius: 4px;
  background: #eaf3ed;
  color: #285a45;
  font-size: 0.68rem;
  font-weight: 700;
}

.matched-student-list .matched-student-empty {
  display: block;
  border-left-color: #cbd9d2;
  color: #687a71;
}

.teacher-profile-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.teacher-profile-editor label,
.lesson-entry-form label {
  align-self: end;
  color: #344f44;
  font-size: 0.75rem;
  font-weight: 700;
}

.teacher-profile-editor input,
.teacher-profile-editor textarea,
.lesson-entry-form input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cbd9d2;
  border-radius: 4px;
  background: #fff;
  color: #24332d;
  font: inherit;
  font-size: 0.84rem;
}

.teacher-profile-editor textarea { resize: vertical; }
.teacher-profile-editor > .helper { grid-column: 1 / -1; margin: -4px 0 2px; }
.teacher-profile-editor input[readonly],
.teacher-profile-editor textarea[readonly] {
  background: #f0f3f1;
  color: #53655d;
  cursor: not-allowed;
}
.teacher-profile-editor input:focus-visible,
.teacher-profile-editor textarea:focus-visible,
.lesson-entry-form input:focus-visible {
  border-color: #397963;
  outline: 3px solid rgba(57, 121, 99, 0.14);
}

.teacher-profile-editor input[type="file"] { padding: 7px; font-size: 0.75rem; }
.dashboard-photo-preview { width: 82px; height: 82px; grid-column: 1 / -1; border-radius: 50%; object-fit: cover; background: #edf3ee; }
.dashboard-video-preview { width: min(100%, 480px); max-height: 270px; grid-column: 1 / -1; border-radius: 4px; background: #16231d; }
.teacher-profile-editor > .dashboard-secondary-button { justify-self: start; }
.dashboard-secondary-button { min-height: 38px; padding: 8px 12px; border: 1px solid #cbd9d2; border-radius: 4px; background: #fff; color: #344f44; font: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.dashboard-secondary-button:hover { border-color: #397963; color: #285c48; }

.rate-input-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 8px; }
.teacher-profile-editor > button,
.teacher-profile-editor > .dashboard-message,
.lesson-entry-form > h3,
.lesson-entry-form > button,
.lesson-entry-form > .dashboard-message { grid-column: 1 / -1; }

.dashboard-primary-button {
  min-height: 42px;
  padding: 10px 14px;
  border: 0;
  border-radius: 4px;
  background: #bd5842;
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.dashboard-primary-button:hover { background: #a44937; }
.dashboard-primary-button:disabled { cursor: not-allowed; opacity: 0.55; }
.dashboard-message { min-height: 1.2em; margin: 2px 0 0; color: #3e7057; font-size: 0.78rem; }
.dashboard-message.error { color: #a34336; }

.month-controls { gap: 10px; color: #304b40; font-size: 0.84rem; }
.month-step { min-height: 34px; width: 36px; padding: 0; font-size: 1.25rem; }
.calendar-weekdays,
.lesson-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { margin-bottom: 5px; color: #73837c; font-size: 0.69rem; font-weight: 800; text-align: center; }
.calendar-day {
  position: relative;
  display: block;
  width: 100%;
  min-height: 70px;
  padding: 8px;
  border-top: 1px solid #e5ece8;
  border-left: 1px solid #e5ece8;
  border-bottom: 0;
  background: #fff;
  color: #344b40;
  font: inherit;
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
}
.calendar-day:hover { background: #f0f6f2; }
.calendar-day:focus-visible { z-index: 1; outline: 3px solid #397963; outline-offset: -3px; }
.calendar-day:disabled { background: #f8faf9; color: #9ba9a2; cursor: default; }
.calendar-day:disabled:hover { background: #f8faf9; }
.calendar-day:nth-child(7n) { border-right: 1px solid #e5ece8; }
.calendar-day.is-empty { background: #f8faf9; }
.calendar-day.has-lessons { background: #edf5ef; }
.calendar-day.has-lessons::after {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #43836a;
  content: "";
}
.calendar-day-hours { display: block; margin-top: 8px; color: #32704f; font-size: 0.68rem; font-weight: 800; }
.lesson-log-heading { display: flex; align-items: baseline; justify-content: space-between; margin-top: 22px; }
.lesson-log-heading h3,
.lesson-entry-form h3 { margin: 0; color: #263f34; font-size: 0.92rem; }
.lesson-log-heading .helper { margin: 0; }
.lesson-table-wrap { overflow-x: auto; }
.lesson-table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 0.78rem; }
.lesson-table th,
.lesson-table td { padding: 9px 8px; border-bottom: 1px solid #e2eae5; text-align: left; vertical-align: top; }
.lesson-table th { color: #687a71; font-size: 0.68rem; font-weight: 800; }
.lesson-table td:last-child { text-align: right; }
.submission-history-section { margin-top: 20px; }
.submission-history-table { min-width: 720px; }
.lesson-remove-button { border: 0; background: transparent; color: #a54638; font: inherit; font-size: 0.72rem; font-weight: 700; cursor: pointer; }
.lesson-entry-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e1e9e4;
}
.optional-label { color: #73837c; font-weight: 500; }

.dashboard-summary-column { position: sticky; top: 18px; display: grid; gap: 14px; }
.payment-estimate-panel {
  padding: 22px;
  background: #203d35;
  color: #fff;
}
.payment-estimate-panel .eyebrow { color: #edc779; }
.payment-estimate-panel h2 { margin-top: 8px; color: #fff; font-family: "Manrope", sans-serif; font-size: 1.9rem; font-weight: 800; overflow-wrap: anywhere; }
.payment-estimate-panel > p:not(.eyebrow) { margin: 7px 0 0; color: #d9e5de; font-size: 0.76rem; line-height: 1.5; }
.estimate-details { display: grid; gap: 10px; margin: 20px 0 0; padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.estimate-details div { display: flex; justify-content: space-between; gap: 10px; font-size: 0.76rem; }
.estimate-details dt { color: #c9d8d0; }
.estimate-details dd { margin: 0; color: #fff; font-weight: 800; text-align: right; }
.payment-estimate-panel .estimate-disclaimer { margin-top: 17px !important; color: #b8cbc1 !important; font-size: 0.68rem !important; }
.monthly-submit-panel p:not(.eyebrow) { color: #64766d; font-size: 0.78rem; line-height: 1.55; }
.monthly-submit-panel .dashboard-primary-button { width: 100%; margin-top: 8px; }

@media (max-width: 900px) {
  .dashboard-columns { grid-template-columns: minmax(0, 1fr) 250px; }
  .dashboard-section { padding: 20px; }
  .teacher-message-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .teacher-dashboard-page { padding: 14px; }
  .teacher-dashboard-header { align-items: flex-start; }
  .teacher-dashboard-header h1 { font-size: 1.8rem; }
  .dashboard-header-actions { align-items: center; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .dashboard-status { align-items: flex-start; padding: 18px; }
  .dashboard-columns { grid-template-columns: minmax(0, 1fr); }
  .dashboard-summary-column { position: static; grid-row: 1; }
  .teacher-profile-editor { grid-template-columns: minmax(0, 1fr); }
  .teacher-profile-editor > label { margin-top: 5px; }
  .dashboard-section-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .dashboard-section-heading .helper { text-align: left; }
  .teacher-message-item { max-width: 100%; }
  .calendar-heading { align-items: flex-start; flex-direction: row; }
  .calendar-day { min-height: 58px; padding: 6px; font-size: 0.72rem; }
  .calendar-day-hours { font-size: 0.62rem; }
  .lesson-entry-form { grid-template-columns: minmax(0, 1fr); }
  .lesson-entry-form > label { margin-top: 4px; }
}

@media (max-width: 420px) {
  .teacher-dashboard-header { flex-direction: column; }
  .dashboard-header-actions { align-items: center; flex-direction: row; }
  .calendar-heading { flex-direction: column; }
  .calendar-day { min-height: 50px; padding: 4px; }
  .calendar-day-hours { margin-top: 5px; }
  .dashboard-section,
  .monthly-submit-panel { padding: 16px; }
}

.teacher-dashboard-page {
  background-color: #edf2ed;
  background-image: linear-gradient(rgba(24, 53, 45, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(24, 53, 45, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
}

.teacher-dashboard-header {
  padding-bottom: 20px;
  border-bottom: 1px solid #d5e0d9;
}

.dashboard-status,
.dashboard-section,
.monthly-submit-panel,
.payment-estimate-panel {
  border-radius: 8px;
}

.dashboard-status,
.dashboard-section,
.monthly-submit-panel {
  box-shadow: 0 8px 24px rgba(24, 54, 43, 0.055);
}

.dashboard-primary-button,
.dashboard-secondary-button,
.dashboard-link,
.dashboard-signout,
.month-step {
  border-radius: 6px;
}

.dashboard-primary-button:focus-visible,
.dashboard-secondary-button:focus-visible,
.dashboard-link:focus-visible,
.dashboard-signout:focus-visible,
.month-step:focus-visible,
.calendar-day:focus-visible {
  outline: 3px solid rgba(23, 111, 94, 0.3);
  outline-offset: 2px;
}

.teacher-message-list,
.teacher-profile-editor input,
.teacher-profile-editor textarea,
.lesson-entry-form input,
.teacher-message-compose textarea {
  border-radius: 6px;
}