:root {
  --teal: #476c77;
  --charcoal: #313d41;
  --mist: #d4dee2;
  --white: #ffffff;
  --line: #bdcbd0;
  --soft: #eef3f5;
  --success: #3b795e;
  --danger: #b45a55;
  --danger-dark: #96443f;
  --warning: #9a6400;
  --gold: #d7a35d;
  --gold-soft: #f5ead9;
}

* {
  box-sizing: border-box;
}

body {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  margin: 0;
  color: var(--charcoal);
  background: var(--soft);
  font-family: Helvetica, Arial, sans-serif;
}

button,
textarea,
input,
select {
  font: inherit;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: var(--white);
  background: var(--teal);
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

button.secondary,
.sidebar nav button {
  border: 1px solid var(--line);
  color: var(--charcoal);
  background: var(--white);
}

.button-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 16px;
  color: var(--white);
  background: var(--teal);
  font-weight: 700;
  text-decoration: none;
}


.button-link.secondary-link {
  border: 1px solid var(--line);
  color: var(--charcoal);
  background: var(--white);
}

.button-link.secondary-link:hover,
.button-link.secondary-link:focus-visible {
  border-color: var(--teal);
  color: var(--teal);
}

.mobile-nav-toggle,
.chat-back-button {
  display: none;
}

.mobile-nav-scrim {
  display: none;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  color: var(--white);
  background: var(--charcoal);
  border-right: 5px solid var(--gold);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  color: var(--teal);
  background: var(--white);
  font-weight: 900;
}

.sidebar-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 6px;
  object-fit: contain;
  background: var(--white);
}

.brand strong,
.brand span,
.sidebar section span,
.sidebar section strong {
  display: block;
  overflow-wrap: anywhere;
}

.brand span,
.sidebar section p {
  color: var(--mist);
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar nav button {
  width: 100%;
  text-align: left;
}

.messages-nav-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.unread-badge {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0 6px;
  color: var(--white);
  background: #c73535;
  font-size: 12px;
  font-weight: 800;
}

.unread-badge[hidden] {
  display: none;
}

.sidebar nav button.active {
  color: var(--white);
  background: var(--teal);
  box-shadow: inset 5px 0 0 var(--gold);
}

.sidebar-feedback-link {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--charcoal);
  background: var(--gold-soft);
  text-align: center;
}

.sidebar-feedback-link > span:first-child {
  flex: 1;
}

.sidebar-feedback-link.active {
  box-shadow: inset 5px 0 0 var(--gold);
  border-color: rgba(255, 255, 255, 0.38);
}

.sidebar-feedback-link[hidden] {
  display: none;
}

.sidebar section {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 14px;
}

.sidebar section:first-of-type {
  margin-top: auto;
}

main {
  padding: 28px;
}

header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

main > header {
  align-items: flex-start;
  border-bottom: 4px solid var(--gold);
  padding-bottom: 22px;
}

h1,
h2 {
  margin-top: 0;
  font-family: Georgia, "Times New Roman", serif;
}

main h1,
main h2 {
  color: var(--teal);
}

h1 {
  max-width: 780px;
  margin-bottom: 0;
  font-size: 40px;
  line-height: 1.08;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
}

h3 {
  margin: 0;
  color: var(--teal);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stacked-form {
  display: grid;
  gap: 12px;
}

.view {
  display: none;
  gap: 20px;
}

.view.active {
  display: grid;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--white);
}

.family-switcher {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: end;
}

.family-switcher[hidden] {
  display: none;
}

.family-switcher label {
  margin: 0;
}

select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--charcoal);
  background: var(--white);
  font-weight: 700;
}

input[type="search"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--charcoal);
  background: var(--white);
}

input[type="email"],
input[type="text"],
input[type="password"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--charcoal);
  background: var(--white);
}

.auth-screen {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 44px 24px;
  border-top: 12px solid var(--gold);
  background: var(--mist);
}

.auth-screen[hidden] {
  display: none;
}

.auth-panel {
  width: min(100%, 500px);
  border: 0;
  border-radius: 6px;
  padding: 40px;
  background: var(--white);
  box-shadow: 0 22px 55px rgba(49, 61, 65, 0.16);
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 42px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--mist);
}

.auth-wordmark {
  color: var(--teal);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1;
}

.auth-logo {
  display: block;
  width: min(270px, 76%);
  max-height: 82px;
  object-fit: contain;
  object-position: left center;
}

.auth-brand span {
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-panel p {
  color: #687b82;
}

.auth-panel h1 {
  margin-bottom: 12px;
  color: var(--teal);
  font-size: 46px;
  line-height: 1.02;
}

.auth-panel form button {
  width: 100%;
}

.auth-account-actions {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--mist);
}

