/* ---------- Foundations ---------- */
/* Palette and type taken from the Metro Music flyer: navy serif headline,
   amber accents, warm cream paper, condensed caps and italic serif taglines. */
:root {
  --navy: #14213a;
  --navy-deep: #0d1628;
  --amber: #f0a92e;
  --amber-dark: #c9860f;
  --amber-light: #f8d58f;
  --cream: #fbf6ee;
  --cream-dark: #f5e8cf;
  --brown: #6b3b16;
  --ink: #1f2838;
  --ink-soft: #5a6070;
  --white: #ffffff;
  --line: #ecdcc0;
  --good: #2f8f4e;
  --bad: #c0503a;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(20, 33, 58, 0.12);
  --shadow-sm: 0 2px 10px rgba(20, 33, 58, 0.08);
  --font-serif: "Cinzel", Georgia, serif;
  --font-display: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  --font-script: "Cormorant Garamond", Georgia, serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0 0 0.5rem;
}
h2 {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

p { margin: 0 0 0.75rem; }

a { color: var(--brown); }

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.script {
  font-family: var(--font-script);
  font-style: italic;
  font-weight: 500;
  color: var(--brown);
}

/* Gold divider lines from the flyer: a centre dot or a heart. */
.rule {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--amber);
  margin: 1rem 0;
}
.rule::before,
.rule::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--amber);
  opacity: 0.8;
}
.rule-dot {
  min-height: 12px;
  gap: 1rem;
  background: radial-gradient(circle, var(--amber) 4px, transparent 4.5px) center / 12px 12px no-repeat;
}
.rule-heart span { font-size: 1.3rem; line-height: 1; }
.rule-short { max-width: 360px; margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
button,
a.button-like,
#add-teacher-btn:not([hidden]),
.teacher-card-actions a,
.form-actions a {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border: 2px solid var(--amber);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
button:hover,
a.button-like:hover,
#add-teacher-btn:hover,
.teacher-card-actions a:hover,
.form-actions a:hover {
  background: var(--amber);
  color: var(--navy);
  transform: translateY(-1px);
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: 2px solid var(--navy);
  transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--navy); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy-deep); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--white); transform: translateY(-1px); }

#sign-out-btn {
  border-color: var(--line);
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
}

/* Sign in sits top right, where people look for it; shown only when signed out. */
.header-sign-in:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 1rem 0.4rem 0.75rem;
  font-size: 0.9rem;
  white-space: nowrap;
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.header-sign-in:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: var(--white); }
.header-sign-in .google-g {
  width: 18px;
  height: 18px;
  background: var(--white);
  border-radius: 50%;
  padding: 2px;
  flex-shrink: 0;
}

/* ---------- Header ---------- */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .page {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  gap: 1rem;
}
.site-header img.logo {
  height: 42px;
  display: block;
}
.site-nav {
  display: flex;
  gap: 1.75rem;
}
.site-nav a,
.header-phone {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  color: var(--navy);
  text-decoration: none;
}
.site-nav a:hover { color: var(--amber-dark); }
.header-phone { color: var(--brown); }
.header-account {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
#user-label {
  font-weight: 600;
  color: var(--navy);
}

