:root {
  color-scheme: light;
  --green-900: #1F3D2E;
  --green-700: #3E5A43;
  --gold: #C9A66B;
  --cream: #F3E9D2;
  --paper: #FAF8F3;
  --surface: #FFFFFF;
  --ink: #0F1E17;
  --muted: #69736B;
  --line: #E8E1D4;
  --danger: #A84A42;
  --blue: #365D78;
  --shadow: 0 14px 34px rgba(31, 61, 46, 0.12);
  --soft-shadow: 0 8px 20px rgba(31, 61, 46, 0.08);
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.statistics-page {
  gap: 0.75rem;
}

.statistics-title {
  align-items: flex-start;
}

.statistics-title h2 {
  font-family: var(--sans);
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.statistics-title p {
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.statistics-period-panel {
  border-radius: 8px;
  padding: 0.62rem 1rem;
}

.statistics-period-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(260px, 1fr) auto;
  align-items: end;
  gap: 1rem;
}

.statistics-selector {
  width: 100%;
  font-size: 0.76rem;
}

.statistics-selector span,
.statistics-period-switch-wrap > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.statistics-selector select {
  min-height: 38px;
  border-radius: 7px;
  padding: 0.5rem 0.65rem;
  font-size: 0.84rem;
}

.statistics-period-nav {
  justify-self: center;
  border: 0;
  background: transparent;
  padding: 0;
}

.statistics-period-nav strong {
  min-width: 220px;
  color: var(--ink);
  font-size: 1.02rem;
}

.statistics-period-nav button,
.statistics-period-switch button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf9;
  box-shadow: 0 5px 12px rgba(31, 61, 46, 0.06);
}

.statistics-period-nav button:hover,
.statistics-period-switch button:hover {
  border-color: rgba(62, 90, 67, 0.28);
  background: #f7f4ec;
  color: var(--green-900);
}

.statistics-period-switch-wrap {
  display: grid;
  gap: 0.32rem;
}

.statistics-period-switch {
  min-width: 148px;
  border: 1px solid var(--line);
  background: #fffdf9;
  border-radius: 8px;
  padding: 0.18rem;
}

.statistics-period-switch button {
  border: 0;
  box-shadow: none;
  min-height: 34px;
  padding: 0.38rem 0.7rem;
}

.statistics-period-switch button.active,
.statistics-period-switch button.active:hover {
  background: var(--green-900);
  color: #fff;
}

.statistics-note {
  position: relative;
  overflow: hidden;
  align-items: flex-start;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(62, 90, 67, 0.08), rgba(255, 253, 249, 0.95));
  padding: 0.72rem 1rem;
}

.statistics-note::after {
  content: "";
  position: absolute;
  right: 1rem;
  bottom: -1.15rem;
  width: 170px;
  height: 78px;
  background: url("/assets/horse3.png") center / contain no-repeat;
  opacity: 0.07;
  pointer-events: none;
}

.statistics-note-icon {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  border: 1px solid rgba(31, 61, 46, 0.28);
  border-radius: 50%;
  background: #fffdf9;
  color: var(--green-900);
}

.statistics-note-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.statistics-note div {
  display: grid;
  gap: 0.12rem;
}

.statistics-note strong {
  white-space: normal;
  font-size: 0.9rem;
}

.statistics-note span:not(.statistics-note-icon) {
  max-width: 860px;
  font-size: 0.82rem;
}

.statistics-summary-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0.8rem 0;
}

.statistics-summary-panel .statistics-card {
  min-height: 96px;
  grid-template-columns: 58px minmax(0, 1fr);
  align-content: center;
  align-items: center;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 0.2rem 1.05rem;
}

.statistics-summary-panel .statistics-card:last-child {
  border-right: 0;
}

.statistics-card-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(62, 90, 67, 0.17);
  border-radius: 50%;
  background: #eef6ed;
  color: var(--green-900);
}

.statistics-card-trophy .statistics-card-icon {
  background: #fff4dc;
  color: #bd8b32;
}

.statistics-card-group .statistics-card-icon {
  background: #eef6ed;
}

.statistics-card-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.statistics-card-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.statistics-summary-panel .statistics-card span {
  font-size: 0.78rem;
}

.statistics-summary-panel .statistics-card strong {
  margin-top: 0.06rem;
  display: block;
  font-family: var(--display);
  font-size: 1.55rem;
}

.statistics-summary-panel .statistics-card small {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.75rem;
}

.statistics-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
}

.statistics-table-panel {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  padding: 0.78rem;
  border-radius: 8px;
}

.statistics-table-panel::after {
  content: "";
  position: absolute;
  right: 0.7rem;
  bottom: -0.75rem;
  width: 130px;
  height: 64px;
  background: url("/assets/horse3.png") center / contain no-repeat;
  opacity: 0.055;
  pointer-events: none;
}

.statistics-panel-heading {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.statistics-panel-heading h2 {
  font-size: 1.02rem;
}

.statistics-panel-heading span {
  font-size: 0.72rem;
}

.statistics-panel-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-900);
  color: #fff;
}

.statistics-panel-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.statistics-panel-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.82;
}

.statistics-table {
  position: relative;
  z-index: 1;
  gap: 0.34rem;
  overflow: visible;
}

.statistics-row {
  min-width: 0;
  /*grid-template-columns: minmax(118px, 1.2fr) 56px 56px minmax(98px, 0.9fr);*/
  gap: 0.48rem;
}

.statistics-row-head {
  padding: 0 0.22rem;
  font-size: 0.68rem;
}

.statistics-row:not(.statistics-row-head) {
  min-height: 58px;
  border-radius: 8px;
  padding: 0.48rem 0.48rem;
  font-size: 0.76rem;  
}

.statistics-name {
  gap: 0.42rem;
}

.statistics-name strong {
  white-space: normal;
}

.statistics-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 50%;
}

.statistics-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 34px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  background: #eff5ed;
  color: var(--green-900);
  font-size: 0.68rem;
  font-weight: 900;
}

.statistics-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.statistics-avatar.placeholder img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.statistics-hours {
  margin: 0.6rem;
  display: grid;
  gap: 0.14rem;
}

.statistics-hours strong {
  line-height: 1;
}

.statistics-mini-progress {
  width: 100%;
  height: 6px;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: #f0eadf;
}

.statistics-mini-progress b {
  height: 100%;
  min-width: 3px;
  display: block;
  border-radius: inherit;
}

@media (max-width: 1280px) {
  .statistics-period-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .statistics-period-nav {
    justify-self: stretch;
  }

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

  .statistics-row {
    /*grid-template-columns: minmax(180px, 1.4fr) 84px 84px minmax(150px, 0.9fr);*/

  }
}

@media (max-width: 760px) {
  .statistics-grid {
    gap: 0.48rem;
  }

  .statistics-table-panel {
    min-height: 0;
  }

  .statistics-summary-panel {
    grid-template-columns: 1fr;
    padding: 0.35rem 0;
  }

  .statistics-summary-panel .statistics-card {
    min-height: 84px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.72rem;
  }

  .statistics-summary-panel .statistics-card:last-child {
    border-bottom: 0;
  }

  .statistics-period-nav {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px 58px;
  }

  .statistics-period-nav strong {
    min-width: 0;
    padding-inline: 0.25rem;
    font-size: 0.82rem;
  }

  .statistics-period-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  .statistics-table {
    overflow-x: visible;
  }

  .statistics-row {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.65rem;
    row-gap: 0.18rem;
    margin: 0.2rem 0;
  }

  .statistics-name {
    grid-column: 1;
    grid-row: 1;
  }

  .statistics-hours {
    display: contents;
  }

  .statistics-hours strong {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    font-size: 1.08rem;
    white-space: nowrap;
  }

  .statistics-hours small {
    grid-column: 1 / -1;
    padding-left: calc(34px + 0.42rem);
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.is-offline [data-view="settings"],
.is-offline [data-view="notifications"],
.is-offline [data-action="install-app"],
.is-offline [data-action="open-install-guide-video"] {
  display: none;
}

.offline-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #dbc185;
  border-radius: 6px;
  background: #fff6df;
  color: #654a19;
}

.offline-banner > div {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.offline-banner strong { font-size: 0.95rem; }
.offline-banner span { font-size: 0.85rem; }
.offline-banner small { font-size: 0.78rem; }
.offline-banner button { flex: 0 0 auto; }
.offline-banner.is-checking { background: var(--surface); border-color: var(--line); color: var(--ink); }
.offline-client-banner small { font-size: 0.9rem; line-height: 1.5; }
.offline-rider-summary { display: grid; gap: 1.4rem; }
.offline-summary-section { min-width: 0; }
.offline-summary-item { display: grid; gap: 0.35rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.offline-summary-item h3 { margin: 0; }
.offline-summary-item > strong { font-size: 1.12rem; }
.offline-summary-item > span { color: var(--muted); font-size: 0.9rem; }
.offline-page { min-width: 0; }
.offline-page h2 { margin: 0 0 1rem; font-size: 1.4rem; }
.offline-page h3 { margin: 0 0 0.6rem; font-size: 1rem; }
.offline-search { display: grid; gap: 0.35rem; margin-bottom: 1rem; font-size: 0.85rem; }
.offline-appointment-section { margin-bottom: 1.1rem; }
.offline-appointment, .offline-pass {
  min-width: 0;
  margin-bottom: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.offline-appointment[hidden] { display: none; }
.offline-appointment summary {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem;
  cursor: pointer;
  list-style: none;
}
.offline-appointment summary::-webkit-details-marker { display: none; }
.offline-appointment-time, .offline-appointment-title { display: grid; gap: 0.25rem; min-width: 0; overflow-wrap: anywhere; }
.offline-appointment-time { font-size: 0.78rem; color: var(--muted); }
.offline-appointment-time strong { font-size: 1.05rem; color: var(--ink); }
.offline-appointment-title small { color: var(--muted); }
.offline-appointment .status { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.offline-appointment dl { display: grid; gap: 0.5rem; margin: 0; padding: 0 0.8rem 0.8rem; }
.offline-appointment dl > div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 0.5rem; font-size: 0.85rem; }
.offline-appointment dt { color: var(--muted); }
.offline-appointment dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.offline-pass { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; padding: 0.9rem; overflow-wrap: anywhere; }
.offline-pass h3, .offline-pass p { margin: 0 0 0.25rem; }
.offline-pass p, .offline-pass small { color: var(--muted); }
.offline-pass > small { grid-column: 1 / -1; }
.offline-calendar .admin-timeline-board { max-width: 100%; overflow-x: auto; }
.offline-calendar .calendar-view-controls { min-width: 0; }
.offline-appointment-modal .admin-modal-panel { width: min(100%, 540px); }
.offline-appointment-modal dl { display: grid; gap: 0.65rem; margin: 1rem 0 0; }
.offline-appointment-modal dl > div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 0.5rem; }
.offline-appointment-modal dt { color: var(--muted); }
.offline-appointment-modal dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .offline-banner { flex-direction: column; align-items: stretch; gap: 0.65rem; padding: 0.75rem; }
  .offline-banner button { align-self: flex-start; }
  .offline-appointment summary { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.55rem; padding: 0.7rem; }
  .offline-appointment summary > .status { grid-column: 2; justify-self: start; }
  .offline-appointment dl > div { grid-template-columns: 6rem minmax(0, 1fr); }
  .offline-pass { grid-template-columns: minmax(0, 1fr); }
}

.bulletin-page,
.bulletin-admin-page {
  display: grid;
  gap: 1rem;
}

.bulletin-page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.bulletin-page-title h2 {
  color: var(--green-900);
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1.08;
}

.bulletin-page-title p {
  margin-top: 0.2rem;
  color: var(--muted);
}

.bulletin-feed,
.bulletin-admin-list {
  display: grid;
  gap: 0.85rem;
}

.bulletin-post-card,
.bulletin-admin-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: var(--soft-shadow);
}

.bulletin-post-card.has-image {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.bulletin-post-image {
  margin: 0;
  background: #f4efe5;
}

.bulletin-post-placeholder,
.bulletin-card-open {
  display: none;
}

.bulletin-post-placeholder {
  background: #eef4ed;
  color: var(--green-900);
}

.bulletin-document-icon {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bulletin-image-open {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
}

.bulletin-post-image img {
  width: 100%;
  height: auto;
  max-height: 320px;
  display: block;
  object-fit: cover;
}

.bulletin-post-card.has-image .bulletin-post-image-feed {
  width: fit-content;
  max-width: min(360px, 38vw);
  min-height: 0;
  max-height: 30dvh;
  justify-self: start;
}

.bulletin-post-card.has-image .bulletin-post-image-feed .bulletin-image-open {
  width: auto;
  height: auto;
  max-width: 100%;
}

.bulletin-post-card.has-image .bulletin-post-image-feed img {
  width: auto;
  height: auto;
  min-height: 0;
  max-width: min(360px, 38vw);
  max-height: 30dvh;
  object-fit: contain;
}

.bulletin-post-content {
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
}

.bulletin-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.bulletin-post-meta span + span::before {
  content: "•";
  margin-right: 0.42rem;
  color: rgba(105, 115, 107, 0.65);
}

.bulletin-post-card h2,
.bulletin-admin-card h3 {
  color: var(--green-900);
  font-family: var(--display);
  line-height: 1.12;
}

.bulletin-post-card h2 {
  font-size: 1.45rem;
}

.bulletin-post-card p,
.bulletin-admin-card p {
  color: var(--ink);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.bulletin-empty {
  display: grid;
  gap: 0.2rem;
  color: var(--muted);
}

.bulletin-empty strong {
  color: var(--green-900);
}

.bulletin-new-action {
  width: auto;
  min-width: 150px;
}

.bulletin-new-action span {
  margin-right: 0.3rem;
  font-size: 1.25rem;
  line-height: 0;
}

.bulletin-admin-card {
  grid-template-columns: 160px minmax(0, 1fr) auto;
  align-items: stretch;
}

.bulletin-post-image-admin img {
  width: 160px;
  height: 100%;
  min-height: 120px;
  object-fit: cover;
}

.bulletin-admin-card-main {
  display: grid;
  align-content: center;
  gap: 0.36rem;
  padding: 0.85rem;
  min-width: 0;
}

.bulletin-admin-card-main p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.88rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.bulletin-state {
  border-radius: 999px;
  padding: 0.2rem 0.48rem;
  font-size: 0.74rem;
  font-weight: 800;
}

.bulletin-state.visible {
  background: #e8f4eb;
  color: var(--green-900);
}

.bulletin-state.future {
  background: #eef5fb;
  color: var(--blue);
}

.bulletin-state.expired,
.bulletin-state.hidden {
  background: #f3ede5;
  color: var(--muted);
}

.bulletin-image-preview {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f3ec;
  padding: 0.55rem;
}

.bulletin-image-preview img {
  width: 100%;
  height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  object-fit: contain;
}

.bulletin-image-preview .check-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.45rem;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.bulletin-image-preview .check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  accent-color: var(--green-900);
  margin: 0;
  padding: 0;
}

.bulletin-modal-panel textarea {
  min-height: 160px;
  resize: vertical;
}

.bulletin-detail-viewer {
  z-index: 82;
}

.bulletin-detail-panel {
  width: min(100%, 640px);
}

.bulletin-detail-panel .admin-modal-head {
  margin-bottom: 0.75rem;
}

.bulletin-detail-panel .admin-modal-head h3 {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.22;
}

.bulletin-detail-panel .bulletin-post-image-detail {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f3ec;
}

.bulletin-detail-panel .bulletin-post-image-detail img {
  width: 100%;
  max-height: 42dvh;
  object-fit: contain;
}

.bulletin-detail-body {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.bulletin-image-viewer {
  z-index: 85;
}

.bulletin-image-viewer-panel {
  position: relative;
  z-index: 1;
  width: min(96vw, 1100px);
  max-height: min(92dvh, 840px);
  display: grid;
}

.bulletin-image-viewer-frame {
  max-height: min(92dvh, 840px);
  overflow: auto;
  display: grid;
  place-items: start center;
  border-radius: 8px;
  background: #111712;
  box-shadow: 0 24px 70px rgba(15, 30, 23, 0.36);
}

.bulletin-image-viewer-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(9, 19, 14, 0.72);
  color: #fffdf9;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.bulletin-image-viewer-image {
  max-width: none;
  display: block;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
}

.bulletin-image-viewer-frame.is-zoomed .bulletin-image-viewer-image {
  cursor: zoom-out;
}

.bulletin-image-viewer-image img {
  width: 100%;
  max-width: none;
  height: auto;
  display: block;
}

@media (min-width: 761px) {
  .bulletin-image-viewer-panel {
    width: fit-content;
    max-width: 96vw;
    max-height: 92dvh;
  }

  .bulletin-image-viewer-frame {
    max-width: 96vw;
    max-height: 92dvh;
    overflow: hidden;
    place-items: center;
  }

  .bulletin-image-viewer-image,
  .bulletin-image-viewer-frame.is-zoomed .bulletin-image-viewer-image {
    width: auto !important;
    max-width: 96vw;
    max-height: 92dvh;
    cursor: default;
  }

  .bulletin-image-viewer-image img {
    width: auto;
    max-width: 96vw;
    max-height: 92dvh;
    object-fit: contain;
  }
}

@media (max-width: 760px) {
  .bulletin-page,
  .bulletin-admin-page {
    gap: 0.75rem;
  }

  .bulletin-page-title {
    align-items: stretch;
    flex-direction: column;
    gap: 0.65rem;
  }

  .bulletin-page-title h2 {
    font-size: clamp(2.2rem, 12vw, 3rem);
  }

  .bulletin-page-title p {
    display: none;
  }

  .bulletin-new-action {
    width: 100%;
  }

  .bulletin-feed,
  .bulletin-admin-list {
    gap: 0.65rem;
  }

  .bulletin-feed {
    gap: 0.85rem;
  }

  .bulletin-post-card {
    grid-template-columns: 96px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 0.68rem;
    min-height: 112px;
    border-radius: 14px;
    padding: 0.72rem;
  }

  .bulletin-post-card.has-image {
    grid-template-columns: 96px minmax(0, 1fr) 22px;
  }

  .bulletin-post-content {
    min-width: 0;
    padding: 0;
    gap: 0.18rem;
  }

  .bulletin-post-card h2 {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ink);
    font-family: var(--sans);
    font-size: clamp(1.02rem, 4.5vw, 1.16rem);
    font-weight: 850;
    line-height: 1.16;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .bulletin-post-card p {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .bulletin-post-meta {
    gap: 0.25rem;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .bulletin-post-meta span + span {
    display: none;
  }

  .bulletin-post-meta span + span::before {
    content: none;
  }

  .bulletin-post-placeholder,
  .bulletin-post-card.has-image .bulletin-post-image-feed {
    width: 96px;
    height: 96px;
    max-width: none;
    max-height: none;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 14px;
  }

  .bulletin-post-card.has-image .bulletin-post-image-feed .bulletin-image-open {
    width: 100%;
    height: 100%;
  }

  .bulletin-post-image img {
    height: 100%;
    max-height: none;
    object-fit: cover;
  }

  .bulletin-post-card.has-image .bulletin-post-image-feed img {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-width: 100%;
    max-height: none;
    object-fit: cover;
  }

  .bulletin-card-open {
    width: 22px;
    height: 56px;
    display: grid;
    place-items: center;
    align-self: center;
    border: 0;
    background: transparent;
    color: var(--gold);
    padding: 0;
    font-size: 2rem;
    line-height: 1;
  }

  .bulletin-admin-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .bulletin-post-image-admin {
    grid-column: 1 / -1;
  }

  .bulletin-post-image-admin img {
    width: 100%;
    height: clamp(120px, 40vw, 180px);
    min-height: 0;
    object-fit: contain;
  }

  .bulletin-admin-card-main {
    padding: 0.8rem;
  }

  .bulletin-image-preview {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 0.58rem;
    padding: 0.5rem;
  }

  .bulletin-image-preview img {
    height: 64px;
  }

  .bulletin-image-preview .check-row {
    align-self: stretch;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    line-height: 1.25;
  }

  .bulletin-image-preview .check-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 18px;
    justify-self: start;
  }

  .bulletin-image-viewer-panel {
    width: min(100%, 560px);
    max-height: min(90dvh, 760px);
  }

  .bulletin-image-viewer-frame {
    max-height: min(90dvh, 760px);
  }

  .bulletin-image-viewer-close {
    top: 0.45rem;
    right: 0.45rem;
    width: 38px;
    height: 38px;
  }

  .bulletin-detail-panel {
    width: min(100%, 560px);
    max-height: min(88dvh, 760px);
    padding: 1rem;
  }

  .bulletin-detail-panel .admin-modal-head h3 {
    font-size: 1rem;
  }

  .bulletin-detail-panel .bulletin-post-image-detail img {
    max-height: 34dvh;
    height: auto;
  }
}

.statistics-page {
  display: grid;
  gap: 1rem;
}

.statistics-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.statistics-selector {
  width: min(360px, 100%);
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.statistics-selector select {
  min-height: 44px;
  background: #fffdf9;
  font-weight: 700;
}

.statistics-period-panel {
  padding: 0.75rem;
}

.statistics-period-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.statistics-period-nav,
.statistics-period-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  padding: 0.25rem;
}

.statistics-period-nav strong {
  min-width: 230px;
  padding: 0 0.65rem;
  text-align: center;
}

.statistics-period-nav button,
.statistics-period-switch button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--green-900);
  padding: 0.45rem 0.72rem;
  font-weight: 800;
}

.statistics-period-nav button:hover,
.statistics-period-switch button:hover,
.statistics-period-switch button.active {
  background: var(--green-900);
  color: #fff;
}

.statistics-note {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid rgba(62, 90, 67, 0.16);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(62, 90, 67, 0.08), rgba(201, 166, 107, 0.08));
  padding: 0.75rem 0.85rem;
}

.statistics-note strong {
  color: var(--green-900);
  white-space: nowrap;
}

.statistics-note span {
  color: var(--muted);
  font-size: 0.9rem;
}

.statistics-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.statistics-card {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 0.22rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  padding: 1rem;
  box-shadow: var(--soft-shadow);
}

.statistics-card span,
.statistics-card small {
  color: var(--muted);
}

.statistics-card strong {
  color: var(--green-900);
  font-family: var(--display);
  font-size: 1.75rem;
  line-height: 1;
}

.statistics-grid {
  display: grid;
  gap: 1rem;
}

.statistics-table-panel {
  overflow: hidden;
}

.statistics-panel-heading span {
  color: var(--muted);
  font-size: 0.88rem;
}

.statistics-table {
  display: grid;
  gap: 0.42rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
}

.statistics-row {
  min-width: 620px;
  /*display: grid;
  grid-template-columns: minmax(190px, 1.35fr) 84px 84px minmax(150px, 0.9fr);*/
  gap: 0.75rem;
  align-items: center;
}

.statistics-row-head {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0 0.7rem;
}

.statistics-row:not(.statistics-row-head) {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  padding: 0.68rem 0.7rem;
  font-size: 0.9rem;
  
}

.statistics-name {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  min-width: 0;
}

.statistics-name i {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
}

.statistics-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statistics-row span {
  min-width: 0;
}

.statistics-row span > small {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.74rem; 
}

@media (max-width: 980px) {
  .statistics-title {
    align-items: stretch;
    flex-direction: column;
  }

  .statistics-selector {
    width: 100%;
  }

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

  .statistics-period-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .statistics-period-nav,
  .statistics-period-switch {
    width: 100%;
  }

  .statistics-period-nav {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px 64px;
  }

  .statistics-period-nav strong {
    min-width: 0;
  }

  .statistics-period-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .statistics-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .statistics-note strong {
    white-space: normal;
  }

  .statistics-card-grid {
    grid-template-columns: 1fr;
  }

  .statistics-card {
    min-height: 92px;
    padding: 0.82rem;
  }

  .statistics-card strong {
    font-size: 1.45rem;
  }

  .statistics-row-head {
    display: none;
  }

  .statistics-row {
    min-width: 0;
   /* grid-template-columns: repeat(1, minmax(0, 1fr));*/
  }

  .statistics-row:not(.statistics-row-head) {
    gap: 0.45rem;
  }

  .statistics-name {
    grid-column: 1 / -1;
  }

}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.66;
}