.auth-account-actions:not(:has(button:not([hidden]))) {
  display: none;
}

.auth-create-action {
  width: 100%;
  border: 2px solid var(--gold);
  color: var(--charcoal);
  background: var(--gold-soft);
}

.auth-create-action:hover,
.auth-create-action:focus-visible {
  background: var(--gold);
}

.auth-text-action {
  justify-self: center;
  min-height: 36px;
  padding: 0 8px;
  color: var(--teal);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#signup-form[hidden],
#login-form[hidden],
#show-signup[hidden],
#show-forgot-password[hidden],
#forgot-password-form[hidden],
#client-setup-form[hidden] {
  display: none;
}

.auth-help {
  margin: 24px 0 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.portal-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 10px;
}

.account-panel {
  position: relative;
  min-width: 190px;
}

.account-panel details {
  width: 100%;
}

.account-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--charcoal);
  background: var(--white);
  font-weight: 700;
}

.account-panel summary::-webkit-details-marker {
  display: none;
}

.account-chevron {
  font-size: 22px;
  transition: transform 160ms ease;
}

.account-panel details[open] .account-chevron {
  transform: rotate(90deg);
}

.account-menu-content {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  right: 0;
  width: min(320px, 82vw);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--charcoal);
  background: var(--white);
  box-shadow: 0 14px 35px rgb(49 61 65 / 18%);
}

.account-panel button {
  width: 100%;
  margin-top: 10px;
}

.account-password-form {
  margin-top: 10px;
}

.account-password-form[hidden] {
  display: none;
}

.account-password-form label {
  margin: 0 0 8px;
  color: var(--charcoal);
  font-size: 13px;
}

.account-password-form p {
  margin-bottom: 0;
  font-size: 13px;
}

.account-panel button.secondary {
  color: var(--charcoal);
  background: var(--white);
}

.role-locked label select {
  pointer-events: none;
  appearance: none;
}

.search-control {
  margin: 0 0 16px;
}

.profile-completion-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: #e8a5a5;
  border-left: 6px solid #d96767;
  background: #ffe8e8;
  box-shadow: 0 8px 22px rgba(150, 62, 62, 0.08);
}

.profile-completion-panel[hidden] {
  display: none;
}

.profile-completion-panel p {
  margin: 6px 0 0;
  color: #7d3d3d;
}

.profile-completion-panel .eyebrow,
.profile-completion-panel h2 {
  color: #803131;
}

.file-library,
.lesson-notes,
.employment-list {
  display: grid;
  gap: 12px;
}

.file-group,
.lesson-note-card,
.employment-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--white);
}

.file-group > div:first-child,
.file-links {
  display: grid;
  gap: 4px;
}

.file-group span,
.lesson-note-card span {
  color: #687b82;
  font-size: 13px;
}

.lesson-note-attachments {
  margin-top: -2px;
}

.lesson-note-card p {
  margin: 0;
}

.file-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.file-links a,
.file-links span,
.employment-file-link {
  display: block;
  overflow: hidden;
  border: 1px solid var(--mist);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--teal);
  background: var(--soft);
  font-weight: 800;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.employment-admin-tools {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  border: 1px solid var(--mist);
  border-radius: 8px;
  padding: 16px;
  background: var(--soft);
}

.employment-admin-tools[hidden],
[data-admin-only][hidden] {
  display: none;
}

.panel-subtitle {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
}

.employment-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.employment-card p {
  margin: 0;
  color: #60757c;
}

.employment-meta {
  color: #687b82;
  font-size: 13px;
  font-weight: 700;
}

.employment-file-link {
  text-align: left;
}

.mini-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
}

button.mini-button.danger {
  border: 1px solid var(--danger);
  color: var(--white);
  background: var(--danger);
}

button.mini-button.danger:hover,
button.mini-button.danger:focus-visible {
  background: var(--danger-dark);
}

.lesson-note-form {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.compact-tutor-bookings {
  align-content: start;
  height: min(520px, 62vh);
  max-height: 520px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
  scrollbar-gutter: stable;
}

.compact-tutor-bookings .booking-card {
  gap: 7px;
  height: 136px;
  padding: 12px 14px;
  align-content: start;
  overflow: hidden;
}

.tutor-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(380px, 1.18fr);
  gap: 18px;
  align-items: start;
}

.tutor-secondary-grid {
  margin-top: 18px;
}

.tutor-lesson-card,
.tutor-upcoming-panel,
.tutor-past-panel,
.tutor-materials-panel {
  height: 100%;
}

