/* =============================== All Styles (Global) =============================== */
html {
  font-family: 'Raleway', sans-serif;
}

body {
  margin: 0;
  height: 100%;
  padding-top: 65px;
  background-color: #f7f7f7;
}

body.test-site {
  padding-top: 105px;
}

html,
body {
  overflow-x: hidden;
}

h1 {
  color: #000000;
}

.Title {
  color: #FFFFFF;
}

p {
  color: #000000;
  font-family: 'Raleway', sans-serif;
  font-size: 18px;
}

a {
  -webkit-transition: .3s;
  transition: .3s;
  text-decoration: none;
}

a:hover {
  color: #5aff37;
}

.pgood {
  color: #00CC00;
  text-align: center;
}

.pbad {
  color: #FF0009;
  text-align: center;
}

/* Navigation */
.navDropButton {
  background-color: #FFFFFF;
  color: #444444;
  padding: 5px 0;
  font-size: 25px;
  font-family: 'Montserrat', sans-serif;
  border: none;
  cursor: pointer;
  word-spacing: normal;
  display: inline-block;
  text-decoration: none;
}

/* Normalize <button> vs <a> so nav items render identical */
.navDropButton {
  font-weight: 400;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  vertical-align: middle;
}

button.navDropButton {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.navDropdown {
  position: relative;
  display: inline-block;
  margin: 0 18px;
}

.navDropdownContent {
  display: none;
  position: absolute;
  background-color: #f1f1f1;
  min-width: 160px;
  padding: 5px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.navDropdownContent a {
  font-family: 'Montserrat', sans-serif;
  color: #444444;
  font-size: 25px;
  text-decoration: none;
  display: block;
}

.navDropdownContent a:hover {
  background-color: #ddd;
  color: #5aff37;
}

.navDropdown:hover .navDropdownContent {
  display: block;
}

.navDropdown:hover .navDropButton {
  color: #5aff37;
}

.DivFooter {
  text-align: center;
  margin-bottom: 20px;
}

.PageTitleH1 {
  color: #0054ff;
}

.PageTitle {
  width: 3px;
  padding: 0px 20px 0px;
  white-space: nowrap;
}

.PageTitleTable {
  margin-left: auto;
  margin-right: auto;
  width: 80%;
}

.pfooter {
  font-size: 10px;
}

.DivNavigationBar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  width: 100%;
  height: 65px;
  background-color: rgba(255, 255, 255, 0.96);
  -webkit-box-shadow: 0 0 2px #262626;
  -moz-box-shadow: 0 2px #262626;
  box-shadow: 0 1px 8px rgba(38, 38, 38, 0.16);
  backdrop-filter: blur(8px);
}

body.test-site .DivNavigationBar {
  top: 40px;
}

.TestSiteBanner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2100;
  height: 40px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: red;
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 1px 8px rgba(38, 38, 38, 0.12);
}

.NavigationBarButtons {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  text-align: center;
  color: #444444;
  font-size: 25px;
  word-spacing: normal;
  font-family: 'Montserrat', sans-serif;
}

.NavBarOverlay {
  height: 100%;
  width: 100%;
  display: none;
  position: fixed;
  z-index: 3000;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.9);
}

.NavBarOverlayContent {
  position: relative;
  top: 10%;
  width: 100%;
  text-align: center;
  margin-top: 10px;
}

.NavBarOverlay a {
  padding: 8px;
  text-decoration: none;
  font-size: 36px;
  color: #818181;
  display: block;
  transition: 0.3s;
}

.NavBarOverlay a:hover,
.NavBarOverlay a:focus {
  color: #5aff37;
}

.profilePicture {
  width: 250px;
  height: 250px;
  object-fit: cover;
}

.NavBarOverlay .CloseButton {
  position: absolute;
  top: 20px;
  right: 45px;
  font-size: 60px;
}

.MainContentColumns {
  width: 48%;
  min-width: 325px;
  vertical-align: top;
  display: inline-block;
}

.MainContent {
  padding: 20px;
  margin: 10px auto;
  box-shadow: 3px 3px 5px #888888;
  text-align: center;
  background-color: #FFFFFF;
  width: 90%;
  max-width: 1024px;
}

/* =============================== FAQs =============================== */
.MainContent.faq-page {
  width: 92%;
  max-width: 1080px;
  padding: 28px;
  text-align: left;
  box-shadow: 0 12px 36px rgba(38, 38, 38, 0.12);
  border-radius: 8px;
}

.faq-page .PageTitleTable {
  margin-bottom: 18px;
}

.faq-intro {
  max-width: 760px;
  margin: 0 auto 26px;
  text-align: center;
}

.faq-eyebrow {
  margin: 0 0 8px;
  color: #0054ff;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.faq-intro h2 {
  margin: 0 0 12px;
  color: #111111;
  font-family: 'Montserrat', sans-serif;
  font-size: 34px;
  line-height: 1.2;
}

.faq-intro p:not(.faq-eyebrow) {
  margin: 0;
  color: #4f4f4f;
  font-size: 18px;
  line-height: 1.6;
}

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  overflow: hidden;
  border: 1px solid #dfe7f3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(0, 84, 255, 0.07);
}

.faq-question-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 48px;
  padding: 16px 18px 10px;
  color: #151515;
  font-family: 'Montserrat', sans-serif;
}

.faq-number {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #0054ff;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
}

.faq-question {
  min-width: 0;
  color: #151515;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}

.faq-answer {
  padding: 0 24px 22px 74px;
}

.faq-answer p {
  margin: 0 0 12px;
  color: #333333;
  font-size: 17px;
  line-height: 1.65;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer a {
  color: #0054ff;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.faq-answer a:hover,
.faq-answer a:focus {
  color: #248f15;
}

@media (max-width: 700px) {
  .MainContent.faq-page {
    width: 92%;
    padding: 20px 14px;
  }

  .faq-intro {
    margin-bottom: 20px;
  }

  .faq-intro h2 {
    font-size: 27px;
  }

  .faq-intro p:not(.faq-eyebrow) {
    font-size: 16px;
  }

  .faq-question-row {
    grid-template-columns: 34px 1fr;
    gap: 10px;
    padding: 14px 14px 8px;
  }

  .faq-number {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .faq-question {
    font-size: 16px;
  }

  .faq-answer {
    padding: 0 16px 18px 58px;
  }

  .faq-answer p {
    font-size: 16px;
  }
}

/* =============================== Team =============================== */
.MainContent.team-page {
  width: 92%;
  max-width: 1120px;
  padding: 28px;
  text-align: left;
  box-shadow: 0 12px 36px rgba(38, 38, 38, 0.12);
  border-radius: 8px;
}

.team-page .PageTitleTable {
  margin-bottom: 18px;
}

.team-intro {
  max-width: 760px;
  margin: 0 auto 28px;
  text-align: center;
}

.team-eyebrow {
  margin: 0 0 8px;
  color: #0054ff;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.team-intro h2 {
  margin: 0 0 12px;
  color: #111111;
  font-family: 'Montserrat', sans-serif;
  font-size: 34px;
  line-height: 1.2;
}

.team-intro p:not(.team-eyebrow) {
  margin: 0;
  color: #4f4f4f;
  font-size: 18px;
  line-height: 1.6;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 980px;
  margin: 0 auto;
}

.team-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid #dfe7f3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(0, 84, 255, 0.07);
}

.team-card__photo-wrap {
  display: flex;
  justify-content: center;
  padding: 24px 24px 14px;
  background: linear-gradient(180deg, #eef4ff 0%, #ffffff 100%);
}

.team-card__photo {
  width: 172px;
  height: 172px;
  border: 5px solid #ffffff;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 8px 24px rgba(38, 38, 38, 0.16);
}

.team-card__content {
  padding: 0 24px 26px;
  text-align: center;
}

.team-card__content h3 {
  margin: 8px 0 12px;
  color: #111111;
  font-family: 'Montserrat', sans-serif;
  font-size: 23px;
  line-height: 1.25;
}

.team-card__content p {
  margin: 0;
  color: #333333;
  font-size: 16px;
  line-height: 1.65;
}

.team-message {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 20px;
  border: 1px solid #dfe7f3;
  border-radius: 8px;
  background: #f8fbff;
  text-align: center;
}

.team-message--error {
  border-color: #f4b8b8;
  background: #fff5f5;
}

.team-message p {
  margin: 0;
  color: #333333;
}

@media (max-width: 700px) {
  .MainContent.team-page {
    width: 92%;
    padding: 20px 14px;
  }

  .team-intro {
    margin-bottom: 22px;
  }

  .team-intro h2 {
    font-size: 27px;
  }

  .team-intro p:not(.team-eyebrow) {
    font-size: 16px;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .team-card__photo-wrap {
    padding: 20px 18px 12px;
  }

  .team-card__photo {
    width: 146px;
    height: 146px;
  }

  .team-card__content {
    padding: 0 18px 22px;
  }

  .team-card__content h3 {
    font-size: 21px;
  }
}

#InformationNote {
  position: fixed;
  min-height: 44px;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 52px 8px 16px;
  background: #F78181;
  text-align: center;
  box-shadow: 0 0 5px black;
  z-index: 3200;
}

#InformationNote p {
  margin: 0;
}

.InformationNoteMessage {
  max-width: 100%;
}

.InformationNoteClose {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.68);
  color: #7f1d1d;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  transform: translateY(-50%);
}

.InformationNoteClose:hover {
  background: #ffffff;
  color: #991b1b;
}

.NewsDateTitleH2 {
  color: #0054ff;
}

.NewsDateTitle {
  width: 3px;
  padding: 0px 20px 0px;
  white-space: nowrap;
}

div.polaroid {
  width: 80%;
  background-color: white;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  margin-bottom: 25px;
  margin-left: auto;
  margin-right: auto;
}

div.container {
  text-align: center;
  padding: 10px 20px;
  margin-left: auto;
  margin-right: auto;
  font-size: 16px;
}

/* =============================== News / Updates =============================== */
/* These classes are used on admin.php to keep News cards aligned and mobile friendly */
.polaroid.news-card {
  padding: 14px 18px 18px 18px;
  box-sizing: border-box;
  text-align: left;
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 2px;
  /* slight nudge down */
  gap: 12px;
}

.news-title-wrap {
  min-width: 0;
}

.news-title {
  margin: 0;
  line-height: 1.2;
  display: inline;
}

.news-postedby {
  margin-left: 8px;
  font-size: 14px;
  color: #777;
}

.news-date {
  white-space: nowrap;
  font-size: 14px;
  color: #666;
  margin-top: 2px;
}

.news-content {
  padding-top: 8px;
}

.news-content p {
  margin: 0;
}

/* Reactions row (admin.php news feed) */
.news-reactions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.reaction-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.reaction-form {
  display: inline;
  margin: 0;
}

.reaction-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  background: #f7f7f7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  user-select: none;
  transition: filter 0.15s ease-in-out, transform 0.06s ease-in-out;
}

.reaction-btn:hover {
  filter: brightness(0.98);
}

.reaction-btn:active {
  transform: scale(0.97);
}

.reaction-btn.selected {
  border-color: #007bff;
  background: #eaf3ff;
}

.reaction-badge {
  position: absolute;
  right: -6px;
  top: -6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  padding: 0 5px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: #111;
  color: #fff;
}

.reaction-total {
  font-size: 13px;
  color: #666;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .news-reactions {
    justify-content: flex-start;
  }

  .reaction-total {
    margin-left: auto;
  }
}


@media (max-width: 700px) {
  .polaroid.news-card {
    width: 92%;
    padding: 12px 14px 14px 14px;
  }

  .news-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .news-postedby {
    display: block;
    margin-left: 0;
    margin-top: 4px;
  }

  .news-date {
    margin-top: 0;
  }
}

/* =============================== Weekly Calendar — Admin =============================== */
:root {
  --slot-height: 40px;
}

/* Container and header */
.calendar-container {
  max-width: 1200px;
  margin: 20px auto;
  background: #fff;
  padding: 12px 20px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .1);
  overflow-x: auto;
  color: #2c3e50;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.calendar-container>*:first-child {
  margin-top: 0;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px
}

.calendar-header h2 {
  margin: 0;
  font-size: 1.8em
}