/* ---------- Hero ---------- */
.hero .page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}
.hero-copy { max-width: 470px; }
.hero-copy h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(3.2rem, 8vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: center;
  color: var(--navy);
  margin: 0;
}
.hero-kicker {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy);
  text-align: center;
  margin-bottom: 0.6rem;
}
.hero-copy .script {
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  line-height: 1.25;
  text-align: center;
  margin: 0;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.hero-visual {
  position: relative;
  padding: 0 0 2rem 2rem;
}
.hero-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 449 / 408;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.badge {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px dashed var(--amber-dark);
  outline: 7px solid var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.badge strong { color: var(--brown); font-size: 1.15rem; font-weight: 700; }
.badge-heart { color: var(--amber); font-size: 1.2rem; }

/* ---------- Audience band ---------- */
.audience {
  background: linear-gradient(90deg, var(--cream-dark), rgba(245, 232, 207, 0.4));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.audience .page {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding-top: 1.4rem;
  padding-bottom: 1.4rem;
}
.piano-icon { width: 72px; height: 72px; fill: var(--navy); flex-shrink: 0; }
.audience p {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  line-height: 1.3;
  color: var(--navy);
}
.audience p span { display: block; }

/* ---------- Lessons checklist ---------- */
.lessons { padding: 3rem 0 2.5rem; }
.lessons h2 { text-align: center; font-size: 1.9rem; }
.checklist {
  list-style: none;
  padding: 0;
  margin: 1.5rem auto 0;
  max-width: 860px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  gap: 0.9rem 2.5rem;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.15rem;
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--line);
}
.checklist li::before {
  content: "";
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--amber);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23f0a92e' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.checklist strong { font-weight: 600; color: var(--navy); }

/* ---------- Now enrolling ribbon ---------- */
.enrolling {
  padding: 1rem 1.5rem 2rem;
  text-align: center;
}
.ribbon {
  position: relative;
  max-width: 820px;
  margin: 0 auto 1.25rem;
  background: var(--amber);
  padding: 0.9rem 3rem;
  clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%);
  box-shadow: var(--shadow-sm);
}
.ribbon::after {
  content: "";
  position: absolute;
  inset: 5px 6%;
  border-top: 1.5px dashed rgba(255, 255, 255, 0.75);
  border-bottom: 1.5px dashed rgba(255, 255, 255, 0.75);
  pointer-events: none;
}
.ribbon span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 4vw, 2.2rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy-deep);
}
.enrolling .script {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.25;
  color: var(--ink);
  margin: 0;
}

/* ---------- Notice cards (pending) ---------- */
#pending {
  max-width: 640px;
  margin: 2.5rem auto 0;
  padding: 0 1.5rem;
}
#pending p {
  background: var(--white);
  border-left: 5px solid var(--amber);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.25rem;
  color: var(--ink-soft);
}

/* ---------- Generic section rhythm ---------- */
#teachers-directory,
#admin-instruments,
#admin-users,
#my-students,
#signed-in {
  padding: 2.5rem 0;
}

.section-note {
  color: var(--ink-soft);
  max-width: 70ch;
  margin-bottom: 1.25rem;
}
.muted { color: var(--ink-soft); }

select {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  max-width: 100%;
}
select:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Teachers directory ---------- */
#teachers-directory h2 { text-align: center; font-size: 1.9rem; }
#teachers-directory > .page > p {
  text-align: center;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 auto 1.5rem;
}
#add-teacher-btn { margin: 0 auto 1.5rem; display: table; }