.tutor-lesson-card {
  padding: 18px;
}

.tutor-lesson-card .panel-title {
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.tutor-lesson-card h2 {
  font-size: clamp(22px, 1.85vw, 28px);
  line-height: 1.12;
}

.detail-grid.tutor-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin-bottom: 14px;
}

.detail-grid.tutor-detail-grid div {
  border-left: 3px solid var(--mist);
  padding-left: 10px;
}

.detail-grid.tutor-detail-grid dt {
  font-size: 12px;
}

.detail-grid.tutor-detail-grid dd {
  font-size: 16px;
  line-height: 1.25;
}

.actions.tutor-lesson-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.actions.tutor-lesson-actions button {
  min-height: 38px;
  padding: 0 12px;
  width: 100%;
}

.actions.tutor-lesson-actions button.secondary {
  border-color: var(--gold-soft);
  color: var(--charcoal);
  background: var(--gold-soft);
}

.actions.tutor-lesson-actions button.danger {
  border: 1px solid var(--danger);
  color: var(--white);
  background: var(--danger);
}

.actions.tutor-lesson-actions button.danger:hover,
.actions.tutor-lesson-actions button.danger:focus-visible {
  background: var(--danger-dark);
}

.tutor-sms-status {
  grid-column: 1 / -1;
  margin: 0;
  min-height: 20px;
}

.tutor-lesson-material-status {
  display: flex;
  justify-content: flex-end;
}

.lesson-status-stack,
.lesson-card-badges {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.lesson-status-stack {
  flex-direction: column;
}

.lesson-quick-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ghost-sms-button {
  width: auto;
  min-width: 0;
  min-height: 0;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  box-shadow: none;
}

.ghost-sms-button:hover,
.ghost-sms-button:focus-visible {
  background: transparent;
  transform: scale(1.08);
}

.prep-toggle {
  width: 58px;
  min-width: 58px;
  height: 58px;
  min-height: 58px;
  border: 2px solid var(--line);
  border-radius: 50%;
  padding: 0;
  color: var(--teal);
  background: var(--white);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: lowercase;
  box-shadow: none;
}

.prep-toggle:hover,
.prep-toggle:focus-visible {
  border-color: var(--teal);
}

.prep-toggle.is-prepped {
  border-color: #2f8f52;
  color: var(--white);
  background: #2f8f52;
}

.prep-toggle-compact {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  font-size: 12px;
}

.tutor-booking-line {
  display: block;
  min-width: 0;
  color: #687b82;
  font-size: 15px;
  line-height: 1.22;
}

.tutor-booking-line .zoom-assignment {
  margin-top: 1px;
}

.compact-tutor-bookings .card-row {
  align-items: flex-start;
}

.compact-tutor-bookings .card-row strong {
  min-width: 0;
  padding-top: 4px;
  line-height: 1.15;
}

.tutor-upcoming-panel,
.tutor-past-panel,
.tutor-materials-panel {
  padding: 18px;
}

.schedule-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.schedule-tabs button {
  min-height: 36px;
  border: 1px solid var(--line);
  padding: 0 10px;
  color: var(--charcoal);
  background: var(--white);
}

.schedule-tabs button.active,
.schedule-tabs button[aria-selected="true"] {
  border-color: var(--teal);
  color: var(--white);
  background: var(--teal);
}

.date-filter {
  display: grid;
  gap: 6px;
  min-width: 190px;
}

.date-filter span {
  color: #526c74;
  font-size: 13px;
  font-weight: 800;
}

.peace-panel,
.crm-panel {
  display: grid;
  gap: 18px;
}

.peace-summary,
.crm-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.peace-summary article,
.crm-summary article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--white);
}

.peace-summary strong,
.crm-summary strong {
  display: block;
  color: var(--charcoal);
  font-size: 34px;
  line-height: 1;
}

.peace-summary span,
.crm-summary span,
.peace-status span,
.peace-tutor-card .card-row span {
  color: #687b82;
}

.crm-panel .search-control {
  margin-bottom: 0;
}

.crm-follow-up-scroll {
  max-height: min(66vh, 760px);
}