.calendar-nav a {
  text-decoration: none;
  color: #007bff;
  padding: 8px 12px;
  border: 1px solid #007bff;
  border-radius: 4px;
  transition: .3s;
  font-size: .9em;
  margin-left: 6px
}

.calendar-nav a:hover {
  background: #007bff;
  color: #fff
}

.calendar-nav-group {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap
}

.goto-date {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: 6px
}

.goto-date input[type="date"] {
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: .9em
}

.goto-date .button {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #007bff;
  background: #fff;
  color: #007bff;
  text-decoration: none;
  cursor: pointer
}

.goto-date .button:hover {
  background: #007bff;
  color: #fff
}

.calendar-actions .button {
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #007bff;
  background: #fff;
  color: #007bff;
  text-decoration: none;
  cursor: pointer;
  font-size: .9em;
  transition: .3s;
}

.calendar-actions .button:hover {
  background: #007bff;
  color: #fff;
}

.calendar-view-switch {
  display: flex;
  gap: 6px;
  margin-left: 4px;
}

.calendar-view-switch-under-hours {
  margin: 10px 0 14px 0;
  justify-content: flex-start;
}

.calendar-view-switch a {
  text-decoration: none;
  color: #007bff;
  border: 1px solid #007bff;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: .9em;
}

.calendar-view-switch a.active {
  background: #007bff;
  color: #fff;
}



/* Mobile fix for crunched calendar nav buttons */
@media (max-width: 700px) {
  .calendar-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .calendar-nav-group {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  /* Remove the left margin that causes cramped wrapping on phones */
  .calendar-nav a {
    margin-left: 0;
  }

  /* Make each nav button full width for clean stacking */
  .calendar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .calendar-nav a {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 12px 12px;
    font-size: 16px;
    /* helps iOS readability and avoids weird wrapping */
  }

  /* Date picker row: stack nicely */
  .goto-date {
    margin-left: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .calendar-view-switch {
    margin-left: 0;
    width: 100%;
  }

  .calendar-view-switch-under-hours {
    margin: 10px 0 6px 0;
  }

  .calendar-view-switch a {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .goto-date input[type="date"],
  .goto-date .button,
  .calendar-actions .button {
    width: 100%;
    box-sizing: border-box;
    height: 48px;
    /* forces equal height */
    padding: 0 12px;
    /* remove extra vertical padding */
    font-size: 16px;
    line-height: 48px;
    /* vertically center text */
  }

  /* Remove iOS default date styling that makes it taller */
  .goto-date input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
  }
}

/* Grid */
.weekly-calendar-grid {
  display: grid;
  grid-template-columns: 80px repeat(7, minmax(120px, 1fr));
  grid-template-rows: auto 1fr;
  border: 1px solid #ddd;
}

.empty-corner {
  grid-column: 1;
  grid-row: 1;
  background: #f2f2f2;
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd
}

.day-header {
  grid-row: 1;
  text-align: center;
  padding: 10px 5px;
  background: #e6e6e6;
  border-bottom: 1px solid #ddd;
  border-right: 1px solid #ddd;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.day-header:last-of-type {
  border-right: none
}

.day-header span {
  font-size: .9em;
  color: #555
}

.current-day-header {
  background: #d8edf7;
  border-bottom: 2px solid #007bff;
  color: #007bff
}

/* Time gutter */
.time-column {
  grid-column: 1;
  grid-row: 2;
  border-right: 1px solid #ddd;
  position: sticky;
  left: 0;
  background: #f2f2f2;
  background-image: repeating-linear-gradient(to bottom,
      #eee 0,
      #eee 1px,
      transparent 1px,
      transparent var(--slot-height));
}

.time-slot-label {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font-size: .9em;
  color: #555;
  padding-top: 4px;
  height: var(--slot-height);
  box-sizing: border-box;
  border-bottom: 0;
}

/* Event columns */
.event-columns-container {
  grid-column: 2 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  position: relative;
}

.day-column-events {
  position: relative;
  border-right: 1px solid #eee;
  background: #fcfcfc;
  background-image: repeating-linear-gradient(to bottom,
      transparent 0,
      transparent calc(var(--slot-height) - 1px),
      rgba(0, 0, 0, .06) calc(var(--slot-height) - 1px),
      rgba(0, 0, 0, .06) var(--slot-height));
}

.day-column-events:last-of-type {
  border-right: none
}

.current-day-column {
  background: #e6f7ff
}

/* Monthly grid */
.monthly-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid #d7dee7;
  border-radius: 8px;
  overflow: hidden;
}

.month-day-name {
  background: #edf3fa;
  border-right: 1px solid #d7dee7;
  border-bottom: 1px solid #d7dee7;
  padding: 10px 8px;
  font-weight: 700;
  text-align: center;
  color: #2f3f53;
}

.month-day-name:nth-child(7n) {
  border-right: none
}

.month-day-cell {
  min-height: 130px;
  border-right: 1px solid #edf0f5;
  border-bottom: 1px solid #edf0f5;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.month-day-cell.is-outside-month {
  background: #f8fafc
}

.month-day-cell.is-today .month-day-head {
  background: #007bff;
  color: #fff;
}

.month-day-head {
  font-size: .88em;
  font-weight: 700;
  color: #2f3f53;
  padding: 6px 8px;
  border-bottom: 1px solid #f1f3f7;
}

.month-day-body {
  flex: 1;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.month-event-chip {
  border: 1px solid #b3e5fc;
  background: #e0f2f7;
  border-radius: 6px;
  text-align: left;
  padding: 5px 6px;
  cursor: pointer;
  display: flex;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  font-size: 12px;
  line-height: 1.2;
}

.month-event-time {
  font-weight: 700;
  color: #0f3f6e;
  min-width: 38px;
}

.month-event-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-event-copy {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

@media (max-width: 900px) {
  .month-day-name {
    font-size: 13px;
    padding: 8px 4px
  }

  .month-day-cell {
    min-height: 110px
  }

  .month-event-chip {
    font-size: 11px
  }
}

@media (max-width: 700px) {
  .monthly-calendar {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    border: none;
    gap: 10px;
  }

  .month-day-name {
    display: none
  }

  .month-day-cell {
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    min-height: 0;
  }

  .month-day-head {
    background: #f4f8fd;
    border-bottom: 1px solid #dbe4ef;
  }
}

/* Working hours light background (slot-style shading) */
.working-hours-shade {
  position: absolute;
  left: 0;
  right: 0;
  background: rgba(34, 197, 94, 0.12);
  border-top: 1px dashed rgba(34, 197, 94, 0.35);
  border-bottom: 1px dashed rgba(34, 197, 94, 0.35);
  z-index: 1;
  pointer-events: none;
}


/* Current time line */
.current-time-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #ef4444;
  z-index: 4;
  pointer-events: none;
}

.current-time-line::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ef4444;
}

/* Booking cards */
.booking-event {
  position: absolute;
  background: #e0f2f7;
  border: 1px solid #b3e5fc;
  padding: 6px 8px 30px;
  border-radius: 4px;
  font-size: .8em;
  line-height: 1.2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  cursor: pointer;
  overflow: hidden;
  z-index: 2;
  box-sizing: border-box;
}

.booking-event b {
  color: #0056b3;
  display: block;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.booking-event span {
  display: block;
  color: #666
}

.booking-hours-remaining {
  display: block;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.booking-hours-remaining--low {
  color: #dc2626 !important;
}

/* Status colors */
.status-Confirmed {
  background: #d4edda;
  border-color: #28a745
}

.status-Pending {
  background: #fff3cd;
  border-color: #ffc107
}

.status-Cancelled {
  background: #f8d7da;
  border-color: #dc3545;
  opacity: .9
}

.status-Delivered {
  background: #e8f5e9;
  border-color: #8bc34a
}

.status-Scheduled {
  background: #e0f2f7;
  border-color: #b3e5fc
}

.status-TentativelyScheduled {
  background: #fef3c7;
  border-color: #facc15
}

/* Blocked time */
.status-Blocked,
.block-event {
  background: #fee2e2;
  border-color: #ef4444;
}

.block-event b {
  color: #b91c1c;
}

.block-event span,
.block-event .block-notes {
  color: #7f1d1d;
}

.block-event {
  background-image:
    linear-gradient(135deg, rgba(185, 28, 28, 0.08) 10%, rgba(0, 0, 0, 0) 10%),
    linear-gradient(0deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0));
  background-size: 8px 8px, auto;
}

/* Meeting time */
.status-Meeting,
.meeting-event {
  background: #ede9fe;
  border-color: #8b5cf6;
}

.meeting-event b {
  color: #5b21b6;
}

.meeting-event span,
.meeting-event .block-notes {
  color: #4c1d95;
}

.meeting-event {
  background-image:
    linear-gradient(135deg, rgba(124, 58, 237, 0.12) 10%, rgba(0, 0, 0, 0) 10%),
    linear-gradient(0deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0));
  background-size: 8px 8px, auto;
}

/* Add to cal links inside booking cards */
.add-to-cal {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  opacity: .95;
}

.add-to-cal a {
  font-size: .72em;
  text-decoration: none;
  border: 1px solid #007bff;
  padding: 2px 6px;
  border-radius: 4px;
  color: #007bff;
  background: #fff;
  white-space: nowrap;
}

/* Inline status control */
.inline-status {
  margin-top: 4px;
  font-size: .8em;
}

.inline-status select {
  width: 100%;
  font-size: .85em;
  padding: 3px;
}

/* Scoped success and error */
.MainContent .pgood {
  color: #0a7a2f;
  background: #eaf7ee;
  border: 1px solid #bfe6cc;
  padding: 8px 10px;
  border-radius: 6px;
  text-align: center;
}

.MainContent .pbad {
  color: #b00020;
  background: #fde7eb;
  border: 1px solid #ffc0cb;
  padding: 8px 10px;
  border-radius: 6px;
  text-align: center;
}

.account-created-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 14px auto 0;
}

.account-created-actions .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  max-width: 100%;
  line-height: 1.25;
  text-align: center;
}

.prepay-redemptions-message {
  margin: 0 auto 14px auto;
  max-width: 1024px;
  width: 100%;
}

.prepay-redemptions-message p {
  margin: 0;
}

.prepay-actions-cell {
  text-align: center;
  white-space: normal;
}

.prepay-actions-cell .action-emoji-btn {
  vertical-align: middle;
}

.prepay-redemptions-wrap {
  overflow-x: visible;
}

