:root {
  --bg: #f5f7f4;
  --surface: #ffffff;
  --ink: #1c2520;
  --muted: #66716b;
  --line: #dce3dd;
  --brand: #0d7c66;
  --brand-strong: #075f4d;
  --accent: #d9912b;
  --danger: #b73535;
  --shadow: 0 12px 32px rgba(31, 44, 36, .08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  padding: 8px 12px;
  cursor: pointer;
  min-height: 38px;
}

button:hover {
  background: var(--brand-strong);
}

button.ghost {
  background: #eef5f1;
  color: var(--brand-strong);
  border: 1px solid var(--line);
}

button.danger {
  background: var(--danger);
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

label input,
label select,
label textarea {
  color: var(--ink);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  color: var(--brand-strong);
}

.brand-logo-image {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex: 0 0 auto;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  font-size: 13px;
}

.topbar nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
}

.ui-icon {
  display: inline-grid;
  place-items: center;
  width: 1.45em;
  height: 1.45em;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(13, 124, 102, .12);
  color: var(--brand-strong);
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

button .ui-icon,
a .ui-icon {
  font-size: .92em;
}

.nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.topbar nav a:hover,
.nav-cta {
  background: #eef5f1;
}

.page {
  width: min(1180px, calc(100% - 28px));
  margin: 24px auto 48px;
}

.flash {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.flash.success {
  border-color: #b6dfc8;
  background: #eef9f1;
}

.flash.danger {
  border-color: #e7b9b9;
  background: #fff0f0;
}

.flash.warning {
  border-color: #f0d49c;
  background: #fff8e8;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(20, 28, 24, .45);
}

.modal-backdrop.open {
  display: grid;
}

.modal {
  position: relative;
  width: min(720px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  overflow-y: auto;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(15, 23, 18, .22);
}

.modal h2 {
  margin: 0 42px 12px 0;
  font-size: 24px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  min-height: 36px;
  padding: 0;
  background: #f2f5f3;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.modal-summary {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #cde8d6;
  border-radius: 8px;
  background: #ecf8f1;
  color: var(--brand-strong);
  font-weight: 700;
}

.modal form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.modal form button {
  grid-column: 1 / -1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: toast-in .18s ease-out;
}

.toast.success {
  border-color: #b6dfc8;
  background: #eef9f1;
}

.toast.danger {
  border-color: #e7b9b9;
  background: #fff0f0;
}

.toast.leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: .2s ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: end;
  padding: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #f1faf5 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.page-booking,
.page-my-bookings {
  --bg: #07151c;
  --surface: #0f2430;
  --ink: #edf7f3;
  --muted: #9fb4ba;
  --line: rgba(202, 232, 221, .18);
  --brand: #26c6a4;
  --brand-strong: #8ef5d2;
  --accent: #9bd84b;
  --danger: #ff6f7d;
  --shadow: 0 24px 70px rgba(0, 0, 0, .32);
  background:
    radial-gradient(circle at 12% 10%, rgba(38, 198, 164, .20), transparent 30%),
    linear-gradient(180deg, #07151c 0%, #0a1b25 48%, #10242c 100%);
}

.page-booking .topbar,
.page-my-bookings .topbar {
  background: rgba(7, 21, 28, .86);
  border-bottom-color: rgba(255, 255, 255, .10);
}

.page-booking .brand,
.page-my-bookings .brand {
  color: #f2fff8;
}

.page-booking .topbar nav a,
.page-my-bookings .topbar nav a {
  color: #dbeee8;
}

.page-booking .topbar nav a:hover,
.page-booking .nav-cta,
.page-my-bookings .topbar nav a:hover,
.page-my-bookings .nav-cta {
  background: rgba(38, 198, 164, .14);
  color: #fff;
}

.booking-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: end;
  min-height: 360px;
  padding: clamp(24px, 5vw, 56px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(12, 37, 50, .98), rgba(9, 24, 32, .92)),
    linear-gradient(90deg, rgba(38, 198, 164, .16), rgba(155, 216, 75, .10));
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.booking-hero.has-venue-media {
  background:
    linear-gradient(135deg, rgba(8, 24, 31, .82), rgba(9, 24, 32, .58)),
    var(--venue-image),
    linear-gradient(135deg, rgba(12, 37, 50, .98), rgba(9, 24, 32, .92));
  background-size: cover;
  background-position: center;
}

.booking-hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -140px auto;
  width: 420px;
  height: 420px;
  background: conic-gradient(from 120deg, rgba(38, 198, 164, .24), rgba(155, 216, 75, .16), transparent);
  border-radius: 50%;
  opacity: .75;
}

.booking-hero.has-venue-media::after {
  animation: floatPulse 5.5s ease-in-out infinite;
}

.booking-hero-copy {
  position: relative;
  z-index: 1;
}

.booking-hero h1 {
  margin: 8px 0 14px;
  max-width: 760px;
  font-size: clamp(40px, 7vw, 84px);
  line-height: .95;
  color: #f7fff9;
}

.booking-hero p {
  max-width: 660px;
  margin: 0;
  color: #bdd2d5;
  font-size: 18px;
}

.compact-hero {
  min-height: 220px;
  grid-template-columns: 1fr;
}

.compact-hero h1 {
  font-size: clamp(34px, 5vw, 60px);
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  color: #cce1df;
}

.hero-metrics strong {
  color: var(--accent);
  font-size: 22px;
}

.hero-metrics .booking-user-pill {
  align-items: center;
  flex-wrap: wrap;
  max-width: 100%;
}

.booking-user-pill small {
  color: inherit;
  font-weight: 800;
}

.booking-user-pill em {
  color: inherit;
  font-size: 12px;
  font-style: normal;
  opacity: .72;
}

.booking-date-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  padding: 18px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  backdrop-filter: blur(16px);
}

.quick-date-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-date-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: inherit;
  font-size: 13px;
  font-weight: 850;
}

.quick-date-actions a:hover {
  transform: translateY(-1px);
}

.facility-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.facility-strip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  color: #e9fbf5;
  font-size: 13px;
  font-weight: 800;
}

.facility-strip b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #10242c;
  font-size: 12px;
}

.venue-gallery {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(90px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.venue-gallery img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  animation: cardIn .35s ease both;
}

.venue-gallery img:first-child {
  height: 160px;
}

.page-booking .booking-hero {
  gap: 18px;
  align-items: center;
  min-height: 236px;
  padding: clamp(18px, 3vw, 30px);
}

.page-booking .booking-hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
}

.page-booking .booking-hero p {
  font-size: 15px;
}

.page-booking .hero-metrics {
  margin-top: 14px;
}

.page-booking .hero-metrics span {
  padding: 7px 10px;
}

.page-booking .hero-metrics strong {
  font-size: 18px;
}

.page-booking .booking-date-card {
  gap: 10px;
  padding: 14px;
}

.page-booking .facility-strip {
  margin-top: 10px;
}

.page-booking .facility-strip span {
  min-height: 30px;
  padding: 5px 9px;
}

.page-booking .facility-strip b {
  width: 20px;
  height: 20px;
}

.page-booking .venue-gallery {
  gap: 8px;
  margin-top: 10px;
  perspective: 900px;
}

.page-booking .venue-gallery img {
  height: 72px;
  transform-origin: center;
  animation: galleryFloat 7s ease-in-out infinite;
  transition: transform .22s ease, filter .22s ease, box-shadow .22s ease;
}

.page-booking .venue-gallery img:first-child {
  height: 96px;
}

.page-booking .venue-gallery img:nth-child(2) {
  animation-delay: .12s;
}

.page-booking .venue-gallery img:nth-child(3) {
  animation-delay: .7s;
}

.page-booking .venue-gallery img:nth-child(4) {
  animation-delay: 1.05s;
}

.page-booking .venue-gallery img:nth-child(5) {
  animation-delay: 1.45s;
}

.page-booking .venue-gallery img:hover {
  animation-play-state: paused;
  filter: saturate(1.12) contrast(1.04);
  transform: translateY(-3px) scale(1.035);
  box-shadow: 0 18px 36px rgba(6, 24, 28, .20);
}

@keyframes floatPulse {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-16px, -10px, 0) scale(1.04); }
}

@keyframes galleryFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotateX(0deg) scale(1); }
  45% { transform: translate3d(0, -4px, 0) rotateX(1.5deg) scale(1.012); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .page-booking .venue-gallery img {
    animation: none;
  }
}

.booking-date-card label {
  color: #d5e7e6;
}

.page-booking input,
.page-booking select,
.page-my-bookings input,
.page-my-bookings select {
  background: rgba(255, 255, 255, .94);
  border-color: rgba(255, 255, 255, .16);
  color: #10242c;
}

.page-booking .court-card,
.page-booking .selection-panel,
.page-booking .booking-form,
.page-booking .auto-assign,
.page-my-bookings .panel {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .13);
  color: #eef9f6;
  backdrop-filter: blur(14px);
}

.page-booking .court-head p,
.page-booking .muted,
.page-my-bookings .muted {
  color: #9fb4ba;
}

.page-booking .court-head strong {
  color: var(--accent);
}

.page-booking .slot {
  min-height: 46px;
  display: grid;
  place-items: center;
  gap: 2px;
  background: rgba(38, 198, 164, .14);
  color: #cffff0;
  border-color: rgba(38, 198, 164, .28);
}

.page-booking .slot small {
  max-width: 100%;
  color: #ffb6bd;
  font-size: 10px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-booking .slot.busy {
  background: rgba(255, 255, 255, .05);
  color: rgba(237, 247, 243, .42);
  border-color: rgba(255, 255, 255, .10);
}

.page-booking .slot.selected {
  background: rgba(155, 216, 75, .18);
  color: #f4ffd6;
  border-color: rgba(155, 216, 75, .70);
}

.page-booking .selected-chip {
  background: rgba(155, 216, 75, .18);
  color: #f4ffd6;
  border-color: rgba(155, 216, 75, .48);
}

.page-my-bookings .panel h1,
.page-my-bookings .panel h2 {
  color: #eef9f6;
}

.page-my-bookings table {
  color: #eef9f6;
}

.page-my-bookings th {
  color: #9fb4ba;
}

.page-my-bookings td,
.page-my-bookings th {
  border-bottom-color: rgba(255, 255, 255, .12);
}

.page-my-bookings .badge {
  background: rgba(38, 198, 164, .14);
  color: #cffff0;
}

.page-my-bookings .bank-list article {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .13);
}

.payment-countdown {
  display: inline-block;
  margin-top: 4px;
  color: #c51616;
  font-size: 12px;
  font-weight: 950;
}

.payment-countdown.expired {
  color: var(--danger);
}

.page-my-bookings .booking-card-deadline {
  background: #fff0a6;
  border-color: #f1cc45;
  color: #623900;
}

.page-my-bookings .booking-card-deadline b {
  color: #765000;
}

.page-my-bookings .booking-card-deadline strong {
  color: #c51616;
}

.my-booking-panel {
  display: grid;
  gap: 14px;
}

.my-booking-list {
  display: grid;
  gap: 12px;
}

.my-booking-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(138px, 180px);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  color: #eef9f6;
}

.booking-card-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.booking-card-time {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.booking-card-time strong {
  display: block;
  color: #f7fff9;
  font-size: 14px;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.booking-card-time small {
  display: block;
  color: #9fb4ba;
  font-size: 12px;
}

.booking-card-meta {
  display: grid;
  grid-template-columns: minmax(58px, .7fr) minmax(64px, .65fr) minmax(72px, .8fr) minmax(72px, .8fr);
  gap: 6px;
}

.booking-card-meta span,
.booking-card-deadline {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
  overflow-wrap: anywhere;
}

.booking-card-meta b,
.booking-card-deadline b {
  color: #9fb4ba;
  font-size: 10px;
}

.booking-card-meta span {
  font-size: 12px;
}

.booking-card-deadline strong {
  color: #f7fff9;
  font-size: 12px;
  line-height: 1.3;
}

.booking-card-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.payment-submit-form {
  display: grid !important;
  grid-template-columns: minmax(104px, 132px) minmax(104px, 140px) auto;
  gap: 8px;
  align-items: end;
  width: min(430px, 100%);
}

.file-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: #eef9f6;
  cursor: pointer;
}

.file-mini input {
  width: 1px;
  height: 1px;
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.booking-card-actions button,
.payment-submit-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 10px;
  white-space: nowrap;
}

.booking-card-actions .ui-icon,
.payment-submit-form .ui-icon,
.file-mini .ui-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font-size: 12px;
  line-height: 1;
}

.slip-preview-button,
.slip-thumb-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: #eef9f6;
  cursor: zoom-in;
}

.slip-preview-button img,
.slip-thumb-button img {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, .18);
}

.slip-thumb-button {
  min-width: 116px;
  justify-content: flex-start;
  color: var(--customer-ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, .74);
}

.payment-review-table {
  min-width: 980px;
}

.payment-review-table td:first-child,
.payment-review-table th:first-child {
  width: 46px;
  text-align: center;
}

.payment-review-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.payment-review-table .table-actions {
  justify-content: flex-start;
}

.payment-review-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.payment-review-editor p {
  margin: 3px 0 0;
}

.profile-panel {
  max-width: 860px;
  margin-inline: auto;
}

.profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.profile-wide {
  grid-column: 1 / -1;
}

.profile-form label small {
  display: block;
  margin: 2px 0 6px;
  color: var(--customer-muted);
  font-size: 11px;
  font-weight: 800;
}

.profile-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-summary span {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--customer-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: var(--customer-ink);
  font-weight: 800;
}

.profile-summary b {
  color: var(--customer-muted);
  font-size: 11px;
}

.profile-save-button {
  grid-column: 1 / -1;
  justify-self: end;
  min-height: 46px;
  padding-inline: 18px;
}

.booking-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, .8fr) repeat(2, minmax(140px, .7fr)) auto;
  gap: 10px;
  align-items: end;
}

.booking-filter-form button {
  min-height: 40px;
}

.booking-filter-panel {
  position: relative;
  z-index: 220;
  overflow: visible;
}

.booking-results-panel {
  position: relative;
  z-index: 1;
}

.booking-filter-form .filter-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  position: relative;
  z-index: 40;
}

.booking-filter-form .field-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.status-filter-dropdown {
  position: relative;
}

.status-filter-dropdown[open] {
  z-index: 9999;
}

.status-filter-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}

.status-filter-dropdown summary::-webkit-details-marker {
  display: none;
}

.status-filter-dropdown[open] summary {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent);
}

.status-filter-options {
  position: absolute;
  z-index: 99999;
  top: calc(100% + 8px);
  left: 0;
  width: min(320px, 100%);
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
  text-align: left;
}

html[data-theme="dark"] .status-filter-options {
  background: #13232c;
}

.status-filter-options p {
  margin: 0;
  padding-left: 2px;
  padding-bottom: 2px;
  font-size: 11px;
}

.status-filter-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  cursor: pointer;
  text-align: left;
}

.status-filter-option input {
  margin: 0;
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
}

.status-filter-option span {
  color: inherit;
  font-weight: 700;
  line-height: 1.05;
  font-size: 12px;
}

.booking-management-table {
  min-width: 1060px;
}

.booking-management-table td:nth-child(1),
.booking-management-table th:nth-child(1) {
  width: 46px;
  text-align: center;
}

.booking-management-table td small {
  display: block;
  margin-top: 3px;
  color: var(--settings-muted);
  font-size: 11px;
}

.booking-management-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.booking-management-actions p {
  margin: 3px 0 0;
}

.booking-manage-modal {
  display: grid;
  gap: 14px;
}

.booking-manage-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.booking-manage-head p {
  margin: 4px 0 0;
}

.booking-manage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.booking-manage-grid > div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 74%, transparent);
}

.booking-manage-grid b {
  color: var(--muted);
  font-size: 11px;
}

.booking-manage-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.booking-manage-actions form {
  display: inline-flex;
}

.booking-history-card {
  grid-template-columns: minmax(0, 1fr);
  opacity: .82;
}

.booking-history-panel {
  margin-top: 14px;
}

.hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.05;
}

.hero p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
}

.eyebrow {
  color: var(--accent) !important;
  font-weight: 800;
  letter-spacing: 0;
}

.date-picker {
  display: flex;
  gap: 8px;
  align-items: end;
}

.court-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.court-card,
.panel,
.auth-panel,
.booking-form,
.auto-assign {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.court-card {
  padding: 16px;
}

.court-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
}

.court-head h2,
.panel h1,
.panel h2,
.booking-form h2,
.auth-panel h1,
.auto-assign h2 {
  margin: 0;
}

.court-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.court-head strong {
  color: var(--brand-strong);
  white-space: nowrap;
}

.slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.slot {
  min-height: 38px;
  padding: 6px;
  background: #ecf8f1;
  color: var(--brand-strong);
  border: 1px solid #cde8d6;
}

.slot.busy {
  background: #f0f0f0;
  color: #9a9a9a;
  border-color: #e2e2e2;
}

.slot.phone-only:disabled {
  opacity: 1;
}

.slot.phone-only small b,
.availability-row.phone-only strong b {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  min-height: 18px;
  margin-right: 4px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #1c2520;
  font-size: 10px;
  line-height: 1;
}