.crm-follow-up-list {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.crm-follow-up-card {
  border-left: 5px solid var(--danger);
}

.crm-follow-up-card .card-row {
  align-items: flex-start;
}

.crm-follow-up-card .card-row span:not(.pill),
.crm-follow-up-details span {
  display: block;
  color: #687b82;
  font-size: 14px;
}

.crm-follow-up-details {
  display: grid;
  gap: 4px;
}

.crm-follow-up-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.crm-follow-up-form label {
  display: grid;
  gap: 6px;
}

.crm-follow-up-form label.full {
  grid-column: 1 / -1;
}

.crm-follow-up-form span {
  color: #687b82;
  font-size: 13px;
  font-weight: 800;
}

.crm-follow-up-form textarea {
  min-height: 94px;
  resize: vertical;
}

.crm-follow-up-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.crm-card-status {
  min-height: 18px;
  color: #687b82;
  font-size: 13px;
  font-weight: 800;
}

.crm-status-pill.status-needs-follow-up {
  background: #f8d8d4;
  color: #7c2924;
}

.crm-status-pill.status-contacted {
  background: #f4ead7;
  color: #6b4b18;
}

.crm-status-pill.status-waiting-response {
  background: #dbe8ef;
  color: #315e6d;
}

.crm-status-pill.status-scheduled {
  background: #d8f0df;
  color: #225b34;
}

.crm-status-pill.status-paused {
  background: #e8edf0;
  color: #4f626b;
}

.crm-status-pill.status-do-not-contact {
  background: #e6d7dc;
  color: #65323f;
}

.peace-tutor-list,
.peace-lessons,
.peace-zoom-conflicts,
.zoom-conflict-list {
  display: grid;
  gap: 12px;
}

.zoom-conflict-alert,
.zoom-conflict-clear {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.zoom-conflict-alert {
  border-color: #d98b8b;
  border-left: 6px solid var(--danger);
  background: #ffe8e8;
}

.zoom-conflict-alert h3 {
  margin: 4px 0 0;
  color: #803131;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.zoom-conflict-alert .eyebrow {
  color: #803131;
}

.zoom-conflict-clear {
  display: grid;
  gap: 4px;
  border-color: rgba(47, 143, 82, 0.35);
  background: rgba(47, 143, 82, 0.08);
}

.zoom-conflict-clear span {
  color: #687b82;
}

.zoom-conflict-group {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(128, 49, 49, 0.22);
  border-radius: 8px;
  padding: 12px;
  background: var(--white);
}

.zoom-conflict-group > strong {
  color: #803131;
}

.zoom-conflict-lesson {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--charcoal);
}

.zoom-conflict-lesson span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.peace-summary article.peace-summary-warning {
  border-color: #d98b8b;
  background: #ffe8e8;
}

.peace-summary article.peace-summary-clear {
  border-color: rgba(47, 143, 82, 0.35);
  background: rgba(47, 143, 82, 0.08);
}

.peace-tutor-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--white);
}

.peace-lessons {
  margin-top: 12px;
}

.peace-lesson {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.peace-lesson.is-prepped {
  border-color: rgba(47, 143, 82, 0.45);
  background: rgba(47, 143, 82, 0.08);
}

.peace-lesson strong,
.peace-lesson span {
  display: block;
}

.peace-status {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 94px;
  text-align: center;
}

.compact-tutor-materials {
  height: min(520px, 62vh);
  max-height: 520px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
  scrollbar-gutter: stable;
}

.read-receipt {
  display: block;
  margin-top: 4px;
  color: inherit;
  font-size: 11px;
  opacity: 0.68;
  text-align: right;
}

.panel-title-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.icon-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
}

.compose-chat-button {
  border-radius: 999px;
}

.message-search-toggle {
  border-radius: 999px;
  font-size: 22px;
}

.message-search-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
  margin: -6px 0 14px;
}

.message-search-control[hidden] {
  display: none;
}

.message-search-control span {
  grid-column: 1 / -1;
  color: #526c74;
  font-size: 13px;
  font-weight: 800;
}

.message-search-control input {
  min-height: 44px;
}

.message-search-control button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  padding: 0;
  color: var(--charcoal);
  background: var(--white);
  font-size: 24px;
  line-height: 1;
}