.teachers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.teachers-grid > p { grid-column: 1 / -1; text-align: center; color: var(--ink-soft); }
.teacher-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.teacher-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.teacher-card img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--amber-light);
  margin-bottom: 0.75rem;
}
.teacher-card h3 { margin: 0.25rem 0; font-size: 1.3rem; }
.teacher-instruments {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--amber-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.teacher-contact {
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.teacher-card-actions {
  margin-top: 0.9rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.teacher-card-actions a,
.teacher-card-actions button {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

/* ---------- Client: my students ---------- */
#my-students { background: var(--white); border-bottom: 1px solid var(--line); }
#my-students h2 { font-size: 1.5rem; }
#my-students .admin-list { margin-bottom: 1rem; }
#add-self-btn:not([hidden]) { display: inline-block; margin-bottom: 1rem; }

/* ---------- Admin: users ---------- */
.pending-badge:not([hidden]) {
  display: inline-block;
  background: var(--amber);
  color: var(--navy-deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}
.pending-badge:hover { background: var(--amber-dark); }

#admin-users { background: var(--white); border-bottom: 1px solid var(--line); }
#admin-users h2 { font-size: 1.5rem; }
.table-scroll { overflow-x: auto; }
.users-table td { vertical-align: middle; }
.users-table tr.user-pending { background: rgba(240, 169, 46, 0.12); }
.user-person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 220px;
}
.user-person img,
.user-initial {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.user-initial {
  display: grid;
  place-items: center;
  background: var(--cream-dark);
  color: var(--navy);
  font-weight: 700;
}
.user-person strong { display: block; color: var(--navy); }
.user-email { font-size: 0.85rem; color: var(--ink-soft); overflow-wrap: anywhere; }
select.needs-link { border: 2px solid var(--amber); }

/* ---------- Admin: instruments ---------- */
#admin-instruments {
  background: var(--cream-dark);
}
#admin-instruments h2 { font-size: 1.5rem; }
#add-instrument-form,
.inline-form {
  display: flex;
  gap: 0.75rem;
  max-width: 420px;
  margin-bottom: 1.25rem;
}
#add-instrument-form input,
.inline-form input {
  flex: 1;
  font: inherit;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

#instruments-list,
.admin-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 520px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
#instruments-list li,
.admin-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}
#instruments-list li:last-child,
.admin-list li:last-child { border-bottom: none; }
#instruments-list li span,
.admin-list li span { flex: 1; }
#instruments-list button,
.admin-list button {
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
}
.instrument-edit-input {
  flex: 1;
  font: inherit;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

/* ---------- Schedule ---------- */
#signed-in h2 { font-size: 1.5rem; }
/* Data tables (currently just Manage Users) -- scoped so they don't leak into
   FullCalendar, which is built out of tables too. */
.users-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.users-table thead tr { background: var(--navy); }
.users-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.95rem;
}
.users-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}
.users-table tbody tr:last-child td { border-bottom: none; }
.users-table tbody tr:hover { background: var(--cream); }

.status {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.status-completed { background: rgba(47, 143, 78, 0.12); color: var(--good); }
.status-cancelled,
.status-no-show { background: rgba(192, 80, 58, 0.12); color: var(--bad); }
.status-scheduled { background: rgba(20, 33, 58, 0.08); color: var(--navy); }

/* ---------- Contact ---------- */
.contact { padding: 1rem 0 3rem; }
.contact-card {
  max-width: 1000px;
  margin: 0 auto;
  background: rgba(245, 232, 207, 0.55);
  border: 2px dashed var(--amber-light);
  border-radius: 22px;
  padding: 2rem 1.75rem;
  text-align: center;
}
.contact-card h2 { font-size: 1.7rem; margin: 0; }
.contact-card .rule { margin: 0.5rem auto 1.5rem; }
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: center;
  text-align: left;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.25rem 1.75rem;
  min-width: 0;
}
.contact-list li + li { border-left: 1px solid var(--line); }
.contact-list div { min-width: 0; }
.contact-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--navy);
  display: grid;
  place-items: center;
}
.contact-icon svg { width: 24px; height: 24px; fill: var(--white); }
.contact-icon-fb { background: #1877f2; }
.contact-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  color: var(--navy);
}
.contact-list a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  overflow-wrap: break-word;
}
.contact-list a:hover { color: var(--brown); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  padding: 1.5rem 1.5rem 1.25rem;
  text-align: center;
}
.site-footer .script {
  color: var(--white);
  font-size: 1.6rem;
  margin: 0 0 0.25rem;
}
.site-footer .script span { color: var(--amber); font-style: normal; margin: 0 0.4rem; }
.footer-meta {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  margin: 0;
}

/* ---------- Teacher edit form ---------- */
.form-page-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.form-page-header .page {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}
.form-page-header img.logo { height: 38px; }

#not-authorized {
  max-width: 640px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}
#not-authorized p {
  background: var(--white);
  border-left: 5px solid var(--bad);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.25rem;
}

