@font-face {
  font-family: "Adam Bold";
  src: url("/assets/fonts/Adam-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Adam";
  src: url("/assets/fonts/Adam-Bold.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

.legacy-brand-text {
  font-family: "Adam Bold", "Adam", sans-serif !important;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.04em;
}

input[type="date"][data-legacy-datepicker="on"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.legacy-portal-datepicker {
  position: relative;
  width: 100%;
  min-width: 0;
  z-index: 1;
}

.legacy-portal-datepicker.is-open {
  z-index: 80;
}

.legacy-portal-datepicker-trigger {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid rgb(0 0 0 / 0.1);
  border-radius: 1rem;
  background: #fff;
  color: #101010;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.legacy-portal-datepicker-trigger:hover:not(:disabled) {
  border-color: rgb(0 0 0 / 0.2);
}

.legacy-portal-datepicker.is-open .legacy-portal-datepicker-trigger {
  border-color: #ff0080;
  background: #fff;
  box-shadow: 0 0 0 2px rgb(255 0 128 / 0.3);
}

.legacy-portal-datepicker-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.legacy-portal-datepicker-trigger.is-placeholder {
  color: rgb(0 0 0 / 0.4);
  font-weight: 600;
}

.legacy-portal-datepicker-pop {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 400;
  width: 18rem;
  max-width: calc(100vw - 2rem);
  border: 1px solid rgb(0 0 0 / 0.1);
  border-radius: 1rem;
  background: #fff;
  padding: 0.9rem 1rem 0.85rem;
  box-shadow: 0 18px 50px rgb(16 16 16 / 0.16);
}

.legacy-portal-datepicker-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.legacy-portal-datepicker-month {
  margin: 0;
  color: #101010;
  font-size: 0.875rem;
  font-weight: 800;
}

.legacy-portal-datepicker-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: rgb(0 0 0 / 0.4);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.legacy-portal-datepicker-nav-btn:hover {
  background: rgb(0 0 0 / 0.06);
  color: #101010;
}

.legacy-portal-datepicker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 0.15rem;
}

.legacy-portal-datepicker-weekdays span {
  padding: 0.25rem 0;
  color: rgb(0 0 0 / 0.4);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.legacy-portal-datepicker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.legacy-portal-datepicker-empty {
  aspect-ratio: 1;
}

.legacy-portal-datepicker-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: #101010;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.legacy-portal-datepicker-day:hover:not(:disabled):not(.is-selected) {
  background: rgb(0 0 0 / 0.06);
}

.legacy-portal-datepicker-day.is-selected {
  background: linear-gradient(135deg, #eb008b 0%, #c4006f 100%);
  color: #fff;
  font-weight: 700;
}

.legacy-portal-datepicker-day:disabled,
.legacy-portal-datepicker-day.is-disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.legacy-adapter-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  color: rgb(0 0 0 / 0.55);
  font-size: 0.875rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 160ms ease, color 160ms ease;
}

.legacy-adapter-nav-link:hover,
.legacy-adapter-nav-link[aria-current="page"] {
  background: #ff0080;
  color: white;
}

.legacy-adapter-nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.legacy-adapter-card {
  margin-top: 1.5rem;
  border: 1px solid rgb(0 0 0 / 0.1);
  border-radius: 2rem;
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 18px 60px rgb(16 16 16 / 0.06);
}

main[data-legacy-security-active="true"] > :not([data-legacy-security-page]) {
  display: none !important;
}

.legacy-adapter-kicker {
  color: #ff0080;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.legacy-adapter-title {
  margin-top: 0.5rem;
  font-family: "Adam", "Epilogue", system-ui, sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.legacy-adapter-copy {
  margin-top: 0.75rem;
  max-width: 52rem;
  color: rgb(0 0 0 / 0.55);
  font-size: 0.9rem;
  line-height: 1.55;
}

.legacy-adapter-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.legacy-adapter-grant {
  grid-template-columns: minmax(0, 1fr) minmax(150px, 190px) auto;
  align-items: end;
  border: 1px solid rgb(0 0 0 / 0.1);
  border-radius: 1.5rem;
  background: rgb(0 0 0 / 0.025);
  padding: 1rem;
}

.legacy-adapter-field {
  display: grid;
  gap: 0.4rem;
  color: rgb(0 0 0 / 0.45);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legacy-adapter-field select,
.legacy-adapter-field input {
  min-height: 44px;
  border: 1px solid rgb(0 0 0 / 0.15);
  border-radius: 1rem;
  background: white;
  padding: 0.65rem 0.8rem;
  color: #101010;
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.legacy-adapter-button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: #101010;
  padding: 0.75rem 1.2rem;
  color: white;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.legacy-adapter-button:hover { background: #ff0080; }
.legacy-adapter-button:disabled { cursor: wait; opacity: 0.45; }
.legacy-adapter-button.secondary { border: 1px solid rgb(0 0 0 / 0.15); background: white; color: #101010; }
.legacy-adapter-button.danger { border: 1px solid #fecaca; background: white; color: #dc2626; }

.legacy-adapter-member {
  margin-top: 1rem;
  border: 1px solid rgb(0 0 0 / 0.1);
  border-radius: 1.5rem;
  padding: 1rem;
}

.legacy-adapter-member-head,
.legacy-adapter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.legacy-adapter-member-name { font-weight: 900; text-transform: uppercase; }
.legacy-adapter-member-email { margin-top: 0.25rem; color: rgb(0 0 0 / 0.45); font-size: 0.82rem; }
.legacy-adapter-permissions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.legacy-adapter-check { display: flex; align-items: center; gap: 0.55rem; border: 1px solid rgb(0 0 0 / 0.1); border-radius: 1rem; padding: 0.65rem 0.75rem; font-size: 0.8rem; font-weight: 700; }
.legacy-adapter-actions { justify-content: flex-end; margin-top: 1rem; }
.legacy-adapter-message { margin-top: 1rem; border-radius: 1rem; background: #ecfeff; padding: 0.8rem 1rem; color: #155e75; font-size: 0.85rem; font-weight: 700; }
.legacy-adapter-error { background: #fff1f2; color: #9f1239; }

.legacy-mfa-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 0.72);
  padding: 1.25rem;
  backdrop-filter: blur(10px);
}

.legacy-mfa-dialog { width: min(100%, 520px); border-radius: 2rem; background: white; padding: 2rem; box-shadow: 0 30px 100px rgb(0 0 0 / 0.35); }
.legacy-mfa-code { margin-top: 1.25rem; width: 100%; min-height: 56px; border: 2px solid rgb(0 0 0 / 0.15); border-radius: 1rem; padding: 0.75rem; text-align: center; font-size: 1.6rem; font-weight: 900; letter-spacing: 0.3em; }
.legacy-mfa-qr { display: block; width: min(260px, 80%); margin: 1.25rem auto; }

.legacy-teacher-profile-blur {
  position: absolute;
  top: -45%;
  left: -25%;
  width: 150%;
  height: 190%;
  filter: blur(42px);
  transform: scale(1.18);
}

.legacy-teacher-profile-blur img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.legacy-teacher-profile-wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #fff7fb 0%, rgba(255, 247, 251, 0.86) 42%, rgba(255, 247, 251, 0.5) 100%);
}

.legacy-teacher-profile-thumb {
  box-shadow: 0 10px 28px rgba(16, 16, 16, 0.22);
  outline: 2px solid rgba(255, 255, 255, 0.92);
}

.legacy-week-hours {
  display: grid;
  gap: 0.55rem;
}

.legacy-week-hours-legend {
  margin-bottom: 0.35rem;
  color: rgb(0 0 0 / 0.45);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.legacy-week-hours-day {
  display: grid;
  grid-template-columns: 6.5rem minmax(10.5rem, 0.9fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  border: 1px solid rgb(0 0 0 / 0.1);
  border-radius: 1.15rem;
  background: #fff;
  padding: 0.7rem 0.8rem;
}

.legacy-week-hours-name {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legacy-week-hours-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.legacy-week-hours-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgb(0 0 0 / 0.12);
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  color: rgb(0 0 0 / 0.55);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.legacy-week-hours-choice:has(input:checked) {
  border-color: #ff0080;
  background: #fff7fb;
  color: #101010;
}

.legacy-week-hours-choice input {
  accent-color: #ff0080;
}

.legacy-week-hours-time {
  display: grid;
  gap: 0.2rem;
  color: rgb(0 0 0 / 0.4);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legacy-week-hours-time input {
  min-height: 52px;
  border: 1px solid rgb(0 0 0 / 0.1);
  border-radius: 0.9rem;
  background: rgb(0 0 0 / 0.03);
  padding: 0.45rem 0.75rem;
  color: #101010;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: none;
}

.legacy-week-hours-time input::-webkit-datetime-edit,
.legacy-week-hours-time input::-webkit-datetime-edit-fields-wrapper,
.legacy-week-hours-time input::-webkit-datetime-edit-hour-field,
.legacy-week-hours-time input::-webkit-datetime-edit-minute-field,
.legacy-week-hours-time input::-webkit-datetime-edit-ampm-field {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.legacy-week-hours-day:has(input[value="out"]:checked) .legacy-week-hours-time {
  opacity: 0.38;
  pointer-events: none;
}

.legacy-slot-days {
  display: grid;
  gap: 0.5rem;
}

.legacy-slot-day {
  border: 1px solid rgb(0 0 0 / 0.08);
  border-radius: 1.25rem;
  background: #f4f4f4;
  overflow: hidden;
}

.legacy-slot-day-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 1rem;
  user-select: none;
}

.legacy-slot-day-summary::-webkit-details-marker,
.legacy-slot-day-summary::marker {
  display: none;
  content: '';
}

.legacy-slot-day-summary::after {
  content: '';
  width: 0.42rem;
  height: 0.42rem;
  margin-left: 0.15rem;
  border-right: 2px solid rgb(0 0 0 / 0.35);
  border-bottom: 2px solid rgb(0 0 0 / 0.35);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.legacy-slot-day[open] .legacy-slot-day-summary::after {
  transform: rotate(-135deg);
}

.legacy-slot-day-name {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legacy-slot-day-meta {
  margin-left: auto;
  color: rgb(0 0 0 / 0.48);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.legacy-slot-day-list {
  display: grid;
  gap: 0.4rem;
  padding: 0 0.65rem 0.7rem;
}

.legacy-calendar-block-applies {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.legacy-calendar-block-legend {
  display: block;
  float: none;
  width: 100%;
  padding: 0;
  color: rgb(0 0 0 / 0.45);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.legacy-calendar-block-hint {
  margin: 0.5rem 0 0.75rem;
  color: rgb(0 0 0 / 0.55);
  font-size: 0.875rem;
  line-height: 1.5;
}

.legacy-calendar-block-select {
  position: relative;
}

.legacy-calendar-block-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 49px;
  border: 1px solid rgb(0 0 0 / 0.1);
  border-radius: 1rem;
  background: rgb(0 0 0 / 0.03);
  padding: 0.75rem 1rem;
  color: #101010;
  text-align: left;
  font-size: 0.875rem;
  cursor: pointer;
}

.legacy-calendar-block-select-button::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.75rem;
  border-right: 2px solid rgb(0 0 0 / 0.35);
  border-bottom: 2px solid rgb(0 0 0 / 0.35);
  transform: rotate(45deg) translateY(-0.12rem);
  flex: none;
}

.legacy-calendar-block-select-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legacy-calendar-block-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.35rem);
  right: 0;
  left: 0;
  max-height: 16rem;
  overflow: auto;
  border: 1px solid rgb(0 0 0 / 0.1);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 18px 60px rgb(16 16 16 / 0.12);
  padding: 0.4rem;
}

.legacy-calendar-block-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
  color: rgb(0 0 0 / 0.78);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.legacy-calendar-block-option:hover,
.legacy-calendar-block-option:has(input:checked) {
  background: #fff7fb;
  color: #101010;
}

.legacy-calendar-block-option input {
  accent-color: #ff0080;
}

@media (max-width: 760px) {
  .legacy-adapter-grant,
  .legacy-adapter-permissions { grid-template-columns: 1fr; }
  .legacy-adapter-card { padding: 1.1rem; }
  .legacy-week-hours-day {
    grid-template-columns: 1fr 1fr;
  }
  .legacy-week-hours-name,
  .legacy-week-hours-modes {
    grid-column: 1 / -1;
  }
}

/* LEGACY_TEACHER_PROFILE_PAGE: teacher self-service profile + availability */
.ltp-page { display: grid; gap: 24px; max-width: 980px; }
.ltp-page > header { margin-bottom: 0; }
.ltp-card { background: #fff; border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 32px; padding: 24px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.05); display: grid; gap: 18px; scroll-margin-top: 24px; }
.ltp-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ltp-eyebrow { font-size: 12px; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase; color: #ff0080; margin: 0; }
.ltp-title { margin: 6px 0 0; font-size: 28px; line-height: 1; font-weight: 900; letter-spacing: -0.04em; text-transform: uppercase; }
.ltp-badge { border-radius: 999px; padding: 6px 12px; font-size: 11px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.ltp-badge-live { background: #dcfce7; color: #166534; }
.ltp-badge-hidden { background: #fff0f8; color: #c90065; }
.ltp-hint { margin: 0; font-size: 13px; line-height: 1.5; color: rgba(0, 0, 0, 0.55); }
.ltp-hint-box { background: rgba(0, 0, 0, 0.035); border-radius: 18px; padding: 12px 16px; color: rgba(0, 0, 0, 0.7); }
.ltp-photo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.ltp-photo { width: 112px; height: 112px; border-radius: 28px; object-fit: cover; background: #fff0f8; flex: none; }
.ltp-photo-empty { display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 900; color: #c90065; }
.ltp-photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: 1 1 240px; }
.ltp-photo-actions .ltp-hint { flex-basis: 100%; }
.ltp-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ltp-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ltp-span { grid-column: 1 / -1; }
.ltp-field { display: grid; gap: 6px; min-width: 0; }
.ltp-label { font-size: 12px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.ltp-input { box-sizing: border-box; font: inherit; width: 100%; min-width: 0; border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 16px; background: #fff; padding: 12px 16px; font-size: 14px; color: #111; }
.ltp-input:focus { outline: none; border-color: #ff0080; box-shadow: 0 0 0 3px rgba(255, 0, 128, 0.12); }
.ltp-textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
.ltp-count { justify-self: end; font-size: 11px; color: rgba(0, 0, 0, 0.4); }
.ltp-static { margin: 0; font-size: 14px; color: rgba(0, 0, 0, 0.65); }
.ltp-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.ltp-button { border: 0; border-radius: 999px; background: #000; color: #fff; padding: 12px 22px; font-size: 12px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }
.ltp-button:disabled { opacity: 0.5; cursor: wait; }
.ltp-button-ghost { background: #fff; color: #111; border: 1px solid rgba(0, 0, 0, 0.15); }
.ltp-button-ghost:hover:not(:disabled) { border-color: #000; }
.ltp-notice { margin: 0; border-radius: 18px; padding: 12px 16px; font-size: 14px; font-weight: 700; }
.ltp-notice-error { background: #fef2f2; color: #991b1b; }
.ltp-notice-success { background: #ecfdf5; color: #065f46; }
.ltp-branch { min-width: 200px; }
.ltp-days { display: grid; gap: 8px; }
.ltp-day { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: start; border-top: 1px solid rgba(0, 0, 0, 0.06); padding-top: 10px; }
.ltp-day-name { margin: 10px 0 0; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }
.ltp-day-ranges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ltp-range { display: flex; align-items: center; gap: 6px; background: rgba(0, 0, 0, 0.035); border-radius: 18px; padding: 4px 6px 4px 4px; }
.ltp-time { width: 116px; padding: 8px 10px; border-radius: 12px; }
.ltp-to { font-size: 12px; color: rgba(0, 0, 0, 0.5); }
.ltp-icon-button { border: 0; background: transparent; font-size: 20px; line-height: 1; width: 28px; height: 28px; border-radius: 999px; cursor: pointer; color: rgba(0, 0, 0, 0.55); }
.ltp-icon-button:hover { background: rgba(0, 0, 0, 0.08); color: #000; }
.ltp-off { font-size: 13px; color: rgba(0, 0, 0, 0.4); padding: 8px 0; }
.ltp-link-button { border: 0; background: transparent; color: #c90065; font-size: 12px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; padding: 8px 4px; }
@media (max-width: 640px) {
  .ltp-card { padding: 18px; border-radius: 24px; }
  .ltp-grid { grid-template-columns: minmax(0, 1fr); }
  .ltp-day { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ltp-day-name { margin-top: 0; }
  .ltp-time { width: 104px; }
}