.scroll-list {
  max-height: min(58vh, 680px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.imported-bookings-scroll {
  max-height: 320px;
}

.admin-disclosure {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.admin-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 14px 20px;
  cursor: pointer;
  list-style: none;
}

.admin-disclosure summary::-webkit-details-marker {
  display: none;
}

.admin-disclosure summary > span:first-child,
.admin-disclosure summary small {
  display: block;
}

.admin-disclosure summary small {
  margin-top: 3px;
  color: #687b82;
  font-size: 13px;
  font-weight: 400;
}

.admin-disclosure summary::after {
  content: "+";
  color: var(--teal);
  font-size: 24px;
  font-weight: 700;
}

.admin-disclosure[open] summary::after {
  content: "−";
}

.admin-disclosure-content {
  border-top: 1px solid var(--mist);
  padding: 18px 20px 20px;
}

.moderation-disclosure.has-flags {
  border-color: #d8b36c;
  background: #fffaf0;
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.practice-module {
  display: grid;
  gap: 8px;
  min-height: 126px;
  align-content: center;
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  border-radius: 6px;
  padding: 18px;
  color: var(--charcoal);
  background: var(--white);
  text-decoration: none;
}

.practice-module:hover,
.practice-module:focus-visible {
  border-left-color: var(--gold);
  background: var(--gold-soft);
}

.practice-module strong {
  color: var(--teal);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
}

.practice-module span {
  color: #687b82;
}

.messenger-layout {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.team-chat-window {
  display: grid;
  grid-template-rows: minmax(420px, 1fr) auto auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.team-messages {
  max-height: 620px;
  overflow-y: auto;
}

.conversation-sidebar {
  border-right: 1px solid var(--line);
  background: #f7f9fa;
}

.conversation-cards {
  max-height: 620px;
  overflow-y: auto;
}

.conversation-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  width: 100%;
  min-height: 76px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--mist);
  border-radius: 0;
  padding: 12px;
  color: var(--charcoal);
  background: transparent;
  text-align: left;
}

.conversation-card:hover,
.conversation-card:focus-visible,
.conversation-card.active {
  background: var(--gold-soft);
}

.conversation-card.active {
  box-shadow: inset 4px 0 0 var(--gold);
}

.contact-avatar {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.conversation-card-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.conversation-card-copy span {
  overflow: hidden;
  color: #687b82;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-card time {
  color: #687b82;
  font-size: 11px;
  white-space: nowrap;
}

.conversation-card-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.conversation-hide {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #687b82;
  font-size: 18px;
  line-height: 1;
  opacity: 0;
}

.conversation-card:hover .conversation-hide,
.conversation-card:focus-visible .conversation-hide,
.conversation-hide:focus-visible {
  opacity: 1;
}

.conversation-hide:hover,
.conversation-hide:focus-visible {
  background: rgb(71 119 129 / 12%);
  color: var(--teal);
  outline: none;
}

.chat-window {
  display: grid;
  grid-template-rows: auto minmax(320px, 1fr) auto auto;
  min-width: 0;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}

.chat-header > div:last-child {
  display: grid;
  gap: 3px;
}

.chat-header span {
  color: #687b82;
  font-size: 13px;
}

.direct-messages {
  max-height: 500px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.typing-indicator {
  min-height: 22px;
  margin: 0;
  padding: 6px 20px 0;
  color: #687b82;
  background: var(--soft);
  font-size: 13px;
  font-weight: 800;
}

.typing-indicator[hidden] {
  display: block;
  visibility: hidden;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: var(--soft);
}

.chat-row {
  display: flex;
}

.chat-row.sent {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: min(72%, 560px);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--charcoal);
  background: var(--white);
  box-shadow: 0 1px 2px rgb(49 61 65 / 10%);
}

.chat-row.sent .chat-bubble {
  color: var(--white);
  background: var(--teal);
}

.chat-sender-label {
  display: block;
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--teal);
}

.chat-row.sent .chat-sender-label {
  color: inherit;
  opacity: 0.82;
  text-align: right;
}

.chat-bubble p {
  margin: 0 0 5px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.chat-bubble p a {
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.reply-quote {
  display: grid;
  gap: 2px;
  margin-bottom: 8px;
  border-left: 3px solid rgb(255 255 255 / 60%);
  padding-left: 8px;
  opacity: 0.84;
}

.received .reply-quote {
  border-left-color: var(--teal);
}

.reply-quote strong,
.reply-quote span {
  font-size: 12px;
  line-height: 1.25;
}

.reply-quote span {
  display: -webkit-box;
  overflow: hidden;
  text-align: left;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chat-attachments {
  display: grid;
  gap: 6px;
  margin: 6px 0;
}

.chat-attachment {
  display: block;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--teal);
  background: var(--soft);
  font-weight: 800;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-row.sent .chat-attachment {
  border-color: rgb(255 255 255 / 42%);
  color: var(--white);
  background: rgb(255 255 255 / 14%);
}

.chat-bubble span {
  display: block;
  color: inherit;
  font-size: 11px;
  opacity: 0.72;
  text-align: right;
}

.reply-message-button {
  min-height: 24px;
  margin-top: 6px;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  opacity: 0.76;
}

.reply-message-button:hover,
.reply-message-button:focus-visible {
  opacity: 1;
  text-decoration: underline;
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 12px;
}

.reply-preview {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  padding: 8px 10px;
  color: #526c74;
  background: var(--soft);
}

.reply-preview[hidden] {
  display: none;
}

.reply-preview span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-preview button {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  color: var(--charcoal);
  background: var(--white);
}

.chat-composer textarea {
  min-height: 46px;
  max-height: 130px;
  resize: vertical;
}

.chat-file-control {
  display: inline-flex;
  min-height: 46px;
  max-width: 220px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--teal);
  background: var(--white);
  font-weight: 800;
  cursor: pointer;
}

.chat-file-control span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-file-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.chat-file-control:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.55;
}

.chat-file-control.drag-over {
  border-color: var(--gold);
  background: var(--gold-soft);
  box-shadow: 0 0 0 3px rgb(221 164 75 / 18%);
}

.file-clear-button {
  min-height: 46px;
  border-color: #d8a4a0;
  color: #a94842;
  background: #fff6f5;
  font-size: 14px;
}

.file-clear-button[hidden] {
  display: none;
}

.chat-window.drag-over,
.team-chat-window.drag-over {
  border-color: var(--gold);
  background: #f7fbfc;
  box-shadow: 0 0 0 3px rgb(221 164 75 / 18%);
}

.chat-status {
  min-height: 22px;
  margin: 0;
  padding: 0 12px 8px;
  color: #687b82;
  font-size: 13px;
}

.empty-conversations,
.empty-chat {
  padding: 24px;
  color: #687b82;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.hero-panel {
  border-color: var(--teal);
  border-top: 5px solid var(--gold);
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  height: fit-content;
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--charcoal);
  background: var(--mist);
  font-size: 13px;
  font-weight: 700;
}

.pill.success {
  color: #174b34;
  background: #dcf0e7;
}

.pill.warning {
  color: #744900;
  background: #fff1d6;
}

.material-status {
  display: inline-flex;
  align-items: center;
  max-width: 120px;
  width: fit-content;
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  white-space: normal;
}

.materials-ready {
  color: var(--white);
  background: var(--teal);
}

.materials-none {
  border: 1px solid var(--line);
  color: #687b82;
  background: var(--mist);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  color: #687b82;
  font-size: 14px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.legend-dot.has-materials {
  background: var(--teal);
}

.legend-dot.no-materials {
  border: 1px solid var(--line);
  background: var(--mist);
}

.time-box,
.lesson-brief,
.note {
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  padding: 12px;
  background: var(--soft);
}

.time-box {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.time-box strong {
  font-size: 28px;
}

.lesson-brief {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

dt {
  color: #687b82;
  font-size: 13px;
  font-weight: 800;
}

dd {
  margin: 0;
}

.list,
.messages {
  display: grid;
  gap: 12px;
}

.messages {
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  align-content: start;
}

#parent-messages {
  max-height: min(46vh, 440px);
}

.card {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--white);
}

.card strong,
.card a,
.card span {
  overflow-wrap: anywhere;
}

.zoom-link {
  color: var(--teal);
  font-weight: 800;
}

.zoom-assignment {
  display: block;
  margin-top: 4px;
  color: #687b82;
  font-size: 13px;
}

.zoom-account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  gap: 1px;
  background: var(--line);
}

.zoom-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  background: var(--white);
}

.zoom-account-row div,
.zoom-account-row strong,
.zoom-account-row span {
  display: block;
  min-width: 0;
}

.zoom-account-row span {
  margin-top: 3px;
  color: #687b82;
  font-size: 13px;
}

.zoom-password-value {
  font-weight: 800;
  color: var(--charcoal);
}

.zoom-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.zoom-account-actions .zoom-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
}

.zoom-password-toggle {
  color: var(--teal);
}

.booking-card {
  cursor: pointer;
}

.booking-card:hover,
.directory-card:hover {
  border-color: var(--teal);
}

.directory-card {
  cursor: pointer;
}

.selected-card {
  border-color: var(--teal);
  box-shadow: inset 4px 0 0 var(--teal);
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.lesson-detail dd {
  overflow-wrap: anywhere;
}

.profile-form {
  display: grid;
  gap: 14px;
}

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

.profile-form textarea {
  resize: vertical;
}

.profile-form .actions {
  align-items: center;
}

.profile-form .note {
  margin: 0;
}

.profile-readout {
  display: grid;
  gap: 12px;
}

.profile-readout-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--white);
}