#teacher-form-section {
  max-width: 480px;
  margin: 2.5rem auto;
  padding: 0 1.5rem 2.5rem;
}
#teacher-form-section h2 { font-size: 1.6rem; }
#teacher-form-section form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
}
#teacher-form-section label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.9rem;
}
#teacher-form-section input,
#teacher-form-section textarea {
  font: inherit;
  font-weight: 400;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
}
#teacher-form-section fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}
#teacher-form-section legend {
  font-weight: 600;
  color: var(--navy);
  padding: 0 0.4rem;
}
.instrument-checkbox {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400 !important;
  padding: 0.25rem 0;
}
#photo-preview {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--amber-light);
}
.form-actions {
  display: flex;
  gap: 0.75rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .site-nav { display: none; }
  .contact-list { grid-template-columns: 1fr; gap: 1rem; max-width: 340px; margin: 0 auto; }
  .contact-list li { padding: 0; }
  .contact-list li + li { border-left: none; }
}

@media (max-width: 720px) {
  .site-header img.logo { height: 34px; }
  .hero .page {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 2rem;
    padding-bottom: 2.5rem;
  }
  .hero-copy { max-width: none; text-align: center; }
  .hero-visual { padding: 0 0 1.5rem 1.5rem; }
  .badge { width: 130px; height: 130px; font-size: 0.8rem; }
  .badge strong { font-size: 0.95rem; }
  .checklist { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }
  .audience .page { gap: 1rem; }
  .piano-icon { width: 52px; height: 52px; }
  .ribbon { padding: 0.75rem 1.75rem; }
  table { font-size: 0.9rem; }
}

@media (max-width: 560px) {
  .header-sign-in .wide-only { display: none; }
}

@media (max-width: 420px) {
  .header-phone { display: none; }
}

/* ---------- Availability editor ---------- */
#availability-section { padding: 2.5rem 0; background: var(--white); border-bottom: 1px solid var(--line); }
#availability-section h2 { font-size: 1.5rem; }
#availability-section h3 { font-size: 1.15rem; margin-bottom: 0.75rem; }
.field-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 1.25rem;
}
.notice {
  background: var(--white);
  border-left: 5px solid var(--amber);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 0.9rem 1.1rem;
  max-width: 640px;
}
.availability-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.availability-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.availability-list > li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow-sm);
}
.availability-list > li.past { opacity: 0.6; box-shadow: none; }
.availability-list > li.muted { box-shadow: none; }
.availability-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}
.availability-actions { display: flex; gap: 0.4rem; }
.availability-actions button { padding: 0.3rem 0.8rem; font-size: 0.85rem; }
.tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--cream-dark);
  color: var(--ink-soft);
  margin-right: 0.35rem;
}
.tag-current { background: var(--navy); color: var(--white); }
.tag-upcoming { background: var(--amber); color: var(--navy-deep); }
.hours-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.hours-chip {
  font-size: 0.85rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
}
.hours-chip strong { color: var(--navy); margin-right: 0.2rem; }
.availability-form {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.4rem 1.5rem;
}
.availability-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  max-width: 220px;
}
.availability-form input[type="date"],
.availability-form input[type="time"] {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
}
.availability-form input[type="time"]:disabled { opacity: 0.35; }
.availability-days { display: grid; gap: 0.35rem; margin-bottom: 1rem; }
.availability-day {
  display: grid;
  grid-template-columns: 8.5rem 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
}
.availability-day.on { background: rgba(240, 169, 46, 0.1); }
.availability-day label { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--navy); cursor: pointer; }
.availability-day .to { color: var(--ink-soft); font-size: 0.9rem; }
.form-error { color: var(--bad); font-weight: 600; margin: 0 0 0.75rem; }
.btn-save { background: var(--navy); border-color: var(--navy); color: var(--white); }
.btn-save:hover { background: var(--navy-deep); color: var(--white); }

@media (max-width: 820px) {
  .availability-layout { grid-template-columns: 1fr; }
  .availability-form { order: -1; }
}
@media (max-width: 420px) {
  .availability-day { grid-template-columns: 1fr 1fr; }
  .availability-day label { grid-column: 1 / -1; }
  .availability-day .to { display: none; }
}