.slot.phone-only {
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.slot.phone-only small,
.availability-row.phone-only strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.slot.phone-only small b,
.availability-row.phone-only strong b {
  margin-right: 0;
}

.slot.phone-only {
  background: #fff8e8;
  color: #7a4d08;
  border-color: #efd6a6;
}

.slot.waitlistable {
  cursor: pointer;
}

.slot.waitlistable:hover {
  filter: brightness(.98);
  outline: 3px solid rgba(217, 145, 43, .24);
}

body.theme-customer .slot.phone-only small {
  color: inherit;
}

.slot.selected {
  outline: 3px solid rgba(217, 145, 43, .35);
  border-color: var(--accent);
  background: #fff8e8;
  color: #7a4d08;
}

.slot[data-selected-qty] {
  position: relative;
}

.slot[data-selected-qty]::after {
  content: "x" attr(data-selected-qty);
  position: absolute;
  top: -7px;
  right: -7px;
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  padding: 0 6px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--accent);
  color: #10242c;
  font-size: 11px;
  font-weight: 900;
}

.selection-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.selection-panel h2 {
  margin: 0;
}

.booking-cart {
  position: fixed;
  top: 74px;
  bottom: auto;
  right: max(14px, calc((100vw - 1180px) / 2));
  z-index: 8;
  display: grid;
  gap: 12px;
  width: min(340px, calc(100vw - 28px));
  max-height: min(620px, calc(100vh - 36px));
  padding: 14px;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform-origin: top right;
  transition: width .18s ease, max-height .18s ease, padding .18s ease, box-shadow .18s ease;
}

.booking-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}

.booking-cart-head div {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.booking-cart-head span {
  color: var(--accent);
  font-size: 16px;
  font-weight: 900;
}

.booking-cart-head strong {
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.booking-cart-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.booking-cart-head b {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
}

.booking-cart-head b.has-items {
  animation: cart-count-pulse 1.8s ease-in-out infinite;
  background: #ffcf33;
  color: #6b2500;
}

@keyframes cart-count-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 207, 51, 0); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 7px rgba(255, 207, 51, .18); }
}

.cart-toggle {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 1px;
  min-height: 1px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.cart-toggle-icon {
  display: none;
}

.booking-cart.collapsed .booking-cart-body {
  display: none;
}

.booking-cart.collapsed {
  position: fixed;
  top: 74px;
  bottom: auto;
  right: max(14px, calc((100vw - 1180px) / 2));
  width: min(230px, calc(100vw - 28px));
  max-height: none;
  padding: 5px 9px;
  gap: 0;
}

.cart-my-bookings-link,
.cart-clear-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 30px;
  margin-top: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
}

.cart-my-bookings-link {
  background: rgba(13, 124, 102, .11);
  color: var(--brand-strong);
}

.cart-clear-button {
  background: rgba(211, 70, 70, .10);
  color: var(--danger);
}

.selected-slots {
  display: grid;
  gap: 8px;
  min-height: 42px;
}

.selected-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 9px 10px;
  background: #fff8e8;
  color: #7a4d08;
  border: 1px solid #efd6a6;
  border-radius: 8px;
  text-align: left;
}

.booking-cart form > button {
  min-height: 42px;
  font-size: 14px;
}

.selected-chip span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.selected-chip strong,
.selected-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-chip small {
  opacity: .76;
}

.selected-chip b {
  font-size: 18px;
  line-height: 1;
}

.cart-empty {
  display: block;
  padding: 10px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}

.booking-cart form {
  display: grid;
  gap: 10px;
}

.booking-cart form > button {
  width: 100%;
}

.booking-cart form:not(.has-selection) > button {
  opacity: .55;
  pointer-events: none;
}

.booking-rules-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 8px;
  background: rgba(255, 255, 255, .07);
  color: #eef9f6;
  backdrop-filter: blur(14px);
}

.rules-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rules-title h2 {
  margin: 2px 0 0;
  font-size: 22px;
}

.booking-rules-panel .ui-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--accent);
  color: #10242c;
  font-weight: 900;
}

.rules-block {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
}

.rules-block h3 {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 15px;
}

.rules-block ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.rules-block li {
  color: #d8ece9;
  line-height: 1.5;
}

.venue-admin-panel {
  display: grid;
  gap: 14px;
}

.facility-picker {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 124, 102, .06);
}

.facility-picker strong {
  grid-column: 1 / -1;
  color: var(--ink);
}

.facility-picker .new-facility-input {
  grid-column: span 2;
}

.facility-picker .new-facility-icon {
  max-width: 120px;
}

.facility-choice,
.facility-pending {
  position: relative;
  padding-right: 34px;
}

.facility-choice span,
.facility-pending span {
  min-width: 0;
}

.facility-remove-button {
  position: absolute;
  right: 6px;
  top: 50%;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  transform: translateY(-50%);
  border-radius: 999px;
  border: 1px solid rgba(211, 70, 70, .24);
  background: rgba(211, 70, 70, .10);
  color: var(--danger);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.settings-wide {
  grid-column: 1 / -1;
}

.venue-image-preview {
  align-self: end;
  min-height: 42px;
}

.venue-image-preview img {
  width: min(220px, 100%);
  height: 120px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.permission-grid {
  display: grid;
  grid-template-columns: minmax(140px, 190px) repeat(var(--permission-columns, 6), minmax(120px, 1fr));
  gap: 8px;
  overflow-x: auto;
}

.permission-head,
.permission-role,
.permission-cell {
  min-width: 0;
  min-height: 48px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .64);
}

.permission-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.permission-role {
  display: grid;
  gap: 2px;
  color: var(--ink);
  font-weight: 900;
}

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

.permission-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-rule-grid {
  --permission-columns: 5;
  grid-template-columns: minmax(170px, 220px) repeat(var(--permission-columns), minmax(130px, 1fr));
}

.notification-rule-cell {
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
}

.notification-rule-cell label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.inline-create-venue {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.repeat-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
  grid-column: 1 / -1;
}

.booking-form,
.auto-assign,
.panel,
.auth-panel {
  margin-top: 18px;
  padding: 18px;
}

.availability-table {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 8px;
  margin-top: 14px;
}

.availability-head {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.availability-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  align-items: center;
  min-height: 44px;
  text-align: left;
}

.availability-row strong {
  justify-self: start;
}

.booking-form form,
.settings-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.booking-form h2 {
  margin-bottom: 14px;
}

.inline-form {
  margin-top: 14px;
  grid-template-columns: repeat(5, minmax(120px, 1fr)) !important;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.auth-panel {
  max-width: 460px;
  margin: 42px auto;
}

.auth-panel form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

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

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef5f1;
  color: var(--brand-strong);
  font-size: 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions form {
  display: flex;
  gap: 6px;
}

.payment-info p {
  margin-bottom: 0;
}

.bank-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.bank-list article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.stats article {
  display: grid;
  gap: 6px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.stats strong {
  font-size: 28px;
  color: var(--brand-strong);
}

.admin-grid-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 16px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 86px repeat(var(--court-count), minmax(170px, 1fr));
  min-width: calc(86px + (var(--court-count) * 170px));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.admin-grid-head,
.admin-time-cell,
.admin-drop-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-grid-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  gap: 2px;
  padding: 10px;
  background: #eef5f1;
  color: var(--brand-strong);
  font-weight: 800;
}

.admin-grid-head small {
  color: var(--muted);
  font-weight: 500;
}

.time-head,
.admin-time-cell {
  position: sticky;
  left: 0;
  z-index: 1;
}

.admin-time-cell {
  padding: 10px;
  background: #f8faf8;
  color: var(--muted);
  font-weight: 800;
}

.admin-drop-cell {
  position: relative;
  min-height: 74px;
  padding: 6px;
  background: #fff;
  cursor: pointer;
  transition: background .15s ease, outline .15s ease;
}

.admin-drop-cell:empty::after {
  content: "+";
  position: absolute;
  inset: 8px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(13, 124, 102, .28);
  border-radius: 8px;
  color: var(--brand);
  font-size: 24px;
  font-weight: 900;
  opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
}

.admin-drop-cell:empty:hover::after {
  opacity: 1;
  transform: scale(.98);
}

.admin-drop-cell.drag-over {
  background: #ecf8f1;
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.booking-chip {
  display: grid;
  gap: 3px;
  padding: 8px;
  background: #fff8e8;
  border: 1px solid #efd6a6;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  cursor: grab;
}

.booking-chip small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-chip.continuation {
  border-style: dashed;
  cursor: pointer;
  opacity: .74;
}

.booking-chip.dragging {
  opacity: .55;
}

.booking-chip span {
  color: var(--muted);
  font-size: 12px;
}

.admin-booking-modal {
  display: grid;
  gap: 14px;
}

.admin-booking-modal .modal-summary {
  margin-bottom: 0;
}

.admin-booking-modal .customer-picker {
  display: grid;
  gap: 8px;
}

.admin-booking-modal .field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.admin-booking-modal .field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.court-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.court-check-pill {
  margin: 0;
}

.court-check-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.court-check-pill span {
  display: flex;
  min-height: 46px;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.court-check-pill small {
  color: var(--muted);
  font-size: 11px;
}

.court-check-pill input:checked + span {
  border-color: rgba(13, 124, 102, .55);
  background: rgba(13, 124, 102, .12);
  color: var(--brand-strong);
}

.court-check-pill input:focus-visible + span {
  outline: 2px solid rgba(13, 124, 102, .3);
  outline-offset: 2px;
}

.court-check-pill:hover span {
  transform: translateY(-1px);
}

@media (max-width: 560px) {
  .court-check-grid {
    grid-template-columns: 1fr;
  }
}

.quick-customer-hint {
  margin: -2px 0 0;
  padding: 8px 10px;
  border: 1px dashed rgba(13, 124, 102, .28);
  border-radius: 8px;
  background: rgba(13, 124, 102, .06);
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 800;
}

.admin-booking-modal .admin-repeat-controls {
  grid-column: 1 / -1;
}

.recurrence-card {
  padding: 12px;
  border: 1px solid rgba(13, 124, 102, .18);
  border-radius: 8px;
  background: rgba(13, 124, 102, .06);
}

.recurrence-preview {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.admin-booking-delete-form {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.recurring-cancel-actions {
  flex-wrap: wrap;
}

.check {
  width: auto;
  min-height: auto;
}

.hours-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.hours-row {
  display: grid;
  grid-template-columns: 140px 120px 120px;
  gap: 10px;
  align-items: center;
}

.holiday-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.settings-shell {
  margin-top: 18px;
}

.page-settings {
  --settings-bg: #dfe8e0;
  --settings-surface: #f8fbf4;
  --settings-panel: #eef5eb;
  --settings-ink: #17211a;
  --settings-muted: #647063;
  --settings-line: rgba(23, 33, 26, .12);
  --settings-accent: #d8ff55;
  --settings-accent-ink: #17211a;
  background:
    radial-gradient(circle at 8% 12%, rgba(216, 255, 85, .38), transparent 28%),
    linear-gradient(145deg, #e9f0e7 0%, var(--settings-bg) 44%, #cbd8cf 100%);
  color: var(--settings-ink);
}

html[data-theme="dark"] .page-settings {
  --settings-bg: #07100c;
  --settings-surface: #111b16;
  --settings-panel: #17231d;
  --settings-ink: #eff8ed;
  --settings-muted: #a7b6a9;
  --settings-line: rgba(239, 248, 237, .13);
  --settings-accent: #d8ff55;
  --settings-accent-ink: #111b16;
  background:
    radial-gradient(circle at 10% 8%, rgba(216, 255, 85, .16), transparent 28%),
    linear-gradient(145deg, #050907 0%, var(--settings-bg) 54%, #101913 100%);
  color: var(--settings-ink);
}

.page-settings .topbar {
  background: rgba(248, 251, 244, .78);
  border-bottom-color: var(--settings-line);
}

html[data-theme="dark"] .page-settings .topbar {
  background: rgba(7, 16, 12, .82);
}

.page-settings .brand,
.page-settings .topbar nav a {
  color: var(--settings-ink);
}

.page-settings .topbar nav a:hover,
.page-settings .nav-cta {
  background: var(--settings-accent);
  color: var(--settings-accent-ink);
}

.settings-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(20px, 4vw, 34px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .68), rgba(255, 255, 255, .28)),
    var(--settings-surface);
  border: 1px solid var(--settings-line);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(23, 33, 26, .12);
}

html[data-theme="dark"] .settings-title {
  background:
    linear-gradient(135deg, rgba(216, 255, 85, .08), rgba(255, 255, 255, .025)),
    var(--settings-surface);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .36);
}

.settings-title h1 {
  margin: 4px 0 0;
  color: var(--settings-ink);
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1;
}

.page-settings .eyebrow {
  color: #5d7411 !important;
}

html[data-theme="dark"] .page-settings .eyebrow {
  color: var(--settings-accent) !important;
}

.theme-toggle {
  min-width: 92px;
  background: var(--settings-ink);
  color: var(--settings-surface);
  border: 1px solid var(--settings-line);
}

html[data-theme="dark"] .theme-toggle {
  background: var(--settings-accent);
  color: var(--settings-accent-ink);
}

.settings-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 14px;
  padding: 8px;
  background: rgba(255, 255, 255, .34);
  border: 1px solid var(--settings-line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(23, 33, 26, .08);
}

html[data-theme="dark"] .settings-tabs {
  background: rgba(255, 255, 255, .04);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .24);
}

.settings-tabs button {
  background: transparent;
  color: var(--settings-muted);
  border: 1px solid transparent;
  min-height: 48px;
}

.settings-tabs button.active {
  background: var(--settings-accent);
  color: var(--settings-accent-ink);
  border-color: rgba(23, 33, 26, .14);
  box-shadow: 0 10px 24px rgba(123, 150, 19, .18);
}

.settings-tab {
  display: none;
  margin-top: 14px;
  padding: clamp(16px, 3vw, 26px);
  background: var(--settings-surface);
  border: 1px solid var(--settings-line);
  border-radius: 8px;
  box-shadow: 0 20px 54px rgba(23, 33, 26, .10);
  color: var(--settings-ink);
}

html[data-theme="dark"] .settings-tab {
  box-shadow: 0 20px 60px rgba(0, 0, 0, .34);
}

.settings-tab.active {
  display: block;
}

.page-settings label {
  color: var(--settings-muted);
}

.page-settings input,
.page-settings select,
.page-settings textarea {
  background: var(--settings-panel);
  border-color: var(--settings-line);
  color: var(--settings-ink);
}

.page-settings button {
  background: var(--settings-ink);
  color: var(--settings-surface);
}

.page-settings button:hover {
  filter: brightness(.95);
}

html[data-theme="dark"] .page-settings button:not(.theme-toggle) {
  background: var(--settings-accent);
  color: var(--settings-accent-ink);
}

.court-editor,
.bank-editor,
.promotion-editor {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.court-edit-row,
.bank-row,
.promotion-row {
  display: grid;
  grid-template-columns: 58px 1.2fr 1fr 160px 110px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--settings-line);
  border-radius: 8px;
  background: var(--settings-panel);
}

.bank-row {
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
}

.icon-add-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.icon-add-button[hidden] {
  display: none;
}

.row-remove-button {
  align-self: end;
  min-height: 36px;
  border-color: rgba(211, 70, 70, .28);
  background: rgba(211, 70, 70, .10);
  color: var(--danger);
}

.promotion-row {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.weekday-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: end;
}

.weekday-picker label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--settings-line);
  border-radius: 8px;
  color: var(--settings-text);
  font-size: 12px;
  font-weight: 800;
}

.staff-editor {
  display: grid;
  gap: 12px;
}

.staff-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, .8fr) minmax(180px, auto);
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.staff-row p {
  margin: 4px 0 0;
}

.add-row {
  background: #f4f7d8;
  border-color: #dce99d;
  background: color-mix(in srgb, var(--settings-accent) 18%, var(--settings-panel));
  border-color: color-mix(in srgb, var(--settings-accent) 45%, var(--settings-line));
}

.sort-pill {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  border-radius: 8px;
  background: var(--settings-surface);
  color: var(--settings-ink);
  font-weight: 800;
}

.switch-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  color: var(--settings-ink);
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
  color: var(--brand-strong);
}

.holiday-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}

.holiday-calendar > strong {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.calendar-day {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 74px;
  padding: 8px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.calendar-day span {
  font-weight: 800;
}

.calendar-day small {
  color: var(--danger);
  overflow-wrap: anywhere;
}

.calendar-day.muted-day {
  background: #f5f6f5;
  color: #9aa29d;
}

.calendar-day.holiday-day {
  background: #fff0f0;
  border-color: #e7b9b9;
}

.calendar-day.selected {
  outline: 3px solid rgba(13, 124, 102, .24);
  border-color: var(--brand);
}

.gallery-manager {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 124, 102, .06);
}

.gallery-manager-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gallery-manager-head strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.gallery-manager-head p {
  margin: 3px 0 0;
}

.gallery-dropzone {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 126px;
  padding: 16px;
  border: 1px dashed rgba(13, 124, 102, .34);
  border-radius: 8px;
  background: rgba(255, 255, 255, .54);
  color: var(--brand-strong);
  text-align: center;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.gallery-dropzone .ui-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(13, 124, 102, .12);
}

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

.gallery-dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(217, 145, 43, .12);
  transform: translateY(-1px);
}

.gallery-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 10px;
}

.gallery-preview-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.gallery-preview-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-preview-item button {
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-grid;
  place-items: center;
  width: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .70);
  border-radius: 999px;
  background: rgba(211, 70, 70, .92);
  color: #fff;
  font-size: 18px;
  line-height: 1;
}

.qr-tools {
  display: grid;
  gap: 8px;
}

.qr-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: 96px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
}

.qr-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef5f1;
  color: var(--brand-strong);
  cursor: pointer;
}

.file-button input {
  display: none;
}