.profile-readout-card p {
  margin: 0;
  color: var(--charcoal);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.group-chat-form {
  display: grid;
  gap: 16px;
}

.group-chat-members {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.group-member-option {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--soft);
  font-weight: 700;
}

.group-member-option input {
  width: auto;
}

.group-member-option span {
  display: grid;
  gap: 2px;
}

.group-member-option small {
  color: #687b82;
  font-size: 13px;
  font-weight: 700;
}

.compose-modal {
  align-items: center;
  justify-content: center;
}

.compose-panel {
  width: min(640px, calc(100vw - 32px));
  height: auto;
  max-height: min(760px, calc(100vh - 48px));
  overflow-y: auto;
  border-radius: 8px;
}

.compose-selected-members {
  display: flex;
  min-height: 42px;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.compose-chip {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 8px 7px 12px;
  color: var(--white);
  background: var(--teal);
  font-weight: 800;
}

.compose-chip button {
  width: 26px;
  min-width: 26px;
  min-height: 26px;
  border-radius: 50%;
  padding: 0;
  color: var(--charcoal);
  background: var(--white);
}

.compose-user-results {
  display: grid;
  gap: 8px;
}

.compose-result {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  border: 1px solid var(--line);
  padding: 10px;
  color: var(--charcoal);
  background: var(--white);
  text-align: left;
}

.compose-result:hover,
.compose-result:focus-visible {
  border-color: var(--teal);
  background: var(--soft);
}

.compose-result span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.compose-result small {
  overflow: hidden;
  color: #687b82;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-list {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.compact-list .card {
  gap: 2px;
  padding: 10px 12px;
}

.portal-users-scroll {
  max-height: min(62vh, 720px);
}

.admin-user-search {
  margin-top: 14px;
}

.parent-invitations-scroll {
  max-height: min(46vh, 520px);
}

#parent-invitations {
  grid-template-columns: minmax(0, 1fr);
}

.parent-invitation-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.parent-invitation-details {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.parent-invitation-details span {
  color: #687b82;
  overflow-wrap: break-word;
}

.parent-invitation-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.invite-tutor-form {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(220px, 1fr) minmax(210px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin: 18px 0;
}

.invite-tutor-form label {
  margin: 0;
  color: #687b82;
  font-size: 13px;
}

.portal-user-card {
  gap: 12px;
}

.portal-user-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(130px, 0.7fr) minmax(200px, 1fr);
  gap: 10px;
}

.portal-user-controls label {
  margin: 0;
  color: #687b82;
  font-size: 13px;
}

.portal-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-user-actions button {
  min-height: 38px;
}

.portal-user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: #687b82;
  font-size: 13px;
}

.pill.inactive {
  color: #7a2e2e;
  background: #f4dddd;
}

.card-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.muted,
.card span {
  color: #687b82;
}

.message {
  width: min(88%, 560px);
  border-radius: 8px;
  padding: 12px;
  background: var(--soft);
}

.message.parent {
  margin-left: auto;
  color: var(--white);
  background: var(--teal);
}

.message.parent span,
.message.parent p {
  color: #f2fbfd;
}

.message p {
  margin: 4px 0;
}

.metric strong {
  display: block;
  font-size: 36px;
}

.drawer {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: flex-end;
  background: rgba(49, 61, 65, 0.42);
}

.drawer.open {
  display: flex;
}

.drawer-panel {
  position: relative;
  width: min(540px, 100%);
  height: 100%;
  overflow: auto;
  padding: 28px;
  background: var(--white);
  box-shadow: 0 18px 45px rgba(49, 61, 65, 0.18);
}

.close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  padding: 0;
  color: var(--charcoal);
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 26px;
}