[hidden] {
  display: none !important;
}

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

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  color: var(--ink);
  padding: 0.75rem 0.85rem;
  font-size: 16px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 166, 107, 0.22);
}

textarea {
  resize: vertical;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 600;
}

h1 {
  font-size: 2.35rem;
  line-height: 1.05;
}

h2 {
  font-size: 1.22rem;
}

h3 {
  font-size: 1rem;
}

small,
.muted {
  color: var(--muted);
}

svg {
  display: block;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    linear-gradient(rgba(250, 248, 243, 0.92), rgba(250, 248, 243, 0.92)),
    repeating-linear-gradient(135deg, rgba(201, 166, 107, 0.08) 0 1px, transparent 1px 18px);
}

.auth-panel {
  width: min(100%, 390px);
  min-height: 720px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  overflow: hidden;
  color: var(--paper);
  background:
    linear-gradient(rgba(31, 61, 46, 0.82), rgba(31, 61, 46, 0.96)),
    repeating-linear-gradient(145deg, rgba(250, 248, 243, 0.05) 0 1px, transparent 1px 22px),
    var(--green-900);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 2rem 1.45rem;
}

.session-loading-panel {
  min-height: 520px;
}

.session-loading-content {
  display: grid;
  gap: 0.7rem;
  color: rgba(250, 248, 243, 0.9);
  text-align: center;
}

.session-loading-content .loading-bar {
  margin-bottom: 0;
}

.session-login-action {
  justify-self: center;
  color: var(--cream);
}

.auth-brand {
  display: grid;
  justify-items: center;
  gap: 0.7rem;
  text-align: center;
  margin-bottom: 0.25rem;
}

.auth-logo-orb {
  width: 138px;
  height: 138px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(243, 233, 210, 0.78));
  border: 3px solid rgba(201, 166, 107, 0.9);
  box-shadow:
    0 0 0 8px rgba(255, 255, 255, 0.1),
    0 16px 32px rgba(0, 0, 0, 0.24);
}

.auth-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-brand h1 {
  color: var(--paper);
  font-size: 2.65rem;
  letter-spacing: 0;
}

.auth-brand p {
  color: rgba(250, 248, 243, 0.82);
  font-size: 0.88rem;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand-row p,
.brand-row span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.brand-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 8px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

.segmented button,
.tabs button {
  border: 0;
  background: transparent;
  color: inherit;
}

.segmented button {
  min-height: 42px;
  border-radius: 7px;
  color: rgba(250, 248, 243, 0.76);
}

.segmented button.active {
  background: var(--paper);
  color: var(--green-900);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

.stack-form {
  display: grid;
  gap: 0.9rem;
}

.stack-form.compact {
  gap: 0.75rem;
}

.stack-form label,
.form-grid label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-panel .stack-form label {
  color: rgba(250, 248, 243, 0.82);
}

.auth-panel input {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

.auth-panel input::placeholder {
  color: rgba(250, 248, 243, 0.58);
}

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

.primary-action,
.ghost-action,
.text-action,
.round-action,
.icon-button,
.inline-form button {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.68rem 0.95rem;
  white-space: nowrap;
}

.primary-action {
  background: linear-gradient(180deg, #D5B878, var(--gold));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(201, 166, 107, 0.28);
}

.primary-action:hover {
  background: #B88F4C;
}

.auth-panel .primary-action {
  color: #fff;
  text-transform: uppercase;
}

.auth-helper {
  color: rgba(250, 248, 243, 0.78);
  font-size: 0.92rem;
}

.auth-text-button {
  width: fit-content;
  min-height: auto;
  justify-self: end;
  border: 0;
  background: transparent;
  color: var(--cream);
  padding: 0;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ghost-action {
  background: #fffdf9;
  color: var(--green-900);
  border-color: var(--line);
}

.auth-panel .ghost-action {
  color: var(--paper);
}

.text-action {
  border: 0;
  background: transparent;
  color: var(--green-900);
  padding-inline: 0.25rem;
}

.round-action,
.icon-button,
.top-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.round-action,
.icon-button {
  background: #fffdf9;
  border-color: var(--line);
  color: var(--green-900);
}

.round-action svg,
.icon-button svg,
.tabs svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-switch {
  color: rgba(250, 248, 243, 0.78);
  text-align: center;
  font-size: 0.92rem;
}

.auth-switch button {
  min-height: auto;
  border: 0;
  background: transparent;
  color: var(--gold);
  padding: 0;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.app-shell {
  position: relative;
  width: min(100%, 1180px);
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: clip;
  background: #fffdf9;
  box-shadow: 0 0 0 1px rgba(31, 61, 46, 0.06);
}

.app-shell.is-rider {
  max-width: 430px;
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 78px;
  padding: 0.7rem 1rem;
  background: rgba(255, 253, 249, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.top-icon {
  gap: 4px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.82);
  color: var(--green-900);
}

.top-icon span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--green-900);
  border-radius: 99px;
}

.mobile-notification-button {
  position: relative;
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--green-900);
  padding: 0;
}

.mobile-notification-button svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-notification-button .side-pill {
  position: absolute;
  top: -1px;
  right: -2px;
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  border: 2px solid #fffdf9;
  font-size: 0.78rem;
  font-weight: 800;
}

.mobile-menu-backdrop,
.mobile-menu {
  position: fixed;
  display: block;
  pointer-events: none;
}

.mobile-menu-backdrop {
  inset: 0;
  z-index: 28;
  background: rgba(10, 18, 14, 0);
  backdrop-filter: none;
  transition: background 180ms ease, backdrop-filter 180ms ease;
}

.mobile-menu {
  top: 0;
  left: 0;
  z-index: 30;
  width: min(84vw, 318px);
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  transform: translateX(-102%);
  transition: transform 220ms ease;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  border-right: 1px solid rgba(232, 225, 212, 0.86);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 248, 243, 0.98)),
    #fffdf9;
  box-shadow: 22px 0 46px rgba(15, 30, 23, 0.24);
  padding: 1.15rem 1rem calc(2rem + env(safe-area-inset-bottom));
}

.mobile-menu-head {
  display: flex;
  align-items: center;
  min-height: 46px;
}

.mobile-close {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  padding: 0;
  font-size: 1.8rem;
  line-height: 1;
}

.mobile-menu-brand {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 0.65rem 0 1.35rem;
  text-align: center;
}

.mobile-menu-brand img {
  width: 118px;
  height: 118px;
  object-fit: contain;
  border-radius: 50%;
}

.mobile-menu-brand strong {
  color: var(--green-900);
  font-family: var(--display);
  font-size: 2.15rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
}

.mobile-menu-brand span {
  color: var(--green-900);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mobile-menu-nav {
  display: grid;
  gap: 0.48rem;
  padding: 0 0 1.05rem;
  border-bottom: 1px solid var(--line);
}

.mobile-menu-nav button {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 0 0.92rem;
  text-align: left;
  font-weight: 650;
}

.mobile-menu-nav button.active {
  background: #eff4ec;
  color: var(--green-900);
}

.mobile-menu-nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-menu-nav .side-pill {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 0.72rem;
  background: var(--gold);
}

.mobile-settings,
.mobile-refresh,
.mobile-logout {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  min-height: 52px;
  margin-top: 0.85rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #B64230;
  padding: 0 0.92rem;
  text-align: left;
  font-weight: 700;
}

.mobile-settings,
.mobile-refresh {
  background: transparent;
  color: var(--ink);
}

.mobile-settings.active {
  background: #eff4ec;
  color: var(--green-900);
}

.mobile-settings svg,
.mobile-refresh svg,
.mobile-logout svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-install {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  min-height: 52px;
  margin-top: 0.85rem;
  border: 0;
  border-radius: 8px;
  background: #eff4ec;
  color: var(--green-900);
  padding: 0 0.92rem;
  text-align: left;
  font-weight: 700;
}

.mobile-install svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell.is-menu-open .mobile-menu-backdrop,
.app-shell.is-menu-open .mobile-menu {
  pointer-events: auto;
}

.app-shell.is-menu-open .mobile-menu-backdrop {
  background: rgba(9, 19, 14, 0.52);
  backdrop-filter: blur(2px);
}

.app-shell.is-menu-open .mobile-menu {
  transform: translateX(0);
}

.screen-title {
  display: grid;
  justify-items: center;
  min-width: 0;
}

.screen-title img {
  display: none;
}

.screen-title span {
  color: var(--gold);
  font-family: var(--display);
  font-size: 0.85rem;
}

.screen-title strong {
  max-width: 100%;
  color: var(--ink);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.topbar-actions .ghost-action {
  min-height: 42px;
  padding-inline: 0.7rem;
}

.tabs {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 25;
  width: min(100%, 1180px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 0.15rem;
  transform: translateX(-50%);
  padding: 0.55rem 0.7rem calc(0.55rem + env(safe-area-inset-bottom));
  background: rgba(255, 253, 249, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.is-rider .tabs {
  width: min(100%, 430px);
}

.tabs button {
  position: relative;
  display: grid;
  place-items: center;
  gap: 0.2rem;
  min-width: 0;
  min-height: 54px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.76rem;
}

.tabs button.active {
  color: var(--green-900);
}

.tabs button.active svg {
  fill: rgba(31, 61, 46, 0.12);
}

.tabs button span:not(.pill) {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill {
  position: absolute;
  top: 0.2rem;
  right: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 0 0.35rem;
  background: var(--gold);
  color: #fff;
  font-size: 0.72rem;
}

.workspace {
  width: 100%;
  margin: 0 auto;
  padding: 1rem 1rem 6.4rem;
}

.is-admin .workspace,
.is-instructor .workspace {
  padding-inline: clamp(1rem, 3vw, 2rem);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

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

.metric-card,
.panel,
.pass-card,
.day-column,
.appointment-row,
.notification-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
}

.metric-card {
  display: grid;
  gap: 0.45rem;
  min-height: 104px;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(243, 233, 210, 0.22), transparent),
    var(--surface);
}

.metric-card span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.metric-card strong {
  align-self: end;
  color: var(--green-900);
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  gap: 1rem;
  align-items: start;
}

.is-rider .two-column {
  grid-template-columns: 1fr;
}

.single-column {
  display: grid;
  gap: 1rem;
}

.panel {
  padding: 0.1rem;
}

.panel.full-width {
  margin-bottom: 1rem;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.panel-heading h2 {
  color: var(--green-900);
}

.week-navigator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.week-navigator strong {
  min-width: 170px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.week-navigator button {
  min-width: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--green-900);
  padding: 0 0.55rem;
  font-weight: 800;
}

.week-navigator button:hover:not(:disabled),
.week-navigator button:focus-visible {
  background: #eff4ec;
}

.week-navigator button:disabled {
  color: #c0b8ac;
}

.week-navigator-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 7px;
  color: var(--green-900);
}

.week-navigator svg,
.calendar-view-mode-selector svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-view-header {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.calendar-view-header h2 {
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.05rem;
  font-weight: 850;
  line-height: 1.2;
}

.calendar-view-title-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto minmax(90px, 1fr);
  align-items: center;
  gap: 0.7rem;
  position: relative;
}

.calendar-view-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-self: center;
}

.calendar-view-options {
  width: auto;
  position: relative;
  justify-self: end;
}

.calendar-view-options > summary {
  width: fit-content;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 0.7rem;
  color: var(--green-900);
  background: #fffdf9;
  font-size: 0.9rem;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.calendar-view-options > summary::-webkit-details-marker {
  display: none;
}

.calendar-view-options > summary svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s ease;
}

.calendar-view-options[open] > summary svg {
  transform: rotate(180deg);
}

.calendar-view-options-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 30;
  width: min(430px, calc(100vw - 2rem));
  display: grid;
  gap: 0.7rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf9;
  box-shadow: 0 16px 36px rgba(31, 61, 46, 0.16);
}

.calendar-declined-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  color: var(--green-900);
  font-weight: 750;
  line-height: 1.25;
}

.calendar-declined-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--green-900);
}

.calendar-instructor-filter {
  display: grid;
  gap: 0.35rem;
  color: var(--green-900);
  font-weight: 750;
  line-height: 1.25;
}

.calendar-instructor-filter span {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 700;
}

.calendar-instructor-filter select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  color: var(--ink);
  padding: 0.62rem 0.72rem;
  font: inherit;
  font-weight: 700;
}

.calendar-view-mode-selector {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  min-width: 0;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.calendar-view-options-panel .calendar-view-mode-selector {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calendar-view-mode-selector button {
  min-height: 36px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 0 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.calendar-view-mode-selector button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-mode-label-short {
  display: none;
}

.calendar-view-mode-selector button.active {
  background: var(--green-900);
  color: #fff;
  box-shadow: 0 8px 18px rgba(31, 61, 46, 0.16);
}

.calendar-view-mode-selector button:hover:not(.active),
.calendar-view-mode-selector button:focus-visible:not(.active) {
  background: #eff4ec;
  color: var(--green-900);
}

.calendar-section-tabs {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf9;
  padding: 0.28rem;
  box-shadow: var(--soft-shadow);
}

.calendar-section-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 0 1rem;
  font-weight: 850;
  white-space: nowrap;
}

.calendar-section-tabs button.active {
  background: var(--green-900);
  color: #fff;
  box-shadow: 0 8px 18px rgba(31, 61, 46, 0.16);
}

.calendar-section-tabs button:hover:not(.active),
.calendar-section-tabs button:focus-visible:not(.active) {
  background: #eff4ec;
  color: var(--green-900);
}

.staff-calendar-page {
  display: grid;
  align-content: start;
  gap: 0.8rem;
}

.staff-calendar-section-tabs {
  margin-bottom: 0;
}

.panel-heading:has(.calendar-view-header),
.admin-calendar-head:has(.calendar-view-header) {
  display: block;
  margin-bottom: 0;
}

.panel-heading:has(.calendar-view-header) > h2,
.admin-calendar-head:has(.calendar-view-header) > div:first-child,
.admin-calendar-panel > .panel-heading {
  display: none;
}

.panel-heading:has(.calendar-view-header) .calendar-view-header,
.admin-calendar-head:has(.calendar-view-header) .calendar-view-header {
  width: 100%;
}

.message {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  padding: 0.8rem 0.9rem;
  border: 1px solid;
}

.message > span {
  min-width: 0;
}

.message-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  color: currentColor;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.message-close:hover,
.message-close:focus-visible {
  background: rgba(255, 255, 255, 0.84);
}

.message.error {
  color: #742222;
  background: #fff0ef;
  border-color: #e7bbb6;
}

.message.warning {
  color: #6f4c11;
  background: #fff8e8;
  border-color: #e8d3a3;
}

.workspace > .app-floating-message {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  left: max(0.75rem, env(safe-area-inset-left));
  right: max(0.75rem, env(safe-area-inset-right));
  z-index: 120;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: 0 18px 46px rgba(45, 18, 14, 0.22);
}

@media (max-width: 720px) {
  .workspace > .app-floating-message {
    max-width: none;
  }
}

.message.success {
  color: var(--green-900);
  background: #edf6ef;
  border-color: #bed9c3;
}

.message.update {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  color: var(--green-900);
  background: #fff8e8;
  border-color: #e8d3a3;
}

.message.update div {
  display: grid;
  gap: 0.18rem;
}

.message.update span {
  color: var(--muted);
}

.message.update button {
  border: 0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #fff;
  background: var(--green-900);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.message.update button:hover {
  background: var(--green-700);
}

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

  .message.update button {
    width: 100%;
  }
}

.auth-panel .message.success {
  color: var(--paper);
  background: rgba(62, 90, 67, 0.55);
  border-color: rgba(255, 255, 255, 0.14);
}

.auth-panel .message.error {
  color: #fff;
  background: rgba(168, 74, 66, 0.45);
  border-color: rgba(255, 255, 255, 0.14);
}

.loading-bar {
  height: 4px;
  width: 100%;
  margin-bottom: 1rem;
  border-radius: 99px;
  overflow: hidden;
  background: var(--cream);
}

.loading-bar::before {
  content: "";
  display: block;
  width: 38%;
  height: 100%;
  background: var(--gold);
  animation: load-slide 1s infinite ease-in-out;
}

@keyframes load-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(280%); }
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(138px, 1fr));
  gap: 0.75rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  padding-bottom: 0.25rem;
}

.day-column {
  min-height: 184px;
  padding: 0.8rem;
  background: #fffdf9;
}

.day-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.day-column header span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--green-900);
}

.day-items {
  display: grid;
  gap: 0.5rem;
}

.appointment-chip {
  display: grid;
  gap: 0.1rem;
  min-height: 62px;
  border-left: 4px solid var(--green-700);
  border-radius: 7px;
  background: #f2f7f2;
  padding: 0.55rem;
}

.appointment-chip span {
  color: var(--muted);
  font-size: 0.86rem;
}

.appointment-chip strong {
  overflow-wrap: anywhere;
}

.appointment-chip.requested {
  border-left-color: var(--gold);
  background: #fff8ea;
}

.appointment-chip.completed {
  border-left-color: var(--blue);
  background: #edf4f7;
}

.appointment-chip.no_show {
  border-left-color: #8b6b4f;
  background: #f5eee8;
}

.appointment-chip.cancelled,
.appointment-chip.declined {
  border-left-color: var(--danger);
  background: #fff1f0;
}

.appointment-list,
.pass-list,
.notification-list,
.simple-list {
  display: grid;
  gap: 0.7rem;
}

.notifications-page {
  display: grid;
  align-content: start;
  gap: 0.85rem;
}

.notification-section-tabs {
  margin-bottom: 0;
}

.appointment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem;
}

.appointment-row.fresh-request {
  border: 1px solid rgba(201, 166, 107, 0.55);
  background: linear-gradient(135deg, rgba(255, 248, 234, 0.92), rgba(255, 253, 249, 0.98));
  box-shadow: 0 8px 22px rgba(201, 166, 107, 0.16);
}

.is-rider .appointment-row {
  grid-template-columns: 1fr;
}

.appointment-main {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.appointment-main p,
.appointment-main small {
  display: block;
  overflow-wrap: anywhere;
}

.date-tile {
  width: 58px;
  height: 64px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.date-tile span {
  color: var(--gold);
  font-size: 0.78rem;
  text-transform: lowercase;
}

.date-tile strong {
  color: var(--green-900);
  font-family: var(--display);
  font-size: 1.35rem;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.is-rider .row-actions {
  justify-content: flex-start;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  background: #eef7f0;
  color: var(--green-900);
  white-space: nowrap;
}

.status.requested {
  background: #fff3db;
  color: #7c581b;
}

.status.completed {
  background: #e6f0f4;
  color: #294e66;
}

.status.no_show {
  background: #f4eadf;
  color: #6d4c34;
}

.status.cancelled,
.status.declined {
  background: #ffe8e6;
  color: #822d2d;
}

.appointment-list-heading {
  align-items: flex-start;
}

.appointment-list-heading p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.incoming-appointments-panel {
  background:
    linear-gradient(135deg, rgba(255, 248, 234, 0.5), rgba(250, 248, 243, 0.12)),
    #fffdf9;
}

.fresh-request-count {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  background: #fff3db;
  color: #7c581b;
  padding: 0.25rem 0.7rem;
  font-weight: 900;
  white-space: nowrap;
}

.incoming-day-list {
  display: grid;
  gap: 0.9rem;
}

.incoming-day-group,
.incoming-later-group {
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.78);
}

.incoming-later-group {
  background:
    linear-gradient(135deg, rgba(62, 90, 67, 0.04), rgba(201, 166, 107, 0.06)),
    rgba(255, 253, 249, 0.9);
}

.incoming-day-group > summary,
.incoming-later-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  cursor: pointer;
  list-style: none;
}

.incoming-day-group > summary::-webkit-details-marker,
.incoming-later-group > summary::-webkit-details-marker {
  display: none;
}

.incoming-day-group > summary::after,
.incoming-later-group > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-right: 2px solid var(--green-900);
  border-bottom: 2px solid var(--green-900);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.incoming-day-group[open] > summary::after,
.incoming-later-group[open] > summary::after {
  transform: rotate(225deg);
}

.incoming-day-group > summary div,
.incoming-later-group > summary div {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  flex-wrap: wrap;
  min-width: 0;
}

.incoming-day-group > summary strong,
.incoming-later-group > summary strong {
  color: var(--green-900);
  font-size: 1rem;
}

.incoming-day-group > summary span,
.incoming-later-group > summary span {
  color: var(--muted);
  font-size: 0.86rem;
}

.incoming-day-group > summary mark,
.incoming-later-group > summary mark {
  border-radius: 999px;
  background: #fff3db;
  color: #7c581b;
  padding: 0.2rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.incoming-day-group[open] > .appointment-list,
.incoming-day-group[open] > .incoming-compact-list,
.incoming-later-group[open] > .incoming-day-list,
.incoming-day-group[open] > .empty-small,
.incoming-later-group[open] > .empty-small {
  margin-top: 0.65rem;
}

.incoming-day-list.nested {
  gap: 0.55rem;
  padding-top: 0.1rem;
}

.appointment-filter-form {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #fffdf9 0%, #f7faf5 100%);
}

.appointment-filter-mobile {
  display: none;
}

.incoming-compact-list {
  display: grid;
  gap: 0;
}

.incoming-appointment-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(96px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  border: 0;
  border-bottom: 1px solid rgba(232, 225, 212, 0.78);
  background: transparent;
  color: var(--ink);
  padding: 0.72rem 0;
  text-align: left;
}

.incoming-appointment-card:last-child {
  border-bottom: 0;
}

.incoming-appointment-card:hover,
.incoming-appointment-card:focus-visible {
  background: rgba(239, 244, 236, 0.52);
}

.incoming-appointment-time {
  color: var(--green-900);
  font-size: 0.95rem;
  font-weight: 900;
  white-space: nowrap;
}

.incoming-appointment-body {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.incoming-appointment-body strong,
.incoming-appointment-body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.incoming-appointment-body strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 900;
}

.incoming-appointment-body small {
  color: var(--muted);
  font-size: 0.82rem;
}

.appointment-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: end;
}

.appointment-search-row label,
.appointment-filter-grid label {
  display: grid;
  gap: 0.22rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.appointment-search-row label span,
.appointment-filter-grid label span {
  color: var(--green-900);
  font-weight: 800;
}

.appointment-search-row button {
  width: auto;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--green-900);
  color: #fff;
  padding: 0 0.85rem;
  font-weight: 800;
}

.appointment-filter-form input,
.appointment-filter-form select {
  min-height: 38px;
  padding: 0.5rem 0.65rem;
  font-size: 0.92rem;
}

.appointment-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 0.45rem;
}