/* ---------- Lesson calendar (FullCalendar) ---------- */
.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.calendar-head h2 { margin: 0; }
.calendar-head .field-inline { margin: 0; }
#signed-in .section-note { margin-top: 0.5rem; }
.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
}
.calendar-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line); }
.swatch-available { background: var(--white); }
.swatch-unavailable { background: repeating-linear-gradient(135deg, #efe6d4 0 4px, #f7f1e6 4px 8px); }
.swatch-busy { background: #cfd3da; }
.swatch-lesson { background: var(--navy); border-color: var(--navy); }
.swatch-cancelled { background: var(--white); border: 1px dashed var(--bad); }

.calendar-message {
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  margin-bottom: 0.9rem;
  border-left: 5px solid var(--navy);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.calendar-message.ok { border-left-color: var(--good); }
.calendar-message.warn { border-left-color: var(--amber); }

#calendar {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
  --fc-border-color: var(--line);
  --fc-today-bg-color: rgba(240, 169, 46, 0.08);
  --fc-now-indicator-color: var(--bad);
  --fc-button-bg-color: var(--white);
  --fc-button-border-color: var(--amber);
  --fc-button-text-color: var(--navy);
  --fc-button-hover-bg-color: var(--amber);
  --fc-button-hover-border-color: var(--amber);
  --fc-button-active-bg-color: var(--navy);
  --fc-button-active-border-color: var(--navy);
  --fc-event-bg-color: var(--navy);
  --fc-event-border-color: var(--navy);
  --fc-bg-event-opacity: 1;
  --fc-list-event-hover-bg-color: var(--cream);
}
#calendar .fc-button {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  border-radius: 999px;
  box-shadow: none;
  padding: 0.35rem 0.9rem;
}
#calendar .fc-button-group > .fc-button { border-radius: 0; }
#calendar .fc-button-group > .fc-button:first-child { border-radius: 999px 0 0 999px; }
#calendar .fc-button-group > .fc-button:last-child { border-radius: 0 999px 999px 0; }
#calendar .fc-button-active,
#calendar .fc-button:active { color: var(--white); }
#calendar .fc-button:disabled { opacity: 0.45; }
#calendar .fc-toolbar-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy);
  letter-spacing: 0.03em;
}
#calendar .fc-col-header-cell-cushion,
#calendar .fc-list-day-text,
#calendar .fc-list-day-side-text {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
}
#calendar .fc-timegrid-slot { height: 1.15rem; }
#calendar .fc-timegrid-slot-label-cushion { font-size: 0.8rem; color: var(--ink-soft); }
/* Everything outside the teacher's hours is hatched; their hours sit on top in white. */
#calendar .fc-timegrid-col.fc-day {
  background: repeating-linear-gradient(135deg, #efe6d4 0 6px, #f7f1e6 6px 12px);
}
#calendar .fc-bg-event.bg-available { background: var(--white); }
#calendar .fc-bg-event.bg-busy { background: #cfd3da; }
#calendar .fc-timegrid-col.fc-day:not(.fc-day-past) { cursor: pointer; }
#calendar .fc-day-past .fc-bg-event.bg-available { background: #fbfaf7; }

#calendar .fc-event.lesson { border-radius: 6px; padding: 1px 3px; cursor: pointer; }
#calendar .fc-event.lesson .fc-event-title { font-weight: 600; }
#calendar .fc-event.lesson-completed { background: #2f5d8a; border-color: #2f5d8a; }
#calendar .fc-event.lesson-no-show { background: #7a4b3a; border-color: #7a4b3a; }
#calendar .fc-event.lesson-cancelled {
  background: var(--white);
  border: 1px dashed var(--bad);
  --fc-event-text-color: var(--bad);
  color: var(--bad);
}
#calendar .fc-event.lesson-cancelled .fc-event-main { color: var(--bad); text-decoration: line-through; }
#calendar .fc-event.lesson-other-teacher { background: var(--amber-dark); border-color: var(--amber-dark); }
#calendar .fc-list-event.lesson-cancelled { text-decoration: line-through; color: var(--bad); }