.prepay-redemptions-wrap .prepay-top-filter-row {
  display: flex;
  flex-direction: row;
  align-items: end;
  justify-content: center;
  gap: 12px;
  padding: 10px 12px 14px;
  margin: 0;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.prepay-redemptions-wrap .prepayInactiveToggle {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  background: #fafafa;
  font-size: 13px;
}

.prepay-redemptions-wrap .prepay-clear-filters {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.prepay-redemptions-wrap .prepay-results-per-page {
  width: 112px;
  gap: 3px;
}

.prepay-redemptions-wrap .prepay-results-per-page span {
  font-size: 12px;
  text-align: left;
}

.prepay-redemptions-wrap .prepay-results-per-page .analytics-filter-select {
  height: 34px;
  border-radius: 8px;
  font-size: 13px;
}

.prepay-redemptions-table {
  min-width: 0;
  table-layout: fixed;
  font-size: clamp(11px, 0.68vw, 13px);
}

.prepay-redemptions-table thead th,
.prepay-redemptions-table td {
  padding: 8px 4px;
  line-height: 1.18;
  text-align: center;
  overflow-wrap: break-word;
  word-break: normal;
}

.prepay-redemptions-table thead th {
  vertical-align: middle;
  font-size: clamp(12px, 0.86vw, 15px);
  line-height: 1.12;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.prepay-redemptions-table thead th strong {
  display: block;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.prepay-redemptions-table th:nth-child(1),
.prepay-redemptions-table td:nth-child(1) {
  width: 9%;
}

.prepay-redemptions-table th:nth-child(2),
.prepay-redemptions-table td:nth-child(2) {
  width: 9%;
}

.prepay-redemptions-table th:nth-child(3),
.prepay-redemptions-table td:nth-child(3) {
  width: 12%;
}

.prepay-redemptions-table th:nth-child(4),
.prepay-redemptions-table td:nth-child(4) {
  width: 12%;
}

.prepay-redemptions-table th:nth-child(5),
.prepay-redemptions-table td:nth-child(5) {
  width: 8%;
}

.prepay-redemptions-table th:nth-child(6),
.prepay-redemptions-table td:nth-child(6) {
  width: 9%;
}

.prepay-redemptions-table th:nth-child(7),
.prepay-redemptions-table td:nth-child(7) {
  width: 9%;
}

.prepay-redemptions-table th:nth-child(8),
.prepay-redemptions-table td:nth-child(8) {
  width: 10%;
}

.prepay-redemptions-table th:nth-child(9),
.prepay-redemptions-table td:nth-child(9) {
  width: 8%;
}

.prepay-redemptions-table th:nth-child(10),
.prepay-redemptions-table td:nth-child(10) {
  width: 8%;
}

.prepay-redemptions-table th:nth-child(11),
.prepay-redemptions-table td:nth-child(11) {
  width: 3%;
}

.prepay-redemptions-table .prepay-actions-cell {
  padding-left: 2px;
  padding-right: 2px;
}

.prepay-redemptions-table .prepay-actions-cell .action-emoji-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
}

.prepay-redemptions-table .analytics-filter-row th {
  padding: 8px 4px;
  vertical-align: middle;
}

.prepay-redemptions-table .analytics-filter-input,
.prepay-redemptions-table .analytics-filter-select {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1;
}

.prepay-date-filter {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.prepay-date-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  min-width: 0;
}

.prepay-redemptions-table .prepay-date-shortcuts .btn-clear {
  min-height: 28px;
  padding: 4px;
  font-size: 11px;
  line-height: 1.05;
  white-space: normal;
  border-radius: 7px;
}

.prepay-date-main,
.prepay-date-time {
  display: block;
}

.prepay-date-time {
  margin-top: 3px;
  color: #374151;
  font-size: 0.92em;
}

@media (max-width: 960px) {
  .prepay-redemptions-wrap .prepay-top-filter-row {
    flex-wrap: wrap;
    align-items: center;
  }
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 4000;
  overflow-y: auto;
  padding: 16px 0;
  box-sizing: border-box;
}

.modal {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  max-width: 520px;
  width: 92%;
  padding: 16px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  box-sizing: border-box;
}

.modal h3 {
  margin-top: 0;
  margin-bottom: 12px
}

.student-edit-modal {
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
}

.student-edit-modal h3 {
  position: sticky;
  top: -16px;
  z-index: 3;
  background: #fff;
  margin: -16px -16px 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.modal form label {
  display: block;
  font-weight: 600;
  margin-top: 10px
}

.modal form input[type="datetime-local"],
.modal form input[type="email"],
.modal form input[type="text"],
.modal form input[type="tel"],
.modal form input[type="date"],
.modal form input[type="number"],
.modal form select,
.modal form textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  margin-top: 6px;
}

.modal form input.readonly-field {
  background: #f3f4f6;
  color: #666666;
  cursor: not-allowed;
}

.student-search-native {
  display: none;
}

.student-search-select {
  position: relative;
  margin-top: 6px;
}

.modal form .student-search-input {
  margin-top: 0;
}

.student-search-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.student-search-option,
.student-search-empty {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  background: #fff;
  color: #1f2937;
  text-align: left;
  font: inherit;
}

.student-search-option {
  cursor: pointer;
}

.student-search-option:hover,
.student-search-option.is-active {
  background: #eef4ff;
}

.student-search-option-fixed {
  font-weight: 700;
}

.student-search-group-label {
  padding: 8px 10px 4px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.student-search-empty {
  color: #6b7280;
}

.modal form .quarter-datetime-control {
  position: relative;
  margin-top: 6px;
}

.modal form .quarter-datetime-display {
  width: 100%;
  height: 40px;
  padding: 8px 38px 8px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  margin-top: 0;
  background: #fff;
  color: #111827;
  cursor: pointer;
  font-family: Arial, sans-serif;
}

.student-edit-modal #edit_TestDate_display,
.student-edit-modal #edit_DateOfBirth {
  -webkit-appearance: none;
  appearance: none;
  height: 34px;
  padding: 8px;
  margin-top: 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  background: #fff;
  color: #000;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: normal;
}

.student-edit-modal #edit_DateOfBirth {
  margin-top: 6px;
}

.student-edit-modal .quarter-datetime-icon {
  display: none;
}

.modal form .quarter-datetime-icon {
  position: absolute;
  top: 12px;
  right: 13px;
  width: 14px;
  height: 14px;
  border: 1.5px solid #111827;
  border-radius: 2px;
  box-sizing: border-box;
  pointer-events: none;
}

.modal form .quarter-datetime-icon::before {
  content: '';
  position: absolute;
  left: 2px;
  right: 2px;
  top: 3px;
  border-top: 1.5px solid #111827;
}

.modal form .quarter-datetime-icon::after {
  content: '';
  position: absolute;
  left: 3px;
  top: -3px;
  width: 6px;
  height: 3px;
  border-left: 1.5px solid #111827;
  border-right: 1.5px solid #111827;
}

.modal form .quarter-datetime-display:focus {
  border-color: #2f6ff2;
  box-shadow: 0 0 0 2px rgba(47, 111, 242, 0.16);
  outline: none;
}

.modal form .quarter-datetime-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 3px);
  z-index: 4200;
  display: grid;
  grid-template-columns: 260px 104px;
  gap: 0;
  width: 364px;
  min-height: 300px;
  padding: 0;
  border: 1px solid #b8b8b8;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.24);
  color: #111827;
  font-family: Arial, sans-serif;
  font-size: 13px;
}

.modal form .quarter-datetime-panel[hidden] {
  display: none;
}

.quarter-picker-calendar {
  padding: 12px 12px 10px;
}

.quarter-picker-header {
  display: grid;
  grid-template-columns: 1fr 30px 30px;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}

.quarter-picker-month,
.quarter-picker-nav,
.quarter-picker-link,
.quarter-picker-day,
.quarter-picker-time-option {
  appearance: none;
  border: 0;
  background: transparent;
  color: #111827;
  font: inherit;
  cursor: pointer;
}

.quarter-picker-month {
  justify-self: start;
  padding: 4px 0;
  font-weight: 700;
}

.quarter-picker-month::after {
  content: '';
  display: inline-block;
  margin-left: 4px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #111827;
  vertical-align: middle;
}

.quarter-picker-nav {
  width: 30px;
  height: 30px;
  font-size: 28px;
  line-height: 24px;
  color: #555;
}

.quarter-picker-nav:hover,
.quarter-picker-link:hover,
.quarter-picker-day:hover,
.quarter-picker-time-option:hover {
  background: #f1f3f4;
}

.quarter-picker-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px 4px;
}

.quarter-picker-weekday {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  font-weight: 700;
}

.quarter-picker-day {
  width: 28px;
  height: 28px;
  justify-self: center;
  border-radius: 0;
}

.quarter-picker-day.is-outside {
  color: #777;
}

.quarter-picker-day.is-today {
  color: #2563eb;
  font-weight: 700;
}

.quarter-picker-day.is-selected {
  background: #2f6ff2;
  color: #fff;
  font-weight: 700;
}

.quarter-picker-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.quarter-picker-link {
  padding: 6px 8px;
  color: #2563eb;
}

.quarter-picker-time {
  display: grid;
  grid-template-columns: 52px 52px;
  border-left: 1px solid #d1d5db;
}

.quarter-picker-time-column {
  max-height: 300px;
  overflow-y: auto;
  padding: 40px 0 6px;
}

.quarter-picker-time-column+.quarter-picker-time-column {
  border-left: 1px solid #ececec;
}

.quarter-picker-time-option {
  display: block;
  width: 100%;
  min-height: 32px;
  padding: 0;
  text-align: center;
}

.quarter-picker-time-option.is-selected {
  background: #2f6ff2;
  color: #fff;
  font-weight: 700;
}

.quarter-picker-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid #d1d5db;
}

.quarter-picker-action {
  appearance: none;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #2f6ff2;
  border-radius: 6px;
  background: #fff;
  color: #2f6ff2;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.quarter-picker-confirm {
  background: #2f6ff2;
  color: #fff;
}

.quarter-picker-action:hover {
  filter: brightness(0.96);
}

.quarter-picker-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  filter: none;
}

@media (max-width: 520px) {
  .modal form .quarter-datetime-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    grid-template-columns: minmax(0, 1fr);
    width: min(92vw, 364px);
    max-height: 82vh;
    overflow: auto;
  }

  .quarter-picker-time {
    grid-template-columns: 1fr 1fr;
    border-left: 0;
    border-top: 1px solid #d1d5db;
  }

  .quarter-picker-time-column {
    max-height: 160px;
    padding: 6px 0;
  }
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}

@media (max-width: 720px) {
  .modal-backdrop {
    align-items: flex-start;
    padding: 12px 0;
  }

  .modal {
    width: 94%;
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }
}

/* Buttons */
.btn {
  border: 1px solid #007bff;
  padding: 8px 12px;
  border-radius: 6px;
  background: #007bff;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

.btn.secondary {
  background: #fff;
  color: #007bff
}

/* =============================== Confirmation Dialog =============================== */
.confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 4100;
  backdrop-filter: blur(2px);
}

.confirm-modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
  max-width: 600px;
  width: 94%;
  overflow: hidden;
  font-family: 'Raleway', sans-serif;
}

.confirm-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.confirm-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  background: #eef6ff;
  color: #0b63c9;
  border: 1px solid #d9ebff;
}

.confirm-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #111;
}

.confirm-body {
  padding: 18px 20px 6px 20px;
  color: #333;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 20px 20px 20px;
}

.btn-confirm {
  background: #007bff;
  border: 1px solid #007bff;
  color: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn-confirm:hover {
  filter: brightness(0.95);
}

.btn-cancel {
  background: #fff;
  border: 1px solid #ddd;
  color: #333;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn-cancel:hover {
  background: #f7f7f7;
}

.confirm--danger .confirm-icon {
  background: #fff3f2;
  color: #c62828;
  border-color: #fbe3e1;
}

.confirm--warn .confirm-icon {
  background: #fff7e6;
  color: #b26a00;
  border-color: #ffe7bf;
}

.confirm--info .confirm-icon {
  background: #eef6ff;
  color: #0b63c9;
  border-color: #d9ebff;
}

/* Minor normalization for AdminNavBar */
.AdminNavBar {
  margin: 0 auto;
  width: 90%;
  text-align: center;
}

/* =============================== Student Directory — Filters and Table =============================== */
.filters-bar {
  max-width: 1400px;
  margin: 0 auto 12px auto;
  width: 95%;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) minmax(140px, 0.7fr) auto minmax(130px, 160px);
  gap: 10px;
  align-items: end;
}

.filters-bar label {
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.filters-bar select,
.filters-bar input[type=text],
.filters-bar button {
  width: 100%;
  padding: 6px 8px;
  box-sizing: border-box;
}

.filters-search {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(620px, 100%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.filters-search label {
  grid-column: 1 / -1;
  text-align: center;
}

.filters-search-input {
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  font-size: 15px;
  min-height: 38px;
}

.filters-search-btn {
  width: auto;
  min-width: 110px;
  min-height: 38px;
  margin: 0;
}

.payments-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 760px) 150px;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto 10px;
  width: min(1000px, 100%);
}

.payments-search-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.payments-search-controls .filters-search-input {
  flex: 1 1 auto;
  width: 100%;
}

.payments-search-controls .filters-search-btn,
.payments-search-controls .btn-clear {
  flex: 0 0 auto;
}

.payments-search-controls .btn-clear {
  min-width: 150px;
}

.paymentsInactiveToggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 14px;
  font-weight: 600;
}

.payments-results-per-page {
  display: grid;
  gap: 4px;
  width: 150px;
  font-weight: 600;
}

.payments-results-per-page span {
  font-size: 13px;
  color: #374151;
}

.prepay-beta-note {
  margin: 0 0 14px;
  text-align: center;
}

.prepayInactiveToggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  font-weight: 600;
}

.prepay-top-filter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-direction: column;
  margin: 0 0 14px;
}

.prepay-results-per-page {
  display: grid;
  gap: 4px;
  width: 150px;
  font-weight: 600;
}

.prepay-results-per-page span {
  font-size: 13px;
  color: #374151;
}

