/* Appointments */
.appointments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.appointments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.student-appointments-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.student-appointments-grid .appointment-card {
  background-color: var(--c-surface, #fff);
  border-radius: 12px;
  border: 1px solid var(--c-border, #d1d5db);
  padding: 1.25rem;
  box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.student-appointments-grid .appointment-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.student-appointments-grid .appointment-card__time {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-weight: 600;
  color: var(--c-text, #111827);
}

.student-appointments-grid .appointment-card__time span:last-child {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-muted, #6b7280);
}

.student-appointments-grid .appointment-card__status {
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1f2937;
  background: #e0f2fe;
}

.student-appointments-grid button.appointment-card__status {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  font-family: inherit;
}

.student-appointments-grid .appointment-card__status--toggle {
  cursor: pointer;
}

.student-appointments-grid .appointment-card__status--toggle:hover {
  filter: brightness(0.97);
}

.student-appointments-grid .appointment-card__status--toggle.is-busy {
  cursor: progress;
  opacity: 0.75;
}

.required-asterisk {
  color: #dc2626;
  font-weight: 700;
  margin-right: 4px;
}

label strong + .required-asterisk {
  margin-left: 4px;
  margin-right: 0;
}

.student-appointments-grid .appointment-card__status[data-status="completed"] {
  color: #1e3a8a;
  background: #bfdbfe;
}

.student-appointments-grid .appointment-card__status[data-status="cancelled"] {
  color: #991b1b;
  background: #fee2e2;
}

.student-appointments-grid .appointment-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: baseline;
  font-size: 0.8rem;
  color: var(--c-muted, #6b7280);
}

.student-appointments-grid .appointment-card__meta-label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  font-size: 0.7rem;
  color: var(--c-muted, #6b7280);
}

.student-appointments-grid .appointment-card__meta-value {
  color: var(--c-text, #111827);
  font-weight: 500;
}

.student-appointments-grid .appointment-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.student-appointments-grid .appointment-card__lesson {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-muted, #6b7280);
}

.student-appointments-grid .appointment-card__details {
  display: grid;
  gap: 0.65rem 1rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  font-size: 0.9rem;
}

.student-appointments-grid .appointment-card__details-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.student-appointments-grid .appointment-card__details-item dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-muted, #6b7280);
  margin: 0;
}

.student-appointments-grid .appointment-card__details-item dd {
  margin: 0;
  color: var(--c-text, #111827);
}

.student-appointments-grid .appointment-card__details-item dd a {
  color: var(--c-primary, #4f46e5);
  font-weight: 600;
  text-decoration: none;
}

.student-appointments-grid .appointment-card__notes {
  display: grid;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.student-appointments-grid .appointment-card__note {
  background: rgba(37, 99, 235, 0.06);
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.student-appointments-grid .appointment-card__note--secondary {
  background: rgba(107, 114, 128, 0.08);
}

.student-appointments-grid .appointment-card__note-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-muted, #6b7280);
}

.student-appointments-grid .appointment-card__note-value {
  color: var(--c-text, #111827);
  line-height: 1.45;
}

.student-appointments-grid .appointment-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.student-appointments-grid .appointment-card__actions .btn {
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
}

.appointments-empty {
  margin: 0;
  padding: 1rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--c-muted, #6b7280);
  background: rgba(107, 114, 128, 0.08);
  border-radius: 8px;
}

/* Messaging editor */
.compose-editor {
  border: 1px solid var(--c-border, #d1d5db);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.compose-editor-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  border-bottom: 1px solid var(--c-border, #d1d5db);
  background: var(--c-surface, #f8fafc);
}

.compose-editor-tabs .subtab-btn {
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
}

.compose-editor-tabs .subtab-btn.active {
  background: var(--c-primary, #4f46e5);
}

.compose-editor-panel {
  padding: 0.75rem;
}

.compose-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.compose-toolbar .compose-toolbar-btn {
  background: #e5e7eb;
  border: 1px solid #d1d5db;
  color: #111827;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
}

.compose-toolbar .compose-toolbar-btn:hover {
  background: #d1d5db;
}

.compose-editor-area {
  min-height: 200px;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--c-border, #d1d5db);
  border-radius: 8px;
  background: #fff;
  outline: none;
  line-height: 1.6;
}

.compose-editor-area:empty:before {
  content: attr(data-placeholder);
  color: #9ca3af;
}

.compose-code {
  width: 100%;
  min-height: 200px;
  resize: vertical;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--c-border, #d1d5db);
  border-radius: 8px;
  font-family: "Courier New", Courier, monospace;
}

/* Gmail-inspired compose layout */
.gmail-compose {
  border: 1px solid #dadce0;
  box-shadow: 0 10px 30px rgba(60, 64, 67, 0.2);
}

.gmail-compose__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #f1f3f4;
  border-bottom: 1px solid #e3e6e8;
}

.gmail-compose__body {
  display: flex;
  flex-direction: column;
  max-height: 70vh;
  overflow-y: auto;
}

.gmail-compose__row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #edf0f2;
}

.gmail-compose__row--editor {
  padding: 0.75rem 1rem 1rem;
}

.gmail-compose__label {
  width: 56px;
  font-size: 0.8rem;
  color: #5f6368;
  padding-top: 0.4rem;
}

.gmail-compose__input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  background: transparent;
}

.gmail-chip-input {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  min-height: 36px;
  border-bottom: 1px solid transparent;
}

.gmail-chip-input input {
  border: none;
  outline: none;
  font-size: 0.95rem;
  flex: 1 1 160px;
  min-width: 140px;
  padding: 0.25rem 0;
  background: transparent;
}

.gmail-chip-input:focus-within {
  border-bottom-color: #1a73e8;
}

.gmail-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #e8f0fe;
  color: #1967d2;
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
}

.gmail-chip button {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.gmail-ccbcc {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.gmail-ccbcc__btn {
  border: none;
  background: transparent;
  color: #5f6368;
  cursor: pointer;
  font-size: 0.8rem;
}

.gmail-compose__attachments {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #edf0f2;
  min-height: 0;
}

.gmail-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gmail-attachment-list a {
  color: #1a73e8;
  text-decoration: none;
}

.gmail-attachment-list a:hover {
  text-decoration: underline;
}

.gmail-attachment-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid #dadce0;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  color: #3c4043;
  background: #f8f9fa;
}

.gmail-attachment-pill .gmail-icon-btn {
  font-size: 0.9rem;
  padding: 0;
}

.message-attachment {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #dadce0;
  font-size: 0.7rem;
  color: #5f6368;
  background: #f8f9fa;
}

.gmail-compose__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  gap: 0.75rem;
  background: #fafbfc;
  position: sticky;
  bottom: 0;
  z-index: 2;
  border-top: 1px solid #edf0f2;
}

.gmail-actions-left,
.gmail-actions-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.gmail-icon-btn {
  border: none;
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
  color: #5f6368;
  line-height: 1;
  padding: 0.2rem 0.35rem;
}

.gmail-send-btn {
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
}

.gmail-attachment-hint {
  font-size: 0.75rem;
  color: #5f6368;
}

.gmail-menu {
  position: relative;
}

.gmail-menu__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(60, 64, 67, 0.2);
  padding: 0.75rem;
  min-width: 220px;
  z-index: 3;
}

.gmail-menu__panel label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #3c4043;
}

.gmail-menu__panel select {
  padding: 0.4rem 0.5rem;
  border: 1px solid #dadce0;
  border-radius: 6px;
}

@media (max-width: 640px) {
  .gmail-compose__row {
    flex-direction: column;
    align-items: stretch;
  }

  .gmail-compose__label {
    width: auto;
    padding-top: 0;
  }

  .gmail-ccbcc {
    justify-content: flex-end;
  }

  .gmail-compose__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .gmail-actions-left,
  .gmail-actions-right {
    justify-content: space-between;
  }
}

.appointment-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.appt-date-time {
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
}

.appt-type {
  background: var(--c-surface);
  font-family: "courier";
  font-weight: 700;
  margin-right: 4px;
  color: var(--c-gray);
  border: var(--c-gray) solid 1px;
  font-size: 0.9rem;
  display: inline-block;
}

.appointment-details p {
  margin: 0.25rem 0;
  font-size: 0.95rem;
}

.appointment-notes {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #555;
  border-top: 1px dashed #ccc;
  padding-top: 0.5rem;
}

.appt-placeholder {
  text-align: center;
  color: #888;
  margin-top: 1rem;
  font-style: italic;
}
/* Appointment Card */
.appointment-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  background: #fafafa;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.appointment-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.appt-date-time {
  font-size: 1rem;
  color: #333;
}
.appt-day {
  font-size: 0.9rem;
  font-weight: 400;
  color: #666;
  margin-bottom: 0.2rem;
}

.appt-type-wrap {
  text-align: right;
}

.appt-status {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  font-weight: bold;
}

/* Status colors */
.appt-status.confirmed {
  color: #28a745;
} /* green */
.appt-status.completed {
  color: #007bff;
} /* blue */
.appt-status.cancelled {
  color: #dc3545;
} /* red */
.appt-status.noshow {
  color: #b02a37;
} /* darker red */
.appt-status.scheduled,
.appt-status.open {
  color: #f59e0b;
}
.appointment-notes {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #555;
  border-top: 1px dashed #ccc;
  padding-top: 0.5rem;
}

.appt-actions {
  margin-top: 0.75rem;
  text-align: right;
}
.appt-actions .btn {
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
}

.appointments-page .appointments-section {
  margin-bottom: 2rem;
}

.appointments-page .appointments-wrapper {
  padding: 1.25rem 1.5rem;
}

.appointments-page .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.appointments-page .section-header h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
}
.billing-section {
  padding: 1rem;
}

.billing-section h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #eee;
}

.table-striped tbody tr:nth-child(odd) {
  background: #fafafa;
}

.form-grid label {
  display: block;
  margin-bottom: 1rem;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 0.25rem;
}

.parent-account-value {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 0.25rem;
  background: #f9fafb;
}

.parent-account-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.parent-account-link:hover {
  text-decoration: underline;
}

.hidden {
  display: none;
}
/* Two-column grid */
.grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr; /* 2/3 + 1/3 split */
  gap: 1.5rem;
}

/* Waitlist page layout */

.form-status[data-state="error"] {
  color: #b91c1c;
}
.form-status[data-state="success"] {
  color: #047857;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.badge--inactive {
  background: #f3f4f6;
  color: #4b5563;
  border-color: #e5e7eb;
}
.badge--active {
  background: #dcfce7;
  color: #047857;
  border-color: #bbf7d0;
}

.billing-section--single {
  grid-template-columns: 1fr;
}

@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr; /* collapse on smaller screens */
  }
}

/* Small buttons for actions */
.btn-sm {
  background: #e5e7eb;
  color: #111;
  padding: 0.3rem 0.6rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  margin-right: 0.25rem;
}
.btn-sm:hover {
  background: #d1d5db;
}

.full-width {
  width: 100%;
}

/* Profile layout tweaks */
.profile-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.profile-photo-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.profile-balance-due {
  color: #dc2626;
  font-size: 0.85rem;
  margin: 0;
  text-align: center;
}

.form-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: center;
  margin-top: 0.75rem;
}

@media (max-width: 640px) {
  .form-actions .btn {
    flex: 1;
  }
}

/* Notes (chat style) */
.notes-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}
.note-row {
  display: flex;
}
.note-bubble {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  max-width: 760px;
  width: fit-content;
}
.note-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}
.note-meta .note-author { font-weight: 600; color: #374151; }
.note-text { white-space: pre-wrap; line-height: 1.35; }
.note-delete {
  margin-left: auto;
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.note-delete:hover { background: #e5e7eb; color: #374151; }

.note-input {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  border-top: 1px solid #eee;
  padding-top: 0.5rem;
}
.note-input textarea {
  flex: 1;
  min-height: 48px;
  max-height: 140px;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}
.appointments-page .appointments-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