.crop-canvas {
  width: min(320px, 100%);
  aspect-ratio: 1;
  display: block;
  margin: 0 auto 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.empty {
  padding: 32px;
  background: #fff;
  border-radius: 8px;
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 14px;
  }

  .topbar nav {
    justify-content: flex-start;
  }

  .hero,
  .booking-hero,
  .booking-form form,
  .modal form,
  .settings-form,
  .inline-form,
  .repeat-controls,
  .hours-row,
  .court-edit-row,
  .bank-row,
  .promotion-row,
  .staff-row,
  .stats {
    grid-template-columns: 1fr !important;
  }

  .date-picker {
    width: 100%;
  }

  .page-booking .booking-hero {
    gap: 12px;
    min-height: auto;
    padding: 16px;
  }

  .page-booking .booking-hero h1 {
    font-size: clamp(30px, 9vw, 42px);
  }

  .page-booking .booking-hero p {
    font-size: 14px;
  }

  .page-booking .hero-metrics {
    gap: 6px;
    margin-top: 10px;
  }

  .page-booking .hero-metrics span {
    min-height: 30px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .page-booking .facility-strip {
    max-height: 76px;
    overflow: hidden;
  }

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

  .venue-gallery img,
  .venue-gallery img:first-child {
    height: 110px;
  }

  .permission-grid {
    grid-template-columns: minmax(120px, 160px) repeat(var(--permission-columns, 6), minmax(110px, 1fr));
  }

  .notification-rule-grid {
    grid-template-columns: minmax(140px, 180px) repeat(var(--permission-columns), minmax(110px, 1fr));
  }

  .my-booking-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

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

  .payment-submit-form {
    grid-template-columns: 1fr;
  }

  .settings-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .settings-tabs {
    grid-template-columns: 1fr;
  }

  .booking-cart {
    position: fixed;
    top: 70px;
    bottom: auto;
    right: auto;
    left: 10px;
    width: calc(100% - 20px);
    max-height: min(70vh, 620px);
    margin: 0;
  }

  .booking-cart.collapsed {
    top: 70px;
    bottom: auto;
    right: auto;
    left: 10px;
    width: min(260px, calc(100% - 20px));
  }

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

/* Theme families */
html[data-theme="light"] body.theme-customer,
body.theme-customer {
  --customer-bg: #edf4ef;
  --customer-surface: #ffffff;
  --customer-panel: #f7fbf8;
  --customer-ink: #10242c;
  --customer-muted: #627176;
  --customer-line: rgba(16, 36, 44, .13);
  --customer-brand: #0d7c66;
  --customer-brand-strong: #075f4d;
  --customer-accent: #d9912b;
  --bg: var(--customer-bg);
  --surface: var(--customer-surface);
  --ink: var(--customer-ink);
  --muted: var(--customer-muted);
  --line: var(--customer-line);
  --brand: var(--customer-brand);
  --brand-strong: var(--customer-brand-strong);
  --accent: var(--customer-accent);
  background:
    radial-gradient(circle at 12% 8%, rgba(13, 124, 102, .14), transparent 28%),
    linear-gradient(180deg, #f6faf6 0%, var(--customer-bg) 48%, #dfeae5 100%);
  color: var(--customer-ink);
}

html[data-theme="dark"] body.theme-customer {
  --customer-bg: #07151c;
  --customer-surface: rgba(255, 255, 255, .07);
  --customer-panel: rgba(255, 255, 255, .09);
  --customer-ink: #edf7f3;
  --customer-muted: #9fb4ba;
  --customer-line: rgba(202, 232, 221, .18);
  --customer-brand: #26c6a4;
  --customer-brand-strong: #8ef5d2;
  --customer-accent: #9bd84b;
  --danger: #ff6f7d;
  --shadow: 0 24px 70px rgba(0, 0, 0, .32);
  background:
    radial-gradient(circle at 12% 10%, rgba(38, 198, 164, .20), transparent 30%),
    linear-gradient(180deg, #07151c 0%, #0a1b25 48%, #10242c 100%);
  color: var(--customer-ink);
}

html[data-theme="light"] body.theme-management,
body.theme-management {
  --settings-bg: #dfe8e0;
  --settings-surface: #f8fbf4;
  --settings-panel: #eef5eb;
  --settings-ink: #17211a;
  --settings-muted: #647063;
  --settings-line: rgba(23, 33, 26, .12);
  --settings-accent: #d8ff55;
  --settings-accent-ink: #17211a;
  --bg: var(--settings-bg);
  --surface: var(--settings-surface);
  --ink: var(--settings-ink);
  --muted: var(--settings-muted);
  --line: var(--settings-line);
  --brand: var(--settings-ink);
  --brand-strong: var(--settings-ink);
  --accent: var(--settings-accent);
  background:
    radial-gradient(circle at 8% 12%, rgba(216, 255, 85, .38), transparent 28%),
    linear-gradient(145deg, #e9f0e7 0%, var(--settings-bg) 44%, #cbd8cf 100%);
  color: var(--settings-ink);
}

html[data-theme="dark"] body.theme-management {
  --settings-bg: #07100c;
  --settings-surface: #111b16;
  --settings-panel: #17231d;
  --settings-ink: #eff8ed;
  --settings-muted: #a7b6a9;
  --settings-line: rgba(239, 248, 237, .13);
  --settings-accent: #d8ff55;
  --settings-accent-ink: #111b16;
  --shadow: 0 22px 70px rgba(0, 0, 0, .34);
  background:
    radial-gradient(circle at 10% 8%, rgba(216, 255, 85, .16), transparent 28%),
    linear-gradient(145deg, #050907 0%, var(--settings-bg) 54%, #101913 100%);
  color: var(--settings-ink);
}

body.theme-customer,
body.theme-management {
  min-height: 100vh;
  transition: background .18s ease, color .18s ease;
}

body.theme-customer .topbar {
  background: rgba(255, 255, 255, .82);
  border-bottom-color: var(--customer-line);
}

html[data-theme="dark"] body.theme-customer .topbar {
  background: rgba(7, 21, 28, .86);
  border-bottom-color: rgba(255, 255, 255, .10);
}

body.theme-management .topbar {
  background: rgba(248, 251, 244, .78);
  border-bottom-color: var(--settings-line);
}

html[data-theme="dark"] body.theme-management .topbar {
  background: rgba(7, 16, 12, .82);
}

body.theme-customer .brand,
body.theme-customer .topbar nav a,
body.theme-management .brand,
body.theme-management .topbar nav a {
  color: var(--ink);
}

html[data-theme="dark"] body.theme-customer .brand,
html[data-theme="dark"] body.theme-customer .topbar nav a {
  color: #dbeee8;
}

html[data-theme="dark"] body.theme-customer .brand-logo-image,
html[data-theme="dark"] body.backoffice .brand-logo-image {
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

body.theme-customer .topbar nav a:hover,
body.theme-customer .nav-cta {
  background: rgba(13, 124, 102, .12);
  color: var(--customer-brand-strong);
}

html[data-theme="dark"] body.theme-customer .topbar nav a:hover,
html[data-theme="dark"] body.theme-customer .nav-cta {
  background: rgba(38, 198, 164, .14);
  color: #fff;
}

body.theme-customer .ui-icon {
  background: rgba(13, 124, 102, .13);
  color: var(--customer-brand-strong);
}

html[data-theme="dark"] body.theme-customer .ui-icon {
  background: rgba(155, 216, 75, .16);
  color: #eaffba;
}

body.theme-management .topbar nav a:hover,
body.theme-management .nav-cta {
  background: var(--settings-accent);
  color: var(--settings-accent-ink);
}

.top-theme-toggle {
  min-width: 78px;
  min-height: 34px;
  padding: 7px 10px;
}

body.theme-customer .theme-toggle {
  background: var(--customer-ink);
  color: var(--customer-surface);
  border: 1px solid var(--customer-line);
}

html[data-theme="dark"] body.theme-customer .theme-toggle {
  background: var(--customer-accent);
  color: #10242c;
}

body.theme-management .theme-toggle {
  background: var(--settings-ink);
  color: var(--settings-surface);
  border: 1px solid var(--settings-line);
}

html[data-theme="dark"] body.theme-management .theme-toggle {
  background: var(--settings-accent);
  color: var(--settings-accent-ink);
}

body.theme-customer .booking-hero {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(230, 244, 235, .84)),
    linear-gradient(90deg, rgba(13, 124, 102, .10), rgba(217, 145, 43, .10));
  border-color: var(--customer-line);
}

body.theme-customer .booking-hero.has-venue-media {
  background:
    linear-gradient(135deg, rgba(8, 24, 31, .78), rgba(9, 24, 32, .52)),
    var(--venue-image),
    linear-gradient(135deg, rgba(12, 37, 50, .98), rgba(9, 24, 32, .92));
  background-size: cover;
  background-position: center;
}

body.theme-customer .booking-hero h1 {
  color: var(--customer-ink);
}

body.theme-customer .booking-hero.has-venue-media h1 {
  color: #f7fff9;
}

body.theme-customer .booking-hero p,
body.theme-customer .booking-date-card label,
body.theme-customer .hero-metrics span {
  color: var(--customer-muted);
}

body.theme-customer .booking-hero.has-venue-media p,
body.theme-customer .booking-hero.has-venue-media .booking-date-card label,
body.theme-customer .booking-hero.has-venue-media .hero-metrics span {
  color: #d8ece9;
}

body.theme-customer .booking-date-card,
body.theme-customer .hero-metrics span {
  background: rgba(255, 255, 255, .70);
  border-color: var(--customer-line);
}

html[data-theme="dark"] body.theme-customer .booking-hero {
  background:
    linear-gradient(135deg, rgba(12, 37, 50, .98), rgba(9, 24, 32, .92)),
    linear-gradient(90deg, rgba(38, 198, 164, .16), rgba(155, 216, 75, .10));
  border-color: rgba(255, 255, 255, .12);
}

html[data-theme="dark"] body.theme-customer .booking-hero.has-venue-media {
  background:
    linear-gradient(135deg, rgba(7, 21, 28, .84), rgba(7, 21, 28, .62)),
    var(--venue-image),
    linear-gradient(135deg, rgba(12, 37, 50, .98), rgba(9, 24, 32, .92));
  background-size: cover;
  background-position: center;
}

html[data-theme="dark"] body.theme-customer .booking-hero h1 {
  color: #f7fff9;
}

html[data-theme="dark"] body.theme-customer .booking-hero p,
html[data-theme="dark"] body.theme-customer .booking-date-card label,
html[data-theme="dark"] body.theme-customer .hero-metrics span {
  color: #bdd2d5;
}

html[data-theme="dark"] body.theme-customer .booking-date-card,
html[data-theme="dark"] body.theme-customer .hero-metrics span {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .16);
}

body.theme-customer .court-card,
body.theme-customer .selection-panel,
body.theme-customer .booking-cart,
body.theme-customer .booking-form,
body.theme-customer .auto-assign,
body.theme-customer .booking-rules-panel,
body.theme-customer .panel,
body.theme-customer .auth-panel,
body.theme-customer .modal,
body.theme-customer .toast {
  background: var(--customer-surface);
  border-color: var(--customer-line);
  color: var(--customer-ink);
}

html[data-theme="dark"] body.theme-customer .court-card,
html[data-theme="dark"] body.theme-customer .selection-panel,
html[data-theme="dark"] body.theme-customer .booking-cart,
html[data-theme="dark"] body.theme-customer .booking-form,
html[data-theme="dark"] body.theme-customer .auto-assign,
html[data-theme="dark"] body.theme-customer .booking-rules-panel,
html[data-theme="dark"] body.theme-customer .panel,
html[data-theme="dark"] body.theme-customer .auth-panel,
html[data-theme="dark"] body.theme-customer .modal,
html[data-theme="dark"] body.theme-customer .toast {
  backdrop-filter: blur(14px);
}

body.theme-customer .rules-block {
  background: var(--customer-panel);
  border-color: var(--customer-line);
}

body.theme-customer .rules-block li {
  color: var(--customer-muted);
}

html[data-theme="dark"] body.theme-customer .rules-block {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .12);
}

html[data-theme="dark"] body.theme-customer .rules-block li {
  color: #d8ece9;
}

body.theme-customer input,
body.theme-customer select,
body.theme-customer textarea {
  background: var(--customer-panel);
  border-color: var(--customer-line);
  color: var(--customer-ink);
}

html[data-theme="dark"] body.theme-customer input,
html[data-theme="dark"] body.theme-customer select,
html[data-theme="dark"] body.theme-customer textarea {
  background: rgba(255, 255, 255, .10);
  color: #f2fff8;
  border-color: rgba(255, 255, 255, .22);
}

html[data-theme="dark"] body.theme-customer select option {
  color: #10242c;
}

html[data-theme="dark"] body.theme-customer input[type="date"] {
  color-scheme: dark;
}

body.theme-customer .court-head p,
body.theme-customer .muted,
body.theme-customer th {
  color: var(--customer-muted);
}

body.theme-customer .panel h1,
body.theme-customer .panel h2,
body.theme-customer .auth-panel h1 {
  color: var(--customer-ink);
}

body.theme-customer table {
  color: var(--customer-ink);
}

body.theme-customer td,
body.theme-customer th,
body.theme-customer .bank-list article {
  border-color: var(--customer-line);
}

body.theme-customer .slot {
  background: rgba(13, 124, 102, .10);
  color: var(--customer-brand-strong);
  border-color: rgba(13, 124, 102, .20);
}

body.theme-customer .slot.busy {
  background: rgba(16, 36, 44, .06);
  color: rgba(16, 36, 44, .48);
  border-color: rgba(16, 36, 44, .10);
}

body.theme-customer .slot.phone-only {
  background: rgba(217, 145, 43, .16);
  color: #704600;
  border-color: rgba(217, 145, 43, .50);
}

body.theme-customer .slot.waitlistable {
  background: rgba(217, 145, 43, .18);
  color: #704600;
  border-color: rgba(217, 145, 43, .54);
}

body.theme-customer .slot.selected,
body.theme-customer .selected-chip {
  background: rgba(217, 145, 43, .13);
  color: #7a4d08;
  border-color: rgba(217, 145, 43, .46);
}

html[data-theme="dark"] body.theme-customer .slot {
  background: rgba(38, 198, 164, .14);
  color: #cffff0;
  border-color: rgba(38, 198, 164, .28);
}

html[data-theme="dark"] body.theme-customer .slot.busy {
  background: rgba(255, 255, 255, .05);
  color: rgba(237, 247, 243, .42);
  border-color: rgba(255, 255, 255, .10);
}

html[data-theme="dark"] body.theme-customer .slot.phone-only {
  background: rgba(155, 216, 75, .13);
  color: #eaffba;
  border-color: rgba(155, 216, 75, .46);
}

html[data-theme="dark"] body.theme-customer .slot.waitlistable {
  background: rgba(217, 145, 43, .14);
  color: #ffe0a8;
  border-color: rgba(217, 145, 43, .46);
}

html[data-theme="dark"] body.theme-customer .slot.phone-only small b,
html[data-theme="dark"] body.theme-customer .availability-row.phone-only strong b {
  background: var(--customer-accent);
  color: #10242c;
}

html[data-theme="dark"] body.theme-customer .slot.selected,
html[data-theme="dark"] body.theme-customer .selected-chip {
  background: rgba(155, 216, 75, .18);
  color: #f4ffd6;
  border-color: rgba(155, 216, 75, .70);
}

body.theme-management .hero,
body.theme-management .panel,
body.theme-management .auth-panel,
body.theme-management .stats article,
body.theme-management .admin-booking-panel,
body.theme-management .modal,
body.theme-management .toast,
body.theme-management .empty {
  background: var(--settings-surface);
  border-color: var(--settings-line);
  color: var(--settings-ink);
  box-shadow: 0 20px 54px rgba(23, 33, 26, .10);
}

html[data-theme="dark"] body.theme-management .hero,
html[data-theme="dark"] body.theme-management .panel,
html[data-theme="dark"] body.theme-management .auth-panel,
html[data-theme="dark"] body.theme-management .stats article,
html[data-theme="dark"] body.theme-management .admin-booking-panel,
html[data-theme="dark"] body.theme-management .modal,
html[data-theme="dark"] body.theme-management .toast,
html[data-theme="dark"] body.theme-management .empty {
  box-shadow: 0 20px 60px rgba(0, 0, 0, .34);
}

body.theme-management input,
body.theme-management select,
body.theme-management .admin-grid,
body.theme-management .admin-drop-cell,
body.theme-management .calendar-day,
body.theme-management .qr-preview {
  background: var(--settings-panel);
  border-color: var(--settings-line);
  color: var(--settings-ink);
}

body.theme-management .admin-grid-head,
body.theme-management .admin-time-cell,
body.theme-management .ghost-link,
body.theme-management .file-button {
  background: color-mix(in srgb, var(--settings-accent) 16%, var(--settings-panel));
  border-color: var(--settings-line);
  color: var(--settings-ink);
}

body.theme-management .admin-grid-head,
body.theme-management .admin-time-cell,
body.theme-management .admin-drop-cell,
body.theme-management td,
body.theme-management th {
  border-color: var(--settings-line);
}

body.theme-management .booking-chip {
  background: color-mix(in srgb, var(--settings-accent) 18%, var(--settings-panel));
  border-color: color-mix(in srgb, var(--settings-accent) 42%, var(--settings-line));
  color: var(--settings-ink);
}

body.theme-management .booking-chip span,
body.theme-management .stats span,
body.theme-management .stats small,
body.theme-management .hero p,
body.theme-management .muted,
body.theme-management th,
body.theme-management label {
  color: var(--settings-muted);
}

body.theme-management .stats strong,
body.theme-management .panel h1,
body.theme-management .panel h2,
body.theme-management .hero h1 {
  color: var(--settings-ink);
}

body.theme-management table {
  color: var(--settings-ink);
}

body.theme-management button:not(.theme-toggle):not(.calendar-day) {
  background: var(--settings-ink);
  color: var(--settings-surface);
}

html[data-theme="dark"] body.theme-management button:not(.theme-toggle):not(.calendar-day) {
  background: var(--settings-accent);
  color: var(--settings-accent-ink);
}

body.theme-management .settings-tabs button {
  background: transparent;
  color: var(--settings-muted);
  border: 1px solid transparent;
}

body.theme-management .settings-tabs button.active {
  background: var(--settings-accent);
  color: var(--settings-accent-ink);
  border-color: rgba(23, 33, 26, .14);
}

/* Unified customer theme for every page */
body.theme-customer .hero,
body.theme-customer .stats article,
body.theme-customer .admin-booking-panel,
body.theme-customer .settings-title,
body.theme-customer .settings-tab,
body.theme-customer .empty {
  background: var(--customer-surface);
  border-color: var(--customer-line);
  color: var(--customer-ink);
  box-shadow: var(--shadow);
}

body.theme-customer .settings-title {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .78), rgba(238, 247, 241, .64)),
    var(--customer-surface);
}

html[data-theme="dark"] body.theme-customer .settings-title {
  background:
    linear-gradient(135deg, rgba(38, 198, 164, .10), rgba(255, 255, 255, .035)),
    var(--customer-surface);
}

body.theme-customer .settings-title h1,
body.theme-customer .stats strong,
body.theme-customer .hero h1 {
  color: var(--customer-ink);
}

body.theme-customer label,
body.theme-customer .stats span,
body.theme-customer .stats small,
body.theme-customer .hero p,
body.theme-customer .booking-chip span,
body.theme-customer .holiday-calendar > strong {
  color: var(--customer-muted);
}

body.theme-customer .settings-tabs {
  background: rgba(255, 255, 255, .46);
  border-color: var(--customer-line);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] body.theme-customer .settings-tabs {
  background: rgba(255, 255, 255, .04);
}

body.theme-customer .settings-tabs button {
  background: transparent;
  color: var(--customer-muted);
  border: 1px solid transparent;
}

body.theme-customer .settings-tabs button.active {
  background: rgba(13, 124, 102, .12);
  color: var(--customer-brand-strong);
  border-color: rgba(13, 124, 102, .20);
}

html[data-theme="dark"] body.theme-customer .settings-tabs button.active {
  background: rgba(155, 216, 75, .18);
  color: #f4ffd6;
  border-color: rgba(155, 216, 75, .46);
}

body.theme-customer .court-edit-row,
body.theme-customer .bank-row,
body.theme-customer .staff-row,
body.theme-customer .sort-pill,
body.theme-customer .admin-grid,
body.theme-customer .admin-drop-cell,
body.theme-customer .calendar-day,
body.theme-customer .qr-preview {
  background: var(--customer-panel);
  border-color: var(--customer-line);
  color: var(--customer-ink);
}

body.theme-customer .admin-grid-head,
body.theme-customer .admin-time-cell,
body.theme-customer .ghost-link,
body.theme-customer .file-button {
  background: rgba(13, 124, 102, .10);
  border-color: var(--customer-line);
  color: var(--customer-brand-strong);
}

html[data-theme="dark"] body.theme-customer .admin-grid-head,
html[data-theme="dark"] body.theme-customer .admin-time-cell,
html[data-theme="dark"] body.theme-customer .ghost-link,
html[data-theme="dark"] body.theme-customer .file-button {
  background: rgba(38, 198, 164, .12);
  color: var(--customer-brand-strong);
}

body.theme-customer .admin-grid-head,
body.theme-customer .admin-time-cell,
body.theme-customer .admin-drop-cell,
body.theme-customer td,
body.theme-customer th {
  border-color: var(--customer-line);
}

body.theme-customer .booking-chip,
body.theme-customer .add-row {
  background: rgba(217, 145, 43, .13);
  border-color: rgba(217, 145, 43, .42);
  color: var(--customer-ink);
}

html[data-theme="dark"] body.theme-customer .booking-chip,
html[data-theme="dark"] body.theme-customer .add-row {
  background: rgba(155, 216, 75, .13);
  border-color: rgba(155, 216, 75, .36);
}

body.theme-customer button:not(.theme-toggle):not(.cart-toggle):not(.calendar-day):not(.slot) {
  background: var(--customer-brand);
  color: #fff;
}

body.theme-customer button:not(.theme-toggle):not(.cart-toggle):not(.calendar-day):not(.slot):hover {
  background: var(--customer-brand-strong);
}

html[data-theme="dark"] body.theme-customer button:not(.theme-toggle):not(.cart-toggle):not(.calendar-day):not(.slot) {
  background: var(--customer-accent);
  color: #10242c;
}

body.theme-customer .admin-calendar-actions button,
html[data-theme="dark"] body.theme-customer .admin-calendar-actions button {
  border: 1px solid var(--bo-line);
  background: var(--bo-panel-strong);
  color: var(--customer-brand-strong);
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

#payment-review,
#waitlist-review {
  scroll-margin-top: 92px;
}

.panel-title-row h1 {
  margin: 0;
}

.compact-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.notification-list,
.activity-list {
  display: grid;
  gap: 10px;
}

.notification-item,
.activity-list article {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--customer-line);
  border-radius: 8px;
  background: var(--customer-panel);
  color: var(--customer-ink);
}

.notification-item.unread {
  border-color: rgba(217, 145, 43, .48);
  background: rgba(217, 145, 43, .12);
}

.notification-item h2 {
  margin: 8px 0 6px;
  font-size: 18px;
  line-height: 1.25;
}

.notification-item p,
.activity-list p {
  margin: 0;
}

.notification-item small,
.activity-list small {
  flex: 0 0 auto;
  color: var(--customer-muted);
  font-size: 12px;
  white-space: nowrap;
}

.report-panel .inline-form {
  align-items: end;
}

html[data-theme="dark"] body.theme-customer .notification-item,
html[data-theme="dark"] body.theme-customer .activity-list article {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .12);
}