.prepay-clear-filters {
  align-self: center;
  min-height: 38px;
  white-space: nowrap;
}

.checklistFilterBar {
  max-width: 760px;
  margin: 0 auto 18px auto;
  width: 100%;
}

.checklistFilterField {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr);
  gap: 12px;
  align-items: center;
}

.checklistFilterField label {
  font-weight: 600;
  display: block;
  margin-bottom: 0;
}

.checklistFilterField select {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
}

.checklistInactiveToggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-weight: 600;
}

.checklistCard {
  max-width: 760px;
  margin: 20px auto 0;
  padding: 20px 22px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #fafcff);
  box-shadow: 0 10px 26px rgba(68, 68, 68, 0.08);
  text-align: left;
}

.checklistCardHeader {
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.checklistCardTitle {
  margin: 0;
  font-size: 24px;
  color: #0054ff;
}

.checklistCardSubtitle {
  margin: 8px 0 0;
  font-size: 15px;
  color: #5b6472;
}

.checklistItemRow {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 160px 12px 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.checklistItemRow:last-child {
  border-bottom: 0;
}

.checklistItemRowChecked {
  background: #f2fbf4;
  border-radius: 10px;
}

.checklistCheckbox {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: #0054ff;
  flex: 0 0 auto;
}

.checklistItemRowChecked .checklistCheckbox {
  accent-color: #149443;
}

.checklistItemRowChecked .checklistItemText {
  color: #116530;
}

.checklistItemText {
  flex: 1 1 auto;
  font-size: 17px;
  line-height: 1.45;
  color: #1f2937;
}

.checklistVideoButton {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
}

.checklistVideoButton:hover,
.checklistVideoButton:focus {
  background: rgba(0, 84, 255, 0.08);
  outline: none;
}

@media (max-width: 720px) {
  .filters-bar {
    grid-template-columns: 1fr;
  }

  .filters-search {
    grid-template-columns: 1fr;
  }

  .filters-search label {
    text-align: left;
  }

  .filters-search-btn {
    width: 100%;
  }

  .payments-filter-toolbar {
    grid-template-columns: 1fr;
  }

  .payments-search-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .payments-search-controls .btn-clear,
  .payments-search-controls .filters-search-btn {
    width: 100%;
  }

  .payments-results-per-page {
    width: 100%;
  }

  .checklistCard {
    padding: 16px 14px;
  }

  .checklistFilterField {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .checklistCardTitle {
    font-size: 21px;
  }

  .checklistItemText {
    font-size: 16px;
  }
}

.table-dir {
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 1700px;
  table-layout: auto;
}

.table-dir th,
.table-dir td {
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 12px 12px;
  text-align: left;
  vertical-align: middle;
  font-size: 15px;
}

.table-dir thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f7f7;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  font-weight: 700;
}

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

.table-dir tbody tr:hover {
  background: #f2f8ff;
}

.table-dir input[type=text],
.table-dir input[type=tel],
.table-dir input[type=date],
.table-dir input[type=number],
.table-dir select {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  min-width: 0;
  font-size: 14px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  background: #fff;
}

.table-dir .email-cell,
.table-dir .wrap-cell {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.actions {
  text-align: center;
  white-space: normal;
}

.block-form {
  margin: 6px 0 0 0;
  display: block;
}

.action-emoji-btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 3px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
}

.delbtn {
  padding: 6px 10px;
  font-weight: 600;
  border: 1px solid #dc2626;
  background: #dc2626;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
}

.delbtn:hover {
  filter: brightness(0.95);
}

.btn-clear {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #666;
  background: #fff;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
  min-height: 38px;
}

.btn-clear:hover {
  background: #f2f2f2;
}

.checklistbtn {
  display: inline-block;
  margin: 6px 0;
  padding: 6px 10px;
  font-weight: 600;
  border: 1px solid #0054ff;
  background: #eef4ff;
  color: #0054ff;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
}

.checklistbtn.action-emoji-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  margin: 3px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.checklistbtn:hover {
  background: #dfeaff;
  color: #0054ff;
}

/* =============================== Student Directory — Mobile Card Layout =============================== */
/* On small screens we turn each row into a card and use data-label attributes on <td> to show field labels. */

.dir-table-wrap {
  width: 98vw;
  max-width: none;
  margin: 0 auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  background: #fff;
  padding-bottom: 8px;
}

.analytics-table-wrap.dir-table-wrap {
  overflow-x: hidden;
}

.dir-table-wrap::-webkit-scrollbar {
  display: none;
  height: 0;
}

.dir-table-wrap::-webkit-scrollbar-track {
  background: #f1f3f5;
  border-radius: 999px;
}

.dir-table-wrap::-webkit-scrollbar-thumb {
  background: #b8c0cc;
  border: 3px solid #f1f3f5;
  border-radius: 999px;
}

.analytics-table.table-dir {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.table-dir th:nth-child(1),
.table-dir td:nth-child(1) {
  width: 150px;
}

.table-dir th:nth-child(2),
.table-dir td:nth-child(2) {
  width: 150px;
}

.table-dir th:nth-child(3),
.table-dir td:nth-child(3) {
  width: auto;
}

.table-dir th:nth-child(4),
.table-dir td:nth-child(4) {
  width: 135px;
}

.table-dir th:nth-child(5),
.table-dir td:nth-child(5) {
  width: 255px;
}

.table-dir th,
.table-dir td {
  overflow: visible;
}

.inline-hours-form {
  display: block;
  margin: 0;
}

.table-dir .inline-hours-input {
  width: 86px;
  max-width: 100%;
  min-width: 0;
}

/* Action buttons should stack cleanly on narrow widths */
.actions .delbtn,
.actions .checklistbtn,
.actions .btn-cancel-future {
  width: 100%;
  box-sizing: border-box;
}

.actions .action-emoji-btn {
  width: 32px;
  box-sizing: border-box;
}

.actions .block-form {
  display: inline;
  margin: 0;
}

.actions .action-emoji-btn,
.actions .btn-cancel-future.action-emoji-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 1px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 820px) {
  .table-dir {
    min-width: 0;
  }
}

@media (max-width: 720px) {

  /* Card mode */
  .dir-table-wrap {
    overflow: visible;
    width: 95%;
  }

  .analytics-table.table-dir {
    width: 100%;
    min-width: 0;
    table-layout: auto;
  }

  .table-dir {
    table-layout: auto;
    width: 100%;
    min-width: 0;
  }

  .table-dir thead {
    display: none;
  }

  .table-dir,
  .table-dir tbody,
  .table-dir tr,
  .table-dir td {
    display: block;
    width: 100%;
  }

  .table-dir tr {
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 14px;
    padding: 10px 12px;
    margin: 0 0 12px 0;
    background: #fff;
    box-sizing: border-box;
    overflow: hidden;
  }

  .table-dir td {
    border: 0;
    padding: 8px 0;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .table-dir td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 3px;
    font-weight: 600;
  }

  /* Make inputs comfortable on iOS (prevents zoom) */
  .table-dir input[type=text],
  .table-dir input[type=tel],
  .table-dir input[type=date],
  .table-dir input[type=number],
  .table-dir select,
  .table-dir button {
    font-size: 16px;
  }

  /* Actions: keep spacing */
  .actions {
    padding-top: 6px;
  }

  .actions .btn-cancel-future {
    margin-top: 0;
  }
}

/* =============================== Working Hours Panel =============================== */
.working-hours-panel {
  margin: 8px 0 20px 0;
  text-align: center;
}

.working-hours-panel>summary {
  display: list-item;
  margin: 0 auto 10px;
  width: max-content;
  text-align: left;
  cursor: pointer;
  font-weight: 400;
  padding: 6px 0;
}

.wh-grid {
  display: grid;
  justify-content: center;
  grid-template-columns: minmax(380px, 420px);
  gap: 12px;
  align-items: start;
  text-align: left;
}

.wh-form {
  border: 1px solid #e5e7eb;
  padding: 14px;
  border-radius: 10px;
  background: #fafafa;
  min-width: 380px;
  max-width: 420px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.wh-form label {
  font-weight: 600;
  display: block;
  margin: 6px 0 4px 0;
}

.wh-form input[type="time"],
.wh-form select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
  height: 38px;
}

.wh-form .btn {
  display: block;
  margin: 6px auto 0;
}

/* Bold the "Viewing calendar for" label */
.instructor-switcher label {
  font-weight: 700;
}

/* =============================== Form UI (Generic) =============================== */
:root {
  --form-max: 720px;
  --form-gap: 14px;
  --form-label: #111;
  --form-text: #222;
  --form-muted: #666;
  --form-border: #d9d9d9;
  --form-focus: #0b63c9;
  --form-bg: #fff;
  --form-bg-alt: #fafafa;
  --form-radius: 10px;
  --form-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}

.form-wrap {
  width: 100%;
  max-width: var(--form-max);
  margin: 0 auto;
  text-align: left;
}

.form-card {
  background: var(--form-bg);
  border: 1px solid #ececec;
  border-radius: var(--form-radius);
  padding: 18px;
  box-shadow: var(--form-shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--form-gap);
}

.form-grid .col-span-2 {
  grid-column: span 2;
}

@media (max-width: 760px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .col-span-2 {
    grid-column: auto;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-weight: 600;
  color: var(--form-label);
  font-size: 15px;
}

.form-hint {
  font-size: 13px;
  color: var(--form-muted);
}

.input,
.select,
.textarea {
  width: 100%;
  font: inherit;
  color: var(--form-text);
  border: 1px solid #d9d9d9;
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  box-sizing: border-box;
  outline: none;
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: #0b63c9;
  box-shadow: 0 0 0 3px rgba(11, 99, 201, .12);
}

.form-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.form-actions.center {
  justify-content: center;
}

.btn-primary {
  border: 1px solid #007bff;
  background: #007bff;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.btn-primary:hover {
  filter: brightness(0.97);
}

.form-note {
  background: #fafafa;
  border: 1px solid #eee;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
}

.alert {
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0;
  font-size: 15px;
}

.alert-good {
  color: #0a7a2f;
  background: #eaf7ee;
  border: 1px solid #bfe6cc;
}

.alert-bad {
  color: #b00020;
  background: #fde7eb;
  border: 1px solid #ffc0cb;
}

.stack-sm {
  display: grid;
  gap: 8px;
}

.stack-md {
  display: grid;
  gap: 12px;
}

input[type="submit"].btn-primary {
  appearance: none;
  border: none;
}

.form-intro {
  margin: 0 0 4px 0;
  color: #666;
  font-size: 15px;
}

/* Social links */
.social-links {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.social-links a {
  display: inline-block;
  line-height: 0;
}

.social-links img {
  width: 48px;
  height: 48px;
  display: block;
}

.enquiries-table-wrap {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.enquiries-table {
  min-width: 1460px;
}

.enquiries-table th,
.enquiries-table td {
  vertical-align: top;
  color: #111827;
  font-family: 'Raleway', Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}

.enquiries-table th {
  font-weight: 700;
}

.enquiries-table th:nth-child(3),
.enquiries-table td:nth-child(3) {
  min-width: 230px;
}

.enquiries-table th:nth-child(1),
.enquiries-table td:nth-child(1) {
  min-width: 145px;
  white-space: nowrap;
}

.enquiries-table th:nth-child(7),
.enquiries-table td:nth-child(7) {
  min-width: 140px;
  white-space: nowrap;
}

.enquiries-email-cell {
  overflow-wrap: anywhere;
  word-break: normal;
}

.enquiries-message-cell {
  min-width: 260px;
  max-width: 360px;
  line-height: 1.45;
}

.enquiries-footer {
  width: 100%;
  max-width: none;
  margin-top: 12px;
}

.enquiries-count {
  width: 100%;
  text-align: center;
}

/* Generic Cards */
:root {
  --card-bg: #fff;
  --card-border: #ececec;
  --card-radius: 10px;
  --card-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  --card-pad: 18px;
}

.card,
.form-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--card-pad);
  box-shadow: var(--card-shadow);
}

.card-body {
  padding: 0;
}

.card> :first-child,
.form-card> :first-child {
  margin-top: 0;
}

.card> :last-child,
.form-card> :last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .wh-grid {
    grid-template-columns: minmax(300px, 1fr);
  }

  .wh-form {
    min-width: 300px;
  }
}

/* =============================== Homepage media helpers and mobile =============================== */

/* Stack columns on smaller screens (legacy two-column pages) */
@media (max-width: 900px) {
  .MainContent {
    width: 94%;
    padding: 16px;
    margin: 12px auto;
  }

  .PageTitleTable {
    width: 100%;
  }

  .PageTitleH1 {
    font-size: 28px;
  }

  .MainContentColumns {
    width: 100% !important;
    min-width: 0;
    display: block;
  }

  p {
    font-size: 16px;
  }

}

/* Tiny phones */
@media (max-width: 600px) {
  .PageTitleH1 {
    font-size: 24px;
  }

  .MainContent .pgood,
  .MainContent .pbad {
    overflow-wrap: anywhere;
  }

  .account-created-actions {
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: 360px;
  }

  .account-created-actions .btn-primary {
    width: 100%;
    padding: 12px 10px;
    white-space: normal;
  }

}

/* Tighten nav text on phones */
@media (max-width: 900px) {
  .NavigationBarButtons {
    font-size: 20px;
    word-spacing: 14px;
    padding-top: 10px;
  }
}

/* Title table cell alignment and general image safety */
.PageTitleTable td {
  vertical-align: middle;
}

.MainContent img {
  max-width: 100%;
  height: auto;
}

.MainContent.team-page .team-card__photo {
  width: 172px;
  height: 172px;
}

@media (max-width: 700px) {
  .MainContent.team-page .team-card__photo {
    width: 146px;
    height: 146px;
  }
}

/* Fix any legacy float:center */
[style*="float:center"] {
  float: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: block !important;
}

/* Desktop 2-column enforcement */
@media (min-width: 901px) {
  .MainContentColumns {
    display: inline-block !important;
    width: 48% !important;
    min-width: 320px;
    vertical-align: top;
  }

  .MainContentColumns+.MainContentColumns {
    margin-left: 1.5%;
  }
}

/* Ensure MainContent contains floats so the footer stays below */
.MainContent::after {
  content: "";
  display: block;
  clear: both;
}

/* =============================== Student User Page — Lessons table mobile UI =============================== */

.sectionTitle {
  margin: 18px 0 10px;
  font-size: 20px;
}

/* Small info card used for next-lesson + messages */
.infoCardWrap {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin: 12px 0;
}

.instructorProfileThumbWrap {
  display: flex;
  width: 270px;
  min-width: 270px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.instructorProfileThumb {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  display: block;
}

.infoCard {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  margin: 0;
  flex: 1;
}

.infoCard p {
  margin: 0;
}

/* Paid hours label */
.hoursLeft {
  font-size: 18px;
  font-weight: 700;
  margin: 10px 0 14px;
}

/* Make text inside the info card uniform */
.infoCard p {
  font-size: 18px;
  font-weight: 400;
  margin: 6px 0;
}

/* Override hoursLeft styling when shown inside infoCard */
.infoCard .hoursLeft {
  font-size: 18px;
  font-weight: 400;
  margin-top: 6px;
}

.profileActionStack {
  width: 100%;
  max-width: 100%;
  margin: 18px auto 0;
}

.profileActionRow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 0;
}

.profileActionButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.profileActionButtonPrimary {
  background: linear-gradient(135deg, #0054ff, #2f6dff);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(0, 84, 255, 0.18);
}

.profileActionButtonPrimary:hover {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(0, 84, 255, 0.22);
}

.profileActionButtonSecondary {
  background: #f4f8ff;
  color: #0054ff;
  border: 1px solid rgba(0, 84, 255, 0.18);
  box-shadow: 0 10px 20px rgba(68, 68, 68, 0.08);
}

.profileActionButtonSecondary:hover {
  color: #0054ff;
  background: #eaf1ff;
  transform: translateY(-1px);
}

.profileInsuranceBanner {
  width: min(100%, 680px);
  margin-top: 16px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.profileInsuranceBanner a {
  display: block;
}

.profileInsuranceBanner img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 0;
}

/* =============================== Shop =============================== */
.shopGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
  margin: 28px auto 8px;
  max-width: 960px;
  text-align: left;
  align-items: stretch;
}

.shopCard {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 250px;
  gap: 24px;
  padding: 28px 24px 24px;
  border-radius: 22px;
  border: 1px solid rgba(0, 84, 255, 0.12);
  background:
    radial-gradient(circle at top right, rgba(0, 84, 255, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(245, 249, 255, 1), rgba(255, 255, 255, 1)),
    #ffffff;
  box-shadow: 0 18px 34px rgba(68, 68, 68, 0.10);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.shopCard:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 42px rgba(68, 68, 68, 0.14);
  border-color: rgba(0, 84, 255, 0.24);
}

.shopCard::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 7px;
  background: linear-gradient(90deg, #0054ff, #7aa7ff);
}

.shopCardHeader {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.shopTitle {
  margin: 0;
  max-width: 12ch;
  font-size: 30px;
  line-height: 1.05;
  color: #0f172a;
  text-align: center;
}

.shopPrice {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 38px;
  font-weight: 700;
  color: #0054ff;
  text-align: center;
}

.shopSaving {
  margin: -8px 0 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #0a7a2f;
  text-align: center;
}

.shopButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  margin-top: auto;
  padding: 0 20px;
  box-sizing: border-box;
  border-radius: 999px;
  background: linear-gradient(135deg, #0054ff, #2f6dff);
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  letter-spacing: 0.03em;
  box-shadow: 0 12px 24px rgba(0, 84, 255, 0.18);
}

.shopButton:hover {
  color: #ffffff;
  box-shadow: 0 16px 28px rgba(0, 84, 255, 0.24);
}

.shopInsuranceBanner {
  max-width: 960px;
  margin: 34px auto 24px;
  text-align: center;
}

.shopInsuranceBanner p {
  margin: 0 0 16px;
  color: #111827;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(21px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.15;
}

.shopInsuranceBanner a {
  display: block;
}

.shopInsuranceBanner img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 0;
}

@media (max-width: 720px) {
  .infoCardWrap {
    flex-direction: column;
    align-items: stretch;
  }

  .instructorProfileThumbWrap {
    width: 100%;
    min-width: 0;
  }

  .instructorProfileThumb {
    min-height: 160px;
  }

  .profileActionStack {
    width: 100%;
  }

  .profileActionRow {
    flex-direction: column;
  }

  .profileActionButton {
    width: 100%;
    box-sizing: border-box;
  }

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

  .shopCard {
    min-height: 0;
    padding: 22px 18px 18px;
  }

  .shopTitle {
    font-size: 24px;
    max-width: none;
  }

  .shopPrice {
    font-size: 32px;
  }
}

/* Filters for lessons */
.lessonFilters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0 14px;
  text-align: left;
}

.filterField {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.filterField span {
  opacity: 0.85;
}

.lessonFilters select {
  width: 100%;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: #fff;
  font-size: 16px;
  /* prevents iOS zoom */
  box-sizing: border-box;
}

/* Table wrapper: scroll on medium screens, cards on phones */
.tableWrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

/* Lessons table */
.lessonsTable {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.lessonsTable thead th {
  text-align: center;
  font-weight: 700;
  padding: 12px;
  font-size: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.03);
}

.lessonsTable td {
  padding: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  vertical-align: top;
}

.lessonsTable tbody tr:last-child td {
  border-bottom: 0;
}

.payments-total-row td {
  padding: 14px 12px;
  border-top: 2px solid rgba(0, 0, 0, 0.14);
  background: #f7f7f7;
  font-weight: 800;
}

.payments-total-label,
.payments-total-amount {
  display: block;
}

.payments-total-label {
  margin-bottom: 4px;
}

.payments-export-cell {
  text-align: right;
}

.payments-export-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  box-sizing: border-box;
  white-space: nowrap;
}

.prepay-invoice-action-row {
  display: flex;
  justify-content: center;
  padding: 12px 0 0;
}

/* Mobile: filters stack + table becomes cards */
@media (max-width: 720px) {
  .lessonFilters {
    grid-template-columns: 1fr;
  }

  .tableWrap {
    border: 0;
    overflow: visible;
  }

  .payments-export-cell {
    text-align: left;
  }

  .payments-export-pdf {
    width: 100%;
  }

  .prepay-top-filter-row {
    align-items: stretch;
  }

  .prepay-results-per-page {
    width: 100%;
  }

  .prepay-clear-filters {
    width: 100%;
  }

  .prepay-invoice-action-row {
    justify-content: stretch;
  }

  .lessonsTable {
    min-width: 0;
  }

  .lessonsTable thead {
    display: none;
  }

  .lessonsTable,
  .lessonsTable tbody,
  .lessonsTable tr,
  .lessonsTable td {
    display: block;
    width: 100%;
  }

  .lessonsTable tr {
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 12px;
    background: #fff;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
  }

  .lessonsTable td {
    border: 0;
    padding: 8px 0;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .lessonsTable td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 3px;
  }
}


/* =============================== Short lesson behaviour and calendar buttons =============================== */

/* Short lessons: just slightly tighter padding, no extra popover */
.booking-event.short-event {
  padding: 6px 8px;
  overflow: hidden;
}

/* Make sure any legacy popover element is hidden */
.booking-event.short-event .booking-popover,
.booking-event.short-event:hover .booking-popover {
  display: none !important;
}

/* In the edit modal, let the Add to calendar buttons breathe */
.modal .add-to-cal {
  position: static;
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Edit booking locked state */
#editBookingForm.edit-locked select,
#editBookingForm.edit-locked input,
#editBookingForm.edit-locked textarea {
  background-color: #f3f3f3;
  color: #777;
  border-color: #ddd;
}

#editBookingForm.edit-locked button.btn[type="submit"] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Keep the cancel button looking normal */
#editBookingForm.edit-locked #cancelEdit {
  opacity: 1;
  cursor: pointer;
}

/* Instagram viewer */
.ig-hero {
  position: relative;
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .1);
  background: #eee;
}