/* ---------- Lesson dialog ---------- */
.lesson-dialog {
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(13, 22, 40, 0.35);
  padding: 0;
  width: min(560px, calc(100vw - 2rem));
  color: var(--ink);
}
.lesson-dialog::backdrop { background: rgba(13, 22, 40, 0.45); }
.lesson-dialog form { padding: 1.5rem 1.6rem 1.3rem; }
.lesson-dialog h3 {
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.dialog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
}
.dialog-grid .field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.88rem;
}
.dialog-grid .field.wide { grid-column: 1 / -1; }
.dialog-grid .field[hidden] { display: none; }
.dialog-grid input,
.dialog-grid select,
.dialog-grid textarea {
  font: inherit;
  font-weight: 400;
  font-size: 0.95rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--white);
  width: 100%;
}
.readonly-value {
  display: block;
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
}
.dialog-grid input[type="checkbox"] { width: auto; }
.dialog-grid :disabled { background: var(--cream); color: var(--ink-soft); }
.repeat-field {
  flex-direction: row !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem !important;
  background: rgba(240, 169, 46, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
}
.repeat-field .check { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.repeat-field input[type="date"] { width: auto; }
.lesson-dialog .form-error { margin-top: 0.9rem; }
.dialog-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}
.dialog-actions .spacer { flex: 1; }
.btn-danger { border-color: var(--bad); color: var(--bad); }
.btn-danger:hover { background: var(--bad); color: var(--white); }

@media (max-width: 720px) {
  #calendar { padding: 0.5rem; }
  #calendar .fc-toolbar-title { font-size: 1.05rem; }
  .dialog-grid { grid-template-columns: 1fr; }
  .lesson-dialog form { padding: 1.2rem; }
}

/* ---------- Admin: clients & students ---------- */
#admin-clients { padding: 2.5rem 0; background: var(--cream); border-bottom: 1px solid var(--line); }
#admin-clients h2 { font-size: 1.5rem; }
.client-add,
.client-edit {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem 1rem;
  align-items: end;
}
.client-add {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.client-add .field,
.client-edit .field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--navy);
}
.client-add .field.wide { grid-column: 1 / 3; }
.client-edit .field.wide { grid-column: 1 / -1; }
.client-edit .form-actions { grid-column: 1 / -1; }
.client-add input,
.client-add textarea,
.client-edit input,
.client-edit textarea,
.client-filter,
.add-client-student input[type="text"] {
  font: inherit;
  font-weight: 400;
  font-size: 0.95rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--white);
  width: 100%;
}
.client-add textarea { resize: vertical; }
.client-filter { max-width: 420px; margin-bottom: 1rem; }
.clients-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}
.client-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.client-head { display: flex; justify-content: space-between; gap: 0.75rem; align-items: flex-start; }
.client-head h3 { margin: 0; font-size: 1.2rem; }
.client-contact { margin: 0.15rem 0 0; font-size: 0.88rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.client-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.client-actions button { padding: 0.3rem 0.8rem; font-size: 0.82rem; }
.client-notes {
  margin: 0;
  font-size: 0.88rem;
  background: var(--cream);
  border-left: 3px solid var(--amber);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  white-space: pre-wrap;
}
.client-logins { font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.client-logins strong { color: var(--navy); }
.login-chip {
  background: var(--navy);
  color: var(--white);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.8rem;
}
.client-students { max-width: none; box-shadow: none; border: 1px solid var(--line); margin: 0; }
.client-students li { padding: 0.5rem 0.75rem; }
.add-client-student { max-width: none; margin: 0; align-items: center; }
.add-client-student .check { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; white-space: nowrap; }
.add-client-student button { white-space: nowrap; }

@media (max-width: 720px) {
  .client-add,
  .client-edit { grid-template-columns: 1fr; }
  .client-add .field.wide { grid-column: auto; }
  .clients-list { grid-template-columns: 1fr; }
}

/* ---------- Teacher form: hints under a field ---------- */
#teacher-form-section .form-hint {
  margin: -0.7rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* The admin already knows the studio: skip the public intro (hero, audience
   band, "Why Metro Music", enrolling ribbon) and its menu link. app.js sets
   body.is-admin. */
body.is-admin .public-intro { display: none !important; }