.appointment-filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.link-button {
  width: auto;
  min-height: auto;
  border: 0;
  background: transparent;
  color: var(--green-900);
  padding: 0;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.appointment-sort-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.appointment-sort-bar button {
  width: auto;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  color: var(--green-900);
  padding: 0.35rem 0.75rem;
  font-weight: 800;
}

.appointment-sort-bar button.active {
  border-color: var(--green-900);
  background: var(--green-900);
  color: #fff;
  box-shadow: 0 10px 22px rgba(31, 61, 46, 0.16);
}

.appointment-sort-bar small {
  color: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.78;
}

.staff-appointment-panel {
  background:
    linear-gradient(135deg, rgba(62, 90, 67, 0.05), rgba(201, 166, 107, 0.06)),
    #fffdf9;
}

.staff-appointment-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.65rem;
  align-items: end;
}

.staff-appointment-form label {
  display: grid;
  gap: 0.28rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.staff-appointment-form label span {
  color: var(--green-900);
  font-weight: 800;
}

.staff-appointment-form input,
.staff-appointment-form select {
  min-height: 40px;
  padding: 0.55rem 0.7rem;
  font-size: 0.94rem;
}

.staff-appointment-notes {
  grid-column: span 2;
}

.staff-appointment-manual-rider {
  grid-column: span 2;
}

.staff-appointment-form .primary-action {
  min-height: 40px;
  align-self: end;
}

.staff-appointment-modal-panel {
  width: min(100%, 720px);
}

.staff-appointment-modal-copy {
  margin: -0.35rem 0 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.staff-appointment-modal-panel .staff-appointment-panel {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.staff-appointment-modal-panel .staff-appointment-panel > .panel-heading {
  display: none;
}

.staff-appointment-modal-panel .staff-appointment-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.staff-appointment-modal-panel .staff-appointment-manual-rider,
.staff-appointment-modal-panel .staff-appointment-notes,
.staff-appointment-modal-panel .staff-appointment-form .primary-action {
  grid-column: 1 / -1;
}

.staff-appointment-modal-panel .staff-appointment-form .primary-action {
  width: 100%;
}

.cancel-appointment-panel {
  width: min(100%, 460px);
}

.cancel-appointment-summary {
  display: grid;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  padding: 0.9rem;
  color: var(--muted);
}

.cancel-appointment-summary strong {
  color: var(--green-900);
}

@media (min-width: 980px) {
  .appointment-filter-form {
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.6fr) auto;
    align-items: end;
  }

  .appointment-search-row {
    display: contents;
  }

  .appointment-search-row label {
    grid-column: 1;
    grid-row: 1;
  }

  .appointment-filter-grid {
    grid-column: 2;
    grid-row: 1;
  }

  .appointment-search-row button {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .appointment-filter-footer {
    grid-column: 1 / -1;
  }
}

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

  .staff-appointment-modal-panel .staff-appointment-form {
    grid-template-columns: 1fr;
  }

  .staff-appointment-notes {
    grid-column: 1;
  }

  .staff-appointment-manual-rider {
    grid-column: 1;
  }
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.inline-form.wide {
  margin-bottom: 0.9rem;
}

.inline-form select {
  min-width: 130px;
}

.inline-form input {
  min-width: 140px;
}

.inline-form button {
  background: var(--green-900);
  color: #fff;
}

.appointment-admin-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.appointment-horse-form select {
  min-width: 150px;
}

.pass-card {
  position: relative;
  display: block;
  padding: 0;
  overflow: visible;
}

.pass-card::after {
  content: none;
}

.pass-card p,
.pass-card h3 {
  overflow-wrap: anywhere;
}

.pass-card-summary {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 0.8rem;
  padding: 0.92rem 0.95rem;
  cursor: pointer;
  list-style: none;
}

.pass-card-summary::-webkit-details-marker {
  display: none;
}

.pass-card-summary::after {
  content: "";
  grid-column: 3;
  grid-row: 1;
  justify-self: center;
  align-self: center;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--green-900);
  border-bottom: 2px solid var(--green-900);
  transform: rotate(45deg);
  transform-origin: center;
  transition: transform 160ms ease;
}

.pass-card[open] > .pass-card-summary::after {
  border-color: var(--gold);
  transform: rotate(225deg);
}

.pass-card-title {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.pass-card-title h3 {
  margin: 0;
  color: var(--green-900);
  font-size: 1rem;
  line-height: 1.2;
}

.pass-card-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.pass-card-remaining {
  display: grid;
  justify-items: center;
  gap: 0.02rem;
  color: var(--green-900);
}

.pass-card[open] .pass-card-remaining {
  display: none;
}

.pass-card-remaining strong {
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 1;
}

.pass-card-remaining span {
  color: var(--gold);
  font-size: 0.7rem;
}

.pass-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.72rem;
  padding: 0 0.95rem 0.95rem;
}

.pass-count {
  display: grid;
  justify-items: start;
  gap: 0.04rem;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.pass-count strong {
  color: var(--green-900);
  font-family: var(--display);
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  line-height: 0.9;
}

.pass-count span {
  color: var(--gold);
  font-size: 0.82rem;
}

.progress {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--cream);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
}

.pass-card .progress,
.pass-usage-details {
  grid-column: 1 / -1;
}

.pass-edit-menu-wrap {
  position: absolute;
  top: 0.82rem;
  right: 2.65rem;
  z-index: 8;
}

.pass-card:not([open]) > .pass-edit-menu-wrap {
  display: none;
}

.pass-edit-trigger {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-900);
  background: #fffdf9;
  box-shadow: 0 8px 18px rgba(31, 61, 46, 0.08);
  cursor: pointer;
}

.pass-edit-trigger svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.pass-edit-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 40;
  width: min(265px, calc(100vw - 3rem));
  display: grid;
  gap: 0.18rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: 0 18px 40px rgba(31, 61, 46, 0.18);
}

.pass-edit-menu::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 16px;
  width: 12px;
  height: 12px;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: #fffdf9;
  transform: rotate(45deg);
}

.pass-edit-menu button {
  position: relative;
  z-index: 1;
  min-height: 40px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding: 0.5rem 0.58rem;
  color: var(--green-900);
  background: transparent;
  font: inherit;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.pass-edit-menu button span {
  min-width: 0;
}

.pass-edit-menu button:hover,
.pass-edit-menu button:focus-visible {
  background: var(--green-50);
  outline: none;
}

.pass-edit-menu button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pass-card-actions {
  display: flex;
  justify-content: flex-start;
}

.pass-card-actions .small-action {
  gap: 0.4rem;
  color: var(--green-900);
}

.pass-card-actions svg,
.pass-usage-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 721px) {
  .pass-edit-menu {
    width: max-content;
    min-width: 292px;
    max-width: calc(100vw - 3rem);
  }

  .pass-edit-menu button {
    grid-template-columns: 22px max-content;
  }

  .pass-edit-menu button span {
    white-space: nowrap;
  }
}

.pass-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.2rem 0 0.65rem;
  color: var(--green-900);
}

.pass-section-head span {
  color: var(--muted);
  font-size: 0.92rem;
}

.pass-archive-folder {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(250, 248, 243, 0.78);
  overflow: hidden;
}

.pass-archive-folder > summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.95rem;
  cursor: pointer;
  list-style: none;
  color: var(--green-900);
  font-weight: 800;
}

.pass-archive-folder > summary::-webkit-details-marker {
  display: none;
}

.pass-archive-folder > summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.pass-archive-folder[open] > summary::after {
  transform: rotate(225deg);
}

.pass-archive-folder .pass-list {
  padding: 0 0.95rem 0.95rem;
}

.archived-pass-card {
  opacity: 0.86;
  background: #fbfaf6;
}

.status.archived {
  display: inline-flex;
  margin-top: 0.45rem;
  background: #eee8dc;
  color: #6d6253;
}

.pass-usage-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  overflow: hidden;
}

.pass-usage-details summary {
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.62rem;
  color: var(--green-900);
  cursor: pointer;
  list-style: none;
  padding: 0.65rem 0.8rem;
  font-weight: 700;
}

.pass-usage-details summary::-webkit-details-marker {
  display: none;
}

.pass-usage-details summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.pass-usage-icon {
  display: inline-grid;
  place-items: center;
  color: var(--gold);
}

.pass-usage-details[open] summary::after {
  transform: rotate(225deg);
}

.pass-usage-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.pass-usage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.8rem;
}

.pass-usage-row + .pass-usage-row {
  border-top: 1px solid var(--line);
}

.pass-usage-row div {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.pass-usage-row span,
.pass-usage-row small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.pass-usage-row strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.pass-usage-row .status {
  min-height: 28px;
  padding: 0.2rem 0.55rem;
  font-size: 0.82rem;
}

.pass-usage-row.manual {
  background: rgba(243, 233, 210, 0.18);
}

.status.manual-add {
  background: #e8f4ea;
  color: var(--green-900);
}

.status.manual-subtract {
  background: #fff3db;
  color: #7c581b;
}

.pass-usage-empty {
  margin: 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 0.75rem 0.8rem;
}

.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.summary-line:last-child {
  border-bottom: 0;
}

.notification-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem;
}

.notification-row.unread {
  border-color: rgba(201, 166, 107, 0.68);
  background: #fffaf0;
}

.notification-row h3,
.notification-row p {
  overflow-wrap: anywhere;
}

.permission-panel {
  display: grid;
  gap: 0.9rem;
}

.simple-list {
  margin-top: 1rem;
}

.simple-list div {
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.simple-list span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.settings-list,
.settings-actions {
  display: grid;
  gap: 0.75rem;
}

.rider-app-setup-panel {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
}

.rider-app-setup-copy h2 {
  margin: 0;
  font-size: 1.05rem;
}

.rider-app-setup-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.rider-app-setup-actions .ghost-action {
  min-height: 40px;
}

.install-guide-action {
  display: grid;
  gap: 0.3rem;
}

.install-guide-action .ghost-action {
  width: 100%;
}

.install-video-link {
  min-height: auto;
  justify-self: center;
  padding: 0.1rem 0.2rem;
  color: var(--green-900);
  font-size: 0.88rem;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: normal;
}

.mobile-install-video-link {
  justify-self: stretch;
  margin-top: -0.35rem;
  margin-bottom: 0.35rem;
  text-align: center;
}

.install-guide-panel {
  width: min(100%, 560px);
}

.install-guide-video {
  display: block;
  width: 100%;
  max-height: min(70vh, 760px);
  border-radius: 8px;
  background: #000;
}

.children-page {
  width: min(100%, 820px);
  margin: 0 auto;
  gap: 1.2rem;
}

.children-page-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 0.85rem;
}

.children-back-action {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--green-900);
  padding: 0;
}

.children-back-action svg,
.children-feature-icon svg,
.children-avatar svg,
.child-profile-arrow svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.children-back-action svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
}

.children-page-header h1 {
  margin: 0;
  color: var(--green-900);
  font-family: var(--display);
  font-size: 2.25rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.children-page-header p {
  max-width: 520px;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.children-add-card,
.children-help-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: var(--soft-shadow);
  padding: 1rem;
}

.children-add-head {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}

.children-feature-icon,
.children-avatar {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #f1ede5;
  color: var(--green-900);
}

.children-feature-icon {
  width: 78px;
  height: 78px;
}

.children-feature-icon svg {
  width: 38px;
  height: 38px;
  stroke-width: 1.8;
}

.children-add-head h2,
.children-list-heading h2,
.children-help-card h2 {
  margin: 0;
  color: var(--green-900);
  font-family: var(--display);
  line-height: 1.12;
  letter-spacing: 0;
  font-size: 0.5rem;

}

.children-add-head h2 {
  font-size: 1rem;
}

.children-add-head p {
  margin-top: 0.25rem;
  color: var(--muted);
  line-height: 1.42;
}

.children-add-form {
  gap: 0.8rem;
}

.children-add-form input {
  background: #fff;
}

.children-add-form .primary-action {
  width: 100%;
  min-height: 52px;
  font-size: 1rem;
  font-weight: 850;
}

.children-list-section {
  display: grid;
  gap: 0.75rem;
}

.children-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.children-list-heading h2 {
  font-size: 1rem;
}

.children-list-heading span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eee9df;
  color: var(--green-900);
  padding: 0.36rem 0.78rem;
  font-size: 0.88rem;
  font-weight: 800;
}

.child-profile-list {
  display: grid;
  gap: 0.75rem;
}

.child-profile-card {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: var(--soft-shadow);
  padding: 0.75rem;
  color: inherit;
  text-align: left;
}

.child-profile-card:hover,
.child-profile-card:focus-visible {
  border-color: rgba(62, 90, 67, 0.32);
  background: #fff;
}

.children-avatar {
  width: 62px;
  height: 62px;
}

.children-avatar svg {
  width: 31px;
  height: 31px;
  stroke-width: 1.8;
}

.child-profile-copy {
  display: grid;
  gap: 0.14rem;
  min-width: 0;
}

.child-profile-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.child-profile-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.child-profile-arrow {
  display: inline-grid;
  place-items: center;
  justify-self: end;
  color: var(--green-900);
}

.child-profile-arrow svg {
  width: 30px;
  height: 30px;
  stroke-width: 2.2;
}

.children-empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  padding: 1rem;
}

.children-help-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: start;
  gap: 0.9rem;
  background: #eef3ec;
}

.children-help-icon {
  width: 64px;
  height: 64px;
  background: #dfe9df;
}

.children-help-icon svg {
  width: 34px;
  height: 34px;
}

.children-help-card h2 {
  font-size: 1.25rem;
}

.children-help-card ol {
  display: grid;
  gap: 0.42rem;
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.children-help-card li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 0.55rem;
  line-height: 1.38;
}

.children-help-card li span {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-weight: 850;
}

.child-profile-modal-panel {
  width: min(100%, 460px);
}

.child-edit-form input {
  background: #fff;
}

@media (max-width: 640px) {
  .children-page {
    width: 100%;
    gap: 1rem;
  }

  .children-page-header {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 0.65rem;
  }

  .children-back-action {
    width: 38px;
    height: 38px;
  }

  .children-back-action svg {
    width: 25px;
    height: 25px;
  }

  .children-page-header h1 {
    font-size: 1.82rem;
  }

  .children-page-header p {
    font-size: 0.95rem;
  }

  .children-add-card,
  .children-help-card {
    padding: 0.85rem;
  }

  .children-add-head {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 0.75rem;
  }

  .children-feature-icon {
    width: 62px;
    height: 62px;
  }

  .children-feature-icon svg {
    width: 31px;
    height: 31px;
  }

  .children-add-head h2 {
    font-size: 1.35rem;
  }

  .children-list-heading h2 {
    font-size: 1.2rem;
  }

  .children-list-heading span {
    padding: 0.3rem 0.65rem;
    font-size: 0.82rem;
  }

  .child-profile-card {
    grid-template-columns: 54px minmax(0, 1fr) 30px;
    gap: 0.7rem;
    padding: 0.65rem;
  }

  .children-avatar {
    width: 54px;
    height: 54px;
  }

  .children-avatar svg {
    width: 28px;
    height: 28px;
  }

  .child-profile-copy strong {
    font-size: 1rem;
  }

  .child-profile-copy small {
    font-size: 0.86rem;
  }

  .child-profile-arrow svg {
    width: 27px;
    height: 27px;
  }

  .children-help-card {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 0.7rem;
  }

  .children-help-icon {
    width: 54px;
    height: 54px;
  }

  .children-help-card h2 {
    font-size: 1.08rem;
  }

  .children-help-card li {
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 0.5rem;
    font-size: 0.9rem;
  }

  .children-help-card li span {
    width: 25px;
    height: 25px;
  }
}

.settings-list > div {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.settings-list > div:last-child {
  border-bottom: 0;
}

.settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.settings-row:last-child {
  border-bottom: 0;
}

.settings-row > div {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.settings-list span {
  color: var(--muted);
  font-size: 0.86rem;
}

.settings-list strong {
  overflow-wrap: anywhere;
}

.settings-helper {
  color: var(--muted);
  line-height: 1.45;
}

.child-add-form,
.children-list,
.child-row {
  display: grid;
  gap: 0.75rem;
}

.child-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  padding: 0.85rem;
}

.child-row-view {
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
}

.child-row-view strong {
  overflow-wrap: anywhere;
}

.icon-action {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green-900);
  padding: 0;
}

.icon-action svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.child-edit-action {
  justify-self: end;
}

.settings-edit-action {
  justify-self: end;
}

.settings-profile-modal .admin-modal-panel {
  width: min(100%, 460px);
}

.child-row-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.auth-check {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 0.55rem;
  color: rgba(255, 255, 255, 0.9);
}

.auth-check input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin-top: 0.15rem;
  padding: 0;
  accent-color: var(--gold);
}

.text-danger {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #B64230;
  padding: 0.68rem 0.95rem;
  text-align: left;
  font-weight: 700;
}

.empty-state,
.empty-small {
  color: var(--muted);
}

.empty-state {
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.empty-small {
  font-size: 0.9rem;
}

.small-action {
  min-height: 38px;
  padding: 0.48rem 0.75rem;
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.booking-system {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.booking-system-title h2,
.admin-section-title h2 {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
}

.booking-flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 1.1rem;
  align-items: stretch;
}

.booking-flow-column {
  min-width: 0;
  display: grid;
  gap: 0.65rem;
}

.booking-step-label {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  min-height: 48px;
}

.booking-step-label > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-900);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.booking-step-label strong,
.booking-step-label small {
  display: block;
}

.booking-step-label small {
  color: var(--muted);
  font-size: 0.78rem;
}

.booking-step-card {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: var(--soft-shadow);
  overflow: hidden;
  padding: 1rem;
}

.booking-step-card h3 {
  color: var(--ink);
  font-size: 0.98rem;
}

.lesson-type-list {
  display: grid;
  gap: 0.65rem;
}

.lesson-type-option {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 0.7rem;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0.65rem;
  text-align: left;
}

.lesson-type-option.active {
  background: #f2f5ee;
  border-color: rgba(62, 90, 67, 0.28);
}

.lesson-type-option span {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.lesson-type-option small,
.lesson-type-option em {
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
}

.lesson-type-option i {
  width: 14px;
  height: 14px;
  border: 1px solid #b9c2ba;
  border-radius: 50%;
}

.lesson-type-option.active i {
  border: 4px solid var(--green-900);
}

.instructor-choice-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(62, 90, 67, 0.18);
  border-radius: 50%;
  background: linear-gradient(135deg, #eff6ef, #fffdf9);
  color: var(--green-900);
  font-size: 0.9rem;
  font-weight: 900;
}

.lesson-type-icon,
.admin-lesson-type-icon {
  display: block;
  background: var(--lesson-color, var(--green-700));
  -webkit-mask-image: var(--lesson-icon);
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-image: var(--lesson-icon);
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.lesson-type-icon {
  width: 44px;
  height: 44px;
}

.admin-lesson-type-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.booking-note {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fffdf9;
  padding: 0.65rem;
  font-size: 0.8rem;
}

.booking-month {
  display: flex;
  justify-content: center;
}

.booking-month .week-navigator {
  width: 100%;
}

.booking-month .week-navigator strong {
  min-width: 0;
  flex: 1;
}

.booking-month-navigator strong {
  text-transform: capitalize;
}

.booking-weekdays,
.booking-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.25rem;
  text-align: center;
}

.booking-weekdays span {
  color: var(--muted);
  font-size: 0.74rem;
}

.booking-calendar-days span,
.booking-calendar-days button {
  min-width: 0;
  min-height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  padding: 0;
  font-size: 0.86rem;
}

.booking-calendar-days button.available {
  background: rgba(62, 90, 67, 0.1);
  color: var(--green-900);
}

.booking-calendar-days button.active {
  background: var(--green-900);
  color: #fff;
}

.booking-calendar-days button:disabled {
  color: #b7b3aa;
}

.booking-calendar-days .outside {
  color: #c9c2b8;
}

.booking-legend {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.75rem;
}

.booking-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.booking-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d8d2c7;
}

.booking-legend i.available {
  background: #8fcaad;
}

.booking-legend i.limited {
  background: #e4bf82;
}

.booking-time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  gap: 0.5rem;
}

.booking-time-grid button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0.42rem 0.35rem;
  font-weight: 800;
  line-height: 1.15;
}

.booking-time-grid button.active {
  border-color: var(--green-900);
  background: var(--green-900);
  color: #fff;
}

.booking-time-grid button.limited:not(.active) {
  background: #fff2dd;
  border-color: #e8c790;
}

.booking-time-grid button:disabled {
  background: #f2f0eb;
  color: #a9a39a;
}

.booking-selected-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0.55rem 0.65rem;
}

.booking-selected-date strong,
.booking-selected-date span {
  min-width: 0;
}

.booking-selected-date strong {
  color: var(--ink);
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.booking-selected-date span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #edf5ee;
  color: var(--green-900);
  padding: 0.22rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: lowercase;
}