html[data-theme="dark"] body.theme-customer .notification-item.unread {
  background: rgba(155, 216, 75, .12);
  border-color: rgba(155, 216, 75, .40);
}

@media (max-width: 760px) {
  .panel-title-row,
  .notification-item,
  .activity-list article {
    display: grid;
  }

  .compact-stats {
    grid-template-columns: 1fr;
  }

  .notification-item small,
  .activity-list small {
    white-space: normal;
  }
}

/* Back office workspace */
body.backoffice {
  --bo-sidebar: rgba(255, 255, 255, .78);
  --bo-panel: rgba(255, 255, 255, .74);
  --bo-panel-strong: #ffffff;
  --bo-line: rgba(16, 36, 44, .12);
  --bo-soft: rgba(13, 124, 102, .08);
  --bo-blue: #2978d0;
  --bo-green: #0d7c66;
  --bo-amber: #d9912b;
  --bo-red: #bf4444;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(13, 124, 102, .08), transparent 28%),
    linear-gradient(180deg, #f6faf6 0%, #eef5f1 48%, #e2ece7 100%);
}

html[data-theme="dark"] body.backoffice {
  --customer-ink: #f4fff9;
  --customer-muted: #c5d8d4;
  --customer-line: rgba(218, 243, 235, .24);
  --customer-brand-strong: #a6ffe2;
  --bo-sidebar: rgba(8, 24, 31, .86);
  --bo-panel: rgba(255, 255, 255, .07);
  --bo-panel-strong: rgba(255, 255, 255, .10);
  --bo-line: rgba(202, 232, 221, .16);
  --bo-soft: rgba(38, 198, 164, .10);
  background:
    linear-gradient(135deg, rgba(38, 198, 164, .13), transparent 30%),
    linear-gradient(180deg, #07151c 0%, #0a1b25 54%, #10242c 100%);
}

.bo-shell {
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns .18s ease;
}

.bo-shell.sidebar-collapsed {
  grid-template-columns: 78px minmax(0, 1fr);
}

.bo-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  background: var(--bo-sidebar);
  border-right: 1px solid var(--bo-line);
  backdrop-filter: blur(18px);
}

.bo-sidebar-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid var(--bo-line);
  border-radius: 999px;
  background: var(--bo-panel-strong);
  color: var(--customer-brand-strong);
}

.bo-sidebar-toggle span,
.bo-sidebar-toggle span::before,
.bo-sidebar-toggle span::after {
  display: block;
  width: 15px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.bo-sidebar-toggle span {
  position: relative;
}

.bo-sidebar-toggle span::before {
  position: absolute;
  top: -5px;
}

.bo-sidebar-toggle span::after {
  position: absolute;
  top: 5px;
}

.bo-brand {
  display: grid;
  gap: 2px;
  padding: 12px;
  border-radius: 8px;
  color: var(--customer-ink);
}

.bo-brand strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  line-height: 1;
}

.bo-brand-logo {
  width: 58px;
  height: 58px;
}

.bo-brand small,
.bo-kicker,
.bo-venue-card span {
  color: var(--customer-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.bo-venue-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--bo-line);
  border-radius: 8px;
  background: var(--bo-panel);
}

.bo-venue-card strong {
  color: var(--customer-ink);
  font-size: 16px;
}

.bo-venue-card select {
  min-height: 38px;
}

.bo-nav {
  display: grid;
  gap: 8px;
}

.bo-nav-admin {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--bo-line);
}

.bo-nav-section-label {
  padding: 0 10px 4px;
  color: var(--customer-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.bo-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--customer-muted);
  font-weight: 850;
  transition: background .16s ease, border-color .16s ease, transform .16s ease, color .16s ease;
}

.bo-nav-link em,
.bo-sidebar-foot em,
.bo-brand em {
  font-style: normal;
}

.bo-nav-link span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--bo-green);
  box-shadow: 0 0 0 4px rgba(13, 124, 102, .10);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.bo-nav-link span::before {
  content: "▦";
}

.bo-nav-link.nav-icon-dashboard span::before {
  content: "▦";
}

.bo-nav-link.nav-icon-payment span::before {
  content: "✓";
}

.bo-nav-link.nav-icon-waitlist span::before {
  content: "◌";
}

.bo-nav-link.nav-icon-calendar span::before {
  content: "◷";
}

.bo-nav-link.nav-icon-bookings span::before {
  content: "▤";
}

.bo-nav-link.nav-icon-settings span::before {
  content: "⚙";
}

.bo-nav-link.nav-icon-venues span::before {
  content: "⌂";
}

.bo-nav-link.nav-icon-notifications span::before {
  content: "●";
}

.bo-nav-link.nav-icon-owners span::before {
  content: "♛";
}

.bo-nav-link.nav-icon-profile span::before {
  content: "☻";
}

.bo-nav-link.nav-icon-staff span::before {
  content: "⚑";
}

.bo-nav-link.nav-calendar span {
  background: var(--bo-blue);
  box-shadow: 0 0 0 4px rgba(41, 120, 208, .10);
}

.bo-nav-link.nav-payments span {
  background: var(--bo-green);
  box-shadow: 0 0 0 4px rgba(13, 124, 102, .10);
}

.bo-nav-link.nav-waitlist span {
  background: var(--bo-amber);
  box-shadow: 0 0 0 4px rgba(217, 145, 43, .12);
}

.bo-nav-link.nav-settings span {
  background: var(--bo-amber);
  box-shadow: 0 0 0 4px rgba(217, 145, 43, .12);
}

.bo-nav-link.nav-notifications span {
  background: var(--bo-red);
  box-shadow: 0 0 0 4px rgba(191, 68, 68, .10);
}

.bo-nav-link.nav-owners span {
  background: #8b5cf6;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .14);
}

.bo-nav-link.nav-profile span {
  background: #0f766e;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, .14);
}

.bo-nav-link.nav-staff span {
  background: #0f5ec9;
  box-shadow: 0 0 0 4px rgba(15, 94, 201, .14);
}

.bo-nav-link:hover,
.bo-nav-link.active {
  color: var(--customer-ink);
  border-color: var(--bo-line);
  background: var(--bo-panel-strong);
  transform: translateX(3px);
}

.bo-nav-link.active::after {
  content: "";
  position: absolute;
  inset: 9px auto 9px 0;
  width: 3px;
  border-radius: 0 8px 8px 0;
  background: var(--customer-brand);
}

.bo-nav-link b {
  margin-left: auto;
  min-width: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--bo-amber);
  color: #fff;
  font-size: 12px;
  text-align: center;
}

.bo-sidebar-foot {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.bo-sidebar-foot a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--bo-line);
  border-radius: 8px;
  color: var(--customer-muted);
  font-weight: 800;
}

.bo-shell.sidebar-collapsed .bo-sidebar {
  align-items: center;
  padding-inline: 10px;
}

.bo-shell.sidebar-collapsed .bo-brand {
  padding-inline: 0;
}

.bo-shell.sidebar-collapsed .bo-brand em,
.bo-shell.sidebar-collapsed .bo-brand small,
.bo-shell.sidebar-collapsed .bo-venue-card,
.bo-shell.sidebar-collapsed .bo-nav-link em,
.bo-shell.sidebar-collapsed .bo-sidebar-foot em {
  display: none;
}

.bo-shell.sidebar-collapsed .bo-nav {
  width: 100%;
}

.bo-shell.sidebar-collapsed .bo-nav-admin {
  width: 100%;
}

.bo-shell.sidebar-collapsed .bo-nav-link {
  justify-content: center;
  min-height: 46px;
  padding: 8px;
}

.bo-shell.sidebar-collapsed .bo-nav-section-label {
  display: none;
}

.bo-shell.sidebar-collapsed .bo-nav-link b {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 18px;
  padding: 1px 5px;
  font-size: 10px;
}

.bo-shell.sidebar-collapsed .bo-sidebar-foot {
  align-items: center;
}

.bo-shell.sidebar-collapsed .bo-sidebar-foot a {
  justify-content: center;
  width: 42px;
  padding-inline: 0;
}

.bo-stage {
  min-width: 0;
}

.bo-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  background: rgba(246, 250, 246, .78);
  border-bottom: 1px solid var(--bo-line);
  backdrop-filter: blur(18px);
}

html[data-theme="dark"] .bo-topbar {
  background: rgba(7, 21, 28, .82);
}

.bo-topbar h1 {
  margin: 2px 0 0;
  color: var(--customer-ink);
  font-size: 22px;
}

.bo-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-link-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--bo-line);
  border-radius: 10px;
  background: var(--bo-panel);
  color: var(--customer-ink);
  font-weight: 800;
}

.topbar-link-button em {
  font-style: normal;
}

.bo-user {
  display: grid;
  justify-items: end;
  color: var(--customer-ink);
  font-weight: 900;
  line-height: 1.15;
}

.bo-user small {
  color: var(--customer-muted);
  font-size: 12px;
  font-weight: 700;
}

.bo-notification-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--bo-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: var(--customer-ink);
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(15, 23, 18, .08);
}

.bo-notification-button .ui-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 17px;
  line-height: 1;
}

.bo-notification-button b {
  position: absolute;
  right: -4px;
  top: -5px;
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid var(--bo-surface);
  border-radius: 999px;
  background: var(--bo-red);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.bo-notification-button:hover,
.bo-notification-button.active {
  border-color: rgba(191, 68, 68, .34);
  background: rgba(191, 68, 68, .10);
  transform: translateY(-1px);
}

html[data-theme="dark"] .bo-notification-button {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(218, 238, 231, .18);
  color: #f7fff9;
}

html[data-theme="dark"] .bo-notification-button b {
  border-color: #07151c;
}

.bo-page {
  width: min(1320px, calc(100% - 40px));
  margin: 22px auto 52px;
}

.bo-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--bo-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(13, 124, 102, .14), rgba(217, 145, 43, .08)),
    var(--bo-panel);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .bo-hero {
  background:
    linear-gradient(135deg, rgba(38, 198, 164, .16), rgba(155, 216, 75, .08)),
    var(--bo-panel);
}

.bo-hero span {
  color: var(--customer-brand-strong);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.bo-hero h2 {
  margin: 6px 0 8px;
  color: var(--customer-ink);
  font-size: 40px;
  line-height: 1;
}

.bo-hero p {
  max-width: 660px;
  margin: 0;
  color: var(--customer-muted);
}

.bo-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-end;
  justify-content: flex-end;
  gap: 10px;
  min-width: 220px;
}

.bo-hero-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--bo-line);
  border-radius: 8px;
  background: var(--bo-panel-strong);
  color: var(--customer-ink);
  font-weight: 850;
}

body.backoffice .panel,
body.backoffice .settings-title,
body.backoffice .settings-tabs,
body.backoffice .settings-tab {
  border: 1px solid var(--bo-line);
  background: var(--bo-panel);
  box-shadow: 0 14px 42px rgba(31, 44, 36, .08);
  backdrop-filter: blur(14px);
}

html[data-theme="dark"] body.backoffice .panel,
html[data-theme="dark"] body.backoffice .settings-title,
html[data-theme="dark"] body.backoffice .settings-tabs,
html[data-theme="dark"] body.backoffice .settings-tab {
  box-shadow: 0 18px 54px rgba(0, 0, 0, .28);
}