/* Image layers */
.ig-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s ease-in-out;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.ig-layer.active {
  opacity: 1;
}

/* Legacy single caption block (kept for compatibility, not used by new markup) */
.ig-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: saturate(120%) blur(3px);
  color: #fff;
  text-align: center;
  font: 500 14px/1.35 'Raleway', sans-serif;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  z-index: 6;
}

/* New caption layers that crossfade in sync with the images */
.ig-cap-layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: saturate(120%) blur(3px);
  color: #fff;
  text-align: center;
  font: 500 14px/1.35 'Raleway', sans-serif;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  z-index: 6;

  opacity: 0;
  transition: opacity .5s ease-in-out;
}

.ig-cap-layer.active {
  opacity: 1;
}

@media (max-width: 420px) {
  .ig-cap-layer {
    font-size: 13px;
  }
}

/* Badge */
.ig-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  background: #fff;
  border-radius: 999px;
  font: 600 12px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  padding: 6px 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
  z-index: 6;
}

/* Full clickable overlay for opening Instagram profile */
.ig-link {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 7;
  cursor: pointer;
}

/* Navigation arrows overlay */
.ig-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 26px;
  line-height: 40px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
  z-index: 10;
  padding: 0;
}

.ig-prev {
  left: 10px;
}

.ig-next {
  right: 10px;
}

.ig-hero:hover .ig-nav,
.ig-hero:focus-within .ig-nav {
  opacity: 1;
}

.ig-nav:hover {
  background: rgba(0, 0, 0, .6);
  transform: translateY(-50%) scale(1.03);
}

.ig-nav:active {
  transform: translateY(-50%) scale(0.97);
}

.ig-nav:focus-visible {
  outline: 2px solid #5aff37;
  outline-offset: 2px;
}

.ig-nav::after {
  content: "";
  position: absolute;
  inset: -8px;
}