.booking-summary-form,
.booking-confirmation,
.confirmation-empty {
  display: grid;
  gap: 0.7rem;
}

.booking-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
}

.booking-summary-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.booking-summary-row strong {
  text-align: right;
  font-size: 0.86rem;
}

.booking-summary-note {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.confirmation-empty {
  place-items: center;
  margin: auto 0;
  text-align: center;
}

.confirmation-empty span,
.confirmation-check {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e7f1e8;
  color: var(--green-900);
  font-size: 2.8rem;
}

.booking-confirmation {
  text-align: center;
}

.booking-confirmation .confirmation-check {
  margin: 0 auto;
}

.confirmation-card {
  display: grid;
  gap: 0.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0.75rem;
  text-align: left;
}

@media (min-width: 1024px) {
  .booking-system {
    gap: 0.7rem;
  }

  .booking-flow-grid {
    grid-template-columns: repeat(var(--booking-column-count, 6), minmax(0, 1fr));
    grid-template-rows: auto auto;
    gap: 0.65rem;
    align-items: stretch;
  }

  .booking-flow-column {
    display: contents;
    gap: 0.45rem;
  }

  .booking-step-label {
    grid-template-columns: 24px minmax(0, 1fr);
    grid-column: var(--booking-step);
    grid-row: 1;
    align-self: start;
    gap: 0.4rem;
    min-height: 54px;
  }

  .booking-step-label > span {
    width: 22px;
    height: 22px;
    font-size: 0.72rem;
  }

  .booking-step-label strong {
    font-size: 0.86rem;
    line-height: 1.2;
  }

  .booking-step-label small {
    font-size: 0.7rem;
    line-height: 1.25;
  }

  .booking-step-card {
    grid-column: var(--booking-step);
    grid-row: 2;
    align-self: stretch;
    height: clamp(590px, calc(100vh - 220px), 680px);
    min-height: 590px;
    gap: 0.55rem;
    overflow-y: auto;
    padding: 0.7rem;
  }

  .booking-step-card h3 {
    font-size: 0.86rem;
  }

  .lesson-type-list {
    gap: 0.45rem;
  }

  .lesson-type-option {
    grid-template-columns: 32px minmax(0, 1fr) 12px;
    gap: 0.45rem;
    min-height: 62px;
    padding: 0.45rem;
  }

  .lesson-type-icon {
    width: 30px;
    height: 30px;
  }

  .instructor-choice-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.72rem;
  }

  .lesson-type-option strong {
    font-size: 0.82rem;
    line-height: 1.15;
  }

  .lesson-type-option small {
    display: none;
  }

  .lesson-type-option em {
    font-size: 0.68rem;
  }

  .lesson-type-option i {
    width: 11px;
    height: 11px;
  }

  .lesson-type-option.active i {
    border-width: 3px;
  }

  .booking-month .week-navigator {
    min-height: 34px;
    padding: 0.15rem;
  }

  .booking-month .week-navigator button {
    min-width: 28px;
    min-height: 28px;
    padding-inline: 0.35rem;
  }

  .booking-month .week-navigator strong {
    white-space: normal;
    font-size: 0.68rem;
    line-height: 1.15;
  }

  .booking-weekdays,
  .booking-calendar-days {
    gap: 0.18rem;
  }

  .booking-weekdays span {
    font-size: 0.68rem;
  }

  .booking-calendar-days span,
  .booking-calendar-days button {
    min-height: 26px;
    font-size: 0.78rem;
  }

  .booking-legend {
    gap: 0.4rem;
    font-size: 0.68rem;
  }

  .booking-time-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .booking-time-grid button {
    min-height: 34px;
    font-size: 0.78rem;
  }

  .booking-note {
    padding: 0.5rem;
    font-size: 0.7rem;
  }

  .booking-summary-form,
  .booking-confirmation,
  .confirmation-empty {
    gap: 0.5rem;
  }

  .booking-summary-row {
    gap: 0.35rem;
    grid-template-columns: 1fr;
    align-items: start;
    min-height: auto;
    padding-bottom: 0.3rem;
  }

  .booking-summary-row span {
    font-size: 0.72rem;
  }

  .booking-summary-row strong {
    text-align: left;
    font-size: 0.74rem;
    overflow-wrap: anywhere;
  }

  .booking-summary-form .primary-action {
    min-height: 38px;
    padding: 0.5rem 0.45rem;
    font-size: 0.72rem;
    line-height: 1.15;
    white-space: normal;
  }

  .booking-summary-note textarea {
    min-height: 58px;
  }

  .confirmation-card {
    padding: 0.55rem;
  }

  .booking-summary-note {
    gap: 0.2rem;
    font-size: 0.75rem;
  }

  .booking-summary-note textarea {
    min-height: 74px;
    padding: 0.55rem;
    font-size: 0.9rem;
  }

  .confirmation-empty span,
  .confirmation-check {
    width: 58px;
    height: 58px;
    font-size: 2rem;
  }

  .confirmation-empty h3,
  .booking-confirmation h3 {
    font-size: 0.92rem;
  }

  .confirmation-empty p,
  .booking-confirmation p {
    font-size: 0.78rem;
  }

  .confirmation-card {
    padding: 0.55rem;
  }
}

.admin-booking-area,
.admin-feature-block {
  display: grid;
  gap: 1rem;
}

.admin-desktop-sections {
  display: grid;
  gap: 1rem;
}

.admin-mobile-menu-view,
.admin-mobile-selected-section {
  display: none;
}

.admin-feature-block {
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--line);
}

.admin-secondary-grid {
  display: grid;
  gap: 1rem;
}

.admin-secondary-grid .admin-feature-block {
  min-width: 0;
}

.admin-section-title {
  display: grid;
  gap: 0.25rem;
}

.admin-section-title p {
  color: var(--muted);
}

@media (max-width: 720px) {
  .admin-desktop-sections {
    display: none;
  }

  .admin-mobile-menu-view {
    display: grid;
    gap: 0.75rem;
  }

  .admin-mobile-selected-section {
    display: block;
  }

  .admin-mobile-detail-view {
    display: grid;
    gap: 0.8rem;
  }

  .admin-mobile-detail-view .admin-feature-block {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .admin-mobile-detail-view .admin-feature-block > .admin-section-title {
    display: none;
  }

  .admin-mobile-header {
    padding-top: 0;
  }

  .admin-mobile-header h3 {
    color: var(--green-900);
    font-size: 1.45rem;
  }

  .admin-mobile-subheader h3 {
    font-size: 1.18rem;
  }

  .admin-mobile-section-list {
    display: grid;
    gap: 0.65rem;
  }

  .admin-mobile-section-card {
    width: 100%;
    min-height: 78px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid rgba(232, 225, 212, 0.95);
    border-radius: 10px;
    background: #fffdf9;
    box-shadow: 0 10px 26px rgba(31, 61, 46, 0.06);
    color: var(--ink);
    padding: 0.8rem 0.75rem;
    text-align: left;
  }

  .admin-mobile-section-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #eef5ed;
    color: var(--green-900);
  }

  .admin-mobile-section-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    color: var(--green-900);
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .admin-mobile-section-icon img {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .admin-mobile-section-copy {
    display: grid;
    gap: 0.14rem;
    min-width: 0;
  }

  .admin-mobile-section-copy strong {
    overflow: hidden;
    color: var(--green-900);
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1.16;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-mobile-section-copy small {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-mobile-section-meta {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
  }

  .admin-mobile-section-chevron {
    color: var(--green-900);
    font-size: 1.55rem;
    font-weight: 300;
    line-height: 1;
  }
}

.booking-rules-panel {
  display: grid;
  gap: 0.75rem;
  width: min(100%, 920px);
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.booking-rules-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.booking-rule-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(170px, 220px);
  align-items: center;
  gap: 1rem;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: 0 10px 28px rgba(31, 61, 46, 0.05);
  padding: 1rem;
}

.booking-rule-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #eef5ed;
  color: var(--green-900);
}

.booking-rule-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.booking-rule-copy {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
}

.booking-rule-copy strong {
  color: var(--green-900);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.18;
}

.booking-rule-copy small,
.booking-rule-card > small {
  color: var(--muted);
  line-height: 1.38;
}

.booking-rule-control {
  min-width: 0;
  display: block;
}

.booking-rule-control input,
.booking-rule-control select {
  width: 100%;
  min-height: 58px;
  border-radius: 8px;
  background: #fffdf9;
  font-size: 1.08rem;
}

.booking-rule-control select {
  color: var(--ink);
}

.booking-rule-number-control {
  position: relative;
}

.booking-rule-number-control input {
  padding-right: 3.5rem;
  text-align: center;
}

.booking-rule-unit {
  position: absolute;
  top: 50%;
  right: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  transform: translateY(-50%);
  pointer-events: none;
}

.booking-rule-reminders {
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
}

.booking-reminder-options {
  grid-column: 2 / -1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(92px, 1fr);
  gap: 0.65rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.35rem 0.1rem 0.1rem;
}

.booking-reminder-option {
  position: relative;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  color: var(--green-900);
  padding: 0.6rem 0.75rem;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}

.booking-reminder-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  opacity: 0;
  cursor: pointer;
}

.booking-reminder-option:has(input:checked) {
  border-color: rgba(31, 61, 46, 0.72);
  box-shadow: 0 0 0 1px rgba(31, 61, 46, 0.08);
}

.booking-reminder-check {
  position: absolute;
  top: -0.55rem;
  right: -0.4rem;
  width: 24px;
  height: 24px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  border: 2px solid #fffdf9;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.booking-reminder-option:has(input:checked) .booking-reminder-check {
  display: grid;
}

.booking-reminder-summary {
  grid-column: 2 / -1;
  display: grid;
  gap: 0.12rem;
  border: 1px solid rgba(201, 166, 107, 0.42);
  border-radius: 8px;
  background: rgba(250, 244, 232, 0.78);
  padding: 0.62rem 0.72rem;
}

.booking-reminder-summary strong {
  color: var(--green-900);
  font-size: 0.86rem;
}

.booking-reminder-summary span {
  color: var(--muted);
  line-height: 1.35;
}

.booking-rule-reminders > small {
  grid-column: 2 / -1;
}

.booking-rules-autosave-state {
  min-height: 22px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  text-align: right;
}

.booking-rules-autosave-state[data-state="saving"] {
  color: var(--gold);
}

.booking-rules-autosave-state[data-state="saved"] {
  color: var(--green-900);
}

.booking-rules-autosave-state[data-state="error"] {
  color: #B64230;
}

@media (max-width: 1180px) {
  .booking-rules-panel {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .booking-rules-panel {
    gap: 0.7rem;
  }

  .booking-rule-card {
    grid-template-columns: 46px minmax(0, 1fr) minmax(126px, 142px);
    gap: 0.45rem;
    min-height: 0;
    padding: 0.68rem;
  }

  .booking-rule-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .booking-rule-icon svg {
    width: 25px;
    height: 25px;
  }

  .booking-rule-copy strong {
    font-size: 0.92rem;
  }

  .booking-rule-copy small,
  .booking-rule-card > small {
    font-size: 0.78rem;
  }

  .booking-rule-reminders {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .booking-rule-control input,
  .booking-rule-control select {
    min-height: 52px;
    padding-inline: 0.55rem;
    font-size: 0.86rem;
  }

  .booking-rule-control select {
    padding-right: 1.55rem;
    font-size: 0.78rem;
  }

  .booking-rule-number-control input {
    padding-right: 2.75rem;
  }

  .booking-rule-unit {
    right: 0.72rem;
    font-size: 0.78rem;
  }

  .booking-reminder-options,
  .booking-reminder-summary,
  .booking-rule-reminders > small {
    grid-column: 1 / -1;
  }

  .booking-reminder-options {
    grid-auto-columns: minmax(84px, 1fr);
    gap: 0.5rem;
  }

  .booking-rules-autosave-state {
    text-align: left;
  }
}

.admin-control-center {
  gap: 0.85rem;
}

.admin-control-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem;
  align-items: stretch;
}

.admin-export-panel,
.audit-log-panel,
.permission-matrix-panel {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 0.85rem;
  padding: 1rem;
}

.admin-panel-title {
  display: grid;
  gap: 0.12rem;
}

.admin-panel-kicker {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.admin-panel-title h3 {
  color: var(--green-900);
  font-size: 1.2rem;
  line-height: 1.15;
}

.admin-export-panel p,
.permission-matrix-panel p {
  color: var(--muted);
  line-height: 1.42;
}

.admin-export-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.admin-export-stats span {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  padding: 0.65rem;
}

.admin-export-stats strong {
  color: var(--green-900);
  font-family: var(--display);
  font-size: 1.65rem;
  line-height: 1;
}

.admin-export-stats small {
  color: var(--muted);
  font-size: 0.78rem;
}

.audit-log-list {
  display: grid;
  gap: 0.55rem;
  max-height: 380px;
  overflow: auto;
  padding-right: 0.15rem;
}

.audit-log-row,
.audit-log-empty {
  display: grid;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  padding: 0.7rem;
}

.audit-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.audit-log-head strong {
  min-width: 0;
  color: var(--green-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-log-head time,
.audit-log-row span,
.audit-log-empty span {
  color: var(--muted);
  font-size: 0.78rem;
}

.audit-log-row p {
  color: var(--ink);
  line-height: 1.35;
}

.permission-matrix-table-wrap {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.permission-matrix-table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0 0.4rem;
}

.permission-matrix-table th,
.permission-matrix-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem;
}

.permission-matrix-table thead th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.permission-matrix-table tbody th,
.permission-matrix-table tbody td {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fffdf9;
}

.permission-matrix-table tbody th {
  border-left: 1px solid var(--line);
  border-radius: 8px 0 0 8px;
  color: var(--green-900);
  width: 180px;
}

.permission-matrix-table tbody td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 8px 8px 0;
}

.permission-matrix-table tbody th strong,
.permission-matrix-table tbody th small {
  display: block;
}

.permission-matrix-table tbody th small {
  margin-top: 0.18rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
}

.permission-matrix-table td span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  background: #edf6ef;
  color: var(--green-900);
  padding: 0.32rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
}

@media (max-width: 920px) {
  .admin-control-grid {
    grid-template-columns: 1fr;
  }

  .admin-export-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .admin-export-stats {
    grid-template-columns: 1fr;
  }
}

.admin-management-grid,
.availability-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 1rem;
  align-items: start;
}

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

.horse-counter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.horse-counter-card {
  min-height: 94px;
  display: grid;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(232, 241, 232, 0.72), rgba(255, 255, 255, 0.95)),
    #fff;
  box-shadow: var(--soft-shadow);
  padding: 1rem;
}

.horse-counter-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.horse-counter-card strong {
  color: var(--green-900);
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1;
}

.horse-feature-block {
  gap: 0.85rem;
}

.horse-feature-block .admin-section-title h2 {
  color: var(--green-900);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0;
}

.horse-feature-block .admin-section-title p {
  max-width: 560px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.horse-feature-block .horse-counter-grid {
  gap: 0.7rem;
}

.horse-feature-block .horse-counter-card {
  min-height: 82px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  border-color: rgba(62, 90, 67, 0.17);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(232, 241, 232, 0.78), rgba(255, 255, 255, 0.96)),
    #fff;
  box-shadow: var(--soft-shadow);
  padding: 0.75rem;
}

.horse-feature-block .horse-counter-card strong {
  font-family: var(--sans);
  font-size: 1.75rem;
  font-weight: 800;
}

.horse-stat-icon,
.horse-tip-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dff3e1;
  color: #197443;
}

.horse-stat-icon svg,
.horse-tip-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.horse-stat-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.horse-stat-lunge .horse-stat-icon {
  background: #e3f1fb;
  color: #286e9a;
}

.horse-stat-passive .horse-stat-icon {
  background: #e6f1ff;
  color: #3572a8;
}

.horse-add-action {
  min-height: 48px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(31, 61, 46, 0.96), rgba(12, 58, 34, 0.98)),
    var(--green-900);
  color: #fff;
  font-size: 0.98rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(31, 61, 46, 0.16);
}

.horse-list-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.horse-list-heading {
  margin: 0.2rem 0 0.6rem;
}

.horse-list-heading h3 {
  color: var(--green-900);
  font-size: 1.1rem;
}

.horse-list-tools {
  display: flex;
  gap: 0.6rem;
}

.horse-list-tools span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf9;
  color: var(--green-900);
  box-shadow: var(--soft-shadow);
}

.horse-list-tools svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.horse-card-list {
  display: grid;
  gap: 0.75rem;
}

.horse-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  border: 1px solid rgba(232, 225, 212, 0.95);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  padding: 0.65rem;
}

.horse-avatar {
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 50%;
  background: #eff4ec;
  flex: 0 0 54px;
}

.horse-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.horse-avatar-placeholder {
  display: grid;
  place-items: center;
  color: var(--green-900);
  background:
    radial-gradient(circle at 35% 30%, rgba(201, 166, 107, 0.28), transparent 42%),
    #eaf3ea;
}

.horse-avatar-placeholder img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.horse-avatar-placeholder svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.horse-card-main {
  min-width: 0;
  display: grid;
  gap: 0.22rem;
}

.horse-card-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.horse-card-title h3 {
  overflow: hidden;
  color: var(--green-900);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horse-card-main p {
  color: var(--muted);
  font-size: 0.9rem;
}

.horse-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.2rem;
}

.horse-card-badges mark {
  border-radius: 8px;
  background: #e8f3e7;
  color: #197443;
  padding: 0.18rem 0.45rem;
  font-size: 0.78rem;
}

.horse-card-badges mark.inactive {
  background: #ffe8e6;
  color: #b6302d;
}

.horse-card-badges mark.lunge {
  background: #e3f1fb;
  color: #286e9a;
}

.horse-card-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.horse-card-menu {
  position: relative;
}

.horse-card-menu summary {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf9;
  color: var(--green-900);
  cursor: pointer;
  list-style: none;
}

.horse-card-menu summary::-webkit-details-marker {
  display: none;
}

.horse-card-menu summary span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.horse-card-menu div {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 20;
  min-width: 142px;
  display: grid;
  gap: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
  box-shadow: var(--shadow);
  padding: 0.35rem;
}

.horse-card-menu button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  padding: 0 0.7rem;
  text-align: left;
  font-weight: 700;
}

.horse-card-menu button:hover,
.horse-card-menu button:focus-visible {
  background: #eff4ec;
}

.horse-card-menu button.danger {
  color: #b64230;
}

.horse-card-open {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--green-900);
  font-size: 1.55rem;
  line-height: 1;
  padding: 0 0.15rem;
}

.horse-tip-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  border: 1px solid rgba(62, 90, 67, 0.16);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(232, 241, 232, 0.84), rgba(255, 255, 255, 0.94)),
    #fff;
  padding: 0.75rem;
}

.horse-tip-card strong {
  color: var(--green-900);
  font-size: 0.98rem;
}

.horse-tip-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

.horse-modal-preview {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 0.75rem;
}

.horse-modal-preview .horse-avatar {
  width: 72px;
  height: 72px;
}

.horse-modal-preview p {
  color: var(--muted);
  font-size: 0.9rem;
}

.file-field input[type="file"] {
  min-height: 44px;
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  color: var(--ink);
  padding: 0.55rem;
}

.file-field input[type="file"]::file-selector-button {
  min-height: 34px;
  margin-right: 0.7rem;
  border: 0;
  border-radius: 8px;
  background: var(--gold);
  color: #fff;
  padding: 0 0.8rem;
  font-weight: 800;
}

.file-field small {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.instructor-feature-block {
  gap: 0.85rem;
}

.instructor-feature-block .admin-section-title h2 {
  color: var(--green-900);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.instructor-feature-block .admin-section-title p {
  max-width: 560px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.instructor-feature-block .horse-counter-grid {
  gap: 0.7rem;
}

.instructor-feature-block .horse-counter-card {
  min-height: 82px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  border-color: rgba(62, 90, 67, 0.17);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(232, 241, 232, 0.78), rgba(255, 255, 255, 0.96)),
    #fff;
  box-shadow: var(--soft-shadow);
  padding: 0.75rem;
}

.instructor-feature-block .horse-counter-card strong {
  font-family: var(--sans);
  font-size: 1.75rem;
  font-weight: 800;
}

.instructor-card-list {
  display: grid;
  gap: 0.75rem;
}

.instructor-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  border: 1px solid rgba(232, 225, 212, 0.95);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  padding: 0.7rem;
}

.instructor-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.9), transparent 38%),
    linear-gradient(135deg, #d7e8d4, #c9a66b);
  color: var(--green-900);
  flex: 0 0 58px;
  font-weight: 850;
}

.instructor-avatar span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 1rem;
}