body.backoffice .stats {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-bottom: 16px;
}

body.backoffice .stats article {
  position: relative;
  min-height: 126px;
  overflow: hidden;
  border-color: var(--bo-line);
  background: var(--bo-panel);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

body.backoffice .stats article:hover {
  transform: translateY(-3px);
  border-color: rgba(13, 124, 102, .30);
  box-shadow: 0 20px 56px rgba(31, 44, 36, .12);
}

body.backoffice .stats article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--bo-green);
}

body.backoffice .stats article:nth-child(2)::before {
  background: var(--bo-blue);
}

body.backoffice .stats article:nth-child(3)::before {
  background: var(--bo-amber);
}

body.backoffice .stats article:nth-child(4)::before {
  background: var(--bo-red);
}

body.backoffice .stats strong {
  font-size: 36px;
}

body.backoffice table {
  border-collapse: separate;
  border-spacing: 0 8px;
}

body.backoffice thead th {
  border: 0;
  color: var(--customer-muted);
  font-size: 12px;
  text-transform: uppercase;
}

html[data-theme="dark"] body.backoffice .stats small,
html[data-theme="dark"] body.backoffice .bo-hero p,
html[data-theme="dark"] body.backoffice .activity-list p,
html[data-theme="dark"] body.backoffice .activity-list small,
html[data-theme="dark"] body.backoffice .muted {
  color: #c5d8d4;
}

html[data-theme="dark"] body.backoffice .stats span,
html[data-theme="dark"] body.backoffice thead th,
html[data-theme="dark"] body.backoffice .panel-title-row .badge {
  color: #d7ebe5;
}

body.backoffice tbody tr {
  background: var(--bo-panel-strong);
  transition: transform .14s ease, box-shadow .14s ease;
}

body.backoffice tbody tr:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(31, 44, 36, .08);
}

body.backoffice td {
  border: 0;
  border-top: 1px solid var(--bo-line);
  border-bottom: 1px solid var(--bo-line);
}

body.backoffice td:first-child {
  border-left: 1px solid var(--bo-line);
  border-radius: 8px 0 0 8px;
}

body.backoffice td:last-child {
  border-right: 1px solid var(--bo-line);
  border-radius: 0 8px 8px 0;
}

.bo-date-card {
  align-self: end;
  min-width: 248px;
  padding: 10px;
  border: 1px solid var(--bo-line);
  border-radius: 8px;
  background: var(--bo-panel-strong);
}

.bo-calendar-hero {
  align-items: center;
}

.admin-date-nav {
  display: grid;
  grid-template-columns: 30px minmax(0, 340px) 30px;
  align-items: start;
  gap: 8px;
  max-width: 100%;
}

.admin-calendar-side {
  display: grid;
  gap: 8px;
  justify-items: end;
  min-width: 0;
}

.admin-calendar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-calendar-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--bo-line);
  background: var(--bo-panel-strong);
  color: var(--customer-brand-strong);
}

.admin-date-nav .bo-date-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.admin-date-nav .bo-date-card label {
  min-width: 0;
}

.admin-date-nav .bo-date-card input {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

body.admin-picker-collapsed .admin-quick-dates,
body.admin-picker-collapsed .admin-month-picker {
  display: none;
}

.admin-quick-dates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.admin-quick-dates a {
  min-height: 30px;
  padding: 5px 9px;
  border-color: var(--bo-line);
  background: var(--bo-soft);
  color: var(--customer-brand-strong);
}

.admin-month-picker {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--bo-line);
  border-radius: 8px;
  background: #fff;
}

html[data-theme="dark"] .admin-month-picker {
  background: #10242c;
}

.admin-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--customer-ink);
  font-weight: 900;
}

.admin-month-head a {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--bo-line);
  border-radius: 999px;
  color: var(--customer-brand-strong);
}

.admin-month-week,
.admin-month-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.admin-month-week span {
  color: var(--customer-muted);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.month-day,
.empty-day {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 25px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--customer-ink);
  font-size: 11px;
  font-weight: 850;
}

.month-day:hover,
.month-day.active {
  border-color: var(--customer-brand-strong);
  background: rgba(13, 124, 102, .10);
}

.month-day i {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
}

.month-day.free i,
.admin-month-legend i.free {
  background: var(--bo-green);
}

.month-day.full i,
.admin-month-legend i.full {
  background: var(--bo-red);
}

.month-day.past {
  color: var(--customer-muted);
  opacity: .55;
}

.month-day.past i {
  display: none;
}

.admin-month-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--customer-muted);
  font-size: 10px;
  font-weight: 800;
}

.admin-month-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.admin-month-legend i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.date-step {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-height: 30px;
  align-self: start;
  border: 1px solid var(--bo-line);
  border-radius: 999px;
  background: var(--bo-panel-strong);
  color: var(--customer-brand-strong);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.date-step:hover {
  background: rgba(13, 124, 102, .12);
}

.bo-calendar-panel {
  padding: 14px;
}

body.backoffice .admin-grid-wrap {
  margin-top: 0;
  max-width: 100%;
  max-height: calc(100vh - 232px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--bo-line);
  border-radius: 8px;
  background: var(--bo-panel-strong);
}

body.admin-calendar-fullscreen {
  overflow: hidden;
}

body.admin-calendar-fullscreen .bo-shell {
  display: block;
}

body.admin-calendar-fullscreen .bo-sidebar {
  display: none;
}

body.admin-calendar-fullscreen .bo-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
}

body.admin-calendar-fullscreen .bo-main {
  min-height: 100vh;
  padding: 0;
}

body.admin-calendar-fullscreen .bo-page {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 10px;
}

body.admin-calendar-fullscreen .bo-calendar-hero {
  margin-bottom: 8px;
  padding: 10px 12px;
}

body.admin-calendar-fullscreen .bo-calendar-hero h2 {
  font-size: 26px;
}

body.admin-calendar-fullscreen .bo-calendar-panel {
  padding: 8px;
}

body.admin-calendar-fullscreen .admin-grid-wrap {
  max-height: calc(100vh - 174px);
}

body.admin-calendar-fullscreen.admin-picker-collapsed .admin-grid-wrap {
  max-height: calc(100vh - 150px);
}

body.backoffice .admin-grid-wrap::-webkit-scrollbar {
  height: 12px;
}

body.backoffice .admin-grid-wrap::-webkit-scrollbar-track {
  background: rgba(13, 124, 102, .08);
  border-radius: 999px;
}

body.backoffice .admin-grid-wrap::-webkit-scrollbar-thumb {
  background: rgba(13, 124, 102, .38);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

body.backoffice .admin-grid {
  min-width: calc(68px + (var(--court-count) * 150px));
  grid-template-columns: 68px repeat(var(--court-count), minmax(150px, 1fr));
  background: transparent;
  font-size: 12px;
  overflow: visible;
}

body.backoffice .admin-grid-head {
  position: sticky;
  top: 0;
  z-index: 6;
  background: #f4fbf7;
  color: var(--customer-ink);
  padding: 7px;
  box-shadow: 0 2px 0 var(--bo-line);
}

body.backoffice .admin-grid-head.time-head {
  left: 0;
  z-index: 10;
  background: #ecf7f2;
}

body.backoffice .admin-time-cell {
  z-index: 5;
  background: #f4fbf7;
  color: var(--customer-brand-strong);
  font-weight: 900;
  padding: 7px;
  box-shadow: 2px 0 0 var(--bo-line);
}

html[data-theme="dark"] body.backoffice .admin-grid-head,
html[data-theme="dark"] body.backoffice .admin-time-cell {
  background: #10242c;
}

html[data-theme="dark"] body.backoffice .admin-grid-head.time-head {
  background: #0b1d25;
}

body.backoffice .admin-drop-cell {
  min-height: 66px;
  padding: 4px;
  background: rgba(255, 255, 255, .52);
  transition: background .14s ease, box-shadow .14s ease;
}

html[data-theme="dark"] body.backoffice .admin-drop-cell {
  background: rgba(255, 255, 255, .045);
}

body.backoffice .admin-drop-cell.drag-over {
  background: rgba(217, 145, 43, .20);
  box-shadow: inset 0 0 0 2px rgba(217, 145, 43, .54);
}

body.backoffice .booking-chip {
  position: relative;
  gap: 2px;
  padding: 6px;
  border: 1px solid rgba(13, 124, 102, .22);
  border-left: 4px solid var(--bo-green);
  background: rgba(13, 124, 102, .10);
  font-size: 12px;
  transition: transform .14s ease, box-shadow .14s ease;
}

body.backoffice .booking-chip.pay-waiting {
  border-left-color: var(--bo-red);
  background: rgba(191, 68, 68, .10);
}

body.backoffice .booking-chip.pay-submitted {
  border-left-color: var(--bo-amber);
  background: rgba(217, 145, 43, .13);
}

body.backoffice .booking-chip.pay-verified {
  border-left-color: var(--bo-green);
  background: rgba(13, 124, 102, .11);
}

body.backoffice .booking-chip small,
body.backoffice .booking-chip span {
  font-size: 10px;
}

.payment-state,
.payment-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.payment-state i,
.payment-legend i {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.pay-waiting i {
  background: var(--bo-red);
}

.pay-submitted i {
  background: var(--bo-amber);
}

.pay-verified i {
  background: var(--bo-green);
}

.payment-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.payment-legend span {
  padding: 6px 9px;
  border: 1px solid var(--bo-line);
  border-radius: 999px;
  background: var(--bo-panel-strong);
  color: var(--customer-muted);
  font-size: 12px;
  font-weight: 800;
}

.chip-verify-form button {
  min-height: 25px;
  width: 100%;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--bo-amber);
  color: #1c2520;
  font-size: 10px;
  font-weight: 900;
}

body.backoffice .booking-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(31, 44, 36, .12);
}

body.backoffice .booking-chip.dragging {
  opacity: .62;
  transform: scale(.98);
}

.bo-board-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.bo-board-footer span {
  padding: 6px 10px;
  border: 1px solid var(--bo-line);
  border-radius: 999px;
  background: var(--bo-panel-strong);
  color: var(--customer-muted);
  font-size: 12px;
  font-weight: 800;
}

body.backoffice .settings-title {
  display: none;
}

body.backoffice .settings-shell {
  gap: 14px;
}

body.backoffice .venue-switch-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.venue-switch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.venue-switch-head h2 {
  margin: 3px 0 0;
  color: var(--customer-ink);
  font-size: 24px;
  line-height: 1.1;
}

.venue-select-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr);
  gap: 12px;
}

.create-venue-drawer {
  border: 1px solid var(--bo-line);
  border-radius: 8px;
  background: var(--bo-panel-strong);
  overflow: hidden;
}

.create-venue-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--customer-ink);
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.create-venue-drawer summary::-webkit-details-marker {
  display: none;
}

.create-venue-drawer summary b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--customer-brand);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  transition: transform .16s ease;
}

.create-venue-drawer[open] summary b {
  transform: rotate(45deg);
}

.create-venue-drawer .inline-create-venue {
  margin: 0;
  padding: 14px;
  border-top: 1px solid var(--bo-line);
  background: rgba(13, 124, 102, .05);
}

body.backoffice .settings-tabs {
  position: sticky;
  top: 78px;
  z-index: 8;
  padding: 8px;
  backdrop-filter: blur(16px);
}

body.backoffice .settings-tabs button {
  min-height: 38px;
}

body.backoffice .settings-tab {
  padding: 18px;
}

body.backoffice .court-edit-row,
body.backoffice .bank-row,
body.backoffice .staff-row,
body.backoffice .hours-row {
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

body.backoffice .court-edit-row:hover,
body.backoffice .bank-row:hover,
body.backoffice .staff-row:hover,
body.backoffice .hours-row:hover {
  transform: translateY(-2px);
  border-color: rgba(13, 124, 102, .28);
  box-shadow: 0 12px 28px rgba(31, 44, 36, .08);
}

body.backoffice .notification-item,
body.backoffice .activity-list article {
  background: var(--bo-panel-strong);
}

@media (max-width: 1180px) {
  .bo-calendar-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-date-nav {
    width: 100%;
    justify-self: stretch;
    grid-template-columns: 30px minmax(0, 1fr) 30px;
  }

  .admin-calendar-side {
    justify-items: stretch;
  }

  .admin-calendar-actions {
    justify-content: flex-start;
  }

  .admin-date-nav .bo-date-card {
    grid-template-columns: minmax(160px, 1fr);
  }

  .admin-date-nav .bo-date-card label {
    width: min(180px, 100%);
  }

  .admin-date-nav .bo-date-card input[type="date"] {
    width: min(170px, 100%);
  }
}

@media (max-width: 980px) {
  .bo-shell {
    display: block;
  }

  .bo-sidebar {
    position: sticky;
    z-index: 20;
    height: auto;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--bo-line);
  }

  .bo-sidebar-toggle {
    display: none;
  }

  .bo-shell.sidebar-collapsed .bo-sidebar {
    align-items: stretch;
    padding: 12px;
  }

  .bo-shell.sidebar-collapsed .bo-nav-link em {
    display: inline;
  }

  .bo-shell.sidebar-collapsed .bo-nav-link {
    justify-content: flex-start;
    padding: 10px 12px;
  }

  .bo-shell.sidebar-collapsed .bo-nav-link b {
    position: static;
    min-width: 24px;
    padding: 3px 7px;
    font-size: 12px;
  }

  .bo-brand,
  .bo-venue-card,
  .bo-sidebar-foot {
    display: none;
  }

  .bo-nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .bo-nav-link {
    flex: 0 0 auto;
    min-height: 40px;
  }

  .bo-nav-link:hover,
  .bo-nav-link.active {
    transform: none;
  }

  .bo-topbar {
    top: 65px;
    padding: 12px 16px;
  }

  .bo-page {
    width: min(100% - 24px, 1320px);
  }

  .bo-hero {
    display: grid;
  }

  .bo-hero-actions {
    justify-content: flex-start;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .bo-topbar {
    display: grid;
  }

  .bo-topbar-actions {
    justify-content: space-between;
  }

  .bo-user {
    justify-items: start;
  }

  .bo-hero h2 {
    font-size: 30px;
  }

  body.backoffice .stats strong {
    font-size: 30px;
  }

  .bo-date-card {
    min-width: 0;
  }

  .admin-date-nav {
    grid-template-columns: 1fr 1fr;
  }

  .admin-date-nav .bo-date-card {
    grid-column: 1 / -1;
    order: -1;
  }

  .date-step {
    width: 34px;
    height: 34px;
    min-height: 34px;
    justify-self: center;
  }

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

  body.backoffice .settings-tabs {
    top: 128px;
  }
}

/* Polish pass: Thai calendar, customer media, back office readability */
.thai-date-caption {
  display: block;
  margin-top: 2px;
  color: currentColor;
  font-size: 12px;
  font-weight: 850;
  opacity: .82;
}

.booking-month-picker {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(13, 124, 102, .18);
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
}

html[data-theme="dark"] .booking-month-picker {
  border-color: rgba(202, 232, 221, .18);
  background: rgba(9, 27, 35, .96);
  box-shadow: 0 22px 54px rgba(0, 0, 0, .34);
}

.booking-month-picker .admin-month-head,
.booking-month-picker .month-day,
.booking-month-picker .admin-month-week span {
  color: var(--customer-ink);
}

.booking-month-picker .admin-month-head {
  font-size: 16px;
}

.booking-month-picker .admin-month-head a {
  width: 34px;
  height: 34px;
  font-size: 18px;
}

.booking-month-picker .admin-month-week,
.booking-month-picker .admin-month-days {
  gap: 6px;
}

.booking-month-picker .admin-month-week span {
  font-size: 13px;
  font-weight: 900;
}

.booking-month-picker .month-day,
.booking-month-picker .empty-day {
  min-height: 42px;
  border-radius: 10px;
  font-size: 14px;
}

.booking-month-picker .month-day i {
  right: 6px;
  bottom: 6px;
  width: 8px;
  height: 8px;
}

.booking-month-picker .month-day.past {
  color: var(--customer-muted);
}

.booking-month-picker .month-day.free i {
  background: var(--bo-green);
}

.booking-month-picker .month-day.full i {
  background: var(--bo-red);
}

.booking-month-picker .admin-month-legend {
  margin-top: 2px;
  font-size: 11px;
}

body.theme-customer .quick-date-actions a {
  border-color: rgba(13, 124, 102, .30);
  background: rgba(255, 255, 255, .72);
  color: var(--customer-brand-strong);
  box-shadow: inset 0 0 0 1px rgba(13, 124, 102, .08);
}

html[data-theme="dark"] body.theme-customer .quick-date-actions a {
  border-color: rgba(155, 216, 75, .34);
  background: rgba(255, 255, 255, .08);
  color: #eaffba;
}

.facility-rules-block .facility-strip {
  margin-top: 0;
}

body.theme-customer .facility-rules-block .facility-strip span {
  border-color: rgba(13, 124, 102, .26);
  background: rgba(13, 124, 102, .10);
  color: #14342f;
}

html[data-theme="dark"] body.theme-customer .facility-rules-block .facility-strip span {
  border-color: rgba(155, 216, 75, .28);
  background: rgba(155, 216, 75, .10);
  color: #eefbd7;
}

.venue-gallery img[data-lightbox-image] {
  cursor: zoom-in;
}

.image-lightbox {
  display: grid;
  place-items: center;
}

.lightbox-image {
  max-width: min(92vw, 1080px);
  max-height: 78vh;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .32);
}

.nav-icon-customers span::before {
  content: "☻";
}