@media (hover: none) and (pointer: coarse) {
  .ig-nav {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ig-layer {
    transition: none;
  }

  .ig-nav {
    transition: none;
  }

  .ig-cap-layer {
    transition: none;
  }
}


/* =============================== Cancel Future Lessons =============================== */
.btn-cancel-future {
  margin-top: 6px;
  padding: 6px 10px;
  font-weight: 600;
  border: 1px solid #f5d000;
  background: #fff9c4;
  color: #8a6d00;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  transition: all 0.15s ease-in-out;
}

.btn-cancel-future.action-emoji-btn {
  width: 32px;
  min-width: 32px;
}

.btn-cancel-future:hover {
  background: #ffe95a;
  border-color: #e0c200;
  color: #6f5700;
}

/* =============================== Analytics — Tracking table =============================== */
.analytics-title {
  margin: 6px auto 12px;
  text-align: left;
  max-width: 1400px;
  width: 95%;
  color: #0054ff;
}

.analytics-subtitle {
  margin-top: 28px;
}

.analytics-table-wrap {
  width: 95%;
  max-width: 1400px;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  background: #fff;
}

.analytics-table-wrap--secondary {
  margin-top: 0;
}

.analytics-top-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.analytics-top-filter-row label {
  font-weight: 600;
  white-space: nowrap;
}

.analytics-top-filter-row .analytics-filter-select {
  width: 220px;
}

.analytics-top-filter-row .analytics-results-per-page-select {
  width: 130px;
}

.analytics-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
  text-align: left;
}

.analytics-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f7f7;
  font-weight: 700;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 15px;
}

.analytics-table tbody td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 15px;
  vertical-align: top;
}

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

.analytics-table tbody tr:hover {
  background: #f2f8ff;
}

.analytics-table tbody tr:last-child td {
  border-bottom: 0;
}

.paid-hours-log-filter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: #fafafa;
}

.paid-hours-log-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.paid-hours-log-field label {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
}

.paid-hours-log-field .analytics-filter-input,
.paid-hours-log-field .analytics-filter-select {
  width: 100%;
}

.paid-hours-log-field--compact {
  max-width: 160px;
}

.paid-hours-log-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 38px;
  padding-left: 14px;
  padding-right: 14px;
  box-sizing: border-box;
  text-decoration: none;
  white-space: nowrap;
}

.upcoming-tests-wrap {
  margin-top: 12px;
}

.upcoming-tests-filter {
  justify-content: flex-start;
}

.upcoming-tests-results-per-page {
  display: contents;
}

.upcoming-tests-results-per-page label {
  margin-left: auto;
}

.upcoming-tests-inactive-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.upcoming-tests-table {
  min-width: 820px;
}

.upcoming-tests-table th:nth-child(4),
.upcoming-tests-table td:nth-child(4) {
  width: 220px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .paid-hours-log-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paid-hours-log-field--compact {
    max-width: none;
  }

  .paid-hours-log-clear {
    width: 100%;
  }
}

.analytics-table .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  color: #333;
  white-space: nowrap;
}

.analytics-table .wrap {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.analytics-empty {
  text-align: center;
  padding: 18px 12px;
  color: #666;
}

.analytics-footer {
  width: 95%;
  max-width: 1400px;
  margin: 12px auto 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.analytics-count {
  color: #333;
  font-size: 15px;
}

/* All Bookings: center the "Showing X to Y" line like the Analytics layout */
.bookings-footer .bookings-count {
  width: 100%;
  text-align: center;
}

.analytics-pager {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Centered pager for Analytics */
.analytics-pager--center {
  width: 100%;
  justify-content: center;
  margin-left: 0;
  margin-right: 0;
}

/* Analytics filter row styling */
.analytics-filter-row th {
  background: rgba(0, 0, 0, 0.03);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 10px 12px;
}

.analytics-date-range {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.analytics-date-sep {
  opacity: 0.7;
  font-size: 13px;
}

.analytics-filter-note {
  font-size: 13px;
}

.analytics-filter-input,
.analytics-filter-select {
  width: 100%;
  max-width: 100%;
  height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #fff;
  font-size: 14px;
  box-sizing: border-box;
}

.analytics-date-range .analytics-filter-input {
  width: 160px;
}

.paymentsDateFilters {
  display: grid;
  gap: 8px;
}

.paymentsDateFilters .analytics-filter-input {
  width: 100%;
}

.analytics-filter-input:focus,
.analytics-filter-select:focus {
  outline: none;
  border-color: rgba(0, 0, 0, 0.35);
}

.analytics-page-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.analytics-filter-reset {
  white-space: nowrap;
}

/* Mobile: stack the Page filter + reset button nicely */
@media (max-width: 700px) {
  .analytics-page-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .analytics-date-range .analytics-filter-input {
    width: 100%;
  }

  .analytics-top-filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .analytics-top-filter-row .analytics-filter-select {
    width: 100%;
  }

  .paid-hours-log-filter {
    grid-template-columns: 1fr;
  }

  .paid-hours-log-clear {
    width: 100%;
    box-sizing: border-box;
  }
}


.btn.btn-disabled {
  opacity: .5;
  pointer-events: none;
}

.analytics-page {
  color: #666;
  font-size: 14px;
  white-space: nowrap;
}

.analytics-backlink {
  margin-top: 16px;
}


/* ===== Analytics column sizing + header weight ===== */
.analytics-header-row th {
  font-weight: 700;
}

.analytics-col-time {
  width: 340px;
}

.analytics-col-account {
  width: 260px;
}

.analytics-col-page {
  width: 180px;
}

/* Keep the date range inputs on ONE LINE */
.analytics-date-range {
  flex-wrap: nowrap;
}

.analytics-date-range .analytics-filter-input {
  width: 140px;
}

/* Make sure the "to" never wraps */
.analytics-date-sep {
  white-space: nowrap;
}

/* Mobile tweaks */
@media (max-width: 720px) {
  .analytics-title {
    width: 100%;
    text-align: center;
  }

  .analytics-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .analytics-pager {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  .analytics-pager .btn {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }
}


/* =============================== All Bookings — Table Styling =============================== */
/* Reuse Analytics table look for All Bookings, plus a few small tweaks */
.bookings-table-wrap {
  margin-top: 10px;
}

.bookings-date-filter {
  display: grid;
  gap: 8px;
  min-width: 150px;
}

.booking-duplicate-note {
  margin-top: 4px;
  color: #a15c00;
  font-size: 12px;
  font-weight: 600;
}

.booking-delete-form {
  margin: 0;
}

.booking-delete-btn {
  background: #c62828;
  border-color: #a61f1f;
  color: #fff;
  white-space: nowrap;
}

.booking-delete-btn:hover {
  filter: brightness(0.95);
}

.delete-duplicates-btn {
  min-height: 38px;
  margin: 0;
  box-sizing: border-box;
  cursor: pointer;
  width: 100%;
}

.delete-duplicates-btn-disabled {
  min-height: 38px;
  margin: 0;
  box-sizing: border-box;
  cursor: not-allowed;
  width: 100%;
}

.filters-search-container {
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
}

.filters-search-left-col {
  display: flex;
  flex-direction: column;
  flex: 1 1 320px;
  gap: 10px;
}

.filters-search-middle-col {
  display: flex;
  flex-direction: column;
  flex: 0 1 180px;
  gap: 10px;
  align-items: stretch;
}

.filters-search-right-col {
  display: flex;
  flex-direction: column;
  flex: 0 1 220px;
  gap: 10px;
  align-items: stretch;
}

.filters-search-results-col {
  display: flex;
  flex-direction: column;
  flex: 0 1 160px;
  gap: 10px;
  align-items: stretch;
  margin-left: auto;
}

.filters-search-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.all-bookings-delete-message {
  margin: -4px auto 18px;
  text-align: center;
}

.all-bookings-delete-message p {
  margin: 0;
}

/* Toast messages (used on admin_all_bookings.php) */
.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(17, 17, 17, 0.95);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  z-index: 2500;
  display: none;
  font-size: 14px;
  line-height: 1.3;
  max-width: min(520px, 92vw);
  text-align: center;
}

/* Locked status dropdown styling */
.status-locked select[disabled] {
  background: #f0f0f0;
  color: #777;
  border-color: #ddd;
}

/* Make table filters comfortable on mobile */
@media (max-width: 720px) {

  .bookings-table .analytics-filter-input,
  .bookings-table .analytics-filter-select {
    font-size: 16px;
    /* prevents iOS zoom */
  }
}

/* =============================== Homepage redesign =============================== */

.MainContent.homepage {
  width: 90%;
  max-width: 1024px;
  margin: 22px auto 28px;
  padding: 0;
  text-align: left;
  background: #f6f8fb;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(18, 24, 35, 0.12);
  overflow: hidden;
}

.homepage *,
.homepage *::before,
.homepage *::after {
  box-sizing: border-box;
}

.homepage h1,
.homepage h2,
.homepage h3,
.homepage p {
  margin-top: 0;
}

.homepage h1,
.homepage h2,
.homepage h3 {
  color: #111827;
  font-family: 'Montserrat', 'Raleway', sans-serif;
  line-height: 1.05;
  letter-spacing: 0;
}

.homepage p {
  color: #4b5563;
  font-size: 17px;
  line-height: 1.65;
}

.home-hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  background: #030712;
  overflow: hidden;
}

.home-hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.home-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.18) 0%, rgba(3, 7, 18, 0.08) 46%, rgba(3, 7, 18, 0.02) 100%),
    linear-gradient(0deg, rgba(3, 7, 18, 0.03), rgba(3, 7, 18, 0.03));
  pointer-events: none;
}

.home-hero__media img {
  width: 100%;
  height: 100%;
  min-height: 480px;
  display: block;
  object-fit: cover;
  object-position: center 32%;
}

.home-carousel__image {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.home-carousel__image.is-active {
  opacity: 1;
}

.home-carousel__button {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(38, 38, 38, 0.7);
  color: #ffffff;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 36px;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
  opacity: 0;
  transform: translateY(-50%);
  transition: background 0.2s ease-in-out, transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
}

.home-hero:hover .home-carousel__button,
.home-hero:focus-within .home-carousel__button {
  opacity: 0.9;
}

.home-carousel__button:hover,
.home-carousel__button:focus {
  background: rgba(38, 38, 38, 0.82);
  color: #ffffff;
  opacity: 1;
  transform: translateY(-50%) scale(1.04);
}

.home-carousel__button:focus {
  outline: 2px solid #16a34a;
  outline-offset: 3px;
}

.home-carousel__button--prev {
  left: 18px;
  padding-bottom: 4px;
}

.home-carousel__button--next {
  right: 18px;
  padding-bottom: 4px;
}

.home-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: clamp(28px, 4vw, 52px) clamp(28px, 4vw, 52px) 14px;
  background: transparent;
}

.home-hero h1 {
  max-width: 620px;
  margin-bottom: 20px;
  color: #ffffff;
  font-size: clamp(42px, 5vw, 68px);
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 0;
}

.home-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border-radius: 6px;
  font-family: 'Montserrat', 'Raleway', sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.home-button--primary {
  background: #16a34a;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.26);
}

.home-button--secondary {
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(3, 7, 18, 0.58);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.home-button:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.home-section {
  padding: clamp(44px, 6vw, 76px) clamp(20px, 5vw, 64px);
}

.home-section__heading {
  max-width: 100%;
  margin-bottom: 30px;
}

.home-section__heading h2,
.home-panel h2,
.home-final-cta h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 48px);
}

.home-services-section .home-section__heading h2 {
  white-space: nowrap;
  font-size: clamp(34px, 4vw, 47px);
}

.home-intro-section {
  background: #ffffff;
}

.home-intro p {
  font-size: 19px;
}

.home-intro p:last-child {
  margin-bottom: 0;
}

.home-services-section {
  background:
    linear-gradient(180deg, #eef5fa 0%, #f8fbfd 100%);
}

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

.service-card {
  position: relative;
  min-height: 138px;
  display: flex;
  align-items: center;
  padding: 22px;
  border: 1px solid #d7e3ec;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(22, 163, 74, 0.08), rgba(255, 255, 255, 0) 42%),
    #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.service-card h3 {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.18;
}

.service-card p {
  margin-bottom: 0;
  font-size: 15px;
}

.home-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 0;
  padding: 0;
  background: #111827;
}

.home-panel {
  min-height: 470px;
}

.home-panel--dark {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 5vw, 64px);
  background: #111827;
}

.home-panel--dark h2,
.home-panel--dark p {
  color: #ffffff;
}

.home-socials-title {
  max-width: 9ch;
  margin: 0;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 0.95;
}

.home-panel--dark>p {
  color: #d1d5db;
}

.home-panel--instagram {
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  background: #020617;
}

.home-panel--instagram .ig-hero {
  width: 100%;
  max-width: none;
  min-height: 470px;
  height: 100%;
  margin: 0;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
}