.instructor-card-main {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.instructor-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.instructor-card-title h3 {
  overflow: hidden;
  color: var(--green-900);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.instructor-card-main p {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.instructor-card-meta {
  display: grid;
  gap: 0.16rem;
}

.instructor-card-meta span {
  display: flex;
  align-items: center;
  gap: 0.34rem;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.instructor-card-meta svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.instructor-status {
  justify-self: start;
  border-radius: 8px;
  background: #e8f3e7;
  color: #197443;
  padding: 0.18rem 0.45rem;
  font-size: 0.78rem;
}

.instructor-status.inactive {
  background: #e6f1ff;
  color: #3572a8;
}

.instructor-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.instructor-role-badge {
  justify-self: start;
  border-radius: 8px;
  background: #f4ead6;
  color: #8a641e;
  padding: 0.18rem 0.45rem;
  font-size: 0.78rem;
}

.instructor-role-badge.admin_instructor {
  background: #e9f0e7;
  color: var(--green-900);
}

.instructor-role-badge.team-calendar {
  background: #e8f2f6;
  color: #275e72;
}

.instructor-role-badge.missing {
  background: #f7f1ea;
  color: var(--muted);
}

.field-help {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.instructor-permission-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.78rem 0.85rem;
  background: #fffdf9;
  color: var(--green-900);
  font-weight: 750;
}

.instructor-permission-toggle input {
  width: 18px;
  height: 18px;
  margin-top: 0.1rem;
  accent-color: var(--green-900);
}

.instructor-permission-toggle small {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
}

.instructor-card-open {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--green-900);
  font-size: 1.55rem;
  line-height: 1;
  padding: 0;
}

.lesson-feature-block {
  gap: 0.85rem;
}

.lesson-feature-block .admin-section-title h2 {
  color: var(--green-900);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.lesson-feature-block .admin-section-title p {
  max-width: 560px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.lesson-card-list {
  display: grid;
  gap: 0.75rem;
}

.lesson-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  border: 1px solid rgba(232, 225, 212, 0.95);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  padding: 0.7rem;
}

.lesson-card-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #eef5ee;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.9), transparent 38%),
    color-mix(in srgb, var(--lesson-color, var(--green-700)) 18%, white);
  flex: 0 0 58px;
}

.lesson-card-icon .admin-lesson-type-icon {
  width: 30px;
  height: 30px;
}

.lesson-card-main {
  min-width: 0;
  display: grid;
  gap: 0.22rem;
}

.lesson-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.lesson-card-title h3 {
  overflow: hidden;
  color: var(--green-900);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-card-main p {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.lesson-card-meta span {
  border-radius: 8px;
  background: #f3efe6;
  padding: 0.12rem 0.42rem;
}

.lesson-card-open {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--green-900);
  font-size: 1.55rem;
  line-height: 1;
  padding: 0;
}

.lesson-card-open svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-password-reset-action {
  display: none;
}

.horse-management-layout {
  display: grid;
  gap: 1rem;
}

.admin-table {
  display: grid;
  gap: 0.35rem;
}

.admin-table-head,
.admin-table-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.3fr) 100px 100px 92px minmax(168px, auto);
  gap: 0.75rem;
  align-items: center;
}

.admin-table-head {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-table-row {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  padding: 0.55rem 0.7rem;
  font-size: 0.88rem;
}

.admin-table-row > span:first-child,
.admin-table-row > span:first-of-type {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.horse-table-head,
.horse-table-row,
.instructor-table-head,
.instructor-table-row {
  grid-template-columns: minmax(180px, 1.4fr) 120px 100px minmax(168px, auto);
}

.rider-table-head,
.rider-table-row {
  grid-template-columns: minmax(170px, 1fr) minmax(190px, 1fr) minmax(145px, 0.7fr) 132px minmax(170px, 0.8fr) minmax(300px, 1.45fr) minmax(170px, auto);
}

.rider-table-row > span:first-child {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.45rem;
}

.rider-table-row > span:first-child small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.76rem;
}

.rider-table-row > span:first-child > .rider-pass-badge {
  grid-column: 2;
}

.rider-contact {
  overflow: hidden;
  color: var(--green-900);
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rider-contact:hover,
.rider-contact:focus-visible {
  text-decoration: underline;
}

.rider-permission-cell {
  display: grid;
  gap: 0.45rem;
  align-items: center;
}

.booking-permission-cell {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.booking-permission-info {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(62, 90, 67, 0.24);
  border-radius: 50%;
  background: #edf5ed;
  color: var(--green-900);
  font-weight: 900;
  cursor: pointer;
}

.booking-permission-info:hover,
.booking-permission-info:focus-visible {
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(62, 90, 67, 0.12);
}

.booking-permission-state {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.booking-permission-state.allowed {
  background: #edf5ed;
  color: var(--green-900);
}

.booking-permission-state.denied {
  background: #f9e5e2;
  color: #9b2f24;
}

.rider-role-state {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: #edf5ed;
  color: var(--green-900);
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.rider-role-state.parent {
  background: #fff6e5;
  color: #8a5d1a;
}

.rider-role-state.instructor {
  background: #e7f1fb;
  color: #245f80;
}

.rider-role-state.admin_instructor {
  background: #edf5ed;
  color: var(--green-900);
  border: 1px solid rgba(62, 90, 67, 0.22);
}

.rider-permission-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.rider-permission-edit-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 0.55rem;
}

.rider-permission-state {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0.22rem 0.55rem;
  font-size: 0.78rem;
  line-height: 1.2;
}

.rider-permission-option {
  min-height: 56px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  color: var(--ink);
  padding: 0.55rem 0.65rem;
  font-size: 0.84rem;
  line-height: 1.25;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.rider-permission-state i {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-style: normal;
  font-weight: 900;
}

.rider-permission-state.allowed {
  border-color: rgba(62, 90, 67, 0.25);
  background: #edf5ed;
  color: var(--green-900);
}

.rider-permission-state.allowed i {
  background: var(--green-700);
  color: #fff;
}

.rider-permission-state.denied {
  color: var(--muted);
}

.rider-permission-state.denied i {
  background: #f1ebe0;
  color: #9b4a3e;
}

.rider-permission-option input {
  width: 18px;
  inline-size: 18px;
  height: 18px;
  block-size: 18px;
  min-width: 18px;
  min-inline-size: 18px;
  min-height: 18px;
  min-block-size: 18px;
  max-width: 18px;
  max-inline-size: 18px;
  max-height: 18px;
  max-block-size: 18px;
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  align-self: center;
  accent-color: var(--green-900);
  -webkit-appearance: auto;
  appearance: auto;
  border-radius: 5px;
  padding: 0;
  margin: 0;
}

.rider-permission-option span {
  min-width: 0;
  display: block;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.rider-permission-option:hover,
.rider-permission-option:focus-within {
  border-color: rgba(62, 90, 67, 0.32);
  box-shadow: 0 8px 18px rgba(31, 61, 46, 0.08);
}

.rider-permission-option:has(input:checked) {
  border-color: rgba(62, 90, 67, 0.25);
  background: #edf5ed;
  color: var(--green-900);
  box-shadow: inset 4px 0 0 var(--lesson-color, var(--green-700));
}

.rider-status-select {
  min-height: 36px;
  padding: 0.45rem 0.55rem;
  font-size: 0.88rem;
}

.rider-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.rider-modal-section {
  display: grid;
  gap: 0.55rem;
}

.rider-modal-section > strong {
  color: var(--green-900);
}

.rider-modal-section > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.rider-modal-person {
  display: grid;
  gap: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  padding: 0.75rem;
}

.rider-modal-person span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.mobile-rider-view {
  display: none;
}

.mobile-rider-header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.2rem 0 0.55rem;
}

.mobile-rider-header h3 {
  color: var(--green-900);
  font-family: var(--sans);
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.mobile-rider-back,
.mobile-rider-add {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--green-900);
  padding: 0;
}

.mobile-rider-add {
  background: var(--green-900);
  color: #fff;
  box-shadow: 0 10px 24px rgba(31, 61, 46, 0.16);
}

.mobile-rider-back svg,
.mobile-rider-add svg,
.mobile-rider-summary svg,
.mobile-rider-contact svg,
.mobile-rider-lessons svg,
.mobile-rider-action svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-rider-list {
  display: grid;
  gap: 0.65rem;
}

.mobile-rider-search {
  position: relative;
  display: block;
}

.mobile-rider-search input {
  min-height: 44px;
  border-radius: 9px;
  background: #fffdf9;
  padding-left: 2.55rem;
  font-size: 0.9rem;
}

.mobile-rider-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  width: 19px;
  height: 19px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.mobile-rider-search-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-rider-card {
  border: 1px solid rgba(232, 225, 212, 0.95);
  border-radius: 12px;
  background: #fffdf9;
  box-shadow: 0 10px 26px rgba(31, 61, 46, 0.06);
  overflow: hidden;
}

.mobile-rider-summary {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 28px;
  align-items: center;
  gap: 0.7rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0.72rem 0.9rem;
  text-align: left;
}

.mobile-rider-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.22), transparent 34%), var(--green-900);
  color: #fff;
}

.mobile-rider-avatar.instructor,
.mobile-rider-avatar.admin_instructor {
  background: #e5f0fb;
  color: #174f8a;
}

.mobile-rider-avatar.parent {
  background: #f1d6a8;
  color: #814a14;
}

.mobile-rider-avatar.inactive {
  background: #e5e5e5;
  color: #1f2a25;
}

.mobile-rider-title {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.mobile-rider-title strong {
  overflow: hidden;
  color: var(--green-900);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-rider-title small {
  overflow: hidden;
  color: #7c3d10;
  font-size: 0.88rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rider-pass-badge {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.25rem;
  width: fit-content;
  max-width: 100%;
  min-height: 1.35rem;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: #e8f3e7;
  color: #27563a;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
}

.rider-pass-badge.no-pass {
  background: #fff3db;
  color: #805d22;
}

.rider-pass-badge svg {
  flex: 0 0 auto;
  width: 0.85rem;
  height: 0.85rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rider-pass-badge.compact {
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  min-height: 1.15rem;
  padding: 0;
  border-radius: 50%;
}

.admin-timeline-appointment > .rider-pass-badge.compact {
  position: absolute;
  top: 1.65rem;
  right: 0.27rem;
}

.mobile-rider-badge {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #e8f3e7;
  color: var(--green-900);
  padding: 0.28rem 0.65rem;
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.mobile-rider-badge.instructor,
.mobile-rider-badge.admin_instructor {
  background: #e5f0fb;
  color: #174f8a;
}

.mobile-rider-badge.parent {
  background: #fff0dc;
  color: #8a4b18;
}

.mobile-rider-badge.inactive {
  background: #ededed;
  color: #1f2a25;
}

.mobile-rider-chevron {
  display: grid;
  place-items: center;
  color: var(--green-900);
}

.mobile-rider-chevron svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-rider-details {
  display: grid;
  gap: 0.75rem;
  padding: 0 0.9rem 0.9rem;
}

.mobile-rider-contact {
  display: grid;
  gap: 0.45rem;
  padding-top: 0.2rem;
}

.mobile-rider-contact a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  font-size: 0.98rem;
  text-decoration: none;
}

.mobile-rider-contact svg {
  width: 22px;
  height: 22px;
  color: #7c3d10;
}

.mobile-rider-contact span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-rider-facts {
  display: grid;
  gap: 0.45rem;
  border-top: 1px solid var(--line);
  padding-top: 0.78rem;
}

.mobile-rider-facts > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.mobile-rider-facts span {
  color: var(--ink);
}

.mobile-rider-facts strong {
  color: var(--green-900);
  font-weight: 900;
}

.mobile-rider-lesson-block {
  display: grid;
  gap: 0.5rem;
}

.mobile-rider-lesson-block h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 800;
}

.mobile-rider-lessons {
  display: grid;
  gap: 0.38rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-rider-lessons li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-size: 0.98rem;
}

.mobile-rider-lessons svg {
  width: 22px;
  height: 22px;
}

.mobile-rider-lessons li.allowed svg {
  color: var(--green-900);
}

.mobile-rider-lessons li.denied {
  color: var(--muted);
}

.mobile-rider-lessons li.denied svg {
  color: #9b4a3e;
}

.mobile-parent-children-block {
  display: grid;
  gap: 0.55rem;
}

.mobile-parent-children-block h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 800;
}

.mobile-parent-children {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-parent-children li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf9;
  padding: 0.62rem;
}

.mobile-parent-child-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-900);
  color: #fff;
}

.mobile-parent-child-avatar.inactive {
  background: #e5e5e5;
  color: #1f2a25;
}

.mobile-parent-child-avatar svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-parent-child-text {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.mobile-parent-child-text strong {
  overflow: hidden;
  color: var(--green-900);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-parent-child-text small {
  color: var(--ink);
  font-weight: 700;
}

.mobile-parent-child-text em {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  line-height: 1.35;
}

.mobile-rider-muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.mobile-rider-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.mobile-rider-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--green-900);
  color: var(--green-900);
  font-weight: 900;
}

.mobile-rider-action svg {
  width: 22px;
  height: 22px;
}

.booking-permission-details {
  display: grid;
  gap: 0.75rem;
}

.booking-permission-details dl {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.booking-permission-details dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
}

.booking-permission-details dt {
  color: var(--muted);
}

.booking-permission-details dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

.availability-date-field {
  display: grid;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  padding: 0.75rem;
}

.availability-date-field legend {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding-inline: 0.25rem;
}

.availability-month-picker {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 0.45rem;
}

.availability-month-picker strong {
  color: var(--green-900);
  text-align: center;
  text-transform: capitalize;
}

.availability-month-picker button {
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green-900);
  padding: 0;
  font-size: 1.25rem;
  font-weight: 900;
}

.availability-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.32rem;
}

.availability-month-weekday {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.availability-month-empty,
.availability-day-option {
  min-width: 0;
  aspect-ratio: 1;
}

.availability-day-option {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.availability-day-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.availability-day-option:has(input:checked),
.availability-day-option.selected {
  border-color: rgba(62, 90, 67, 0.4);
  background: var(--green-900);
  color: #fff;
  box-shadow: 0 8px 16px rgba(31, 61, 46, 0.14);
}

.availability-date-helper {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.availability-lesson-field {
  display: grid;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  padding: 0.75rem;
}

.availability-lesson-field legend {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding-inline: 0.25rem;
}

.availability-lesson-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.5rem;
}

.availability-lesson-field .availability-lesson-checkbox {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 0.45rem 0.6rem;
  font-size: 0.84rem;
  line-height: 1.2;
}

.availability-lesson-field .availability-lesson-checkbox input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  flex: 0 0 16px;
  accent-color: var(--green-900);
  padding: 0;
  margin: 0;
}

.availability-lesson-checkbox:has(input:checked) {
  border-color: rgba(62, 90, 67, 0.28);
  background: #edf5ed;
  color: var(--green-900);
}

.lesson-color-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
}

.availability-lesson-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.horse-status-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  background: #c9c0b3;
}

.horse-status-dot.active {
  background: var(--green-700);
}

.color-dot {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 4px;
  border: 1px solid rgba(15, 30, 23, 0.12);
}

.admin-table mark {
  border-radius: 999px;
  background: #f1e9dd;
  color: #7a5d28;
  padding: 0.25rem 0.5rem;
  font-size: 0.76rem;
}

.admin-table mark.active {
  background: #e8f3e7;
  color: var(--green-900);
}

.icon-text-action {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--green-900);
  font-weight: 700;
  padding: 0 0.45rem;
  white-space: nowrap;
}

.icon-text-action.danger,
.danger-action {
  color: #B64230;
}

.table-row-actions,
.horse-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: nowrap;
}

.admin-modal-shell,
.horse-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.admin-modal-backdrop,
.horse-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(9, 19, 14, 0.58);
  backdrop-filter: blur(3px);
}

.admin-modal-panel,
.horse-modal-panel {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(100%, 520px);
  max-height: min(88vh, 720px);
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: 0 24px 70px rgba(15, 30, 23, 0.28);
  padding: 1.2rem;
}

.admin-modal-head,
.horse-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-modal-head span,
.horse-modal-head span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-modal-head h3,
.horse-modal-head h3 {
  color: var(--green-900);
  font-size: 1.18rem;
}

.admin-modal-actions,
.horse-modal-actions {
  align-items: center;
}

.admin-modal-actions .danger-action,
.horse-modal-actions .danger-action {
  margin-right: auto;
}

.admin-modal-panel .form-grid,
.horse-modal-panel .form-grid,
.admin-modal-panel .stack-form label,
.horse-modal-panel .stack-form label,
.admin-modal-panel .form-grid label,
.horse-modal-panel .form-grid label {
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
}

.admin-modal-panel input[type="date"],
.admin-modal-panel input[type="time"],
.horse-modal-panel input[type="date"],
.horse-modal-panel input[type="time"] {
  display: block;
  width: 100%;
  inline-size: 100%;
  max-width: 100%;
  max-inline-size: 100%;
  min-width: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.admin-modal-panel form[data-form="availability-slot"],
.admin-modal-panel form[data-form="availability-slot"] .form-grid,
.admin-modal-panel form[data-form="availability-slot"] label,
.admin-modal-panel form[data-form="availability-slot"] fieldset {
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
}

.admin-modal-panel form[data-form="availability-slot"] input,
.admin-modal-panel form[data-form="availability-slot"] select {
  display: block;
  width: 100%;
  inline-size: 100%;
  max-width: 100%;
  max-inline-size: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.admin-modal-panel form[data-form="availability-slot"] input[type="time"],
.admin-modal-panel form[data-form="availability-slot"] input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
}

.inline-alert {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem;
  line-height: 1.45;
  background: rgba(53, 90, 67, 0.08);
  color: var(--green-900);
}

.inline-alert.danger {
  border-color: rgba(182, 66, 48, 0.35);
  background: rgba(182, 66, 48, 0.1);
  color: #7f3127;
}

.checkbox-line {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem;
  background: #fffdf9;
}

.checkbox-line input {
  width: 20px;
  height: 20px;
  margin-top: 0.1rem;
}

.forced-password-shell {
  z-index: 90;
}

.forced-password-panel {
  width: min(100%, 460px);
}

@media (min-width: 721px) {
  .admin-modal-panel,
  .horse-modal-panel {
    width: min(100%, 600px);
    max-height: calc(100dvh - 2rem);
  }

  .forced-password-panel {
    width: min(100%, 460px);
  }
}

.forced-password-copy {
  margin: -0.35rem 0 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.availability-board {
  display: grid;
  gap: 0.75rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  padding-bottom: 0.25rem;
}

.availability-calendar-header {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.availability-calendar-title {
  grid-area: auto;
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.availability-calendar-title h2 {
  color: var(--green-900);
  font-size: clamp(1.55rem, 3.8vw, 2.4rem);
  line-height: 1.08;
}

.availability-calendar-title span {
  color: var(--muted);
  font-size: clamp(0.92rem, 2vw, 1.08rem);
}

.availability-calendar-control-card {
  width: 100%;
  display: grid;
  gap: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  padding: 0.7rem;
}

.availability-calendar-week-controls,
.availability-calendar-action-row .availability-instructor-filter,
.availability-calendar-action-row .availability-new-slot-action {
  grid-area: auto;
}

.availability-calendar-control-card .calendar-view-controls {
  grid-area: auto;
  width: 100%;
  justify-self: stretch;
}

.availability-calendar-control-card .week-navigator {
  width: 100%;
  display: grid;
  grid-template-columns: 46px 38px minmax(0, 1fr) 38px 62px;
  gap: 0.35rem;
}

.availability-calendar-control-card .week-navigator strong {
  min-width: 0;
  font-size: 0.98rem;
}

.availability-calendar-control-card .week-navigator-icon,
.availability-calendar-control-card .week-navigator button {
  min-height: 44px;
  border-radius: 7px;
}

.availability-calendar-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 1fr);
  gap: 0.75rem;
  align-items: stretch;
}

.availability-instructor-filter {
  align-self: center;
}

.availability-instructor-filter span {
  display: none;
}

.availability-instructor-filter select {
  min-height: 42px;
}

.availability-calendar-action-row .availability-instructor-filter {
  align-self: stretch;
  width: 100%;
}

.availability-calendar-action-row .availability-instructor-filter span {
  display: none;
}

.availability-calendar-action-row .availability-instructor-filter select,
.availability-calendar-action-row .availability-new-slot-action {
  width: 100%;
  min-height: 56px;
  border-radius: 8px;
  font-size: 1rem;
}

.availability-calendar-action-row .availability-new-slot-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  justify-self: stretch;
  align-self: stretch;
}

.availability-calendar-action-row .availability-new-slot-action span[aria-hidden="true"] {
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1;
}

.availability-calendar-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
}

.availability-calendar-toolbar > div:first-child {
  display: grid;
  gap: 0.1rem;
}

.availability-calendar-toolbar > div:first-child span {
  color: var(--muted);
  font-size: 0.86rem;
}

.availability-calendar-toolbar .calendar-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.availability-new-slot-action {
  justify-self: end;
}

.availability-period-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.availability-calendar-toolbar .week-navigator {
  width: auto;
  flex-wrap: nowrap;
}

.availability-calendar {
  position: relative;
  min-width: 980px;
  display: grid;
  touch-action: pan-x pan-y;
  grid-template-columns: 58px repeat(7, minmax(118px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.availability-calendar-corner {
  position: sticky;
  left: 0;
  z-index: 5;
  grid-column: 1;
  grid-row: 1;
  background: #fffdf9;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.availability-calendar-day-head {
  z-index: 4;
  grid-row: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.1rem;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.96);
  text-align: center;
}

.availability-calendar-day-head span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.availability-calendar-day-head strong {
  color: var(--green-900);
  font-size: 1rem;
}

.availability-calendar-day-head.today {
  background: #eef5ed;
}

.availability-calendar-day-bg {
  z-index: 1;
  border-left: 1px solid var(--line);
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--calendar-row-height, 34px) - 1px),
      rgba(225, 216, 202, 0.72) calc(var(--calendar-row-height, 34px) - 1px),
      rgba(225, 216, 202, 0.72) var(--calendar-row-height, 34px)
    );
}

.availability-calendar-time {
  position: sticky;
  left: 0;
  z-index: 6;
  grid-column: 1;
  align-self: start;
  border-right: 1px solid var(--line);
  background: #fffdf9;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.1rem 0.45rem 0 0;
  text-align: right;
  transform: translateY(-0.42rem);
}

.availability-calendar-slot-group {
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(var(--slot-count, 1), minmax(0, 1fr));
  gap: 0.35rem;
  min-height: 42px;
  padding: 0.18rem 0.28rem;
}

.availability-calendar-slot {
  width: 100%;
  min-width: 0;
  height: 100%;
  display: grid;
  align-content: start;
  gap: 0.18rem;
  border: 0;
  border-left: 5px solid var(--slot-color);
  border-radius: 8px;
  background: #f4f8f2;
  background: color-mix(in srgb, var(--slot-color) 14%, white);
  color: var(--ink);
  padding: 0.48rem 0.55rem;
  text-align: left;
  box-shadow: 0 8px 16px rgba(31, 61, 46, 0.08);
}

.availability-calendar-slot.inactive {
  opacity: 0.55;
}

.availability-calendar-slot.readonly {
  cursor: default;
  opacity: 0.72;
  box-shadow: none;
  border-style: dashed;
}

.availability-calendar-slot strong {
  overflow: hidden;
  font-size: 0.82rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.availability-calendar-slot span,
.availability-calendar-slot small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.availability-calendar-slot em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
}

.admin-timeline-board {
  margin-top: 0.2rem;
}

.admin-timeline-calendar.compact {
  width: 100%;
}

.admin-timeline-calendar {
  position: relative;
  touch-action: pan-x pan-y;
}

.admin-timeline-calendar .availability-calendar-day-bg {
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--calendar-hour-height, 108px) - 1px),
      rgba(225, 216, 202, 0.78) calc(var(--calendar-hour-height, 108px) - 1px),
      rgba(225, 216, 202, 0.78) var(--calendar-hour-height, 108px)
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--calendar-half-hour-height, 54px) - 1px),
      rgba(225, 216, 202, 0.3) calc(var(--calendar-half-hour-height, 54px) - 1px),
      rgba(225, 216, 202, 0.3) var(--calendar-half-hour-height, 54px)
    );
}

.admin-timeline-click-cell {
  z-index: 3;
  min-width: 0;
  min-height: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: copy;
}