.bo-nav-link.nav-customers span {
  background: #6d5dd3;
  box-shadow: 0 0 0 4px rgba(109, 93, 211, .12);
}

.bo-nav-link.nav-venues span {
  background: #d9912b;
  box-shadow: 0 0 0 4px rgba(217, 145, 43, .14);
}

.compact-bo-hero {
  min-height: 0;
}

.customer-search {
  display: flex;
  gap: 8px;
  align-items: end;
  min-width: min(440px, 100%);
}

.customer-search input {
  min-width: 0;
}

.customer-admin-panel {
  display: grid;
  gap: 12px;
}

.customer-add-drawer {
  padding: 12px;
  border: 1px solid var(--bo-line);
  border-radius: 8px;
  background: var(--bo-panel);
}

.customer-add-drawer summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--customer-ink);
  font-weight: 900;
}

.customer-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.customer-table-wrap {
  border: 1px solid var(--bo-line);
  border-radius: 8px;
  overflow: auto;
}

.customer-table {
  min-width: 820px;
}

.customer-table td strong,
.customer-table td small {
  display: block;
}

.customer-table td strong {
  color: var(--customer-ink);
}

.customer-table td small {
  margin-top: 3px;
  color: var(--customer-muted);
}

.table-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.table-actions form {
  margin: 0;
}

.staff-manager,
.staff-add-view {
  display: grid;
  gap: 12px;
}

.staff-add-view {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--settings-line);
}

.staff-add-view h3 {
  margin: 0;
  color: var(--settings-ink);
}

.staff-card-head strong {
  color: var(--settings-ink);
}

.facility-add-box {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px max-content;
  gap: 10px;
  align-items: end;
  padding-top: 10px;
  border-top: 1px solid var(--settings-line);
}

.facility-add-box button {
  width: auto;
  min-width: 50px;
  min-height: 36px;
  padding: 7px 12px;
  justify-self: start;
}

.facility-pending small {
  color: var(--settings-muted);
  font-size: 11px;
  font-weight: 800;
}

.venue-save-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--settings-line);
}

.venue-save-button {
  min-width: 190px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 900;
}

html[data-theme="dark"] body.backoffice .facility-remove-button {
  color: #ffd8d8;
  border-color: rgba(255, 138, 138, .34);
  background: rgba(255, 93, 93, .15);
}

body.backoffice .theme-toggle span::before,
body.theme-customer .theme-toggle span::before {
  content: "";
}

body.backoffice .admin-calendar-actions button {
  color: #075f4d;
  border-color: rgba(13, 124, 102, .28);
  background: #ffffff;
}

body.backoffice .admin-calendar-actions button .ui-icon {
  color: #075f4d;
  background: rgba(13, 124, 102, .14);
}

html[data-theme="dark"] body.backoffice .admin-calendar-actions button {
  color: #eaffba;
  border-color: rgba(155, 216, 75, .24);
  background: rgba(255, 255, 255, .08);
}

body.admin-picker-collapsed .admin-month-picker {
  display: none;
}

body.admin-picker-collapsed .admin-quick-dates {
  display: grid;
}

.bo-calendar-hero {
  min-height: 0;
  padding: 10px 14px;
  gap: 12px;
}

.bo-calendar-hero h2 {
  font-size: clamp(22px, 3vw, 34px);
}

.bo-calendar-hero p {
  margin-top: 3px;
}

.bo-calendar-hero .payment-legend {
  margin-top: 7px;
}

body.backoffice .modal,
body.backoffice .modal h2,
body.backoffice .modal label,
body.backoffice .modal .modal-summary,
body.backoffice .modal .muted {
  color: var(--customer-ink);
}

html[data-theme="dark"] body.backoffice .modal {
  background: #0f242d;
  border-color: rgba(202, 232, 221, .20);
}

html[data-theme="dark"] body.backoffice .modal input,
html[data-theme="dark"] body.backoffice .modal select,
html[data-theme="dark"] body.backoffice .modal textarea {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(202, 232, 221, .22);
  color: #f4fff9;
}

html[data-theme="dark"] body.backoffice .modal .modal-summary {
  background: rgba(155, 216, 75, .12);
  border-color: rgba(155, 216, 75, .30);
  color: #eaffba;
}

html[data-theme="dark"] body.backoffice .badge,
html[data-theme="dark"] body.backoffice .panel-title-row h2,
html[data-theme="dark"] body.backoffice .panel-title-row .badge,
html[data-theme="dark"] body.backoffice .permission-role,
html[data-theme="dark"] body.backoffice .permission-role small,
html[data-theme="dark"] body.backoffice .notification-rule-cell label,
html[data-theme="dark"] body.backoffice .notification-rule-cell,
html[data-theme="dark"] body.backoffice .notification-item,
html[data-theme="dark"] body.backoffice .notification-item h2,
html[data-theme="dark"] body.backoffice .notification-item p,
html[data-theme="dark"] body.backoffice .weekday-picker label,
html[data-theme="dark"] body.backoffice .staff-manager .badge {
  color: #f4fff9;
}

html[data-theme="dark"] body.backoffice .permission-head,
html[data-theme="dark"] body.backoffice .permission-role,
html[data-theme="dark"] body.backoffice .permission-cell,
html[data-theme="dark"] body.backoffice .notification-item {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(202, 232, 221, .16);
}

@media (max-width: 860px) {
  .customer-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .booking-filter-form button {
    grid-column: 1 / -1;
  }

  .profile-form,
  .profile-summary {
    grid-template-columns: 1fr;
  }

  .facility-add-box {
    grid-template-columns: 1fr;
  }
}

/* User booking list refinements */
.panel-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.panel-actions form {
  margin: 0;
}

.delete-expired-all-button {
  border-color: rgba(211, 70, 70, .28);
  background: rgba(211, 70, 70, .10);
  color: var(--danger);
}

.page-my-bookings .my-booking-card,
.page-booking-history .my-booking-card {
  grid-template-columns: minmax(0, 1fr) minmax(112px, 150px);
  color: var(--customer-ink);
}

.page-my-bookings .booking-card-meta {
  grid-template-columns: minmax(48px, .55fr) minmax(52px, .5fr) minmax(60px, .65fr) minmax(60px, .65fr);
}

.page-my-bookings .booking-card-meta span,
.page-my-bookings .booking-card-deadline,
.page-booking-history .booking-card-meta span {
  padding: 5px 6px;
}

.page-my-bookings .booking-card-meta span,
.page-my-bookings .booking-card-meta b,
.page-my-bookings .booking-card-deadline b,
.page-booking-history .booking-card-meta span,
.page-booking-history .booking-card-meta b {
  color: var(--customer-muted);
}

.page-my-bookings .booking-card-time strong,
.page-my-bookings .booking-card-deadline strong,
.page-booking-history .booking-card-time strong {
  color: var(--customer-ink);
}

.page-my-bookings .payment-submit-form,
.page-my-bookings .file-mini,
.page-my-bookings .payment-submit-form select,
.page-booking-history .payment-submit-form,
.page-booking-history .file-mini,
.page-booking-history .payment-submit-form select {
  color: var(--customer-ink);
}

html[data-theme="dark"] .page-my-bookings .payment-submit-form,
html[data-theme="dark"] .page-my-bookings .file-mini,
html[data-theme="dark"] .page-my-bookings .payment-submit-form select,
html[data-theme="dark"] .page-my-bookings .booking-card-meta span,
html[data-theme="dark"] .page-my-bookings .booking-card-deadline,
html[data-theme="dark"] .page-booking-history .booking-card-meta span {
  color: #eef9f6;
  background: rgba(255, 255, 255, .07);
  border-color: rgba(202, 232, 221, .16);
}

html[data-theme="dark"] .page-my-bookings .booking-card-meta b,
html[data-theme="dark"] .page-my-bookings .booking-card-deadline b,
html[data-theme="dark"] .page-booking-history .booking-card-meta b {
  color: #c5d8d4;
}

html[data-theme="dark"] .page-my-bookings .booking-card-time strong,
html[data-theme="dark"] .page-my-bookings .booking-card-deadline strong,
html[data-theme="dark"] .page-booking-history .booking-card-time strong {
  color: #f7fff9;
}

html[data-theme="dark"] body.theme-customer .booking-cart,
html[data-theme="dark"] body.theme-customer .booking-cart strong,
html[data-theme="dark"] body.theme-customer .booking-cart .selected-chip,
html[data-theme="dark"] body.theme-customer .booking-cart .selected-chip small {
  color: #f7fff9;
}

html[data-theme="dark"] body.theme-customer .booking-cart form > button,
html[data-theme="dark"] .page-my-bookings .payment-submit-form button {
  background: #9bd84b;
  color: #10242c;
}

html[data-theme="dark"] body.theme-customer .booking-cart .selected-chip {
  background: #2a2630;
  color: #fff4df;
  border-color: rgba(255, 205, 122, .44);
}

html[data-theme="dark"] body.theme-customer .booking-cart .selected-chip small {
  color: #f3d7aa;
}

html[data-theme="dark"] body.backoffice .notification-rule-cell label {
  background: rgba(255, 255, 255, .08);
  border-radius: 6px;
  padding: 4px 6px;
}

html[data-theme="dark"] body.backoffice .promotion-row .badge,
html[data-theme="dark"] body.backoffice #promotions-tab .badge,
html[data-theme="dark"] body.backoffice #staff-tab .badge {
  background: rgba(216, 255, 85, .18);
  border: 1px solid rgba(216, 255, 85, .30);
  color: #f4ffd0;
}

/* Back office table editors */
.management-table-wrap {
  border: 1px solid var(--settings-line);
  border-radius: 8px;
  overflow: auto;
  background: var(--settings-panel);
}

.management-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.management-table .bank-editor {
  display: table-row-group;
  margin: 0;
}

.management-table th,
.management-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--settings-line);
  color: var(--settings-ink);
  text-align: left;
  vertical-align: middle;
}

.management-table th {
  background: color-mix(in srgb, var(--settings-surface) 88%, var(--settings-panel));
  color: var(--settings-muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.management-table td:first-child,
.management-table th:first-child {
  width: 48px;
  text-align: center;
}

.management-table td strong,
.management-table td small {
  display: block;
}

.management-table td small {
  margin-top: 3px;
  color: var(--settings-muted);
  font-size: 11px;
}

.management-summary-row:hover td {
  background: color-mix(in srgb, var(--settings-accent) 8%, transparent);
}

.management-editor-row > td {
  padding: 12px;
  background: color-mix(in srgb, var(--settings-surface) 72%, var(--settings-panel));
}

.management-editor-row[hidden] {
  display: none;
}

.empty-table-cell {
  color: var(--settings-muted);
  font-weight: 800;
  text-align: center !important;
}

/* Dark contrast safety net */
html[data-theme="dark"] body,
html[data-theme="dark"] body.backoffice,
html[data-theme="dark"] body.theme-customer {
  color: #f6fff9;
}

html[data-theme="dark"] body.backoffice .panel,
html[data-theme="dark"] body.backoffice .settings-tab,
html[data-theme="dark"] body.backoffice .bo-hero,
html[data-theme="dark"] body.backoffice .bo-shell,
html[data-theme="dark"] body.backoffice .modal,
html[data-theme="dark"] body.backoffice .management-table-wrap,
html[data-theme="dark"] body.backoffice .staff-row,
html[data-theme="dark"] body.backoffice .bank-row,
html[data-theme="dark"] body.backoffice .promotion-row,
html[data-theme="dark"] body.theme-customer .panel,
html[data-theme="dark"] body.theme-customer .modal,
html[data-theme="dark"] body.theme-customer .my-booking-card,
html[data-theme="dark"] body.theme-customer .venue-info-panel,
html[data-theme="dark"] body.theme-customer .rules-panel {
  color: #f6fff9;
}

html[data-theme="dark"] body.backoffice h1,
html[data-theme="dark"] body.backoffice h2,
html[data-theme="dark"] body.backoffice h3,
html[data-theme="dark"] body.backoffice h4,
html[data-theme="dark"] body.backoffice strong,
html[data-theme="dark"] body.backoffice label,
html[data-theme="dark"] body.backoffice .panel-title-row h2,
html[data-theme="dark"] body.backoffice .management-table td,
html[data-theme="dark"] body.backoffice .management-table td strong,
html[data-theme="dark"] body.backoffice .staff-card-head strong,
html[data-theme="dark"] body.theme-customer h1,
html[data-theme="dark"] body.theme-customer h2,
html[data-theme="dark"] body.theme-customer h3,
html[data-theme="dark"] body.theme-customer strong,
html[data-theme="dark"] body.theme-customer label {
  color: #f7fff9;
}

html[data-theme="dark"] body.backoffice .muted,
html[data-theme="dark"] body.backoffice small,
html[data-theme="dark"] body.backoffice .management-table th,
html[data-theme="dark"] body.backoffice .management-table td small,
html[data-theme="dark"] body.backoffice .help-text,
html[data-theme="dark"] body.theme-customer .muted,
html[data-theme="dark"] body.theme-customer small,
html[data-theme="dark"] body.theme-customer .booking-card-meta b {
  color: #c9ddd8;
}

html[data-theme="dark"] body.backoffice input,
html[data-theme="dark"] body.backoffice select,
html[data-theme="dark"] body.backoffice textarea,
html[data-theme="dark"] body.theme-customer input,
html[data-theme="dark"] body.theme-customer select,
html[data-theme="dark"] body.theme-customer textarea {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(218, 238, 231, .24);
  color: #f7fff9;
}

html[data-theme="dark"] body.backoffice input::placeholder,
html[data-theme="dark"] body.backoffice textarea::placeholder,
html[data-theme="dark"] body.theme-customer input::placeholder,
html[data-theme="dark"] body.theme-customer textarea::placeholder {
  color: rgba(229, 245, 239, .64);
}

html[data-theme="dark"] body.backoffice select option,
html[data-theme="dark"] body.theme-customer select option {
  color: #10242c;
  background: #f7fff9;
}

html[data-theme="dark"] body.backoffice .management-table-wrap,
html[data-theme="dark"] body.backoffice .management-table th,
html[data-theme="dark"] body.backoffice .management-table td {
  border-color: rgba(218, 238, 231, .16);
}

html[data-theme="dark"] body.backoffice .management-table th,
html[data-theme="dark"] body.backoffice .management-editor-row > td,
html[data-theme="dark"] body.backoffice .permission-head,
html[data-theme="dark"] body.backoffice .permission-cell,
html[data-theme="dark"] body.backoffice .permission-role,
html[data-theme="dark"] body.backoffice .notification-rule-cell,
html[data-theme="dark"] body.backoffice .notification-item {
  background: rgba(255, 255, 255, .075);
}

html[data-theme="dark"] body.backoffice .management-summary-row:hover td {
  background: rgba(155, 216, 75, .10);
}

html[data-theme="dark"] body.backoffice .badge,
html[data-theme="dark"] body.theme-customer .badge,
html[data-theme="dark"] body.theme-customer .status-pill {
  background: rgba(155, 216, 75, .17);
  border-color: rgba(155, 216, 75, .32);
  color: #efffbd;
}

html[data-theme="dark"] body.backoffice .ghost,
html[data-theme="dark"] body.theme-customer .ghost,
html[data-theme="dark"] body.backoffice .table-actions button,
html[data-theme="dark"] body.theme-customer .panel-actions a,
html[data-theme="dark"] body.theme-customer .panel-actions button {
  color: #f7fff9;
  border-color: rgba(218, 238, 231, .22);
  background: rgba(255, 255, 255, .08);
}

html[data-theme="dark"] body.backoffice .row-remove-button,
html[data-theme="dark"] body.theme-customer .danger,
html[data-theme="dark"] body.theme-customer .row-remove-button {
  color: #ffd8d8;
  border-color: rgba(255, 138, 138, .34);
  background: rgba(255, 93, 93, .13);
}

/* Global dark-mode readability pass for JS-created UI */
html[data-theme="dark"] .modal-backdrop {
  background: rgba(4, 12, 16, .72);
}

html[data-theme="dark"] .modal,
html[data-theme="dark"] .modal *,
html[data-theme="dark"] .toast,
html[data-theme="dark"] .toast *,
html[data-theme="dark"] .flash,
html[data-theme="dark"] .flash * {
  color: #f7fff9;
}

html[data-theme="dark"] .modal {
  background: #10242c;
  border-color: rgba(218, 238, 231, .22);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .58);
}

html[data-theme="dark"] .modal h2,
html[data-theme="dark"] #modal-title,
html[data-theme="dark"] #modal-body,
html[data-theme="dark"] #modal-body p,
html[data-theme="dark"] #modal-body div,
html[data-theme="dark"] #modal-body label,
html[data-theme="dark"] #modal-body strong {
  color: #f7fff9;
}

html[data-theme="dark"] .modal .muted,
html[data-theme="dark"] .modal small,
html[data-theme="dark"] #modal-body .muted,
html[data-theme="dark"] #modal-body small {
  color: #c9ddd8;
}

html[data-theme="dark"] .modal-summary,
html[data-theme="dark"] #modal-body .modal-summary {
  background: rgba(155, 216, 75, .13);
  border-color: rgba(155, 216, 75, .34);
  color: #f2ffc8;
}

html[data-theme="dark"] .modal-close,
html[data-theme="dark"] .modal-actions button,
html[data-theme="dark"] #modal-body button {
  color: #f7fff9;
  border-color: rgba(218, 238, 231, .24);
  background: rgba(255, 255, 255, .10);
}

html[data-theme="dark"] .modal-actions button:hover,
html[data-theme="dark"] #modal-body button:hover {
  background: rgba(255, 255, 255, .16);
}