.home-media-section {
  background: #ffffff;
}

.media-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.36fr);
  gap: 22px;
  align-items: stretch;
}

.media-panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid #dde7ef;
  border-radius: 8px;
  background: #f8fafc;
}

.media-panel h3 {
  margin-bottom: 18px;
  font-size: 24px;
}

.social-panel {
  display: grid;
  align-content: center;
  gap: 14px;
}

.social-panel__link {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #dbe6ef;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-family: 'Montserrat', 'Raleway', sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.social-panel__link:hover {
  color: #111827;
  border-color: #bdd0de;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.social-panel__link img {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
}

.social-panel__button {
  width: 100%;
  margin-top: 4px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #0f172a;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-wrapper .cookieconsent-optout-marketing {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  text-align: center;
  background: #111827;
}

.video-wrapper .cookieconsent-optout-marketing p {
  max-width: 520px;
  margin: 0;
  color: #e5e7eb;
  font-size: 15px;
}

.home-pricing-section {
  background:
    linear-gradient(180deg, #eef5fa 0%, #f8fbfd 100%);
}

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

.pricing-card {
  position: relative;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 22px;
  border: 1px solid #dbe6ef;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(22, 163, 74, 0.08), rgba(255, 255, 255, 0) 42%),
    #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
  text-align: left;
  overflow: hidden;
}

.pricing-card h3 {
  margin-bottom: 12px;
  color: #111827;
  font-size: 20px;
  line-height: 1.18;
}

.pricing-card__price {
  margin: 0;
  color: #2f64ff;
  font-family: 'Montserrat', 'Raleway', sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.08;
}

.pricing-card__saving {
  margin: 8px 0 0;
  color: #15803d;
  font-family: 'Montserrat', 'Raleway', sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.pricing-card--cta {
  align-items: stretch;
}

.pricing-card--cta h3 {
  margin-bottom: 18px;
}

.pricing-card__cta {
  width: 100%;
  margin-top: auto;
}

.home-insurance-banner {
  padding: 0;
  text-align: center;
  background: #ffffff;
}

.home-insurance-banner p {
  margin: 0;
  padding: 0 clamp(20px, 5vw, 64px) 30px;
  color: #111827;
  font-family: 'Montserrat', 'Raleway', sans-serif;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  text-align: left;
}

.home-insurance-banner a {
  display: block;
}

.home-insurance-banner img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 0;
}

.home-final-cta {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  justify-content: center;
  padding: 34px clamp(20px, 5vw, 64px);
  text-align: center;
  background: #16a34a;
}

.home-dvsa-badge {
  width: min(430px, 100%);
  padding: 12px 16px;
  border-radius: 4px;
  background: #ffffff;
}

.home-dvsa-badge img {
  width: min(400px, 100%);
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.home-final-cta h2,
.home-final-cta p {
  color: #ffffff;
}

.home-final-cta h2 {
  margin-bottom: 10px;
  font-size: clamp(25px, 3vw, 38px);
}

.home-final-cta p {
  margin-bottom: 0;
  color: #eaffef;
  font-size: 16px;
}

@media (max-width: 980px) {
  .MainContent.homepage {
    width: 94%;
    max-width: 1024px;
  }

  .home-hero,
  .home-intro-section,
  .home-split,
  .media-grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: 390px;
  }

  .home-hero__content,
  .home-hero__media img {
    min-height: 390px;
  }

  .home-hero__media::after {
    background:
      linear-gradient(90deg, rgba(3, 7, 18, 0.24) 0%, rgba(3, 7, 18, 0.12) 62%, rgba(3, 7, 18, 0.04) 100%),
      linear-gradient(0deg, rgba(3, 7, 18, 0.04), rgba(3, 7, 18, 0.04));
  }

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

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

  .home-panel,
  .home-panel--instagram .ig-hero {
    min-height: 360px;
  }

  .home-socials-title {
    max-width: 12ch;
  }

}

@media (max-width: 640px) {
  .MainContent.homepage {
    width: 100%;
    margin: 0 auto 18px;
    border-radius: 0;
  }

  .home-hero__content,
  .home-section,
  .home-panel--dark,
  .home-final-cta {
    padding: 30px 18px;
  }

  .home-hero {
    display: block;
    min-height: 0;
    background: #030712;
  }

  .home-hero__media {
    position: relative;
    inset: auto;
    height: 340px;
  }

  .home-hero__content,
  .home-hero__media img {
    min-height: 0;
    object-position: center 32%;
  }

  .home-hero__content {
    min-height: 0;
    padding-top: 14px;
    background: #030712;
  }

  .home-hero__media img {
    height: 340px;
  }

  .home-carousel__button {
    width: 38px;
    height: 38px;
    font-size: 31px;
  }

  .home-carousel__button--prev {
    left: 10px;
  }

  .home-carousel__button--next {
    right: 10px;
  }

  .home-hero h1 {
    font-size: 38px;
  }

  .homepage p {
    font-size: 16px !important;
  }

  .home-services-section .home-section__heading h2 {
    white-space: normal;
    font-size: 32px;
  }

  .home-actions,
  .home-button {
    width: 100%;
  }

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

  .service-card {
    min-height: 116px;
    padding: 20px;
  }

  .media-panel {
    padding: 14px;
  }

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

  .pricing-card {
    min-height: 126px;
    padding: 20px;
  }

  .home-dvsa-badge {
    width: min(360px, 100%);
  }

  .home-dvsa-badge img {
    width: min(330px, 100%);
  }
}

/* ================= Account Settings ================= */
.account-settings-page {
  max-width: 900px;
}

.account-settings-page .account-settings-shell {
  display: block;
  width: 100%;
  max-width: 560px;
  min-width: 0;
  margin: 0 auto;
  text-align: left;
}

.account-settings-page .account-settings-shell>p:first-child {
  margin: 6px 0 18px;
  text-align: center;
}

.account-settings-page .account-settings-shell>p:first-child a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #d7e2ff;
  border-radius: 8px;
  color: #2459c7;
  background: #f7f9ff;
  font-size: 16px;
  font-weight: 600;
}

.account-settings-page .account-settings-shell>p:first-child a:hover {
  color: #1743a3;
  background: #edf3ff;
  border-color: #b9cdf7;
}

.account-settings-page .settings-card {
  display: grid;
  grid-template-columns: 170px minmax(220px, 1fr);
  gap: 12px 14px;
  align-items: center;
  margin: 16px 0;
  padding: 20px;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
}

.account-settings-page .settings-card h2 {
  grid-column: 1 / -1;
  margin: 0 0 4px;
  color: #111827;
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  line-height: 1.25;
  text-align: left;
}

.account-settings-page .settings-card .settings-card-help {
  grid-column: 1 / -1;
  margin: 0;
  color: #334155;
  font-size: 15px;
  line-height: 1.45;
}

.account-settings-page .post-codes-form textarea {
  grid-column: 1 / -1;
  width: 100%;
}

.account-settings-page .settings-card label {
  margin: 0;
  color: #334155;
  font-size: 15px;
  text-align: right;
}

.account-settings-page .settings-card .settings-checkbox {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 4px 0;
  padding: 12px;
  border: 1px solid #d7e2ff;
  border-radius: 8px;
  background: #f7f9ff;
  color: #334155;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
}

.account-settings-page .settings-card .settings-checkbox input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #2f6ff2;
}

.account-settings-page .settings-card input[type="email"],
.account-settings-page .settings-card input[type="text"],
.account-settings-page .settings-card select,
.account-settings-page .settings-card textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 15px;
  line-height: 1.2;
  box-sizing: border-box;
  outline: none;
}

.account-settings-page .settings-card input[type="email"],
.account-settings-page .settings-card input[type="text"],
.account-settings-page .settings-card select {
  height: 42px;
  padding: 0 12px;
}

.account-settings-page .settings-card textarea {
  min-height: 150px;
  padding: 10px 12px;
  resize: vertical;
}

.account-settings-page .settings-card input[readonly] {
  color: #475569;
  background: #f8fafc;
}

.account-settings-page .settings-card input:focus,
.account-settings-page .settings-card select:focus,
.account-settings-page .settings-card textarea:focus {
  border-color: #2f6ff2;
  box-shadow: 0 0 0 3px rgba(47, 111, 242, 0.16);
}

.account-settings-page .settings-card .button {
  grid-column: 1 / -1;
  justify-self: center;
  min-height: 42px;
  min-width: 180px;
  padding: 0 18px;
  border: 1px solid #1f5de2;
  border-radius: 8px;
  background: #2f6ff2;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}

.account-settings-page .settings-card .button:hover {
  background: #2459c7;
  border-color: #2459c7;
}

.account-settings-page .settings-card .button:active {
  transform: translateY(1px);
}

.account-settings-page .calendar-privacy-form {
  grid-template-columns: 170px minmax(220px, 1fr);
  margin-top: 14px;
}

.account-settings-page .calendar-privacy-save {
  width: 180px;
}

@media (max-width: 640px) {
  .account-settings-page {
    width: calc(100% - 28px);
    padding: 16px;
  }

  .account-settings-page .settings-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px;
  }

  .account-settings-page .settings-card h2,
  .account-settings-page .settings-card label {
    text-align: left;
  }

  .account-settings-page .settings-card .button {
    grid-column: 1;
    width: 100%;
  }

  .account-settings-page .calendar-privacy-save {
    width: 100%;
  }
}

/* ================= Email Activation ================= */
.email-action-page {
  max-width: 820px;
}

.email-action-page .email-action-shell {
  display: block;
  width: 100%;
  max-width: 520px;
  min-width: 0;
  margin: 0 auto;
  text-align: left;
}

.email-action-card {
  margin: 8px auto 0;
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
}

.email-action-intro {
  margin: 0 0 16px;
  color: #334155;
  font-size: 17px;
  line-height: 1.5;
  text-align: left;
}

.email-action-form {
  display: grid;
  gap: 10px;
}

.email-action-form label:not(.email-action-checkbox) {
  color: #334155;
  font-size: 15px;
  font-weight: 700;
}

.email-action-form input[type="password"] {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 16px;
  box-sizing: border-box;
  outline: none;
}

.email-action-form input[type="password"]:focus {
  border-color: #2f6ff2;
  box-shadow: 0 0 0 3px rgba(47, 111, 242, 0.16);
}

.email-action-checkbox {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 6px 0 2px;
  color: #334155;
  font-size: 15px;
  line-height: 1.45;
}

.email-action-checkbox input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #2f6ff2;
}

.email-action-checkbox a {
  color: #2459c7;
  font-weight: 700;
}

.email-action-submit {
  min-height: 44px;
  margin-top: 6px;
  padding: 0 18px;
  border: 1px solid #1f5de2;
  border-radius: 8px;
  background: #2f6ff2;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}

.email-action-submit:hover {
  background: #2459c7;
  border-color: #2459c7;
}

.email-action-submit:active {
  transform: translateY(1px);
}

.email-action-page .pgood,
.email-action-page .pbad {
  margin: 12px 0;
}

.email-action-page .email-action-shell>p {
  text-align: center;
}

@media (max-width: 640px) {
  .email-action-page {
    width: calc(100% - 28px);
    padding: 16px;
  }

  .email-action-card {
    padding: 16px;
  }
}

/* ================= Student Calendar: Private Message ================= */
.calendar-private-card {
  max-width: 620px;
  margin: 28px auto;
  padding: 22px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  text-align: center;
}

.calendar-private-card h2 {
  margin: 0 0 8px 0;
  color: #1f2937;
  font-size: 26px;
}

.calendar-private-card p {
  margin: 0 0 16px 0;
  color: #4b5563;
  font-size: 16px;
}

.calendar-private-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid #1f5de2;
  border-radius: 8px;
  background: #2f6ff2;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}

.calendar-private-back-btn:hover {
  background: #2459c7;
  border-color: #2459c7;
}

.calendar-private-back-btn:active {
  transform: translateY(1px);
}

/* =============================== Calendar Visual Refresh =============================== */
.calendar-page .calendar-container {
  margin-top: 18px;
  border: 1px solid #d7dee7;
  box-shadow: none;
}

.calendar-page .instructor-switcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 auto 16px;
}

.calendar-page .instructor-switcher label {
  color: #334155;
  font-weight: 600;
}