.admin-timeline-click-cell:hover,
.admin-timeline-click-cell:focus-visible {
  background: rgba(201, 166, 107, 0.1);
  outline: 1px solid rgba(201, 166, 107, 0.45);
  outline-offset: -1px;
}

.admin-timeline-slot {
  pointer-events: none;
  min-height: 100%;
}

.admin-timeline-slot-group {
  position: relative;
  pointer-events: none;
}

.admin-timeline-color-block {
  position: relative;
  min-height: 100%;
  align-content: stretch;
  gap: 0;
  border-left-width: 4px;
  background: color-mix(in srgb, var(--slot-color) 16%, white);
  box-shadow: none;
  opacity: 0.78;
  padding: 0;
  overflow: hidden;
}

.admin-timeline-color-block.team-calendar-item {
  opacity: 0.46;
  filter: saturate(0.65);
}

.admin-timeline-slot-group.has-appointments .admin-timeline-color-block {
  opacity: 0.28;
  filter: saturate(0.72);
}

.admin-timeline-slot-group.has-appointments .calendar-instructor-chip.slot-group-chip {
  opacity: 0.42;
}

.admin-timeline-slot.loose {
  background: #fff8ea;
}

.admin-timeline-appointment-group {
  z-index: 5;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(var(--appointment-count, 1), minmax(0, 1fr));
  gap: 0.28rem;
  min-height: var(--calendar-min-appointment-height, 54px);
  padding: 0.16rem 0.32rem;
  pointer-events: none;
}

.admin-timeline-appointment {
  position: relative;
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 0.05rem;
  overflow: hidden;
  border: 1px solid rgba(225, 216, 202, 0.9);
  border-left: 4px solid var(--slot-color);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 18px rgba(31, 61, 46, 0.12);
  padding: 0.3rem 0.4rem;
  font: inherit;
  pointer-events: auto;
  text-align: left;
  cursor: pointer;
  padding-right: 1.85rem;
}

.admin-timeline-appointment.team-calendar-item {
  background: rgba(255, 255, 255, 0.78);
  border-style: dashed;
  box-shadow: 0 4px 12px rgba(31, 61, 46, 0.08);
}

.admin-timeline-appointment:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.admin-timeline-appointment.requested {
  border-color: rgba(201, 166, 107, 0.9);
  background: #fff8ea;
}

.admin-timeline-appointment.approved {
  border-color: rgba(62, 90, 67, 0.28);
}

.admin-timeline-appointment.completed {
  border-color: rgba(62, 90, 67, 0.45);
  background: #eef5ed;
}

.admin-timeline-appointment.no_show {
  border-color: rgba(139, 107, 79, 0.5);
  background: #f5eee8;
}

.admin-timeline-appointment.cancelled,
.admin-timeline-appointment.declined {
  opacity: 0.68;
}

.admin-timeline-appointment strong,
.admin-timeline-appointment small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-timeline-appointment strong {
  color: var(--ink);
  font-size: 0.72rem;
  line-height: 1.15;
}

.admin-timeline-appointment small {
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.15;
}

.calendar-instructor-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  max-width: 100%;
  border-radius: 999px;
  background: rgba(31, 61, 46, 0.1);
  color: var(--green-900);
  padding: 0.05rem 0.28rem;
  font-size: 0.58rem;
  font-weight: 850;
  line-height: 1;
}

.calendar-instructor-chip.appointment-chip {
  position: absolute;
  top: 0.22rem;
  right: 0.24rem;
  display: inline-flex;
  width: 1.22rem;
  height: 1.22rem;
  min-width: 1.22rem;
  min-height: 1.22rem;
  max-width: 1.22rem;
  max-height: 1.22rem;
  aspect-ratio: 1;
  box-sizing: border-box;
  text-align: center;
  padding: 0;
  font-size: 0.54rem;
  background: color-mix(in srgb, var(--slot-color) 18%, white);
  border: 1px solid color-mix(in srgb, var(--slot-color) 36%, white);
  border-radius: 999px;
  box-shadow: 0 2px 5px rgba(31, 61, 46, 0.08);
}

.calendar-instructor-chip.slot-group-chip {
  position: absolute;
  top: 0.22rem;
  right: 0.3rem;
  z-index: 4;
  min-width: 1.2rem;
  max-width: calc(100% - 0.6rem);
  height: 1.2rem;
  padding: 0 0.26rem;
  font-size: 0.52rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(31, 61, 46, 0.1);
  box-shadow: 0 4px 10px rgba(31, 61, 46, 0.08);
  pointer-events: none;
}

.appointment-detail-panel {
  box-sizing: border-box;
  width: min(100%, 760px);
  max-width: calc(100vw - 2rem);
}

.appointment-detail-panel,
.appointment-detail-panel * {
  min-width: 0;
}

.appointment-detail-summary {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.1rem;
  background: #fffdf9;
}

.appointment-detail-date {
  display: grid;
  place-items: center;
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
  color: var(--green-900);
}

.appointment-detail-date span {
  color: var(--gold);
  font-size: 1.05rem;
}

.appointment-detail-date strong {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
}

.appointment-detail-summary-text {
  display: grid;
  gap: 0.24rem;
}

.appointment-detail-summary-text h4 {
  margin: 0;
  color: var(--green-900);
  font-size: 1.25rem;
}

.appointment-detail-summary-text p,
.appointment-detail-summary-text small {
  margin: 0;
  color: var(--muted);
}

.appointment-detail-summary-text p {
  color: var(--ink);
  font-size: 1rem;
}

.appointment-detail-summary-text .appointment-detail-note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.appointment-detail-summary-text .status {
  justify-self: start;
  margin-top: 0.35rem;
}

.appointment-detail-tabs {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 460px);
  margin: 1.15rem auto 1rem;
  padding: 0.22rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf9;
  box-shadow: var(--shadow-soft);
}

.appointment-detail-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.appointment-detail-tabs button.active {
  background: var(--green-900) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 26px rgba(31, 61, 46, 0.18);
}

.appointment-detail-tabs button.active,
.appointment-detail-tabs button.active:hover,
.appointment-detail-tabs button.active:focus-visible {
  background: var(--green-900) !important;
  color: #ffffff !important;
}

.appointment-detail-management,
.appointment-time-edit-form {
  box-sizing: border-box;
  display: grid;
  gap: 0.85rem;
  width: 100%;
  inline-size: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.appointment-field-block,
.appointment-status-block {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
}

.appointment-field-block > span,
.appointment-status-block > span {
  color: var(--muted);
}

.appointment-detail-management .inline-form,
.appointment-time-edit-form .form-grid.two,
.appointment-time-edit-form .appointment-edit-grid {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

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

.appointment-time-edit-form .appointment-edit-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.appointment-time-edit-form label,
.appointment-time-edit-form input,
.appointment-time-edit-form select {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.appointment-time-edit-form input,
.appointment-time-edit-form select {
  display: block;
  width: 100%;
  inline-size: 100%;
  max-inline-size: 100%;
}

.appointment-time-edit-form input {
  -webkit-appearance: none;
  appearance: none;
}

.appointment-series-scope-modal {
  z-index: 76;
}

.appointment-series-scope-panel {
  width: min(100%, 460px);
}

.appointment-series-scope-copy {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.appointment-series-scope-actions {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.appointment-series-scope-actions button,
.appointment-series-scope-panel > button {
  width: 100%;
}

.appointment-detail-management .appointment-horse-form {
  display: grid;
}

.appointment-detail-management .appointment-horse-form select {
  width: 100%;
}

.appointment-detail-management .appointment-status-block .inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.appointment-detail-management .appointment-status-block .inline-form select,
.appointment-detail-management .appointment-status-block .inline-form input {
  width: 100%;
  min-width: 0;
}

.appointment-detail-management .appointment-status-block .inline-form button {
  width: 100%;
  min-height: 46px;
}

.appointment-detail-modal .appointment-list {
  margin: 0;
}

.appointment-detail-modal .appointment-row {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0.9rem;
  margin: 0;
}

.appointment-detail-modal .appointment-main {
  align-items: flex-start;
}

.appointment-detail-modal .row-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  justify-content: stretch;
  gap: 0.65rem;
  width: 100%;
}

.appointment-detail-modal .status {
  justify-self: start;
}

.appointment-detail-modal .appointment-admin-controls {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  align-items: end;
  gap: 0.55rem;
  width: 100%;
}

.appointment-detail-modal .appointment-admin-controls .inline-form {
  width: 100%;
  min-width: 0;
}

.appointment-detail-modal .appointment-horse-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.appointment-detail-modal .appointment-admin-controls .inline-form:not(.appointment-horse-form) {
  display: grid;
  grid-template-columns: minmax(130px, 180px) minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.45rem;
}

.appointment-detail-modal .appointment-admin-controls select,
.appointment-detail-modal .appointment-admin-controls input {
  width: 100%;
  min-width: 0;
}

.readonly-calendar-note {
  margin: 1rem 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf5;
  color: var(--muted);
  padding: 0.85rem 1rem;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .appointment-detail-modal.admin-modal-shell {
    justify-items: center;
    padding-inline: 0.8rem;
    overflow-x: hidden;
  }

  .appointment-detail-panel {
    width: calc(100dvw - 1.6rem);
    max-width: calc(100dvw - 1.6rem);
    padding: 1rem;
    overflow-x: hidden;
  }

  .appointment-detail-summary {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.85rem;
    width: 100%;
    max-width: 100%;
  }

  .appointment-detail-date {
    min-height: 84px;
  }

  .appointment-detail-date strong {
    font-size: 2.35rem;
  }

  .appointment-detail-tabs {
    width: 100%;
    max-width: 100%;
  }

  .appointment-time-edit-form .form-grid.two,
  .appointment-time-edit-form .appointment-edit-grid {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  .appointment-time-edit-form .admin-modal-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .appointment-time-edit-form .admin-modal-actions button {
    width: 100%;
    max-width: 100%;
  }

  .appointment-detail-modal .row-actions,
  .appointment-detail-modal .appointment-admin-controls,
  .appointment-detail-modal .appointment-admin-controls .inline-form:not(.appointment-horse-form) {
    grid-template-columns: minmax(0, 1fr);
  }

  .appointment-detail-modal .appointment-admin-controls button {
    width: 100%;
  }
}

.admin-timeline-bookings {
  display: grid;
  gap: 0.28rem;
  margin-top: 0.1rem;
}

.admin-timeline-booking {
  display: grid;
  gap: 0.05rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
  padding: 0.28rem 0.38rem;
}

.admin-timeline-booking strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.72rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-timeline-booking small {
  color: var(--muted);
  font-size: 0.68rem;
}

.availability-legend {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-timeline-legend {
  min-width: 100%;
  padding: 0.1rem 0.15rem 0;
}

.availability-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.availability-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.availability-empty {
  margin: 0;
}

.admin-calendar-dashboard {
  display: grid;
  gap: 1rem;
}

.admin-calendar-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
}

.admin-calendar-head span {
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.admin-calendar-head h2 {
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.85rem, 3vw, 2.55rem);
}

.admin-calendar-head p {
  max-width: 680px;
  color: var(--muted);
}

.admin-calendar-controls,
.calendar-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.admin-day-selector {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.admin-day-selector button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 0 0.7rem;
  font-weight: 700;
}

.admin-day-selector button.active {
  background: var(--green-900);
  color: #fff;
}

.admin-calendar-panel {
  overflow: visible;
}

.admin-calendar-board {
  display: grid;
  gap: 0.7rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  padding-bottom: 0.2rem;
}

.admin-calendar-day {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 0.65rem;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  padding: 0.75rem;
}

.admin-calendar-day.today {
  border-color: rgba(62, 90, 67, 0.45);
  background:
    linear-gradient(180deg, rgba(232, 241, 232, 0.62), rgba(255, 253, 249, 0.96)),
    #fffdf9;
}

.admin-calendar-day header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.admin-calendar-day header div {
  display: grid;
  gap: 0.15rem;
}

.admin-calendar-day header span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: lowercase;
}

.admin-calendar-day header strong {
  color: var(--green-900);
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1;
}

.admin-calendar-day header mark {
  min-width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--cream);
  color: var(--green-900);
  font-weight: 800;
}

.admin-calendar-slots,
.slot-bookings {
  display: grid;
  gap: 0.5rem;
}

.admin-calendar-slot {
  display: grid;
  gap: 0.35rem;
  border: 1px solid color-mix(in srgb, var(--slot-color, var(--green-700)) 28%, var(--line));
  border-left: 5px solid var(--slot-color, var(--green-700));
  border-radius: 8px;
  background: color-mix(in srgb, var(--slot-color, var(--green-700)) 10%, white);
  padding: 0.65rem;
}

.admin-calendar-slot.inactive {
  opacity: 0.58;
}

.admin-calendar-slot.loose {
  --slot-color: var(--gold);
  background: #fff8ea;
}

.slot-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.slot-time-row strong,
.admin-calendar-slot p {
  overflow-wrap: anywhere;
}

.slot-time-row span {
  min-width: 38px;
  min-height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--green-900);
  font-size: 0.75rem;
  font-weight: 800;
}

.admin-calendar-slot small,
.slot-bookings em {
  color: var(--muted);
  font-size: 0.78rem;
}

.slot-booking {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  min-height: 34px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
  padding: 0.35rem 0.45rem;
  font-size: 0.78rem;
}

.slot-booking strong {
  overflow-wrap: anywhere;
}

.slot-booking span {
  color: var(--green-900);
  font-weight: 800;
}

.slot-booking small {
  color: var(--muted);
  text-align: right;
}

.admin-basics {
  padding-top: 0.35rem;
}

.rider-section-tabs {
  margin-bottom: 1rem;
}

.rider-create-panel {
  display: grid;
  gap: 1rem;
  max-width: 820px;
}

.rider-create-form {
  max-width: 720px;
}

.rider-create-actions {
  justify-content: flex-end;
}

.mobile-rider-header-spacer {
  width: 44px;
  height: 44px;
}

[data-scroll-anchor] {
  scroll-margin-top: 5.5rem;
}

/* Desktop dashboard */
.desktop-sidebar,
.desktop-welcome,
.desktop-top-brand,
.desktop-top-nav,
.user-chip {
  display: none;
}

.dashboard-welcome {
  display: block;
  margin-bottom: 0.3rem;
}

.dashboard-welcome h1 {
  color: var(--ink);
  font-size: clamp(1.75rem, 2.2vw, 2.35rem);
}

.desktop-card svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-booking-cta {
  position: relative;
  width: 100%;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green-900), #123621);
  color: #fff;
  box-shadow: 0 14px 28px rgba(31, 61, 46, 0.18);
  padding: 0.82rem 1rem;
  text-align: center;
}

.dashboard-booking-cta span {
  min-width: 0;
  overflow: hidden;
  font-size: 1.08rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-booking-cta strong {
  position: absolute;
  right: 1rem;
  top: 50%;
  flex: 0 0 auto;
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1;
  transform: translateY(-50%);
}

.dashboard-bulletin-panel {
  display: grid;
  gap: 0.75rem;
}

.dashboard-bulletin-heading {
  margin-bottom: 0;
}

.dashboard-bulletin-heading h2 {
  color: var(--green-900);
}

.dashboard-bulletin-heading .text-action {
  min-height: auto;
  padding: 0.15rem 0.25rem;
  color: var(--green-900);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dashboard-bulletin-list {
  display: grid;
  gap: 0.65rem;
}

.dashboard-bulletin-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 24px;
  align-items: center;
  gap: 0.68rem;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf9;
  box-shadow: var(--soft-shadow);
  padding: 0.72rem 0.85rem;
}

.dashboard-bulletin-thumb,
.dashboard-bulletin-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: #eef4ed;
  color: var(--green-900);
  padding: 0;
  overflow: hidden;
}

.dashboard-bulletin-thumb {
  cursor: zoom-in;
}

.dashboard-bulletin-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.dashboard-bulletin-icon {
  position: relative;
}

.dashboard-bulletin-icon::before {
  content: none;
}

.dashboard-bulletin-icon .bulletin-document-icon {
  width: 32px;
  height: 32px;
  stroke-width: 2.2;
}

.dashboard-bulletin-icon.has-unread::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--gold);
}

.dashboard-bulletin-copy {
  min-width: 0;
}

.dashboard-bulletin-copy span {
  display: block;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-bulletin-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-bulletin-copy p {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.28;
  margin: 0.16rem 0 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-bulletin-row .appointment-chevron {
  display: grid;
  place-items: center;
  width: 24px;
  height: 48px;
  border: 0;
  background: transparent;
  color: var(--gold);
  padding: 0;
  font-size: 2rem;
  line-height: 1;
}

.card-chevron,
.appointment-chevron,
.next-date-mobile {
  display: none;
}

@media (min-width: 1024px) {
  body {
    background: #faf9f5;
  }

  .app-shell,
  .app-shell.is-rider,
  .app-shell.is-admin,
  .app-shell.is-instructor {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    display: block;
    margin: 0;
    background: #faf9f5;
    box-shadow: none;
  }

  .app-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
  }

  .desktop-sidebar {
    display: none;
  }

  .admin-secondary-grid {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    align-items: start;
  }

  .sidebar-brand {
    display: grid;
    justify-items: center;
    padding: 0 0.75rem 1.25rem;
  }

  .sidebar-brand img {
    width: 178px;
    height: 178px;
    object-fit: contain;
    border-radius: 8px;
  }

  .desktop-nav {
    display: grid;
    gap: 0.6rem;
  }

  .desktop-nav button {
    position: relative;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    padding: 0 1rem;
    text-align: left;
  }

  .desktop-nav button.active {
    background: linear-gradient(135deg, var(--green-900), #123621);
    color: #fff;
    box-shadow: 0 12px 22px rgba(31, 61, 46, 0.18);
  }

  .desktop-nav svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .side-pill {
    min-width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--gold);
    color: #fff;
    font-size: 0.75rem;
  }

  .sidebar-help {
    margin-top: auto;
    display: grid;
    gap: 0.75rem;
    padding: 1.15rem;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(243, 233, 210, 0.7), rgba(255, 255, 255, 0.9));
    border: 1px solid var(--line);
  }

  .sidebar-help p {
    color: var(--muted);
    font-size: 0.9rem;
  }

  .sidebar-help .ghost-action {
    width: 100%;
    background: transparent;
  }

  .topbar {
    position: sticky;
    top: 0;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    min-height: 86px;
    padding: 0 2rem;
    background: rgba(255, 253, 249, 0.96);
  }

  .top-icon {
    display: none;
  }

  .screen-title {
    display: none;
  }

  .desktop-top-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
  }

  .desktop-top-brand img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 50%;
  }

  .desktop-top-brand strong {
    color: var(--green-900);
    font-family: var(--display);
    font-size: 1.42rem;
    font-weight: 600;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .desktop-top-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    min-width: 0;
    overflow: visible;
    padding: 0 0.5rem;
  }

  .desktop-top-nav button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    height: 48px;
    min-width: 48px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    padding: 0 0.85rem;
    line-height: 1;
    white-space: nowrap;
    font-weight: 650;
    box-sizing: border-box;
    transform: translateZ(0);
  }

  .desktop-top-nav button.active {
    background: linear-gradient(135deg, var(--green-900), #123621);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 20px rgba(31, 61, 46, 0.14);
  }

  .desktop-top-nav button.icon-only {
    flex: 0 0 48px;
    width: 48px;
    justify-content: center;
    padding: 0;
  }

  .desktop-top-nav button .side-pill {
    position: absolute;
    top: 6px;
    right: 5px;
    min-width: 20px;
    height: 20px;
    border: 2px solid #fffdf9;
    font-size: 0.72rem;
    pointer-events: none;
  }

  .desktop-top-nav button.active .side-pill {
    border-color: var(--green-900);
  }

  .desktop-top-nav svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .desktop-welcome {
    display: none;
    color: var(--ink);
    font-size: 1.22rem;
    line-height: 1.1;
    white-space: nowrap;
  }

  .dashboard-welcome {
    display: block;
    margin-bottom: 1.35rem;
  }

  .dashboard-welcome h1 {
    color: var(--ink);
    font-size: clamp(1.75rem, 2.2vw, 2.35rem);
  }

  .topbar-actions {
    gap: 0.75rem;
  }

  .round-action {
    position: relative;
    border-radius: 999px;
  }

  .user-chip {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.75rem 0.35rem 0.35rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
  }

  .user-chip span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--green-900);
    color: #fff;
    font-weight: 700;
  }

  .user-chip strong {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.92rem;
  }

  .user-chip small {
    color: var(--muted);
    font-size: 1rem;
  }

  .profile-menu {
    position: relative;
  }

  .profile-dropdown {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    z-index: 35;
    min-width: 190px;
    display: none;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf9;
    box-shadow: var(--shadow);
    padding: 0.35rem;
  }

  .profile-menu.open .profile-dropdown {
    display: grid;
  }

  .profile-dropdown button {
    min-height: 42px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ink);
    padding: 0 0.75rem;
    text-align: left;
  }

  .profile-dropdown button:hover {
    background: #eff4ec;
  }

  .profile-dropdown button[data-action="logout"] {
    color: #B64230;
  }

  .tabs {
    display: none;
  }

  .mobile-menu-backdrop,
  .mobile-menu,
  .app-shell.is-menu-open .mobile-menu-backdrop,
  .app-shell.is-menu-open .mobile-menu {
    display: none;
  }

  .workspace,
  .is-admin .workspace,
  .is-instructor .workspace {
    padding: 1.75rem 2rem 2rem;
  }

  .workspace .panel {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
  }

  .calendar-section-tabs {
    width: min(100%, 560px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-inline: auto;
  }

  .riders-page .rider-create-panel {
    width: 100%;
    margin-inline: auto;
  }

  .admin-calendar-dashboard > .panel {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .rider-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
    gap: 1.5rem;
    align-items: start;
  }

  .home-appointment-grid {
    display: grid;
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
  }

  .desktop-summary-row {
    display: grid;
    grid-column: 2;
    grid-row: 1 / span 2;
    grid-template-columns: minmax(300px, 1.08fr) minmax(300px, 1.08fr) minmax(260px, 0.95fr);
    gap: 1.5rem;
    padding-top: 4rem;
    min-width: 6rem;
  }

  .rider-summary-row {
    grid-template-columns: minmax(0, 1fr);
    max-width: none;
  }

  .dashboard-booking-cta {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
  }

  .rider-app-setup-panel {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .desktop-card {
    min-height: 190px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 1.2rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--soft-shadow);
    padding: 1.65rem;
  }

  .desktop-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 0.4rem;
  }

  .desktop-card p {
    color: var(--muted);
  }

  .desktop-card strong {
    display: block;
    color: var(--ink);
    font-size: 1.05rem;
  }

  .card-icon {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--green-900);
    background: var(--cream);
  }

  .next-card {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    background:
      linear-gradient(135deg, rgba(31, 61, 46, 0.95), rgba(18, 54, 33, 0.92)),
      var(--green-900);
    color: #fff;
  }

  .next-card span,
  .next-card p {
    color: rgba(255, 255, 255, 0.82);
  }

  .next-card strong {
    color: #fff;
    font-size: 2rem;
  }

  .next-card .card-icon {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
  }

  .outline-light,
  .outline-dark,
  .wide-soft-action,
  .calendar-open-action {
    min-height: 44px;
    border-radius: 8px;
    padding: 0.65rem 1rem;
  }

  .outline-light {
    grid-column: 2;
    width: 150px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: transparent;
  }

  .outline-dark {
    align-self: end;
    border: 1px solid var(--green-900);
    color: var(--green-900);
    background: transparent;
  }

  .ticket-icon {
    color: #fff;
    background: var(--gold);
  }

  .pass-overview-body {
    min-width: 0;
  }

  .pass-overview-body .progress {
    margin: 1rem 0 0.6rem;
  }

  .logo-icon {
    overflow: hidden;
    background: var(--green-900);
  }

  .logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .count-card {
    background: linear-gradient(135deg, rgba(232, 241, 232, 0.78), #fff);
  }

  .count-card strong {
    color: var(--green-900);
    font-size: 2rem;
  }

  .desktop-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(360px, 1.25fr) minmax(360px, 1.1fr) minmax(300px, 0.95fr);
    gap: 1.5rem;
    align-items: start;
  }

  .desktop-side-stack {
    display: grid;
    gap: 1.5rem;
  }

  .appointments-panel,
  .booking-panel,
  .mini-calendar-panel,
  .compact-next-panel {
    padding: 1.35rem;
  }

  .desktop-appointment-list,
  .compact-appointment-list {
    display: grid;
    gap: 0.85rem;
  }

  .desktop-appointment-row,
  .compact-appointment-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    min-height: 92px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf9;
    padding: 0.7rem;
  }

  .desktop-date-block {
    width: 64px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eef4ed;
    color: var(--green-900);
  }

  .desktop-date-block span,
  .desktop-date-block small {
    color: var(--green-900);
    font-size: 0.72rem;
    text-transform: uppercase;
  }

  .desktop-date-block strong {
    font-size: 1.55rem;
    line-height: 1;
  }

  .desktop-appointment-info strong,
  .compact-appointment-row strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.35rem;
  }

  .desktop-appointment-info p,
  .compact-appointment-row p {
    color: var(--muted);
    font-size: 0.9rem;
  }

  .wide-soft-action,
  .calendar-open-action {
    border: 0;
    background: #eef4ed;
    color: var(--green-900);
  }

  .booking-panel .stack-form {
    gap: 1rem;
  }

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

  .mini-calendar {
    display: grid;
    gap: 1rem;
  }

  .mini-calendar-head {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    align-items: center;
    text-align: center;
  }

  .mini-calendar-head button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--green-900);
    font-size: 1.5rem;
  }

  .mini-calendar-weekdays,
  .mini-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
    text-align: center;
  }

  .mini-calendar-weekdays span {
    color: var(--muted);
    font-size: 0.78rem;
  }

  .mini-calendar-days span {
    min-height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--ink);
  }

  .mini-calendar-days span.active {
    background: var(--green-900);
    color: #fff;
  }

  .compact-next-panel .text-action {
    font-size: 0.85rem;
  }

  .compact-appointment-row {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    min-height: 78px;
    padding: 0.55rem;
  }

  .compact-appointment-row .desktop-date-block {
    width: 58px;
    height: 64px;
  }

  .compact-appointment-row .status {
    font-size: 0.78rem;
  }

}