html[data-theme="dark"] .modal-actions .danger,
html[data-theme="dark"] #modal-body .danger,
html[data-theme="dark"] .modal button.danger {
  color: #ffe1e1;
  border-color: rgba(255, 135, 135, .42);
  background: rgba(225, 80, 80, .22);
}

html[data-theme="dark"] .modal-actions .ghost,
html[data-theme="dark"] #modal-body .ghost,
html[data-theme="dark"] .modal button.ghost {
  color: #eaf8f3;
  border-color: rgba(218, 238, 231, .22);
  background: rgba(255, 255, 255, .08);
}

html[data-theme="dark"] .modal input,
html[data-theme="dark"] .modal select,
html[data-theme="dark"] .modal textarea {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(218, 238, 231, .24);
  color: #f7fff9;
}

html[data-theme="dark"] .modal input::placeholder,
html[data-theme="dark"] .modal textarea::placeholder {
  color: rgba(229, 245, 239, .64);
}

html[data-theme="dark"] .toast {
  background: #10242c;
  border-color: rgba(218, 238, 231, .20);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .45);
}

html[data-theme="dark"] .toast.success,
html[data-theme="dark"] .flash.success {
  background: rgba(77, 176, 126, .18);
  border-color: rgba(126, 226, 173, .32);
  color: #dcffe9;
}

html[data-theme="dark"] .toast.danger,
html[data-theme="dark"] .flash.danger {
  background: rgba(225, 80, 80, .18);
  border-color: rgba(255, 135, 135, .34);
  color: #ffe1e1;
}

html[data-theme="dark"] .flash.warning {
  background: rgba(238, 180, 77, .18);
  border-color: rgba(255, 214, 130, .34);
  color: #fff2cf;
}

html[data-theme="dark"] table,
html[data-theme="dark"] table td,
html[data-theme="dark"] table th {
  color: #f7fff9;
}

html[data-theme="dark"] .slip-preview-button,
html[data-theme="dark"] .slip-thumb-button {
  color: #f7fff9;
  border-color: rgba(218, 238, 231, .22);
  background: rgba(255, 255, 255, .09);
}

html[data-theme="dark"] .payment-review-table td small {
  color: #c9ddd8;
}

/* Current request refinements */
.quick-date-actions a.active,
.admin-quick-dates a.active {
  border-color: #0d7c66;
  background: #0d7c66;
  color: #fff;
  box-shadow: 0 8px 20px rgba(13, 124, 102, .20);
}

html[data-theme="dark"] .quick-date-actions a.active,
html[data-theme="dark"] .admin-quick-dates a.active {
  border-color: #9bd84b;
  background: #9bd84b;
  color: #10242c;
}

.admin-calendar-toolbar {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: start;
  gap: 8px;
  margin: -8px 0 10px;
  padding: 8px;
  border: 1px solid var(--bo-line);
  border-radius: 8px;
  background: var(--bo-panel);
  box-shadow: 0 10px 28px rgba(31, 44, 36, .07);
}

.admin-calendar-toolbar .bo-date-card {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.admin-calendar-toolbar .bo-date-card label,
.admin-calendar-toolbar .bo-date-card input[type="date"] {
  min-width: 0;
  width: 100%;
  max-width: 220px;
}

.admin-calendar-toolbar .admin-quick-dates {
  display: flex;
  flex-wrap: nowrap;
  align-items: end;
  gap: 6px;
}

.admin-calendar-toolbar .admin-quick-dates a,
.admin-calendar-toolbar .admin-quick-dates button {
  min-height: 26px;
  padding: 3px 6px;
  border: 1px solid var(--bo-line);
  border-radius: 8px;
  background: var(--bo-panel-strong);
  color: var(--customer-brand-strong);
  font-size: 10px;
  font-weight: 900;
}

.admin-calendar-toolbar .admin-month-picker {
  position: absolute;
  z-index: 18;
  top: calc(100% + 6px);
  right: 0;
  width: min(330px, calc(100vw - 40px));
  box-shadow: 0 18px 46px rgba(31, 44, 36, .18);
}

.admin-calendar-toolbar .bo-date-card {
  position: relative;
}

body.admin-picker-collapsed .admin-calendar-toolbar .admin-month-picker {
  display: none;
}

.topbar-icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--bo-line);
  border-radius: 999px;
  background: var(--bo-panel-strong);
  color: var(--customer-brand-strong);
}

.bo-nav-link span,
.bo-sidebar-foot .ui-icon {
  width: 25px;
  height: 25px;
  font-size: 17px;
}

.sidebar-theme-toggle,
.customer-theme-icon {
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
}

.sidebar-theme-toggle span,
.customer-theme-icon span {
  width: 20px;
  overflow: hidden;
  color: transparent;
}

.sidebar-theme-toggle span::before,
.customer-theme-icon span::before {
  content: "☾";
  color: currentColor;
  font-size: 18px;
}

html[data-theme="dark"] .sidebar-theme-toggle span::before,
html[data-theme="dark"] .customer-theme-icon span::before {
  content: "☀";
}

.theme-toggle {
  position: relative;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
}

.theme-toggle span {
  color: transparent;
  font-size: 0;
}

.theme-toggle span::before {
  content: "☾";
  display: inline-grid;
  place-items: center;
  width: 1.25em;
  height: 1.25em;
  color: currentColor;
  font-size: 17px;
  line-height: 1;
}

html[data-theme="dark"] .theme-toggle span::before {
  content: "☀";
}

.booking-filter-form-compact {
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) minmax(170px, .9fr) minmax(140px, .65fr) minmax(140px, .65fr) auto;
  align-items: end;
  gap: 10px;
}

.booking-filter-form-compact select[multiple] {
  min-height: 92px;
}

.venue-contact-card {
  display: grid;
  gap: 10px;
  margin: -6px 0 14px;
  padding: 13px;
  border: 1px solid var(--customer-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 12px 34px rgba(31, 44, 36, .08);
}

.venue-contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.venue-contact-strip span,
.venue-map-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--customer-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .76);
  color: var(--customer-ink);
  font-size: 12px;
  font-weight: 850;
}

.venue-map-button {
  cursor: pointer;
}

.map-modal-frame {
  display: grid;
  gap: 10px;
}

.map-modal-frame iframe {
  width: min(760px, 78vw);
  height: min(460px, 70vh);
  border: 0;
  border-radius: 8px;
  background: #eef5f1;
}

.map-setting-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

@media (max-width: 1180px) {
  body.backoffice .promotion-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.backoffice .promotion-row label:nth-of-type(6),
  body.backoffice .promotion-row label:nth-of-type(7) {
    grid-column: span 1;
  }
}

@media (max-width: 720px) {
  .map-setting-box {
    grid-template-columns: 1fr;
  }
}

html[data-theme="dark"] .venue-contact-card {
  background: rgba(255, 255, 255, .08);
  color: #f7fff9;
  border-color: rgba(218, 238, 231, .18);
}

.topbar-login-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 180px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--customer-line);
  border-radius: 999px;
  color: var(--customer-ink);
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme="dark"] .topbar-login-name {
  border-color: rgba(218, 238, 231, .18);
  color: #f7fff9;
  background: rgba(255, 255, 255, .07);
}

html[data-theme="dark"] .venue-contact-strip span,
html[data-theme="dark"] .venue-map-button {
  background: rgba(255, 255, 255, .08);
  color: #f7fff9;
  border-color: rgba(218, 238, 231, .18);
}

html[data-theme="dark"] .page-my-bookings .booking-card-deadline {
  background: #fff0a6;
  border-color: #f1cc45;
  color: #623900;
}

html[data-theme="dark"] .page-my-bookings .booking-card-deadline b {
  color: #765000;
}

html[data-theme="dark"] .page-my-bookings .booking-card-deadline strong,
html[data-theme="dark"] .page-my-bookings .booking-card-deadline .payment-countdown {
  color: #c51616;
}

@media (max-width: 1180px) {
  .admin-calendar-toolbar .bo-date-card {
    grid-template-columns: minmax(140px, 170px) minmax(0, 1fr);
  }

  .admin-calendar-toolbar .admin-quick-dates a,
  .admin-calendar-toolbar .admin-quick-dates button {
    padding: 3px 5px;
  }

  .booking-filter-form-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking-filter-form-compact button {
    justify-self: start;
  }
}

@media (max-width: 820px) {
  .admin-calendar-toolbar {
    grid-template-columns: 28px minmax(0, 1fr) 28px;
  }

  .admin-calendar-toolbar .bo-date-card {
    grid-template-columns: 1fr;
  }

  .booking-filter-form-compact {
    grid-template-columns: 1fr;
  }
}

/* Final theme toggle override: force icon-only moon/sun buttons everywhere. */
.theme-toggle,
.top-theme-toggle,
.sidebar-theme-toggle,
.customer-theme-icon,
body.theme-customer .theme-toggle,
body.theme-management .theme-toggle,
body.backoffice .theme-toggle,
.page-settings .theme-toggle {
  position: relative !important;
  display: inline-grid !important;
  place-items: center !important;
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  line-height: 1 !important;
}

.theme-toggle span,
.top-theme-toggle span,
.sidebar-theme-toggle span,
.customer-theme-icon span,
.theme-toggle [data-theme-label],
.top-theme-toggle [data-theme-label],
.sidebar-theme-toggle [data-theme-label],
.customer-theme-icon [data-theme-label] {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  color: transparent !important;
  font-size: 0 !important;
  text-indent: -9999px !important;
  white-space: nowrap !important;
}

.theme-toggle span::before,
.top-theme-toggle span::before,
.sidebar-theme-toggle span::before,
.customer-theme-icon span::before,
body.backoffice .theme-toggle span::before,
body.theme-customer .theme-toggle span::before {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  display: block !important;
  width: 19px !important;
  height: 19px !important;
  background: currentColor !important;
  color: inherit !important;
  transform: translate(-50%, -50%) !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2.4'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%2012.8A8.5%208.5%200%201%201%2011.2%203a7%207%200%200%200%209.8%209.8Z'/%3E%3C/svg%3E") center / contain no-repeat !important;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2.4'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%2012.8A8.5%208.5%200%201%201%2011.2%203a7%207%200%200%200%209.8%209.8Z'/%3E%3C/svg%3E") center / contain no-repeat !important;
  text-indent: 0 !important;
}

html[data-theme="dark"] .theme-toggle span::before,
html[data-theme="dark"] .top-theme-toggle span::before,
html[data-theme="dark"] .sidebar-theme-toggle span::before,
html[data-theme="dark"] .customer-theme-icon span::before,
html[data-theme="dark"] body.backoffice .theme-toggle span::before,
html[data-theme="dark"] body.theme-customer .theme-toggle span::before {
  width: 20px !important;
  height: 20px !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2.4'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='4'/%3E%3Cpath%20d='M12%202v2M12%2020v2M4.93%204.93l1.41%201.41M17.66%2017.66l1.41%201.41M2%2012h2M20%2012h2M4.93%2019.07l1.41-1.41M17.66%206.34l1.41-1.41'/%3E%3C/svg%3E") center / contain no-repeat !important;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2.4'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='4'/%3E%3Cpath%20d='M12%202v2M12%2020v2M4.93%204.93l1.41%201.41M17.66%2017.66l1.41%201.41M2%2012h2M20%2012h2M4.93%2019.07l1.41-1.41M17.66%206.34l1.41-1.41'/%3E%3C/svg%3E") center / contain no-repeat !important;
}

/* Theme toggle hard fix: no text, real visible icon, sidebar only in back office. */
.theme-toggle span,
.theme-toggle span::before {
  display: none !important;
}

.theme-toggle::before {
  content: "☾" !important;
  display: block !important;
  color: currentColor !important;
  font-size: 21px !important;
  line-height: 1 !important;
  text-indent: 0 !important;
}

html[data-theme="dark"] .theme-toggle::before {
  content: "☀" !important;
}

body.backoffice .bo-topbar .theme-toggle {
  display: none !important;
}

.bo-sidebar-foot .sidebar-theme-toggle {
  flex: 0 0 38px !important;
  margin-right: 2px;
}

/* Admin calendar compact date controls. */
.admin-calendar-toolbar {
  grid-template-columns: 26px minmax(0, max-content) 26px !important;
  justify-content: start !important;
  align-items: start !important;
  gap: 6px !important;
  padding: 6px !important;
}

.admin-calendar-toolbar .bo-date-card {
  grid-template-columns: 146px 174px !important;
  width: auto !important;
  max-width: calc(100vw - 110px) !important;
  gap: 6px !important;
}

.admin-calendar-toolbar .bo-date-card input[type="date"] {
  max-width: 146px !important;
  height: 30px !important;
  min-height: 30px !important;
  font-size: 11px !important;
}

.admin-calendar-toolbar .admin-quick-dates {
  display: grid !important;
  grid-template-columns: 34px 42px 42px 34px !important;
  width: 164px !important;
  min-width: 164px !important;
  gap: 4px !important;
  align-self: end !important;
}

.admin-calendar-toolbar .admin-quick-dates a,
.admin-calendar-toolbar .admin-quick-dates button {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 !important;
  justify-content: center !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  font-size: 10px !important;
  line-height: 1 !important;
}

.admin-calendar-toolbar .date-step {
  width: 26px !important;
  height: 28px !important;
  min-height: 28px !important;
  font-size: 16px !important;
}

.admin-calendar-toolbar .admin-month-picker {
  left: 0 !important;
  right: auto !important;
  top: calc(100% + 5px) !important;
}

@media (max-width: 900px) {
  .admin-calendar-toolbar {
    grid-template-columns: 24px minmax(0, 1fr) 24px !important;
  }

  .admin-calendar-toolbar .bo-date-card {
    grid-template-columns: minmax(118px, 136px) 152px !important;
    max-width: calc(100vw - 92px) !important;
  }

  .admin-calendar-toolbar .admin-quick-dates {
    grid-template-columns: 30px 38px 38px 30px !important;
    width: 148px !important;
    min-width: 148px !important;
  }
}

/* Latest layout pass: admin calendar controls live inside the top summary card. */
.bo-calendar-hero {
  display: grid !important;
  grid-template-columns: minmax(230px, 1fr) auto !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 0 !important;
  padding: 10px 12px !important;
}

.bo-calendar-summary {
  min-width: 0;
}

.bo-calendar-summary p {
  margin: 0;
}

.bo-calendar-hero .payment-legend {
  margin-top: 6px;
}

.bo-calendar-hero .admin-calendar-toolbar {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 28px minmax(0, max-content) 28px !important;
  justify-content: end !important;
  align-items: end !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  gap: 8px !important;
}

.bo-calendar-hero .admin-calendar-toolbar .date-step {
  width: 28px !important;
  min-width: 28px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  font-size: 18px !important;
}

.bo-calendar-hero .admin-calendar-toolbar .bo-date-card {
  display: grid !important;
  grid-template-columns: 170px 314px !important;
  align-items: end !important;
  width: auto !important;
  max-width: none !important;
  gap: 8px !important;
}

.bo-calendar-hero .admin-calendar-toolbar .bo-date-card label {
  min-width: 0 !important;
}

.bo-calendar-hero .admin-calendar-toolbar .bo-date-card input[type="date"] {
  width: 170px !important;
  max-width: 170px !important;
  height: 30px !important;
  min-height: 30px !important;
  font-size: 11px !important;
}

.bo-calendar-hero .admin-calendar-toolbar .admin-quick-dates {
  display: grid !important;
  grid-template-columns: 76px 56px 76px 82px !important;
  width: 314px !important;
  min-width: 314px !important;
  gap: 6px !important;
}

.bo-calendar-hero .admin-calendar-toolbar .admin-quick-dates a,
.bo-calendar-hero .admin-calendar-toolbar .admin-quick-dates button {
  width: 100% !important;
  min-width: 0 !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 8px !important;
  overflow: visible !important;
  color: inherit !important;
  font-size: 11px !important;
  line-height: 1 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

.bo-calendar-hero .admin-calendar-toolbar .admin-month-picker {
  left: auto !important;
  right: 0 !important;
  top: calc(100% + 8px) !important;
}

.booking-filter-form-compact {
  grid-template-columns: minmax(220px, 1.4fr) minmax(190px, 1fr) minmax(164px, .75fr) minmax(164px, .75fr) auto !important;
}

.booking-filter-form-compact label {
  min-width: 0;
}

.booking-filter-form-compact input[type="date"],
.booking-filter-form-compact input[type="search"],
.booking-filter-form-compact input[type="text"],
.booking-filter-form-compact select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

body.theme-customer .topbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  min-height: 58px;
  padding: 10px 18px;
  overflow: visible;
}

body.theme-customer .topbar .brand {
  flex: 0 0 auto;
  white-space: nowrap;
}