.calendar-page .instructor-switcher select {
  min-width: 240px;
  min-height: 38px;
  padding: 0 38px 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  cursor: pointer;
}

.calendar-page .instructor-switcher select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: none;
}

.calendar-page .instructor-switcher .calendar-switcher-checkbox {
  flex-basis: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
}

.calendar-page .instructor-postcodes-summary {
  max-width: 760px;
  margin: -6px auto 16px;
  color: #334155;
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
}

.calendar-page .instructor-postcodes-summary span {
  color: #1f2937;
}

.calendar-page .calendar-view-switch {
  gap: 8px;
  margin-bottom: 16px;
  scroll-margin-top: 80px;
}

.calendar-page .calendar-view-switch a,
.calendar-page .calendar-nav a,
.calendar-page .goto-date button,
.calendar-page .calendar-actions .button {
  border: 1px solid #2563eb;
  color: #2563eb;
  background: #fff;
  border-radius: 6px;
  padding: 8px 14px;
  text-decoration: none;
  font-weight: 600;
}

.calendar-page .calendar-view-switch a.active,
.calendar-page .calendar-nav a:hover,
.calendar-page .goto-date button:hover,
.calendar-page .calendar-actions .button:hover {
  background: #2563eb;
  color: #fff;
}

.calendar-page .calendar-header {
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.calendar-page .calendar-header h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.6vw, 1.85rem);
  color: #334155;
}

.calendar-page .calendar-nav-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.calendar-page .calendar-nav,
.calendar-page .goto-date {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.calendar-page .goto-date input[type="date"] {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
}

.calendar-page .weekly-calendar-grid {
  border: 1px solid #d7dee7;
  background: #fff;
  min-width: 920px;
  max-height: clamp(616px, 72vh, 820px);
  overflow: auto;
  position: relative;
}

.calendar-page .empty-corner,
.calendar-page .day-header {
  position: sticky;
  top: 0;
  z-index: 8;
  min-height: 56px;
  border-bottom: 1px solid #d7dee7;
  border-right: 1px solid #d7dee7;
  background: #f8fafc;
}

.calendar-page .empty-corner {
  left: 0;
  z-index: 9;
}

.calendar-page .day-header {
  color: #4b5563;
}

.calendar-page .current-day-header {
  background: #dbeafe;
  border-bottom: 2px solid #3b82f6;
}

.calendar-page .time-column {
  position: relative;
  border-right: 1px solid #d7dee7;
  background:
    repeating-linear-gradient(to bottom,
      #ffffff 0,
      #ffffff 39px,
      #e5e7eb 40px);
}

.calendar-page .time-slot-label {
  height: 40px;
  padding-top: 2px;
  text-align: center;
  color: #52525b;
  font-size: 0.95rem;
}

.calendar-page .event-columns-container {
  grid-template-columns: repeat(7, minmax(120px, 1fr));
}

.calendar-page .day-column-events {
  min-height: 100%;
  border-right: 1px solid #d7dee7;
  background:
    repeating-linear-gradient(to bottom,
      #ffffff 0,
      #ffffff 39px,
      #e5e7eb 40px);
}

.calendar-page .current-day-column {
  background:
    linear-gradient(to bottom, rgba(219, 234, 254, 0.55), rgba(219, 234, 254, 0.55)),
    repeating-linear-gradient(to bottom,
      #ffffff 0,
      #ffffff 39px,
      #e5e7eb 40px);
}

.calendar-page .booking-event {
  padding: 8px;
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.2;
  color: #1f2937;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.calendar-page .booking-event b {
  margin-bottom: 4px;
  color: #1d4ed8;
}

.calendar-page .booking-event span {
  color: #475569;
  margin-bottom: 4px;
}

.calendar-page .booking-status-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.calendar-page .add-to-cal {
  position: static;
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  margin-top: 2px;
  align-items: center;
  justify-content: space-between;
  opacity: 1;
}

.calendar-page .add-to-cal a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 4px;
  border-radius: 4px;
  border: 1px solid #3b82f6;
  color: #2563eb;
  background: #fff;
  text-decoration: none;
  font-size: 0.62rem;
  line-height: 1.15;
  font-weight: 500;
  white-space: nowrap;
  flex: 1 1 0;
  min-width: 0;
}

.calendar-page .monthly-calendar {
  border: 1px solid #d7dee7;
  background: #fff;
  border-radius: 0;
  max-height: clamp(420px, 62vh, 720px);
  overflow: auto;
  position: relative;
}

.calendar-page .month-day-name,
.calendar-page .month-day-cell {
  border-right: 1px solid #d7dee7;
  border-bottom: 1px solid #d7dee7;
}

.calendar-page .month-day-name {
  position: sticky;
  top: 0;
  z-index: 8;
  padding: 12px 8px;
  color: #4b5563;
  background: #f8fafc;
}

.calendar-page .month-day-cell {
  min-height: 140px;
  background: #fff;
}

.calendar-page .month-day-cell.is-today {
  background: #eff6ff;
}

.calendar-page .month-day-cell.is-outside-month {
  background: #f8fafc;
  color: #94a3b8;
}

.calendar-page .month-day-head {
  padding: 8px 10px 2px;
}

.calendar-page .month-day-body {
  gap: 6px;
  padding: 6px 8px 10px;
}

.calendar-page .month-event-chip {
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  font-size: 0.8rem;
}

.calendar-page .month-event-time {
  min-width: 0;
}

.calendar-page .month-event-status {
  color: #475569;
  font-size: 0.75rem;
}

@media (max-width: 1100px) {
  .calendar-page .weekly-calendar-grid {
    display: grid;
  }
}

@media (max-width: 760px) {
  .calendar-page .calendar-header h2 {
    font-size: 1.5rem;
  }

  .calendar-page .monthly-calendar {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .calendar-page .month-day-name {
    display: none;
  }
}

/* =============================== HMP Calendar =============================== */
.hmp-calendar-page .calendar-view-switch {
  gap: 8px;
  margin-bottom: 16px;
}

.hmp-calendar-page .calendar-view-switch a,
.hmp-calendar-page .calendar-nav a,
.hmp-calendar-page .goto-date button {
  border: 1px solid #2563eb;
  color: #2563eb;
  background: #fff;
  border-radius: 6px;
  padding: 8px 14px;
  text-decoration: none;
  font-weight: 600;
}

.hmp-calendar-page .calendar-view-switch a.active {
  background: #2563eb;
  color: #fff;
}

.hmp-calendar-page .calendar-header {
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hmp-calendar-page .calendar-header h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.6vw, 1.85rem);
  color: #334155;
}

.hmp-calendar-page .calendar-nav-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hmp-calendar-page .calendar-nav,
.hmp-calendar-page .goto-date {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.hmp-calendar-page .goto-date input[type="date"] {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
}

.hmp-calendar-page .weekly-calendar-grid {
  border: 1px solid #d7dee7;
  background: #fff;
  min-width: 920px;
}

.hmp-calendar-page .empty-corner,
.hmp-calendar-page .day-header {
  min-height: 56px;
  border-bottom: 1px solid #d7dee7;
  border-right: 1px solid #d7dee7;
  background: #f8fafc;
}

.hmp-calendar-page .day-header {
  color: #4b5563;
}

.hmp-calendar-page .current-day-header {
  background: #dbeafe;
  border-bottom: 2px solid #3b82f6;
}

.hmp-calendar-page .time-column {
  position: relative;
  border-right: 1px solid #d7dee7;
  background:
    repeating-linear-gradient(to bottom,
      #ffffff 0,
      #ffffff 39px,
      #e5e7eb 40px);
}

.hmp-calendar-page .time-slot-label {
  height: 40px;
  padding-top: 2px;
  text-align: center;
  color: #52525b;
  font-size: 0.95rem;
}

.hmp-calendar-page .event-columns-container {
  grid-template-columns: repeat(7, minmax(120px, 1fr));
}

.hmp-calendar-page .day-column-events {
  min-height: 100%;
  border-right: 1px solid #d7dee7;
  background:
    repeating-linear-gradient(to bottom,
      #ffffff 0,
      #ffffff 39px,
      #e5e7eb 40px);
}

.hmp-calendar-page .current-day-column {
  background:
    linear-gradient(to bottom, rgba(219, 234, 254, 0.55), rgba(219, 234, 254, 0.55)),
    repeating-linear-gradient(to bottom,
      #ffffff 0,
      #ffffff 39px,
      #e5e7eb 40px);
}

.hmp-calendar-page .booking-event {
  padding: 8px;
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.2;
  color: #1f2937;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.hmp-calendar-page .booking-event b {
  margin-bottom: 4px;
  color: #1d4ed8;
}

.hmp-calendar-page .booking-event span {
  color: #475569;
  margin-bottom: 4px;
}

.hmp-calendar-page .booking-status-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.hmp-calendar-page .add-to-cal {
  position: static;
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  margin-top: 2px;
  align-items: center;
  justify-content: space-between;
  opacity: 1;
}

.hmp-calendar-page .add-to-cal a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 4px;
  border-radius: 4px;
  border: 1px solid #3b82f6;
  color: #2563eb;
  background: #fff;
  text-decoration: none;
  font-size: 0.62rem;
  line-height: 1.15;
  font-weight: 500;
  white-space: nowrap;
  flex: 1 1 0;
  min-width: 0;
}

.hmp-calendar-page .status-scheduled {
  border-color: #7dd3fc;
  background: #e0f2fe;
}

.hmp-calendar-page .status-tentative {
  border-color: #facc15;
  background: #fef3c7;
}

.hmp-calendar-page .status-confirmed {
  border-color: #86efac;
  background: #dcfce7;
}

.hmp-calendar-page .status-delivered {
  border-color: #a3e635;
  background: #f0fdf4;
}

.hmp-calendar-page .status-cancelled {
  border-color: #fca5a5;
  background: #fef2f2;
}

.hmp-calendar-page .status-default {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.hmp-calendar-page .monthly-calendar {
  border: 1px solid #d7dee7;
  background: #fff;
  border-radius: 0;
}

.hmp-calendar-page .month-day-name,
.hmp-calendar-page .month-day-cell {
  border-right: 1px solid #d7dee7;
  border-bottom: 1px solid #d7dee7;
}

.hmp-calendar-page .month-day-name {
  padding: 12px 8px;
  color: #4b5563;
  background: #f8fafc;
}

.hmp-calendar-page .month-day-cell {
  min-height: 140px;
  background: #fff;
}

.hmp-calendar-page .month-day-cell.is-today {
  background: #eff6ff;
}

.hmp-calendar-page .month-day-cell.is-outside-month {
  background: #f8fafc;
  color: #94a3b8;
}

.hmp-calendar-page .month-day-head {
  padding: 8px 10px 2px;
}

.hmp-calendar-page .month-day-body {
  gap: 6px;
  padding: 6px 8px 10px;
}

.hmp-calendar-page .month-event-chip {
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  font-size: 0.8rem;
}

.hmp-calendar-page .month-event-time {
  min-width: 0;
}

.hmp-calendar-page .month-event-status {
  color: #475569;
  font-size: 0.75rem;
}

@media (max-width: 1100px) {
  .hmp-calendar-page .weekly-calendar-grid {
    display: grid;
  }
}

@media (max-width: 760px) {
  .hmp-calendar-page .calendar-header h2 {
    font-size: 1.5rem;
  }

  .hmp-calendar-page .monthly-calendar {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .hmp-calendar-page .month-day-name {
    display: none;
  }
}

.hmp-calendar-page .booking-detail-trigger {
  cursor: pointer;
}

.hmp-calendar-page .booking-detail-trigger:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.hmp-calendar-page .hmp-booking-view-grid {
  display: grid;
  gap: 10px;
}

.hmp-calendar-page .hmp-booking-view-grid label {
  display: block;
  font-weight: 600;
  margin-top: 2px;
}

.hmp-calendar-page .hmp-booking-view-grid input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  background: #f8fafc;
  color: #334155;
}

.hmp-calendar-page .hmp-modal-cal-links {
  margin-top: 14px;
  justify-content: flex-start;
  gap: 8px;
}

.hmp-calendar-page .hmp-modal-cal-links a {
  flex: 0 0 auto;
  font-size: 0.95rem;
  padding: 8px 12px;
}