@media (min-width: 1024px) and (max-width: 1320px) {
  .app-shell,
  .app-shell.is-rider,
  .app-shell.is-admin,
  .app-shell.is-instructor {
    display: block;
  }

  .sidebar-brand img {
    width: 150px;
    height: 150px;
  }

  .desktop-summary-row,
  .desktop-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .desktop-side-stack {
    grid-column: 1 / -1;
  }

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

@media (max-width: 1023px) {
  .app-shell,
  .app-main,
  .workspace,
  .panel,
  .admin-feature-block,
  .booking-flow-column,
  .booking-step-card,
  .appointment-row,
  .pass-card,
  .notification-row {
    min-width: 0;
    max-width: 100%;
  }

  .app-shell,
  .app-main,
  .workspace {
    overflow-x: hidden;
  }

  .topbar {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    top: 0;
    min-height: 70px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: linear-gradient(135deg, var(--green-900), #123621);
    box-shadow: 0 10px 24px rgba(15, 36, 25, 0.16);
    color: #fff;
    backdrop-filter: none;
    overflow: visible;
  }

  .top-icon {
    background: transparent;
    color: #fff;
  }

  .top-icon span {
    width: 23px;
    height: 2.4px;
    background: currentColor;
  }

  .topbar-actions {
    display: none;
  }

  .screen-title {
    justify-self: start;
    width: 100%;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    column-gap: 0.68rem;
    text-align: left;
  }

  .screen-title img {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(255, 253, 249, 0.74);
  }

  .screen-title span {
    max-width: 100%;
    overflow: hidden;
    color: #fff;
    font-family: var(--sans);
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen-title strong {
    display: none;
  }

  .mobile-notification-button {
    display: grid;
    color: #fff;
  }

  .mobile-notification-button .side-pill {
    top: -2px;
    right: -4px;
    border-color: #123621;
  }

  .tabs,
  .is-rider .tabs,
  .is-admin .tabs,
  .is-instructor .tabs {
    display: none;
  }

  .workspace,
  .is-admin .workspace,
  .is-instructor .workspace {
    padding-inline: clamp(0.75rem, 4vw, 1rem);
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }

  .availability-board,
  .admin-calendar-board,
  .week-grid,
  .admin-table {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }
}

@media (max-width: 720px) {
  .mobile-unified-page,
  .notifications-page {
    display: grid;
    gap: 1rem;
  }

  .mobile-unified-page > .panel,
  .notifications-page > .panel {
    display: grid;
    gap: 0.75rem;
  }

  .mobile-unified-page > .panel > .panel-heading,
  .notifications-page > .panel > .panel-heading {
    align-items: center;
    margin-bottom: 0;
  }

  .mobile-unified-page > .panel > .panel-heading h2,
  .notifications-page > .panel > .panel-heading h2 {
    color: var(--green-900);
    font-family: var(--display);
    font-size: 1.45rem;
    line-height: 1.12;
    letter-spacing: 0;
  }

  .settings-list,
  .settings-actions,
  .pass-list,
  .notification-list {
    gap: 0.65rem;
  }

  .settings-row,
  .settings-actions > .ghost-action,
  .settings-actions > .text-danger,
  .notification-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf9;
    box-shadow: var(--soft-shadow);
    padding: 0.72rem;
  }

  .settings-list > div,
  .settings-row,
  .settings-row:last-child {
    border-bottom: 0;
  }

  .settings-row {
    grid-template-columns: minmax(0, 1fr) 38px;
    min-height: 68px;
  }

  .settings-list span {
    font-size: 0.78rem;
  }

  .settings-list strong {
    color: var(--ink);
    font-size: 0.95rem;
  }

  .settings-actions > .ghost-action,
  .settings-actions > .text-danger {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .settings-actions .install-guide-action {
    display: grid;
    gap: 0.35rem;
  }

  .settings-actions .install-guide-action .ghost-action {
    width: 100%;
    border-radius: 8px;
  }

  .pass-section-head {
    margin-bottom: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf9;
    box-shadow: var(--soft-shadow);
    padding: 0.62rem 0.72rem;
  }

  .pass-section-head strong {
    font-size: 0.95rem;
  }

  .pass-section-head span {
    font-size: 0.78rem;
  }

  .pass-card {
    border-radius: 8px;
  }

  .pass-card-summary {
    min-height: 66px;
    gap: 0.55rem;
    padding: 0.72rem 2.25rem 0.72rem 0.72rem;
  }

  .pass-card-title h3 {
    font-size: 0.96rem;
  }

  .pass-card-title p {
    font-size: 0.78rem;
  }

  .pass-card-remaining strong {
    font-size: 1.18rem;
  }

  .pass-card-body {
    grid-template-columns: 1fr;
    gap: 0.58rem;
    padding: 0 0.72rem 0.72rem;
  }

  .pass-count strong {
    font-size: 2.1rem;
  }

  .pass-archive-folder > summary {
    min-height: 48px;
    border-radius: 8px;
    background: #fffdf9;
  }

  .notification-section-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0;
  }

  .notification-section-tabs button {
    min-width: 0;
    padding-inline: 0.55rem;
    font-size: 0.84rem;
  }

  .notification-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    align-items: center;
    gap: 0.62rem;
  }

  .notification-row div {
    min-width: 0;
  }

  .notification-row h3 {
    font-size: 0.95rem;
  }

  .notification-row p {
    font-size: 0.84rem;
    line-height: 1.35;
  }

  .notification-row small {
    font-size: 0.72rem;
  }

  .availability-calendar-header {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .availability-calendar-header > .availability-calendar-title,
  .availability-calendar-control-card .calendar-view-controls,
  .availability-calendar-action-row .availability-instructor-filter,
  .availability-calendar-action-row .availability-new-slot-action {
    grid-area: auto;
  }

  .availability-calendar-title h2 {
    font-size: 1.72rem;
  }

  .availability-calendar-title span {
    font-size: 0.98rem;
  }

  .availability-calendar-control-card {
    gap: 0.65rem;
    padding: 0.55rem;
  }

  .availability-calendar-control-card .week-navigator {
    grid-template-columns: 34px 20px minmax(0, 1fr) 20px 42px;
    gap: 0.2rem;
  }

  .availability-calendar-control-card .week-navigator strong {
    font-size: clamp(0.68rem, 2.6vw, 0.82rem);
    line-height: 1.18;
    white-space: nowrap;
  }

  .availability-calendar-control-card .week-navigator-icon,
  .availability-calendar-control-card .week-navigator button {
    min-height: 42px;
    min-width: 0;
    padding-inline: 0.25rem;
  }

  .availability-calendar-action-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.55rem;
  }

  .availability-calendar-action-row .availability-instructor-filter span {
    display: none;
  }

  .availability-calendar-action-row .availability-instructor-filter select,
  .availability-calendar-action-row .availability-new-slot-action {
    min-height: 52px;
    font-size: 0.95rem;
  }

  .workspace .panel:not(.admin-modal-panel):not(.auth-panel) {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding-inline: 0;
  }

  .workspace .panel.full-width,
  .workspace .panel:has(.calendar-view-header) {
    margin-bottom: 0.75rem;
  }

  .workspace .panel > .panel-heading:first-child {
    padding-inline: 0;
  }

  .workspace .panel .panel {
    padding-inline: 0;
  }
}

@media (max-width: 920px) {
  .app-shell.is-admin,
  .app-shell.is-instructor {
    width: min(100%, 520px);
  }

  .is-admin .tabs,
  .is-instructor .tabs {
    width: min(100%, 520px);
  }

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

  .admin-calendar-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .admin-day-selector {
    justify-content: flex-start;
  }

  .admin-calendar-controls,
  .calendar-toolbar-actions {
    justify-content: flex-start;
  }

  .availability-calendar-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .calendar-view-header {
    gap: 0.65rem;
  }

  .calendar-view-title-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title options"
      "controls controls";
  }

  .availability-calendar-title-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title options"
      "controls controls"
      "instructor instructor";
  }

  .calendar-view-title-row h2 {
    grid-area: title;
  }

  .availability-calendar-title {
    grid-area: title;
  }

  .calendar-view-options {
    grid-area: options;
  }

  .availability-calendar-title-row .availability-new-slot-action {
    grid-area: options;
    justify-self: end;
  }

  .availability-instructor-filter {
    grid-area: instructor;
    width: 100%;
  }

  .availability-instructor-filter span {
    display: block;
  }

  .calendar-view-controls {
    grid-area: controls;
    justify-self: stretch;
  }

  .calendar-view-controls,
  .availability-calendar-toolbar .calendar-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    justify-items: stretch;
    gap: 0.55rem;
    width: 100%;
  }

  .calendar-view-controls .week-navigator,
  .availability-calendar-toolbar .week-navigator {
    width: 100%;
  }

  .availability-period-actions {
    grid-column: 1 / -1;
  }

  .availability-new-slot-action {
    align-self: start;
    min-height: 40px;
    padding-inline: 0.85rem;
    white-space: nowrap;
  }

  .availability-calendar-toolbar .calendar-toolbar-actions > * {
    width: 100%;
  }

  .calendar-view-mode-selector {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }

  .calendar-view-mode-selector button {
    min-width: 0;
    padding-inline: 0.5rem;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  .booking-flow-grid,
  .admin-management-grid,
  .availability-admin-grid {
    grid-template-columns: 1fr;
  }

  .booking-step-card {
    min-height: auto;
  }

  .availability-board {
    grid-template-columns: 1fr;
  }

  .availability-calendar {
    min-width: 860px;
  }

  .horse-counter-grid {
    grid-template-columns: 1fr;
  }

  .horse-feature-block .horse-counter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .instructor-feature-block .horse-counter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .horse-feature-block .horse-counter-card {
    min-height: 82px;
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 0.35rem;
    padding: 0.65rem;
  }

  .instructor-feature-block .horse-counter-card {
    min-height: 82px;
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 0.35rem;
    padding: 0.65rem;
  }

  .horse-stat-icon {
    width: 36px;
    height: 36px;
  }

  .horse-stat-icon svg {
    width: 19px;
    height: 19px;
  }

  .admin-table-head {
    display: none;
  }

  .rider-section-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rider-section-tabs button {
    min-width: 0;
    padding-inline: 0.65rem;
  }

  .rider-create-panel {
    gap: 0.85rem;
  }

  .rider-create-panel .panel-heading {
    align-items: flex-start;
  }

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

  .riders-page > .admin-section-title,
  .riders-page > .horse-counter-grid,
  .riders-page > .admin-table-panel {
    display: none;
  }

  .riders-page .mobile-rider-view {
    display: grid;
    gap: 0.75rem;
  }

  .admin-table-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .table-row-actions,
  .horse-row-actions {
    justify-content: flex-start;
  }

  .rider-row-password-reset {
    display: none;
  }

  .mobile-password-reset-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .appointment-row {
    grid-template-columns: 1fr;
  }

  .row-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .auth-layout {
    padding: 0;
    place-items: stretch;
  }

  .auth-panel {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .app-shell,
  .app-shell.is-rider,
  .app-shell.is-admin,
  .app-shell.is-instructor {
    width: 100%;
    max-width: none;
    box-shadow: none;
  }

  .tabs,
  .is-rider .tabs,
  .is-admin .tabs,
  .is-instructor .tabs {
    width: 100%;
  }

  .topbar {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    padding-inline: 0.85rem;
  }

  .topbar-actions .ghost-action {
    display: none;
  }

  .rider-modal-grid {
    grid-template-columns: 1fr;
  }

  .mobile-rider-header {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .mobile-rider-header h3 {
    font-size: 1.28rem;
  }

  .mobile-rider-back,
  .mobile-rider-add {
    width: 40px;
    height: 40px;
  }

  .mobile-rider-summary {
    grid-template-columns: 44px minmax(0, 1fr) auto 24px;
    gap: 0.55rem;
    padding-inline: 0.75rem;
  }

  .mobile-rider-badge {
    min-height: 30px;
    padding-inline: 0.5rem;
    font-size: 0.8rem;
  }

  .is-rider.view-dashboard .workspace {
    padding: 1.45rem clamp(1rem, 5vw, 1.35rem) calc(1.4rem + env(safe-area-inset-bottom));
  }

  .is-rider.view-dashboard .dashboard-welcome {
    display: block;
    margin: 0 0 1rem;
    text-align: left;
  }

  .is-rider.view-dashboard .dashboard-welcome h1 {
    color: var(--green-900);
    font-size: clamp(1.55rem, 6.6vw, 1.82rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .is-rider.view-dashboard .rider-dashboard {
    display: grid;
    gap: 1.35rem;
  }

  .is-rider.view-dashboard .dashboard-booking-cta {
    min-height: 58px;
    border-radius: 12px;
    padding: 0.82rem 1rem;
  }

  .is-rider.view-dashboard .dashboard-booking-cta span {
    font-size: 1rem;
  }

  .is-rider.view-dashboard .rider-app-setup-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 1rem;
  }

  .is-rider.view-dashboard .rider-app-setup-copy h2 {
    font-size: 1rem;
    line-height: 1.15;
  }

  .is-rider.view-dashboard .rider-app-setup-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    gap: 0.65rem;
  }

  .is-rider.view-dashboard .rider-app-setup-actions .ghost-action {
    width: 100%;
  }

  .is-rider.view-dashboard .desktop-summary-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .is-rider.view-dashboard .desktop-card {
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 0.75rem;
    min-height: 112px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--soft-shadow);
    padding: 0.82rem;
  }

  .is-rider.view-dashboard .desktop-card span {
    display: block;
    color: var(--muted);
    font-size: 1.05rem;
    margin-bottom: 0.15rem;
  }

  .is-rider.view-dashboard .desktop-card p {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0.08rem 0;
  }

  .is-rider.view-dashboard .desktop-card strong {
    display: block;
    color: var(--ink);
    font-size: 1.08rem;
    line-height: 1.2;
  }

  .is-rider.view-dashboard .card-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--green-900);
    background: #eef4ed;
  }

  .is-rider.view-dashboard .card-icon svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .is-rider.view-dashboard .card-chevron {
    display: grid;
    place-items: center;
    width: 22px;
    height: 42px;
    border: 0;
    background: transparent;
    color: var(--green-900);
    padding: 0;
    font-size: 2.25rem;
    line-height: 1;
  }

  .is-rider.view-dashboard .next-card {
    grid-template-columns: minmax(0, 1fr) 28px;
    grid-template-rows: auto auto;
    align-items: center;
    min-height: 168px;
    color: #fff;
    background:
      radial-gradient(circle at 22% 30%, rgba(255, 255, 255, 0.12), transparent 28%),
      linear-gradient(135deg, #1d4933, #0e3c25 62%, #07331f);
    border-color: rgba(31, 61, 46, 0.2);
    box-shadow: 0 16px 30px rgba(31, 61, 46, 0.2);
  }

  .is-rider.view-dashboard .next-card .card-icon {
    display: none;
  }

  .is-rider.view-dashboard .next-card-body {
    min-width: 0;
    max-width: 100%;
    align-self: end;
  }

  .is-rider.view-dashboard .next-card span,
  .is-rider.view-dashboard .next-card p {
    color: rgba(255, 255, 255, 0.86);
  }

  .is-rider.view-dashboard .next-card span {
    font-size: 1.05rem;
  }

  .is-rider.view-dashboard .next-card strong {
    color: #fff;
    font-size: clamp(1.9rem, 12vw, 2.45rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .is-rider.view-dashboard .next-date-full {
    display: none;
  }

  .is-rider.view-dashboard .next-date-mobile {
    display: block;
    font-size: 1.15rem;
    margin: 0.15rem 0 0.45rem;
  }

  .is-rider.view-dashboard .next-empty-title {
    max-width: 100%;
    font-size: clamp(1.45rem, 8vw, 2rem);
  }

  .is-rider.view-dashboard .next-empty-text {
    max-width: 16rem;
    margin-top: 0.45rem;
  }

  .is-rider.view-dashboard .outline-light {
    grid-column: 1 / -1;
    justify-self: start;
    align-self: end;
    min-height: 42px;
    width: auto;
    max-width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    background: transparent;
    color: #fff;
    padding: 0.55rem 1.1rem;
    font-size: 1rem;
  }

  .is-rider.view-dashboard .next-card .card-chevron {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    color: #fff;
  }

  .is-rider.view-dashboard .pass-overview-card {
    min-height: 108px;
  }

  .is-rider.view-dashboard .ticket-icon {
    color: #fff;
    background: linear-gradient(135deg, var(--gold), #dcbf80);
  }

  .is-rider.view-dashboard .pass-overview-body .progress {
    margin: 0.85rem 0 0.65rem;
  }

  .is-rider.view-dashboard .pass-overview-body small {
    color: var(--muted);
    font-size: 0.95rem;
  }

  .is-rider.view-dashboard .count-card {
    min-height: 146px;
    background: linear-gradient(135deg, rgba(238, 244, 237, 0.8), rgba(255, 255, 255, 0.96));
  }

  .is-rider.view-dashboard .logo-icon {
    overflow: hidden;
    background: var(--green-900);
  }

  .is-rider.view-dashboard .logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .is-rider.view-dashboard .count-card strong {
    color: var(--green-900);
    font-size: 2.2rem;
  }

  .is-rider.view-dashboard .outline-dark {
    grid-column: 2;
    justify-self: start;
    min-height: 40px;
    border: 1px solid var(--green-900);
    border-radius: 10px;
    background: transparent;
    color: var(--green-900);
    padding: 0.5rem 1rem;
  }

  .is-rider.view-dashboard .home-appointment-grid {
    display: block;
  }

  .is-rider.view-dashboard .appointments-panel {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .is-rider.view-dashboard .appointments-panel .panel-heading {
    margin-bottom: 0.8rem;
  }

  .is-rider.view-dashboard .appointments-panel .panel-heading h2 {
    color: var(--green-900);
    font-size: clamp(1.45rem, 6.2vw, 1.7rem);
  }

  .is-rider.view-dashboard .dashboard-bulletin-heading h2 {
    font-family: var(--display);
    font-size: clamp(1.45rem, 6vw, 1.7rem);
  }

  .is-rider.view-dashboard .dashboard-bulletin-heading {
    align-items: center;
    flex-direction: row;
  }

  .is-rider.view-dashboard .dashboard-bulletin-row {
    grid-template-columns: 88px minmax(0, 1fr) 22px;
    gap: 0.68rem;
    min-height: 108px;
    padding: 0.72rem;
  }

  .is-rider.view-dashboard .dashboard-bulletin-thumb,
  .is-rider.view-dashboard .dashboard-bulletin-icon {
    width: 82px;
    height: 82px;
    border-radius: 14px;
  }

  .is-rider.view-dashboard .dashboard-bulletin-icon::before {
    content: none;
  }

  .is-rider.view-dashboard .dashboard-bulletin-icon .bulletin-document-icon {
    width: 42px;
    height: 42px;
    stroke-width: 2.4;
  }

  .is-rider.view-dashboard .dashboard-bulletin-copy strong {
    display: -webkit-box;
    overflow: hidden;
    font-family: var(--sans);
    font-size: 1.03rem;
    font-weight: 850;
    line-height: 1.16;
    text-overflow: clip;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .is-rider.view-dashboard .dashboard-bulletin-copy p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.93rem;
    line-height: 1.24;
    text-overflow: clip;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .is-rider.view-dashboard .dashboard-bulletin-row .appointment-chevron {
    grid-area: auto;
  }

  .is-rider.view-dashboard .desktop-appointment-list {
    display: grid;
    gap: 0.8rem;
  }

  .is-rider.view-dashboard .desktop-appointment-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 24px;
    grid-template-areas:
      "date info chevron"
      "date status chevron";
    align-items: center;
    gap: 0.34rem 0.72rem;
    min-height: 96px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fffdf9;
    box-shadow: var(--soft-shadow);
    padding: 0.8rem 0.9rem;
  }

  .is-rider.view-dashboard .desktop-date-block {
    grid-area: date;
    width: 64px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #eef4ed;
    color: var(--green-900);
  }

  .is-rider.view-dashboard .desktop-date-block span,
  .is-rider.view-dashboard .desktop-date-block small {
    color: var(--green-900);
    font-size: 0.75rem;
    text-transform: uppercase;
  }

  .is-rider.view-dashboard .desktop-date-block strong {
    color: var(--green-900);
    font-size: 1.7rem;
    line-height: 1;
  }

  .is-rider.view-dashboard .desktop-appointment-info {
    grid-area: info;
    min-width: 0;
  }

  .is-rider.view-dashboard .desktop-appointment-info strong {
    display: block;
    color: var(--green-900);
    font-size: 1.18rem;
    line-height: 1;
    margin-bottom: 0.38rem;
  }

  .is-rider.view-dashboard .desktop-appointment-info p {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.92rem;
    margin: 0.05rem 0;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .is-rider.view-dashboard .desktop-appointment-row .status {
    grid-area: status;
    justify-self: start;
    min-height: 34px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 999px;
    font-size: 0.86rem;
  }

  .is-rider.view-dashboard .appointment-chevron {
    grid-area: chevron;
    display: grid;
    place-items: center;
    width: 24px;
    height: 48px;
    border: 0;
    background: transparent;
    color: var(--gold);
    padding: 0;
    font-size: 2rem;
    line-height: 1;
  }

  .is-rider.view-dashboard .dashboard-bulletin-row .appointment-chevron {
    grid-area: auto;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .appointment-search-row,
  .appointment-filter-grid {
    grid-template-columns: 1fr;
  }

  .appointment-filter-desktop {
    display: none;
  }

  .appointment-filter-mobile {
    display: block;
    margin-bottom: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: linear-gradient(135deg, #fffdf9 0%, #f7faf5 100%);
    box-shadow: var(--soft-shadow);
    overflow: hidden;
  }

  .appointment-filter-mobile summary {
    min-height: 48px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.6rem;
    color: var(--green-900);
    padding: 0.78rem 0.9rem;
    font-weight: 900;
    cursor: pointer;
    list-style: none;
  }

  .appointment-filter-mobile summary::-webkit-details-marker {
    display: none;
  }

  .appointment-filter-mobile summary::after {
    content: "⌄";
    color: var(--gold);
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 160ms ease;
  }

  .appointment-filter-mobile[open] summary::after {
    transform: rotate(180deg);
  }

  .appointment-filter-mobile summary small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
  }

  .appointment-filter-mobile .appointment-filter-form {
    margin: 0;
    border-width: 1px 0 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .staff-calendar-page {
    gap: 0.65rem;
  }

  .staff-calendar-section-tabs {
    margin-bottom: 0.1rem;
  }

  .staff-calendar-section-tabs button {
    min-height: 36px;
    border-radius: 7px;
    font-size: 0.82rem;
  }

  .incoming-appointments-panel {
    padding: 0.55rem;
  }

  .incoming-appointments-panel > .appointment-list-heading {
    display: none;
  }

  .appointment-filter-mobile {
    width: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .appointment-filter-mobile .appointment-filter-form {
    width: 100%;
    display: grid;
    gap: 0.55rem;
    border: 0;
    padding: 0;
  }

  .appointment-mobile-filter-row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
  }

  .appointment-mobile-search-field {
    position: relative;
    display: block;
    min-width: 0;
  }

  .appointment-mobile-search-field input {
    min-height: 42px;
    border-radius: 8px;
    background: #fffdf9;
    padding-left: 2.45rem;
    font-size: 0.86rem;
    width: 100%;
  }

  .appointment-search-icon {
    position: absolute;
    left: 0.82rem;
    top: 50%;
    width: 18px;
    height: 18px;
    color: var(--muted);
    transform: translateY(-50%);
    pointer-events: none;
  }

  .appointment-search-icon svg,
  .appointment-filter-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .appointment-mobile-filter-toggle {
    width: auto;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf9;
    color: var(--green-900);
    padding: 0.45rem 0.7rem;
    font-size: 0.86rem;
    font-weight: 850;
    white-space: nowrap;
  }

  .appointment-mobile-filter-toggle.active {
    border-color: rgba(31, 61, 46, 0.28);
    background: #eff4ec;
  }

  .appointment-filter-icon {
    width: 18px;
    height: 18px;
  }

  .appointment-mobile-filter-toggle small {
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 900;
  }

  .appointment-mobile-filter-body {
    width: 100%;
    display: grid;
    gap: 0.55rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fffdf9;
    padding: 0.75rem;
    box-shadow: var(--soft-shadow);
  }

  .appointment-mobile-filter-body.is-hidden {
    display: none;
  }

  .appointment-filter-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .incoming-day-list {
    gap: 0.6rem;
  }

  .incoming-day-group,
  .incoming-later-group {
    gap: 0;
    overflow: hidden;
    padding: 0;
    border-radius: 9px;
    background: #fffdf9;
  }

  .incoming-day-group > summary,
  .incoming-later-group > summary {
    padding: 0.65rem 0.72rem;
  }

  .incoming-day-group > summary div,
  .incoming-later-group > summary div {
    display: block;
  }

  .incoming-day-group > summary strong,
  .incoming-later-group > summary strong {
    font-size: 0.86rem;
  }

  .incoming-day-group > summary span,
  .incoming-later-group > summary span {
    display: none;
  }

  .incoming-day-group > summary mark,
  .incoming-later-group > summary mark {
    font-size: 0.74rem;
    padding: 0.16rem 0.45rem;
  }

  .incoming-day-group[open] > .incoming-compact-list,
  .incoming-later-group[open] > .incoming-day-list {
    margin-top: 0;
  }

  .incoming-compact-list {
    padding: 0 0.72rem 0.15rem;
  }

  .incoming-appointment-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.22rem 0.6rem;
    padding: 0.62rem 0;
  }

  .incoming-appointment-time {
    grid-column: 1;
    color: var(--ink);
    font-size: 0.84rem;
  }

  .incoming-appointment-body {
    grid-column: 1;
  }

  .incoming-appointment-body strong {
    font-size: 0.82rem;
  }

  .incoming-appointment-body small {
    font-size: 0.68rem;
  }

  .incoming-appointment-card .status {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    min-height: 24px;
    padding: 0.16rem 0.45rem;
    font-size: 0.65rem;
    font-weight: 850;
  }

  .appointment-sort-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .appointment-sort-bar button {
    width: 100%;
    padding-inline: 0.45rem;
  }

  .week-navigator {
    width: 100%;
    display: grid;
    grid-template-columns: 32px 30px minmax(0, 1fr) 30px 42px;
    gap: 0.18rem;
    align-items: center;
    overflow: hidden;
  }

  .week-navigator-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .week-navigator button {
    min-width: 0;
    min-height: 34px;
    padding-inline: 0.24rem;
  }

  .week-navigator strong {
    min-width: 0;
    font-size: 0.8rem;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
  }

  .calendar-view-controls {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.5rem;
  }

  .calendar-view-options {
    position: static;
  }

  .calendar-view-options-panel {
    left: 0;
    right: 0;
    width: 100%;
  }

  .calendar-view-mode-selector {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .calendar-view-mode-selector button {
    flex: initial;
    min-width: 0;
    min-height: 38px;
    padding-inline: 0.45rem;
    font-size: 0.88rem;
  }

  .calendar-mode-label-full {
    display: none;
  }

  .calendar-mode-label-short {
    display: inline;
  }

  .is-admin.view-dashboard .admin-calendar-panel,
  .is-instructor.view-dashboard .admin-calendar-panel {
    padding: 0.85rem;
  }

  .is-admin.view-dashboard .calendar-view-header,
  .is-instructor.view-dashboard .calendar-view-header {
    gap: 0.55rem;
  }

  .is-admin.view-dashboard .calendar-view-controls,
  .is-instructor.view-dashboard .calendar-view-controls {
    gap: 0.55rem;
  }

  .is-admin.view-dashboard .week-navigator,
  .is-instructor.view-dashboard .week-navigator {
    display: grid;
    grid-template-columns: 34px 30px minmax(0, 1fr) 30px 42px;
    gap: 0.18rem;
    align-items: center;
    overflow: hidden;
  }

  .is-admin.view-dashboard .week-navigator-icon,
  .is-instructor.view-dashboard .week-navigator-icon {
    width: 32px;
    height: 32px;
  }

  .is-admin.view-dashboard .week-navigator button,
  .is-instructor.view-dashboard .week-navigator button {
    min-width: 0;
    min-height: 34px;
    padding: 0 0.25rem;
  }

  .is-admin.view-dashboard .week-navigator strong,
  .is-instructor.view-dashboard .week-navigator strong {
    min-width: 0;
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .is-admin.view-dashboard .calendar-view-mode-selector,
  .is-instructor.view-dashboard .calendar-view-mode-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .is-admin.view-dashboard .calendar-view-mode-selector button,
  .is-instructor.view-dashboard .calendar-view-mode-selector button {
    min-width: 0;
    min-height: 38px;
    flex: initial;
    gap: 0.32rem;
    padding: 0.35rem 0.42rem;
    font-size: 0.88rem;
  }

  .is-admin.view-dashboard .calendar-view-mode-selector button span,
  .is-instructor.view-dashboard .calendar-view-mode-selector button span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .is-admin.view-dashboard .admin-timeline-board,
  .is-instructor.view-dashboard .admin-timeline-board {
    overflow-x: auto;
  }

  .is-admin.view-dashboard .admin-timeline-calendar.compact,
  .is-instructor.view-dashboard .admin-timeline-calendar.compact {
    --calendar-row-height: 11px !important;
    --calendar-half-hour-height: 66px !important;
    --calendar-hour-height: 132px !important;
    --calendar-min-appointment-height: 66px !important;
    min-width: 0 !important;
    width: 100%;
  }

  .is-admin.view-dashboard .admin-timeline-calendar.compact .availability-calendar-time,
  .is-instructor.view-dashboard .admin-timeline-calendar.compact .availability-calendar-time {
    font-size: 0.68rem;
    padding-right: 0.28rem;
  }

  .is-admin.view-dashboard .admin-timeline-calendar.compact .admin-timeline-appointment-group,
  .is-instructor.view-dashboard .admin-timeline-calendar.compact .admin-timeline-appointment-group {
    gap: 0.16rem;
    padding: 0.12rem 0.18rem;
  }

  .is-admin.view-dashboard .admin-timeline-calendar.compact .admin-timeline-appointment,
  .is-instructor.view-dashboard .admin-timeline-calendar.compact .admin-timeline-appointment {
    border-left-width: 3px;
    padding: 0.2rem 1.62rem 0.2rem 0.25rem;
  }

  .is-admin.view-dashboard .admin-timeline-calendar.compact .admin-timeline-appointment strong,
  .is-instructor.view-dashboard .admin-timeline-calendar.compact .admin-timeline-appointment strong {
    font-size: 0.66rem;
  }

  .is-admin.view-dashboard .admin-timeline-calendar.compact .admin-timeline-appointment small,
  .is-instructor.view-dashboard .admin-timeline-calendar.compact .admin-timeline-appointment small {
    font-size: 0.61rem;
  }

  .calendar-section-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-section-tabs button {
    min-width: 0;
    padding-inline: 0.45rem;
    white-space: normal;
  }

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

  .admin-calendar-board {
    gap: 0.55rem;
  }

  .admin-calendar-day {
    min-height: 280px;
    padding: 0.65rem;
  }

  .slot-booking {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .slot-booking small {
    grid-column: 1 / -1;
    text-align: left;
  }

  .booking-system-title h2,
  .admin-section-title h2 {
    font-size: 1rem;
    overflow-wrap: anywhere;
  }

  .booking-flow-grid,
  .availability-board {
    grid-template-columns: 1fr;
  }

  .calendar-view-header,
  .calendar-view-controls,
  .week-navigator,
  .horse-card,
  .lesson-card,
  .booking-step-card,
  .lesson-type-option,
  .admin-table-row,
  .horse-table-row,
  .instructor-table-row,
  .rider-table-row {
    max-width: 100%;
  }

  .horse-feature-block .admin-section-title h2 {
    font-size: 1rem;
  }

  .horse-feature-block .admin-section-title p {
    font-size: 0.9rem;
  }

  .instructor-feature-block .admin-section-title h2 {
    font-size: 1.35rem;
  }

  .instructor-feature-block .admin-section-title p {
    font-size: 0.9rem;
  }

  .lesson-feature-block .admin-section-title h2 {
    font-size: 1rem;
  }

  .lesson-feature-block .admin-section-title p {
    font-size: 0.9rem;
  }

  .horse-add-action {
    min-height: 48px;
    border-radius: 8px;
  }

  .horse-card {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 0.55rem;
    border-radius: 10px;
    padding: 0.62rem;
  }

  .horse-avatar {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .horse-card-title h3 {
    font-size: 0.96rem;
  }

  .horse-card-menu summary {
    width: 34px;
    height: 34px;
  }

  .horse-card-open {
    display: grid;
  }

  .instructor-card {
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 0.6rem;
    padding: 0.65rem;
  }

  .lesson-card {
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 0.6rem;
    padding: 0.65rem;
  }

  .instructor-avatar {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
  }

  .lesson-card-icon {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
  }

  .instructor-card-title h3 {
    font-size: 0.96rem;
  }

  .lesson-card-title h3 {
    font-size: 0.96rem;
  }

  .availability-calendar {
    min-width: 760px;
  }

  .availability-calendar-slot-group {
    gap: 0.25rem;
    padding: 0.14rem 0.2rem;
  }

  .booking-step-label {
    min-height: auto;
  }

  .booking-time-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .booking-time-grid button {
    min-height: 38px;
    font-size: 0.92rem;
  }

  .booking-selected-date {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .booking-selected-date span {
    font-size: 0.72rem;
  }

  .booking-summary-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .booking-summary-row strong {
    text-align: left;
  }

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

  .form-actions button {
    width: 100%;
  }

  .inline-form {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .appointment-admin-controls {
    width: 100%;
    justify-content: stretch;
  }

  .appointment-main {
    align-items: flex-start;
  }

  .pass-card {
    grid-template-columns: 1fr;
  }

  .pass-count {
    width: 100%;
  }
}

.statistics-page {
  gap: 0.75rem;
}

.statistics-title {
  align-items: flex-start;
}

.statistics-title h2 {
  font-family: var(--sans);
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.statistics-title p {
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.statistics-period-panel {
  border-radius: 8px;
  padding: 0.62rem 1rem;
}

.statistics-period-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(260px, 1fr) auto;
  align-items: end;
  justify-content: stretch;
  gap: 1rem;
}

.statistics-selector {
  width: 100%;
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.statistics-selector span,
.statistics-period-switch-wrap > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.statistics-selector select {
  min-height: 38px;
  border-radius: 7px;
  background: #fffdf9;
  padding: 0.5rem 0.65rem;
  font-size: 0.84rem;
  font-weight: 700;
}

.statistics-period-nav {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  padding: 0;
}

.statistics-period-nav strong {
  min-width: 220px;
  padding: 0 0.65rem;
  color: var(--ink);
  text-align: center;
  font-size: 1.02rem;
}

.statistics-period-nav button,
.statistics-period-switch button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf9;
  color: var(--green-900);
  padding: 0.45rem 0.72rem;
  font-weight: 800;
  box-shadow: 0 5px 12px rgba(31, 61, 46, 0.06);
}

.statistics-period-nav button:hover,
.statistics-period-switch button:hover {
  border-color: rgba(62, 90, 67, 0.28);
  background: #f7f4ec;
  color: var(--green-900);
}

.statistics-period-switch-wrap {
  display: grid;
  gap: 0.32rem;
}

.statistics-period-switch {
  min-width: 148px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  padding: 0.18rem;
}

.statistics-period-switch button {
  min-height: 34px;
  border: 0;
  box-shadow: none;
  padding: 0.38rem 0.7rem;
}

.statistics-period-switch button.active,
.statistics-period-switch button.active:hover {
  background: var(--green-900);
  color: #fff;
}

.statistics-note {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  border: 1px solid rgba(62, 90, 67, 0.16);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(62, 90, 67, 0.08), rgba(255, 253, 249, 0.95));
  padding: 0.72rem 1rem;
}

.statistics-note::after {
  content: "";
  position: absolute;
  right: 1rem;
  bottom: -1.15rem;
  width: 170px;
  height: 78px;
  background: url("/assets/horse3.png") center / contain no-repeat;
  opacity: 0.07;
  pointer-events: none;
}

.statistics-note-icon {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  border: 1px solid rgba(31, 61, 46, 0.28);
  border-radius: 50%;
  background: #fffdf9;
  color: var(--green-900);
}

.statistics-note-icon svg,
.statistics-card-icon svg,
.statistics-panel-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.statistics-note-icon svg {
  width: 20px;
  height: 20px;
}

.statistics-note div {
  display: grid;
  gap: 0.12rem;
}

.statistics-note strong {
  color: var(--green-900);
  white-space: normal;
  font-size: 0.9rem;
}

.statistics-note span:not(.statistics-note-icon) {
  max-width: 860px;
  color: var(--muted);
  font-size: 0.82rem;
}

.statistics-summary-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0.8rem 0;
}

.statistics-summary-panel .statistics-card {
  min-height: 96px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-content: center;
  align-items: center;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 0.2rem 1.05rem;
}

.statistics-summary-panel .statistics-card:last-child {
  border-right: 0;
}

.statistics-card-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(62, 90, 67, 0.17);
  border-radius: 50%;
  background: #eef6ed;
  color: var(--green-900);
}

.statistics-card-trophy .statistics-card-icon {
  background: #fff4dc;
  color: #bd8b32;
}

.statistics-card-icon svg {
  width: 28px;
  height: 28px;
}

.statistics-card-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.statistics-summary-panel .statistics-card span {
  color: var(--muted);
  font-size: 0.78rem;
}

.statistics-summary-panel .statistics-card strong {
  margin-top: 0.06rem;
  display: block;
  color: var(--green-900);
  font-family: var(--display);
  font-size: 1.55rem;
  line-height: 1;
}

.statistics-summary-panel .statistics-card small {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.statistics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
}

.statistics-table-panel {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  border-radius: 8px;
  padding: 0.78rem;
}

.statistics-table-panel::after {
  content: "";
  position: absolute;
  right: 0.7rem;
  bottom: -0.75rem;
  width: 130px;
  height: 64px;
  background: url("/assets/horse3.png") center / contain no-repeat;
  opacity: 0.055;
  pointer-events: none;
}

.statistics-panel-heading {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.statistics-panel-heading h2 {
  font-size: 1.02rem;
}

.statistics-panel-heading span {
  color: var(--muted);
  font-size: 0.72rem;
}

.statistics-panel-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-900);
  color: #fff;
}

.statistics-panel-icon svg {
  width: 20px;
  height: 20px;
}

.statistics-panel-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.82;
}

.statistics-table {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.34rem;
  overflow: visible;
}

.statistics-row {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.65rem;
  row-gap: 0.18rem;
}

.statistics-row-head {
  color: var(--muted);
  padding: 0 0.22rem;
  font-size: 0.68rem;
  font-weight: 800;
}

.statistics-row:not(.statistics-row-head) {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  padding: 0.48rem;
  font-size: 0.76rem;
}

.statistics-name {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.statistics-name strong {
  white-space: normal;
}

.statistics-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 50%;
}

.statistics-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 34px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  background: #eff5ed;
  color: var(--green-900);
  font-size: 0.68rem;
  font-weight: 900;
}

.statistics-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.statistics-avatar.placeholder img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.statistics-hours {
  display: contents;
}

.statistics-hours strong {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  font-size: 1.08rem;
  line-height: 1;
  white-space: nowrap;
}

.statistics-hours small {
  grid-column: 1 / -1;
  padding-left: calc(34px + 0.42rem);
  color: var(--muted);
  font-size: 0.68rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.statistics-table-lesson .statistics-hours small {
  padding-left: calc(11px + 0.42rem);
}

.statistics-mini-progress {
  width: 100%;
  height: 6px;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: #f0eadf;
}

.statistics-mini-progress b {
  height: 100%;
  min-width: 3px;
  display: block;
  border-radius: inherit;
}

@media (max-width: 1280px) {
  .statistics-period-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .statistics-period-nav {
    justify-self: stretch;
  }

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

  .statistics-row {
    grid-template-columns: minmax(0, 1fr) auto;
    margin: 1rem;

  }
}

@media (max-width: 760px) {
  .statistics-grid {
    gap: 0.48rem;
  }

  .statistics-table-panel {
    min-height: 0;
  }

  .statistics-summary-panel {
    grid-template-columns: 1fr;
    padding: 0.35rem 0;
  }

  .statistics-summary-panel .statistics-card {
    min-height: 84px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.72rem;
  }

  .statistics-summary-panel .statistics-card:last-child {
    border-bottom: 0;
  }

  .statistics-period-nav {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px 58px;
  }

  .statistics-period-nav strong {
    min-width: 0;
    padding-inline: 0.25rem;
    font-size: 0.82rem;
  }

  .statistics-period-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  .statistics-table {
    overflow-x: visible;
  }

  .statistics-row {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.65rem;
    row-gap: 0.18rem;
    margin: 0.2rem 0;
  }

  .statistics-name {
    grid-column: 1;
    grid-row: 1;
  }

  .statistics-hours {
    display: contents;
  }

  .statistics-hours strong {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    font-size: 1.08rem;
    white-space: nowrap;
  }

  .statistics-hours small {
    grid-column: 1 / -1;
    padding-left: calc(34px + 0.42rem);
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