label {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  font-weight: 700;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.drop {
  min-height: 170px;
  place-items: center;
  border: 2px dashed #9fb0b6;
  border-radius: 8px;
  background: var(--soft);
  text-align: center;
  cursor: pointer;
}

.drop.drag-over {
  border-color: var(--gold);
  background: var(--gold-soft);
  box-shadow: 0 0 0 3px rgb(221 164 75 / 18%);
}

.drop input {
  width: 1px;
  height: 1px;
  opacity: 0;
}

pre {
  overflow: auto;
  border-radius: 8px;
  padding: 14px;
  background: var(--soft);
}

@media (max-width: 860px) {
  body {
    display: block;
    min-height: 100vh;
    padding-top: env(safe-area-inset-top);
  }

  .mobile-nav-toggle {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 10px);
    left: 12px;
    z-index: 40;
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0;
    color: var(--charcoal);
    background: var(--white);
    box-shadow: 0 8px 24px rgb(49 61 65 / 16%);
  }

  .mobile-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: var(--charcoal);
  }

  .mobile-nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgb(49 61 65 / 34%);
  }

  body.nav-open .mobile-nav-scrim {
    display: block;
  }

  body.nav-open main {
    visibility: hidden;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 35;
    width: min(84vw, 320px);
    gap: 18px;
    overflow-y: auto;
    padding: calc(env(safe-area-inset-top) + 18px) 18px 18px;
    box-shadow: 12px 0 30px rgb(49 61 65 / 22%);
    transform: translateX(calc(-100% - 8px));
    transition: transform 180ms ease;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
    visibility: visible;
  }

  .sidebar .brand .mark,
  .sidebar-logo {
    width: 36px;
    height: 36px;
  }

  .sidebar .brand span {
    display: block;
  }

  .sidebar nav {
    grid-template-columns: 1fr;
  }

  .sidebar section:not(.account-panel) {
    display: none;
  }

  header,
  .grid.two,
  .family-switcher,
  .tutor-dashboard-grid,
  .detail-grid,
  .employment-grid,
  .employment-admin-tools,
  .portal-user-controls,
  .invite-tutor-form,
  .parent-invitation-card {
    grid-template-columns: 1fr;
  }

  header {
    display: grid;
  }

  main {
    padding: calc(env(safe-area-inset-top) + 76px) 14px 22px;
  }

  main > header {
    position: relative;
    padding-top: 0;
  }

  .portal-header-actions {
    position: static;
    justify-self: stretch;
  }

  .portal-header-actions > .pill {
    display: none;
  }

  .account-panel {
    width: 100%;
    min-width: 0;
  }

  h1 {
    font-size: clamp(32px, 10vw, 44px);
    line-height: 1.05;
  }

  .auth-screen {
    place-items: start center;
    padding: 28px 14px;
    border-top-width: 8px;
  }

  .auth-panel {
    padding: 28px 22px;
  }

  .auth-brand {
    margin-bottom: 30px;
  }

  .auth-wordmark {
    font-size: 23px;
  }

  .auth-panel h1 {
    font-size: 38px;
  }

  .auth-logo {
    width: min(230px, 74%);
  }

  .practice-grid {
    grid-template-columns: 1fr;
  }

  .messenger-layout {
    display: block;
    min-height: calc(100vh - 230px);
  }

  .conversation-sidebar {
    border-right: 0;
    border-bottom: 0;
  }

  .conversation-cards {
    max-height: none;
  }

  .chat-window {
    display: none;
    min-height: calc(100vh - 230px);
  }

  .messenger-layout.conversation-open .conversation-sidebar {
    display: none;
  }

  .messenger-layout.conversation-open .chat-window {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
  }

  .chat-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .chat-back-button {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    margin-right: 100%;
    border: 1px solid var(--line);
    color: var(--teal);
    background: var(--white);
    font-size: 14px;
  }

  .direct-messages {
    max-height: none;
  }

  .chat-composer {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .chat-composer textarea {
    grid-column: 1 / -1;
  }

  .chat-file-control {
    max-width: none;
  }

  .scroll-list {
    max-height: 60vh;
  }

  .imported-bookings-scroll {
    max-height: 300px;
  }

  .compact-tutor-bookings,
  .compact-tutor-materials {
    height: auto;
    max-height: 60vh;
  }

  .tutor-lesson-actions {
    grid-template-columns: 1fr;
  }

  .peace-summary,
  .peace-lesson {
    grid-template-columns: 1fr;
  }

  .peace-status {
    justify-items: start;
    text-align: left;
  }
}

.linked-user-form {
  margin-bottom: 10px;
}

.linked-user-note {
  margin: 0 0 22px;
}

/* Portal v1.1: booking-card action polish */
.hero-actions {
  align-items: stretch;
}

.hero-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.hero-action:hover,
.hero-action:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgb(49 61 65 / 14%);
}

.hero-action-message {
  border: 1px solid var(--teal) !important;
  color: var(--teal) !important;
  background: var(--white) !important;
}

.hero-action-message:hover,
.hero-action-message:focus-visible {
  background: var(--soft);
}

.hero-action-upload {
  border: 1px solid #d88a20 !important;
  color: var(--white) !important;
  background: #f28c28 !important;
}

.hero-action-upload:hover,
.hero-action-upload:focus-visible {
  background: #dc7a16;
}

.hero-action-schedule {
  border: 1px solid var(--teal) !important;
  color: var(--white) !important;
  background: var(--teal) !important;
  white-space: nowrap;
}

.hero-action-schedule:hover,
.hero-action-schedule:focus-visible {
  background: #385b65;
}

.pill.recent {
  color: #52656c;
  background: #e3eaed;
}

@media (max-width: 560px) {
  .hero-panel {
    padding: 17px;
  }

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

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-action {
    width: 100%;
  }
}