body.theme-customer .topbar nav {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

body.theme-customer .topbar nav::-webkit-scrollbar {
  display: none;
}

body.theme-customer .topbar nav a,
body.theme-customer .topbar nav button,
body.theme-customer .topbar-login-name {
  flex: 0 0 auto;
}

.page-booking .booking-cart {
  top: 70px;
  z-index: 9;
}

.page-booking .booking-cart.collapsed {
  top: 70px;
}

.page-booking .booking-date-card {
  grid-template-columns: minmax(170px, 220px) auto;
  align-items: end;
  gap: 14px;
}

.page-booking .booking-date-card label {
  min-width: 0;
}

.page-booking .booking-date-card input[type="date"] {
  width: 100%;
  min-width: 170px;
}

.page-booking .booking-date-card .quick-date-actions {
  flex-wrap: nowrap;
  margin-left: 10px;
}

@media (max-width: 1180px) {
  .bo-calendar-hero {
    grid-template-columns: 1fr !important;
  }

  .bo-calendar-hero .admin-calendar-toolbar {
    justify-content: start !important;
    max-width: 100%;
  }

  .booking-filter-form-compact {
    grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
  }

  .booking-filter-form-compact button {
    justify-self: start;
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
  .page-booking .booking-hero {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
  }

  .page-booking .booking-date-card {
    grid-template-columns: minmax(176px, 1fr) auto;
    gap: 16px;
  }

  .page-booking .booking-date-card .quick-date-actions {
    margin-left: 16px;
  }
}

@media (max-width: 900px) {
  .bo-calendar-hero .admin-calendar-toolbar {
    grid-template-columns: 26px minmax(0, 1fr) 26px !important;
  }

  .bo-calendar-hero .admin-calendar-toolbar .bo-date-card {
    grid-template-columns: minmax(145px, 170px) minmax(284px, 1fr) !important;
    max-width: calc(100vw - 110px) !important;
  }

  .bo-calendar-hero .admin-calendar-toolbar .bo-date-card input[type="date"] {
    width: 100% !important;
    max-width: none !important;
  }

  .bo-calendar-hero .admin-calendar-toolbar .admin-quick-dates {
    grid-template-columns: 68px 52px 68px 74px !important;
    width: 284px !important;
    min-width: 284px !important;
  }
}

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

  body.theme-customer .topbar {
    gap: 10px;
    padding-inline: 12px;
  }

  body.theme-customer .topbar .brand {
    font-size: 18px;
  }

  .page-booking .booking-date-card {
    grid-template-columns: 1fr;
  }

  .page-booking .booking-date-card .quick-date-actions {
    margin-left: 0;
  }
}

/* Back office sidebar/topbar spacing pass. */
body.backoffice .bo-sidebar {
  gap: 9px;
  padding: 12px;
}

body.backoffice .bo-sidebar-toggle {
  width: 34px;
  min-height: 34px;
}

body.backoffice .bo-brand {
  padding: 7px 8px;
}

body.backoffice .bo-brand strong {
  font-size: 19px;
}

body.backoffice .bo-brand small {
  font-size: 11px;
}

body.backoffice .bo-venue-select {
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.backoffice .bo-venue-select form {
  margin: 0;
}

body.backoffice .bo-venue-select select {
  width: 100%;
  min-height: 34px;
  padding: 6px 30px 6px 10px;
  font-size: 12px;
  font-weight: 850;
  border-radius: 8px;
}

body.backoffice .bo-nav {
  gap: 4px;
}

body.backoffice .bo-nav-link {
  min-height: 37px;
  gap: 8px;
  padding: 6px 9px;
  font-size: 13px;
}

body.backoffice .bo-nav-link span,
body.backoffice .bo-sidebar-foot .ui-icon {
  width: 24px;
  height: 24px;
  font-size: 15px;
  box-shadow: 0 0 0 3px rgba(13, 124, 102, .09);
}

body.backoffice .bo-nav-link.active::after {
  inset: 7px auto 7px 0;
}

body.backoffice .bo-nav-link b {
  min-width: 20px;
  padding: 2px 6px;
  font-size: 10px;
}

body.backoffice .bo-sidebar-foot {
  gap: 5px;
}

body.backoffice .bo-sidebar-foot a {
  min-height: 36px;
  gap: 7px;
  padding: 7px 9px;
  font-size: 12px;
}

body.backoffice .bo-topbar .bo-theme-toggle {
  display: inline-grid !important;
  flex: 0 0 38px !important;
  color: var(--customer-brand-strong);
  background: var(--bo-panel-strong);
  border-color: rgba(13, 124, 102, .24);
  box-shadow: 0 8px 22px rgba(15, 23, 18, .08);
}

html[data-theme="dark"] body.backoffice .bo-topbar .bo-theme-toggle {
  color: #9bd84b;
  background: rgba(255, 255, 255, .10);
  border-color: rgba(155, 216, 75, .34);
}

body.backoffice .bo-sidebar-foot .sidebar-theme-toggle {
  display: none !important;
}

body.backoffice .topbar-icon-button {
  width: 40px;
  height: 40px;
  color: #fff;
  border-color: rgba(13, 124, 102, .35);
  background: linear-gradient(135deg, #0d7c66, #2978d0);
  box-shadow: 0 10px 24px rgba(13, 124, 102, .22);
}

body.backoffice .topbar-icon-button .ui-icon {
  width: 26px;
  height: 26px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

html[data-theme="dark"] body.backoffice .topbar-icon-button {
  color: #10242c;
  border-color: rgba(155, 216, 75, .45);
  background: linear-gradient(135deg, #9bd84b, #26c6a4);
  box-shadow: 0 10px 26px rgba(155, 216, 75, .18);
}

html[data-theme="dark"] body.backoffice .topbar-icon-button .ui-icon {
  background: rgba(7, 21, 28, .16);
  color: #10242c;
}

body.backoffice .bo-shell.sidebar-collapsed .bo-nav-link {
  min-height: 39px;
  padding: 6px;
}

body.backoffice .bo-shell.sidebar-collapsed .bo-sidebar-foot a {
  width: 38px;
  min-height: 36px;
}

@media (max-width: 980px) {
  body.backoffice .bo-sidebar {
    gap: 8px;
    padding: 10px 12px;
  }

  body.backoffice .bo-nav-link {
    min-height: 36px;
    padding: 6px 9px;
  }
}

/* Customer booking layout: hero contact, centered date picker, and phone-only slots. */
.page-booking .booking-hero {
  grid-template-columns: 1fr !important;
  align-items: stretch;
}

.page-booking .booking-hero-copy {
  max-width: none;
}

.hero-contact-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin-top: 12px;
  padding-top: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.hero-contact-strip span,
.hero-contact-strip .venue-map-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #e9fbf5;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.hero-contact-strip .ui-icon {
  background: rgba(255, 255, 255, .16);
  color: inherit;
}

body.theme-customer .hero-contact-strip span,
body.theme-customer .hero-contact-strip .venue-map-button {
  border-color: var(--customer-line);
  background: rgba(255, 255, 255, .68);
  color: var(--customer-ink);
}

.page-booking .booking-hero.has-venue-media .hero-contact-strip span,
.page-booking .booking-hero.has-venue-media .hero-contact-strip .venue-map-button,
html[data-theme="dark"] body.theme-customer .hero-contact-strip span,
html[data-theme="dark"] body.theme-customer .hero-contact-strip .venue-map-button {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .12);
  color: #f7fff9;
}

.booking-date-row {
  display: flex;
  justify-content: center;
  margin: 12px auto 8px;
}

.booking-date-row .booking-date-card {
  width: min(560px, calc(100% - 28px));
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.booking-date-row .booking-date-card .quick-date-actions {
  flex-wrap: nowrap;
  margin-left: 0;
}

.page-booking .slot.phone-only {
  display: grid !important;
  grid-auto-flow: row !important;
  grid-auto-columns: auto !important;
  grid-template-rows: auto auto;
  align-content: center;
  justify-items: center;
  gap: 2px;
  min-height: 52px;
  text-align: center;
}

.page-booking .slot.phone-only span {
  font-weight: 950;
  line-height: 1.1;
}

.page-booking .slot.phone-only small,
.page-booking .availability-row.phone-only strong {
  display: block !important;
  color: inherit !important;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.page-booking .availability-row.phone-only {
  grid-template-columns: 1fr !important;
  justify-items: center;
  gap: 2px;
  min-height: 54px;
  text-align: center;
}

.page-booking .availability-row.phone-only span,
.page-booking .availability-row.phone-only strong {
  justify-self: center;
}

@media (max-width: 760px) {
  .booking-date-row .booking-date-card {
    grid-template-columns: 1fr;
    width: min(420px, calc(100% - 24px));
  }

  .hero-contact-strip {
    margin-inline: -2px;
  }
}

/* Admin calendar header final layout: controls row, legend row, tiny summary tags. */
body.backoffice .topbar-icon-button,
body.backoffice .topbar-icon-button .ui-icon {
  display: inline-grid !important;
  place-items: center !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 0 !important;
  text-align: center !important;
}

body.backoffice .topbar-icon-button .ui-icon {
  margin: 0 !important;
  line-height: 1 !important;
  transform: none !important;
}

.bo-calendar-hero {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  justify-items: center !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 0 !important;
  padding: 12px 150px 11px !important;
}

.admin-calendar-tags {
  position: absolute;
  top: 8px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.admin-calendar-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 8px;
  border: 1px solid rgba(13, 124, 102, .30);
  border-radius: 999px;
  background: rgba(13, 124, 102, .09);
  color: var(--customer-brand-strong);
  font-size: 11px;
  font-weight: 950;
  text-transform: none;
}

html[data-theme="dark"] .admin-calendar-tags span {
  border-color: rgba(155, 216, 75, .34);
  background: rgba(155, 216, 75, .12);
  color: #dfff9f;
}

.bo-calendar-hero .admin-calendar-toolbar {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 34px minmax(250px, 360px) 34px !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 8px !important;
  width: min(460px, 100%) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.bo-calendar-hero .admin-calendar-toolbar .date-step {
  display: inline-grid !important;
  place-items: center !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  font-size: 21px !important;
  line-height: 1 !important;
}

.bo-calendar-hero .admin-calendar-toolbar .bo-date-card {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(150px, 1fr) 112px !important;
  align-items: center !important;
  width: 100% !important;
  max-width: none !important;
  gap: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.bo-calendar-hero .admin-calendar-toolbar .bo-date-card label {
  display: block !important;
  min-width: 0 !important;
}

.bo-calendar-hero .admin-calendar-toolbar .bo-date-card input[type="date"] {
  width: 100% !important;
  max-width: none !important;
  height: 34px !important;
  min-height: 34px !important;
  font-size: 12px !important;
}

.bo-calendar-hero .admin-picker-toggle {
  width: 112px !important;
  min-width: 112px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

.bo-calendar-hero .admin-calendar-legend {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin: 0 !important;
}

.bo-calendar-hero .admin-calendar-legend span {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 11px;
}

.bo-calendar-hero .admin-calendar-toolbar .admin-month-picker {
  left: 50% !important;
  right: auto !important;
  top: calc(100% + 8px) !important;
  transform: translateX(-50%);
}

@media (max-width: 980px) {
  .bo-calendar-hero {
    padding: 44px 10px 10px !important;
  }

  .admin-calendar-tags {
    left: 10px;
    right: 10px;
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .bo-calendar-hero .admin-calendar-toolbar {
    grid-template-columns: 32px minmax(0, 1fr) 32px !important;
    width: 100% !important;
  }

  .bo-calendar-hero .admin-calendar-toolbar .bo-date-card {
    grid-template-columns: minmax(0, 1fr) 104px !important;
  }

  .bo-calendar-hero .admin-picker-toggle {
    width: 104px !important;
    min-width: 104px !important;
    padding-inline: 6px !important;
  }
}

/* Customer booking refinements: cart contrast, trash icon, centered date card. */
.booking-date-row {
  margin-top: 14px;
  margin-bottom: 12px;
}

.booking-date-row .booking-date-card {
  display: grid !important;
  grid-template-columns: 1fr !important;
  justify-items: center;
  width: min(500px, calc(100% - 28px));
  gap: 10px;
  padding: 16px 18px;
  border-color: rgba(13, 124, 102, .24);
  background:
    linear-gradient(135deg, rgba(13, 124, 102, .14), rgba(217, 145, 43, .10)),
    rgba(255, 255, 255, .90);
  box-shadow: 0 16px 42px rgba(13, 36, 30, .12);
  text-align: center;
}

.booking-date-row .booking-date-card label {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(280px, 100%);
  color: var(--customer-ink);
}

.booking-date-row .date-card-title {
  display: block;
  color: var(--customer-brand-strong);
  font-size: 16px;
  font-weight: 950;
  line-height: 1.2;
}

.booking-date-row .booking-date-card input[type="date"] {
  width: min(240px, 100%);
  min-width: 0;
  height: 38px;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
}

.booking-date-row .booking-date-card .quick-date-actions {
  justify-content: center;
  margin-left: 0 !important;
}

html[data-theme="dark"] body.theme-customer .booking-date-row .booking-date-card {
  border-color: rgba(155, 216, 75, .32);
  background:
    linear-gradient(135deg, rgba(38, 198, 164, .18), rgba(155, 216, 75, .12)),
    rgba(12, 37, 50, .96);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] body.theme-customer .booking-date-row .date-card-title {
  color: #dfff9f;
}

.cart-clear-button {
  display: none !important;
}

.selected-chip .cart-trash-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(211, 70, 70, .12);
  color: #c92f2f;
}

.selected-chip .cart-trash-icon::before {
  content: "";
  display: block;
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%206h18'/%3E%3Cpath%20d='M8%206V4h8v2'/%3E%3Cpath%20d='M19%206l-1%2014H6L5%206'/%3E%3Cpath%20d='M10%2011v5'/%3E%3Cpath%20d='M14%2011v5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%206h18'/%3E%3Cpath%20d='M8%206V4h8v2'/%3E%3Cpath%20d='M19%206l-1%2014H6L5%206'/%3E%3Cpath%20d='M10%2011v5'/%3E%3Cpath%20d='M14%2011v5'/%3E%3C/svg%3E") center / contain no-repeat;
}

html[data-theme="dark"] body.theme-customer .booking-cart .selected-chip {
  background: #332719;
  color: #fff8dc;
  border-color: rgba(255, 211, 122, .58);
}

html[data-theme="dark"] body.theme-customer .booking-cart .selected-chip strong {
  color: #fffbe8;
}

html[data-theme="dark"] body.theme-customer .booking-cart .selected-chip small {
  color: #ffd98a;
  opacity: 1;
}

html[data-theme="dark"] body.theme-customer .booking-cart .selected-chip .cart-trash-icon {
  background: rgba(255, 111, 125, .18);
  color: #ff9ba7;
}

.page-booking .booking-hero {
  grid-template-columns: minmax(0, 1fr) minmax(310px, 420px) !important;
  align-items: stretch !important;
}

.hero-gallery-wrap {
  display: grid;
  align-items: center;
}

.hero-venue-gallery {
  margin-top: 0 !important;
  grid-template-columns: 1.15fr 1fr 1fr;
  grid-auto-rows: 78px;
  align-content: start;
}

.hero-venue-gallery img {
  height: 100% !important;
}

.hero-venue-gallery img:first-child {
  grid-row: span 2;
  min-height: 164px;
}

.booking-date-row {
  width: 100%;
  margin: 14px 0 12px;
}

.booking-date-row .booking-date-card {
  position: relative;
  display: grid !important;
  grid-template-columns: max-content minmax(220px, 1fr) max-content !important;
  align-items: center;
  justify-items: stretch;
  width: 100% !important;
  max-width: none !important;
  gap: 10px;
  padding: 14px 16px;
  text-align: left;
}

.booking-date-row .date-card-title {
  display: inline-flex;
  align-items: center;
  color: var(--customer-brand-strong);
  font-size: 16px;
  font-weight: 950;
  line-height: 1.2;
  white-space: nowrap;
}

.booking-picker-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--customer-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  color: var(--customer-ink);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.booking-date-row .booking-date-quick {
  justify-content: flex-end;
  flex-wrap: nowrap;
  margin-left: 0 !important;
}

.booking-date-row .booking-date-quick a {
  gap: 7px;
}

.booking-date-row .booking-date-quick a.active {
  border-color: #0d7c66;
  background: #0d7c66;
  color: #fff;
}

html[data-theme="dark"] .booking-date-row .booking-date-quick a.active {
  border-color: #9bd84b;
  background: #9bd84b;
  color: #10242c;
}

.booking-date-row .booking-month-picker {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 12;
  width: min(420px, calc(100vw - 32px));
  transform: translateX(-50%);
  box-shadow: 0 24px 56px rgba(31, 44, 36, .22);
}

body.booking-picker-collapsed .booking-date-row .booking-month-picker {
  display: none;
}

html[data-theme="dark"] body.theme-customer .booking-picker-toggle {
  border-color: rgba(202, 232, 221, .18);
  background: rgba(255, 255, 255, .08);
  color: #f7fff9;
}

@media (max-width: 760px) {
  .page-booking .booking-hero {
    grid-template-columns: 1fr !important;
  }

  .hero-gallery-wrap {
    order: 2;
  }

  .booking-date-row .booking-date-card {
    grid-template-columns: 1fr !important;
    justify-items: center;
    text-align: center;
  }

  .booking-date-row .booking-date-quick {
    justify-content: center;
  }
}

/* Admin calendar uses a date-label button instead of a native date input. */
.bo-calendar-hero .admin-calendar-toolbar {
  grid-template-columns: 34px minmax(220px, 300px) 34px !important;
  width: min(390px, 100%) !important;
}

.bo-calendar-hero .admin-calendar-toolbar .bo-date-card {
  grid-template-columns: 1fr !important;
  width: 100% !important;
}

.bo-calendar-hero .admin-picker-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100% !important;
  min-width: 0 !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
}

.bo-calendar-hero .admin-picker-toggle .ui-icon {
  width: 20px;
  height: 20px;
  font-size: 12px;
}

@media (max-width: 560px) {
  .bo-calendar-hero .admin-calendar-toolbar {
    grid-template-columns: 32px minmax(0, 1fr) 32px !important;
  }
}
