/*! Foot Relief Privé — brand shell (fonts loaded via <link> in base.html) */

:root {
  --spa-sidebar-width: 248px;
  --spa-gold: #d4af37;
  --spa-gold-soft: #e8c96a;
  --spa-gold-deep: #a8872a;
  --spa-bg: #070b09;
  --spa-bg-elevated: #0d1411;
  --spa-surface: rgba(18, 28, 24, 0.88);
  --spa-surface-solid: #121c18;
  --spa-text: #f3efe4;
  --spa-muted: #9aa89f;
  --spa-border: rgba(212, 175, 55, 0.22);
  --spa-success: #3d9b6a;
  --spa-danger: #c45c5c;
  --spa-warn: #d4a017;
  --spa-info: #6a9fb5;
  --spa-radius: 0.85rem;
  --spa-serif: "Cormorant Garamond", Georgia, serif;
  --spa-sans: "Outfit", system-ui, sans-serif;
}

html,
body {
  background: var(--spa-bg);
  color: var(--spa-text);
  font-family: var(--spa-sans);
  min-height: 100vh;
}

h1, h2, h3, h4, .brand-title, .page-heading {
  font-family: var(--spa-serif);
  letter-spacing: 0.02em;
}

a {
  color: var(--spa-gold-soft);
  text-decoration: none;
}
a:hover {
  color: var(--spa-gold);
}

.app-shell {
  display: flex;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at top left, rgba(212, 175, 55, 0.08), transparent 42%),
    radial-gradient(ellipse at bottom right, rgba(45, 90, 60, 0.18), transparent 45%),
    var(--spa-bg);
}

.sidebar {
  width: var(--spa-sidebar-width);
  background: linear-gradient(180deg, #0a120f 0%, #0c1612 55%, #08100d 100%);
  border-right: 1px solid var(--spa-border);
  color: var(--spa-text);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar .brand {
  padding: 1.1rem 1rem 1rem;
  border-bottom: 1px solid var(--spa-border);
  text-align: center;
  flex-shrink: 0;
}

.sidebar .brand img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--spa-border);
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.18);
  margin-bottom: 0.55rem;
}

.sidebar .brand-title {
  color: var(--spa-gold);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
}

.sidebar .brand-title .brand-prive {
  font-family: var(--spa-serif);
  font-weight: 800;
  color: var(--spa-gold-soft);
  letter-spacing: 0.04em;
  padding: 0 0.2em;
  border-radius: 0.25em;
  background: linear-gradient(
    135deg,
    rgba(212, 175, 55, 0.28),
    rgba(232, 201, 106, 0.12)
  );
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.22);
}

.sidebar .brand-sub {
  color: var(--spa-muted);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.sidebar .nav {
  padding: 0.75rem 0 1rem;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: stretch;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.sidebar .nav > .nav-link,
.sidebar .nav > .nav-group {
  flex-shrink: 0;
  width: auto;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  color: rgba(243, 239, 228, 0.78);
  border-radius: 0.65rem;
  margin: 0.18rem 0.65rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 400;
}

.sidebar .nav-link .bi {
  flex-shrink: 0;
}

.sidebar .nav-link-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar .nav-link:hover {
  color: #fff;
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.18);
}

.sidebar .nav-link.active {
  color: #1a1406;
  background: linear-gradient(135deg, var(--spa-gold-soft), var(--spa-gold));
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.25);
}

.sidebar .nav-section {
  margin: 0.9rem 0.95rem 0.3rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--spa-gold);
  opacity: 0.75;
}

/* Collapsible menu groups (Masters, CRM, ΓÇª) */
.sidebar .nav-group {
  margin: 0.2rem 0.45rem;
}

.sidebar .nav-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  color: var(--spa-gold);
  padding: 0.55rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sidebar .nav-group-toggle:hover {
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.18);
  color: var(--spa-gold-soft);
}

.sidebar .nav-group-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.sidebar .nav-group-label .bi {
  flex-shrink: 0;
}

.sidebar .nav-group-caret {
  font-size: 0.85rem;
  opacity: 0.75;
  transition: transform 0.2s ease;
}

.sidebar .nav-group.is-open > .nav-group-toggle .nav-group-caret {
  transform: rotate(180deg);
}

.sidebar .nav-group-body {
  display: none;
  padding: 0.15rem 0 0.35rem;
}

.sidebar .nav-group.is-open > .nav-group-body {
  display: block;
}

.sidebar .nav-group-body .nav-link {
  margin-left: 0.85rem;
  margin-right: 0.55rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
}

.sidebar-footer {
  padding: 0.85rem 1rem 1.1rem;
  border-top: 1px solid var(--spa-border);
  font-size: 0.75rem;
  color: var(--spa-muted);
  flex-shrink: 0;
}

.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sticky-header-stack {
  position: sticky;
  top: 0;
  z-index: 1030;
  overflow: visible;
}

.topbar {
  background: rgba(10, 16, 13, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--spa-border);
  padding: 0.85rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  overflow: visible;
}

.topbar > .d-flex {
  overflow: visible;
}

.topbar-user-menu {
  position: relative;
  flex-shrink: 0;
  z-index: 1;
}

.topbar-user-name {
  display: inline-block;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

/* Only when portaled to <body>: fixed inside .topbar is relative to backdrop-filter,
   which paints the menu in the page content (ghost label). 1054 > header (1030).
   Never set `inset` here — it resets left/top and parks the open menu below the fold. */
.topbar-user-dropdown.is-portaled.dropdown-menu.show,
ul.topbar-user-dropdown.is-portaled.dropdown-menu.show {
  position: fixed !important;
  z-index: 1054 !important;
  margin: 0 !important;
  transform: none !important;
  right: auto !important;
  bottom: auto !important;
  display: block !important;
}

.topbar-user-dropdown.is-portaled:not(.show) {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.topbar-user-dropdown-header {
  color: var(--spa-gold-soft);
  font-size: 0.82rem;
  font-weight: 600;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .page-heading {
  font-size: 1.35rem;
  color: var(--spa-text);
  margin: 0;
}

.topbar .live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(61, 155, 106, 0.4);
  background: rgba(61, 155, 106, 0.12);
  color: #8fd6ad;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.75rem;
}

.topbar .clock-pill {
  border-color: rgba(201, 169, 98, 0.35);
  background: rgba(201, 169, 98, 0.1);
  color: var(--spa-gold);
}

.topbar .branch-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(201, 169, 98, 0.45);
  background: rgba(201, 169, 98, 0.12);
  color: var(--spa-gold);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  font-size: 0.78rem;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar .branch-pill-warn {
  border-color: rgba(220, 160, 70, 0.55);
  background: rgba(220, 160, 70, 0.12);
  color: #e6c07b;
}

.topbar .branch-switcher-select {
  min-width: 150px;
  max-width: 220px;
  background: rgba(201, 169, 98, 0.1);
  border-color: rgba(201, 169, 98, 0.45);
  color: var(--spa-text);
  font-size: 0.8rem;
}

.topbar-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-shrink: 0;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--spa-gold);
  border-radius: 999px;
  color: var(--spa-gold);
  background: rgba(212, 175, 55, 0.08);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1;
}
.topbar-back i {
  font-size: 1.2rem;
  line-height: 1;
}
.topbar-back:hover,
.topbar-back:focus-visible {
  color: #1a1406;
  background: linear-gradient(135deg, var(--spa-gold-soft), var(--spa-gold));
  border-color: var(--spa-gold);
}
.topbar-back-text {
  display: none;
}

.topbar-home {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  min-height: 2.7rem;
  padding: 0.5rem 1.2rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.topbar-home i {
  font-size: 1.25rem;
  line-height: 1;
}


.topbar-screenshot {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.7rem;
  padding: 0.45rem 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.topbar-screenshot i {
  font-size: 1.1rem;
  line-height: 1;
}
.screenshot-capturing-hide {
  visibility: hidden !important;
  pointer-events: none !important;
}
.screenshot-canvas-wrap {
  width: 100%;
  max-height: min(55vh, 520px);
  overflow: auto;
  border: 1px solid var(--spa-border);
  border-radius: var(--spa-radius);
  background: #0c0f12;
  touch-action: none;
}
#screenshotAnnotateCanvas {
  display: block;
  max-width: 100%;
  height: auto;
  cursor: crosshair;
  vertical-align: top;
}
.screenshot-save-toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 2000;
  background: var(--spa-surface);
  border: 1px solid var(--spa-gold);
  color: var(--spa-text);
  padding: 0.65rem 1rem;
  border-radius: var(--spa-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-size: 0.9rem;
}

@media (max-width: 575.98px) {
  .topbar-screenshot-text {
    display: none;
  }
}

.breadcrumb {
  --bs-breadcrumb-divider-color: var(--spa-muted);
}
.breadcrumb-item,
.breadcrumb-item a {
  color: var(--spa-muted);
  font-size: 0.78rem;
}
.breadcrumb-item.active {
  color: var(--spa-gold-soft);
}

.content {
  padding: 1.35rem;
}

.card-surface {
  background: var(--spa-surface);
  border: 1px solid var(--spa-border);
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.stat-card .stat-label {
  color: var(--spa-muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat-card .stat-value {
  font-family: var(--spa-serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--spa-gold);
  line-height: 1.1;
}

.dash-matrix {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
}
.dash-matrix .stat-card {
  min-height: 7.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.dash-matrix .stat-value {
  font-size: clamp(1.15rem, 1.8vw, 1.85rem);
  word-break: break-word;
}
@media (max-width: 991.98px) {
  .dash-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 575.98px) {
  .dash-matrix {
    grid-template-columns: 1fr;
  }
  .dash-matrix .stat-card {
    min-height: 0;
  }
}

/* In-Store Cash: equal-size summary cells (3 columns × N rows) */
.cash-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: stretch;
}
.cash-matrix .stat-card {
  min-height: 8.75rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}
.cash-matrix .stat-value {
  font-size: clamp(1.25rem, 2vw, 1.85rem);
  word-break: break-word;
  margin: 0.35rem 0 auto;
}
.cash-matrix .stat-label {
  min-height: 2.4em;
  line-height: 1.2;
}
.cash-matrix .text-muted.small {
  margin-top: 0.35rem;
  min-height: 2.4em;
}
.cash-matrix--report .stat-card {
  min-height: 7.5rem;
}
.cash-dir {
  display: inline-block;
  min-width: 2.6rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
}
.cash-dir--in {
  background: rgba(25, 135, 84, 0.12);
  color: #157347;
}
.cash-dir--out {
  background: rgba(180, 140, 60, 0.16);
  color: #8a6a1a;
}
@media (max-width: 991.98px) {
  .cash-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 575.98px) {
  .cash-matrix {
    grid-template-columns: 1fr;
  }
  .cash-matrix .stat-card {
    min-height: 0;
  }
  .cash-matrix .stat-label,
  .cash-matrix .text-muted.small {
    min-height: 0;
  }
}

a.stat-card-link {
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
a.stat-card-link:hover {
  border-color: rgba(212, 175, 55, 0.55);
  transform: translateY(-1px);
  color: inherit;
}
.stat-card-cta {
  opacity: 0.75;
}

.membership-tile {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--spa-border);
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
a.membership-tile:hover {
  border-color: rgba(212, 175, 55, 0.55);
  transform: translateY(-1px);
  color: inherit;
}
.membership-tile-name {
  color: var(--spa-muted);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.membership-tile-count {
  font-family: var(--spa-serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--spa-gold);
  line-height: 1.15;
  margin: 0.15rem 0 0.2rem;
}
.membership-dash-block .membership-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 0.65rem;
}
.membership-summary-item {
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid var(--spa-border);
  border-radius: 0.75rem;
  padding: 0.7rem 0.85rem;
  min-width: 0;
  color: inherit;
}
a.membership-summary-item:hover {
  border-color: rgba(212, 175, 55, 0.55);
  color: inherit;
}
.membership-summary-label {
  display: block;
  color: var(--spa-muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.membership-summary-value {
  display: block;
  font-family: var(--spa-serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--spa-gold);
  line-height: 1.2;
  margin-top: 0.15rem;
}
.membership-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 0.65rem;
}
.membership-tile.is-none {
  border-style: dashed;
}
.membership-tile.is-legacy {
  border-color: rgba(255, 193, 7, 0.35);
}
@media (max-width: 575.98px) {
  .membership-dash-block .membership-summary,
  .membership-board {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  }
}

/* ΓÇöΓÇö Monthly revenue target board ΓÇöΓÇö */
.target-panel {
  overflow: hidden;
}
.target-board {
  --today-pct: 0;
  --mtd-pct: 0;
  display: grid;
  gap: 1.35rem;
}
.target-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 1.75rem;
  padding: 0.35rem 0.15rem 0.15rem;
}
.target-hero-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--spa-muted);
  margin-bottom: 0.35rem;
}
.target-hero-amount {
  font-family: var(--spa-serif);
  font-size: clamp(2.1rem, 4vw, 2.85rem);
  font-weight: 600;
  line-height: 1;
  color: var(--spa-gold-soft);
  letter-spacing: 0.02em;
}
.target-board.is-met .target-hero-amount {
  color: #8fd6ad;
}
.target-hero-vs {
  margin-top: 0.45rem;
  color: var(--spa-muted);
  font-size: 0.92rem;
}
.target-hero-ring {
  --ring: 0;
  position: relative;
  width: 7.25rem;
  height: 7.25rem;
  flex: 0 0 auto;
}
.target-hero-ring svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.target-ring-track,
.target-ring-fill {
  fill: none;
  stroke-width: 9;
}
.target-ring-track {
  stroke: rgba(255, 255, 255, 0.1);
}
.target-ring-fill {
  stroke: var(--spa-gold);
  stroke-linecap: round;
  stroke-dasharray: var(--ring) 100;
  animation: targetRingIn 0.9s ease-out both;
}
.target-board.is-met .target-ring-fill {
  stroke: #5ecf8f;
}
.target-board.is-empty .target-ring-fill {
  stroke-dasharray: 0 100;
  animation: none;
}
.target-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}
.target-ring-pct {
  font-family: var(--spa-serif);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--spa-gold);
  line-height: 1;
}
.target-board.is-met .target-ring-pct {
  color: #8fd6ad;
}
.target-ring-pct.muted {
  color: var(--spa-muted);
}
.target-ring-sub {
  margin-top: 0.15rem;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--spa-muted);
}
.target-bars {
  display: grid;
  gap: 1rem;
}
.target-bar-block {
  padding: 0.85rem 1rem;
  border: 1px solid var(--spa-border);
  border-radius: 0.9rem;
  background: rgba(0, 0, 0, 0.18);
}
.target-bar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  font-size: 0.9rem;
  color: var(--spa-muted);
}
.target-bar-head strong {
  color: var(--spa-text);
  font-size: 1rem;
}
.target-bar-track {
  height: 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.target-bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  transform-origin: left center;
}
.target-bar-fill.is-today {
  width: calc(var(--today-pct) * 1%);
  background: linear-gradient(90deg, var(--spa-gold-deep), var(--spa-gold-soft));
  animation: targetBarIn 0.85s ease-out both;
}
.target-bar-fill.is-mtd {
  width: calc(var(--mtd-pct) * 1%);
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.35), rgba(232, 201, 106, 0.85));
  animation: targetBarIn 0.95s ease-out both;
}
.target-board.is-met .target-bar-fill.is-today {
  background: linear-gradient(90deg, #2f7a54, #5ecf8f);
}
.target-board.is-empty .target-bar-fill {
  width: 0;
  animation: none;
}
.target-bar-foot {
  margin-top: 0.55rem;
  font-size: 0.86rem;
  color: var(--spa-muted);
}
.target-chip {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(94, 207, 143, 0.4);
  color: #8fd6ad;
  font-size: 0.78rem;
}
.target-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.target-stat {
  padding: 0.75rem 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}
.target-stat .stat-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  color: var(--spa-muted);
}
.target-stat .stat-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--spa-text);
  word-break: break-word;
}
.target-stat-hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  color: var(--spa-muted);
  line-height: 1.3;
}
@keyframes targetRingIn {
  from { stroke-dasharray: 0 100; }
  to { stroke-dasharray: var(--ring) 100; }
}
@keyframes targetBarIn {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@media (max-width: 767.98px) {
  .target-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 420px) {
  .target-hero {
    justify-content: center;
    text-align: center;
  }
  .target-hero-main {
    width: 100%;
  }
}

/* Legacy speedometer hooks (unused by current dashboard) */
.speedometer-panel { overflow: hidden; }
.speedometer-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
}
.speedometer {
  --gauge: 0;
  width: min(100%, 280px);
}
.speedometer-dial {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
}
.speedometer-fill {
  position: absolute;
  inset: 0;
  border-radius: 999px 999px 0 0;
  background: conic-gradient(
    from 270deg at 50% 100%,
    var(--spa-gold) 0deg,
    var(--spa-gold) calc(var(--gauge) * 1.8deg),
    rgba(255, 255, 255, 0.08) calc(var(--gauge) * 1.8deg),
    rgba(255, 255, 255, 0.08) 180deg,
    transparent 180deg
  );
}
.speedometer-wrap.is-met .speedometer-fill {
  background: conic-gradient(
    from 270deg at 50% 100%,
    #3d9b6a 0deg,
    #3d9b6a 180deg,
    transparent 180deg
  );
}
.speedometer-wrap.is-empty .speedometer-fill {
  background: conic-gradient(
    from 270deg at 50% 100%,
    rgba(255, 255, 255, 0.08) 0deg,
    rgba(255, 255, 255, 0.08) 180deg,
    transparent 180deg
  );
}
.speedometer-mask {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0;
  height: 76%;
  border-radius: 999px 999px 0 0;
  background: var(--spa-surface);
}
.speedometer-needle {
  --needle: 0deg;
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 2px;
  height: 78%;
  background: linear-gradient(to top, transparent, var(--spa-gold-soft));
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(calc(-90deg + var(--needle)));
  border-radius: 2px;
  z-index: 2;
}
.speedometer-hub {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 35%);
  text-align: center;
  z-index: 3;
  min-width: 5rem;
}
.speedometer-pct {
  font-family: var(--spa-serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--spa-gold);
  line-height: 1;
}
.speedometer-pct.muted { color: var(--spa-muted); }
.speedometer-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.85rem;
  flex: 1 1 220px;
  max-width: 420px;
}
.speedometer-stat .stat-label { display: block; margin-bottom: 0.15rem; }
.speedometer-stat .stat-value { font-size: 1.25rem; }
.pace-gauge-wrap, .pace-gauge, .pace-meta { display: none; }

.chair-board {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.floor-filter {
  background: var(--spa-surface);
  border: 1px solid var(--spa-border);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
}
.floor-split.is-loading .floor-split-row {
  position: relative;
  opacity: 0.55;
  pointer-events: none;
}
.floor-split.is-loading .js-check-free-btn {
  min-width: 6.5rem;
}
.floor-split-row {
  align-items: stretch;
}
.floor-split-col .booking-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.floor-count {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.08rem 0.5rem;
  border-radius: 999px;
  font-family: var(--spa-sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--spa-text);
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid rgba(212, 175, 55, 0.28);
  vertical-align: middle;
}
.floor-board {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(70vh, 44rem);
  overflow-y: auto;
  padding-right: 0.1rem;
}
@media (max-width: 991.98px) {
  .floor-board {
    max-height: none;
    overflow: visible;
  }
}
.chair-filter-form .form-label {
  color: var(--spa-muted);
}
.chair-free-summary {
  color: var(--spa-text);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
}
.chair-free-summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: rgba(212, 175, 55, 0.06);
}
.chair-free-stat {
  min-width: 4.25rem;
  padding: 0.35rem 0.55rem;
  border-radius: 0.55rem;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--spa-border);
}
.chair-free-stat .stat-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--spa-muted);
}
.chair-free-stat .stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--spa-text);
  line-height: 1.2;
}
.chair-free-stat.is-free {
  border-color: rgba(90, 170, 110, 0.45);
}
.chair-free-stat.is-free .stat-value { color: #8fd4a4; }
.chair-free-stat.is-busy {
  border-color: rgba(200, 140, 60, 0.4);
}
.chair-free-stat.is-busy .stat-value { color: #e0b56a; }
.chair-card {
  border: 1px solid var(--spa-border);
  border-radius: 0.85rem;
  padding: 0.75rem 0.9rem;
  background: rgba(0, 0, 0, 0.12);
}
.chair-card.is-free {
  border-color: rgba(90, 170, 110, 0.45);
}
.chair-card.is-filtered-busy {
  opacity: 0.72;
}
.chair-slot.overlaps-filter {
  outline: 1px solid rgba(200, 140, 60, 0.55);
  border-radius: 0.45rem;
}
.chair-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.chair-name {
  font-weight: 600;
  color: var(--spa-text);
}
.chair-free-note {
  color: var(--spa-muted);
  font-size: 0.9rem;
}
.chair-slots {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.chair-slot-link {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  padding: 0.35rem 0.45rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
}
.chair-slot-link:hover {
  border-color: rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.06);
  color: inherit;
}
.chair-slot-time {
  flex: 0 0 5.5rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--spa-gold);
  font-size: 0.9rem;
}
.chair-slot.is-live .chair-slot-time {
  color: #8fd4a8;
}
.chair-slot.is-done {
  opacity: 0.72;
}

.therapist-present-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.therapist-present-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  padding: 0.45rem 0.5rem;
  border-radius: 0.65rem;
  border: 1px solid var(--spa-border);
}
.therapist-present-link:hover {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.06);
  color: inherit;
}
.therapist-present-avatar {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(212, 175, 55, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.therapist-present-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.therapist-initial {
  font-weight: 600;
  color: var(--spa-gold);
}
.chair-card .therapist-present-link {
  flex: 1;
  min-width: 0;
}

.btn-gold {
  background: linear-gradient(135deg, var(--spa-gold-soft), var(--spa-gold-deep));
  border: none;
  color: #1a1406;
  font-weight: 600;
  border-radius: 0.75rem;
  padding: 0.65rem 1.1rem;
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.25);
}
.btn-gold:hover {
  color: #1a1406;
  filter: brightness(1.05);
}

/* Map Bootstrap primary/success to brand gold for existing forms */
.btn-primary,
.btn-success {
  background: linear-gradient(135deg, var(--spa-gold-soft), var(--spa-gold-deep));
  border: none;
  color: #1a1406;
  font-weight: 600;
}
.btn-primary:hover,
.btn-success:hover {
  filter: brightness(1.05);
  color: #1a1406;
}
.btn-outline-primary,
.btn-outline-secondary {
  border-color: rgba(212, 175, 55, 0.55);
  color: var(--spa-gold-soft);
}
.btn-outline-primary:hover,
.btn-outline-secondary:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--spa-gold);
  color: var(--spa-gold);
}

.btn-outline-gold {
  border: 1px solid var(--spa-gold);
  color: var(--spa-gold);
  background: transparent;
  border-radius: 0.75rem;
}
.btn-outline-gold:hover {
  background: rgba(212, 175, 55, 0.12);
  color: var(--spa-gold-soft);
  border-color: var(--spa-gold-soft);
}

/* Match page-level Delete/Back (and similar) so sizes/padding align */
.page-header-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.page-header-actions > form {
  display: inline-flex;
  align-items: center;
  margin: 0;
}
.page-header-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 0.75rem;
  padding: 0.65rem 1.1rem;
  min-height: 2.75rem;
  line-height: 1.25;
  white-space: nowrap;
}
.btn-outline-danger {
  border-radius: 0.75rem;
}
.btn-sm.btn-outline-danger,
.btn-sm.btn-outline-success {
  border-radius: 0.65rem;
}

.form-control,
.form-select {
  background: rgba(7, 11, 9, 0.65);
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: var(--spa-text);
  border-radius: 0.7rem;
}
.form-control:focus,
.form-select:focus {
  background: rgba(7, 11, 9, 0.85);
  border-color: var(--spa-gold);
  color: var(--spa-text);
  box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.18);
}
.form-control::placeholder {
  color: rgba(154, 168, 159, 0.75);
}
.form-label {
  color: var(--spa-gold-soft);
  font-size: 0.85rem;
}

/* Data-entry forms: label above field, one field per row */
.spa-form-vertical {
  --spa-form-field-max: 32rem;
}

.spa-form-vertical.spa-form-vertical--wide {
  --spa-form-field-max: 100%;
}

.spa-form-vertical .row > [class*="col-"] {
  flex: 0 0 100%;
  max-width: 100%;
  width: 100%;
}

.spa-form-vertical .row .row > [class*="col-"] {
  flex: 0 0 100%;
  max-width: 100%;
  width: 100%;
}

.spa-form-vertical .row > [class*="col-"] > .form-control,
.spa-form-vertical .row > [class*="col-"] > .form-select,
.spa-form-vertical .row > [class*="col-"] > .input-group,
.spa-form-vertical .row > [class*="col-"] > textarea.form-control,
.spa-form-vertical .mb-3 > .form-control,
.spa-form-vertical .mb-3 > .form-select,
.spa-form-vertical .mb-3 > .input-group,
.spa-form-vertical .mb-3 > textarea.form-control,
.spa-form-vertical fieldset .form-control,
.spa-form-vertical fieldset .form-select {
  max-width: var(--spa-form-field-max);
  width: 100%;
}

.spa-form-vertical textarea.form-control {
  max-width: min(100%, 42rem);
}

.spa-form-vertical .form-label {
  display: block;
  margin-bottom: 0.35rem;
}

.spa-form-vertical .mb-3[style*="max-width"] {
  max-width: var(--spa-form-field-max) !important;
}

/* Keep checkbox / action rows horizontal */
.spa-form-vertical .spa-form-inline,
.spa-form-vertical .d-flex.gap-4.mb-3,
.spa-form-vertical .d-flex.flex-wrap.gap-1,
.spa-form-vertical .d-flex.flex-wrap.gap-2,
.spa-form-vertical .booking-client-actions,
.spa-form-vertical .d-flex.gap-2:not(.row) {
  max-width: none;
}

/* Tables, grids, and pill pickers stay as designed */
.spa-form-vertical .table-responsive,
.spa-form-vertical .table,
.spa-form-vertical .slot-grid,
.spa-form-vertical .service-pills,
.spa-form-vertical .therapist-grid,
.spa-form-vertical .focus-tag-grid,
.spa-form-vertical .fu-kind-grid,
.spa-form-vertical .booking-matrix,
.spa-form-vertical .booking-schedule-fields,
.spa-form-vertical .slot-period-filter,
.spa-form-vertical .spa-form-keep-columns .row > [class*="col-"] {
  max-width: none;
}

.spa-form-vertical .spa-form-keep-columns .row > [class*="col-"] {
  flex: revert;
  max-width: revert;
  width: revert;
}

.card-surface > form.spa-form-vertical:not(.spa-form-vertical--wide) {
  max-width: 44rem;
}

/* Register / edit client: stack on a phone, two columns on tablet, three on a wide desktop */
.client-register-card {
  min-width: 0;
  max-width: 100%;
}

.client-register-form {
  min-width: 0;
  max-width: none;
}

.client-register-form .row > [class*="col-"] {
  min-width: 0;
}

.client-register-form .form-control,
.client-register-form .form-select,
.client-register-form .input-group {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.client-register-form textarea.form-control {
  max-width: min(100%, 44rem);
}

.client-register-form input[type="date"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.client-register-form .input-group {
  flex-wrap: nowrap;
}

.client-register-form .input-group > .input-group-text {
  flex: 0 0 auto;
}

.client-register-form .spa-phone-input > .form-control,
.client-register-form .spa-phone-input > .form-select {
  width: auto;
  min-width: 0;
}

.client-register-form .spa-phone-input > .spa-phone-cc {
  flex: 0 1 7.5rem;
  width: 7.5rem;
  max-width: 7.5rem;
}

.client-register-form .spa-phone-input > .spa-phone-custom-cc {
  flex: 0 1 5.25rem;
  width: 5.25rem;
  max-width: 5.5rem;
}

.client-register-form .spa-phone-input > .spa-phone-national {
  flex: 1 1 0%;
  width: 1%;
  min-width: 0;
  max-width: none;
}

.client-register-form .form-text {
  overflow-wrap: anywhere;
}

.client-register-form .client-plan-col {
  max-width: 44rem;
}

@media (max-width: 767.98px) {
  .client-register-form .client-contact-prefs {
    gap: 0.65rem 1.1rem;
  }

  .client-register-form .client-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .client-register-form .client-form-actions .btn {
    width: 100%;
    min-height: 44px;
  }

  .client-register-form .client-plan-col {
    max-width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  /* Third field in a trio (email, marketing source) uses the full row */
  .client-register-form .row > .col-xl-4:last-child {
    flex: 0 0 auto;
    width: 100%;
  }
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--spa-text);
  --bs-table-border-color: rgba(212, 175, 55, 0.12);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
  --bs-table-hover-bg: rgba(212, 175, 55, 0.06);
  color: var(--spa-text);
}
.table thead th,
table.dataTable thead > tr > th,
table.dataTable thead > tr > td {
  white-space: nowrap;
  color: #fff;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  border-bottom-color: rgba(212, 175, 55, 0.25);
}

.dropdown-menu {
  background: #121c18;
  border: 1px solid var(--spa-border);
}
.dropdown-item {
  color: var(--spa-text);
}
.dropdown-item:hover {
  background: rgba(212, 175, 55, 0.12);
  color: var(--spa-gold-soft);
}

.alert {
  border-radius: 0.8rem;
  border: 1px solid transparent;
}
.alert-success {
  background: rgba(61, 155, 106, 0.15);
  border-color: rgba(61, 155, 106, 0.35);
  color: #b6e4c8;
}
.alert-danger {
  background: #4a1010;
  border-color: #8b1a1a;
  color: #ffd4d4;
}
.alert-warning {
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.35);
  color: #f0dfad;
}
.alert-info {
  background: rgba(120, 160, 180, 0.12);
  border-color: rgba(120, 160, 180, 0.3);
  color: #c5dbe6;
}

/* Blocks booking / floor ops ΓÇö dark red, high visibility on the dark theme */
.text-danger {
  color: #c62828 !important;
}
.ops-block-text {
  color: #c62828;
  font-weight: 700;
}
.ops-block-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
  padding: 0.85rem 0.95rem;
  border-radius: 0.8rem;
  background: #4a1010;
  border: 1px solid #8b1a1a;
  border-left: 5px solid #b71c1c;
  color: #ffd6d6;
  font-weight: 650;
  box-shadow: 0 0 0 1px rgba(183, 28, 28, 0.25), 0 0 18px rgba(139, 26, 26, 0.35);
}
.ops-block-alert > .bi {
  color: #e53935;
  font-size: 1.2rem;
  line-height: 1.3;
  flex-shrink: 0;
}
.ops-block-alert strong {
  display: block;
  color: #ffe8e8;
  font-weight: 700;
}
.ops-block-alert .ops-block-detail {
  margin: 0.25rem 0 0;
  font-weight: 500;
  color: #ffc9c9;
}
.ops-block-alert .ops-block-link {
  display: inline-block;
  margin-top: 0.45rem;
  color: #ffd6d6;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.ops-block-alert .ops-block-link:hover {
  color: #fff;
}
.ops-block-alert .ops-block-text {
  color: #ff8a80;
}
.chair-free-summary-bar.is-blocked {
  border-color: #8b1a1a;
  background: rgba(74, 16, 16, 0.55);
}
.chair-free-summary-bar.is-blocked .chair-free-summary {
  color: #ffd6d6;
  font-weight: 700;
}
.chair-free-summary-bar.is-blocked .chair-free-stat .stat-value {
  color: #e53935;
}

/* Login ΓÇö sample screen inspired */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 15% 20%, rgba(212, 175, 55, 0.12), transparent 28%),
    radial-gradient(circle at 85% 80%, rgba(40, 90, 60, 0.22), transparent 32%),
    linear-gradient(160deg, #050805 0%, #0b1410 45%, #08110d 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before,
.login-page::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
}
.login-page::before {
  top: -60px;
  left: -40px;
  background: rgba(212, 175, 55, 0.18);
}
.login-page::after {
  bottom: -80px;
  right: -50px;
  background: rgba(30, 90, 55, 0.3);
}

.login-card {
  width: min(440px, 94vw);
  background: rgba(12, 20, 16, 0.78);
  border-radius: 1.25rem;
  border: 1px solid var(--spa-border);
  padding: 2rem 1.75rem 1.6rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  position: relative;
  z-index: 1;
}

.member-portal-card {
  width: min(560px, 94vw);
}

.login-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--spa-border);
}
.login-mode-tab {
  text-align: center;
  text-decoration: none;
  color: var(--spa-muted);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.login-mode-tab:hover {
  color: var(--spa-gold-soft);
}
.login-mode-tab.is-active {
  color: #1a1510;
  background: linear-gradient(135deg, var(--spa-gold), var(--spa-gold-soft));
}

.login-brand {
  text-align: center;
  margin-bottom: 1.4rem;
}
.login-brand img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--spa-border);
  box-shadow: 0 0 36px rgba(212, 175, 55, 0.28);
  margin-bottom: 0.75rem;
}
.login-brand .brand-title {
  color: var(--spa-gold);
  font-size: 2rem;
  margin: 0;
  line-height: 1;
}
.login-brand .brand-prive {
  display: block;
  font-family: var(--spa-serif);
  font-size: 2.35rem;
  color: var(--spa-gold-soft);
  letter-spacing: 0.18em;
  margin: 0.15rem 0 0.35rem;
}
.login-brand .tagline {
  color: var(--spa-muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}
.login-brand .welcome {
  margin-top: 1rem;
  font-family: var(--spa-serif);
  font-size: 1.55rem;
  color: #fff;
}
.login-brand .welcome-sub {
  color: var(--spa-muted);
  font-size: 0.88rem;
}

.login-secure {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--spa-muted);
  border-top: 1px solid var(--spa-border);
  padding-top: 0.85rem;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  background: rgba(7, 11, 9, 0.65);
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: var(--spa-text);
  border-radius: 0.5rem;
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter label {
  color: var(--spa-muted);
}

/* ΓÇöΓÇöΓÇö Responsive shell (tablet + phone) ΓÇöΓÇöΓÇö */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1035;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  border: 0;
  padding: 0;
  cursor: pointer;
}
.sidebar-backdrop.is-visible {
  display: block;
}
body.sidebar-open {
  overflow: hidden;
}

.pwa-install-banner {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  z-index: 1080;
  display: none;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--spa-border);
  background: rgba(12, 20, 16, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  color: var(--spa-text);
  max-width: 36rem;
  margin-inline: auto;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.pwa-install-banner.is-visible {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}
.pwa-install-banner[hidden] {
  display: none !important;
}
.pwa-install-icon {
  width: 44px;
  height: 44px;
  border-radius: 0.65rem;
  object-fit: cover;
  border: 1px solid var(--spa-border);
  flex-shrink: 0;
}
.pwa-install-copy {
  flex: 1;
  min-width: 0;
}
.pwa-install-copy strong {
  display: block;
  font-size: 0.95rem;
  color: var(--spa-gold-soft);
  margin-bottom: 0.15rem;
}
.pwa-install-copy p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--spa-muted);
  line-height: 1.35;
}
.pwa-install-steps {
  margin-top: 0.55rem;
}
.pwa-install-steps[hidden] {
  display: none !important;
}
.pwa-install-steps-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.76rem;
  color: var(--spa-text);
  line-height: 1.45;
}
.pwa-install-steps-list li + li {
  margin-top: 0.28rem;
}
.pwa-share-glyph {
  display: inline-flex;
  vertical-align: -2px;
  color: var(--spa-gold-soft);
}
.pwa-install-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-shrink: 0;
}
.pwa-install-actions .btn {
  white-space: nowrap;
  min-height: 36px;
}

@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1040;
    width: min(var(--spa-sidebar-width), 86vw);
    max-width: 320px;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: none;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
  }
  .main-area {
    width: 100%;
    min-width: 0;
  }
  .topbar {
    flex-wrap: wrap;
    padding: 0.65rem 0.85rem;
    gap: 0.55rem;
    padding-top: calc(0.65rem + env(safe-area-inset-top, 0px));
  }
  .topbar .page-heading {
    font-size: 1.1rem;
    max-width: min(42vw, 12rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .topbar .breadcrumb {
    display: none;
  }
  .topbar-back {
    min-width: 40px;
    min-height: 40px;
    padding: 0;
  }
  .topbar-back-text {
    display: none;
  }
  .topbar .branch-switcher-select {
    min-width: 110px;
    max-width: 150px;
  }
  .topbar .branch-pill {
    max-width: 140px;
  }
  #sidebarToggle {
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .sidebar .nav-link,
  .sidebar .nav-group-toggle {
    min-height: 44px;
  }
  .content {
    padding: 0.9rem 0.85rem 5.5rem;
  }
  .content.has-live-bar {
    padding-top: 0.75rem;
  }

  /* Tables: scroll only when columns need it — never force 560px on phones.
     Profile tab panes are excluded: overflow-x:auto would also force a vertical bar. */
  .table-responsive,
  .dataTables_wrapper,
  .content .card-surface:has(table):not(.client-profile-panes) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  table.table,
  table.dataTable {
    min-width: 0;
    width: 100%;
  }
  /* Wide list grids still get a readable floor on tablet landscape */
  .table-responsive > table.table.datatable,
  .table-responsive > table.table.datatable-long,
  .dataTables_wrapper table.dataTable {
    min-width: min(100%, 36rem);
  }
  #billingForm table.table,
  #billLines,
  #tipTipsTable,
  table.table-fluid {
    min-width: 0 !important;
  }
  .topbar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(10, 16, 13, 0.98);
  }
  .card-surface {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .btn,
  .nav-link,
  .nav-group-toggle,
  .form-control,
  .form-select {
    touch-action: manipulation;
  }
  .dataTables_wrapper .row {
    --bs-gutter-x: 0.5rem;
  }
  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate {
    float: none !important;
    text-align: left !important;
    margin-bottom: 0.5rem;
  }
  .dataTables_wrapper .dataTables_filter input {
    width: 100% !important;
    margin-left: 0 !important;
    margin-top: 0.35rem;
  }
  .dataTables_wrapper,
  .content .card-surface:has(.dataTables_wrapper) {
    overflow-x: visible;
  }

  /* Forms & toolbars */
  .card-surface {
    padding: 0.85rem !important;
  }
  .btn-toolbar,
  .d-flex.gap-2.flex-wrap {
    row-gap: 0.45rem;
  }
  .btn {
    min-height: 38px;
  }
  .form-control,
  .form-select {
    font-size: 16px; /* avoid iOS zoom on focus */
    min-height: 42px;
  }
  .modal-dialog {
    margin: 0.65rem;
    max-width: calc(100% - 1.3rem);
  }
  .modal-footer {
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .modal-footer .btn {
    flex: 1 1 auto;
  }

  /* Live session bar — compact chips, horizontal scroll */
  .live-session-bar-inner {
    flex-wrap: nowrap;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
  }
  .live-session-chips {
    width: auto;
    flex: 1 1 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.1rem;
    flex-wrap: nowrap;
  }
  .live-chip.session-card {
    min-width: 0;
    max-width: none;
  }
  .live-chip-chair {
    max-width: 5.5rem;
  }
  .live-session-bar-cta {
    width: auto;
    flex: 0 0 auto;
  }

  .suggest-card {
    flex-wrap: wrap;
  }
  .suggest-score {
    width: 100%;
    text-align: left;
    margin-top: 0.25rem;
  }

  .report-card {
    margin-bottom: 0.65rem;
  }

  .stat-card .stat-value {
    font-size: 1.35rem;
  }
}

@media (max-width: 767.98px) {
  .login-card {
    width: min(440px, 100%);
    padding: 1.35rem 1.1rem 1.2rem;
    border-radius: 1rem;
  }
  .login-brand img {
    width: 76px;
    height: 76px;
  }
  .login-brand .brand-title {
    font-size: 1.55rem;
  }
  .login-brand .brand-prive {
    font-size: 1.85rem;
  }
  .login-page {
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
  .topbar > .d-flex:last-child {
    width: 100%;
    justify-content: space-between !important;
    overflow: visible;
  }
  .topbar .dropdown .btn {
    max-width: 42vw;
  }
  .topbar-user-name {
    max-width: 36vw;
  }
  .topbar-user-dropdown .dropdown-item {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }
  .pwa-install-banner {
    flex-wrap: wrap;
  }
  .pwa-install-actions {
    flex-direction: row;
    width: 100%;
  }
  .pwa-install-actions .btn {
    flex: 1;
  }
  /* Phone: less chrome, fewer paints while scrolling long lists */
  .sticky-header-stack {
    contain: layout style;
  }
  .live-session-bar {
    max-height: 4.75rem;
  }
  .dataTables_wrapper .dataTables_paginate .paginate_button {
    min-height: 40px;
    min-width: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .sidebar {
    transition: none !important;
  }
}

@media (min-width: 768px) {
  .topbar-back {
    padding: 0.4rem 0.85rem 0.4rem 0.7rem;
    min-width: 0;
  }
  .topbar-back-text {
    display: inline;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .content {
    padding: 1.1rem 1.1rem 5rem;
  }
  .topbar .page-heading {
    max-width: 18rem;
  }
  table.table,
  table.dataTable {
    min-width: 0;
  }
}

/* Standalone PWA: respect notches */
@media (display-mode: standalone) {
  .topbar {
    padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
  }
  .pwa-install-banner {
    display: none !important;
  }
}

.emp-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--spa-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
.emp-avatar-empty {
  background: rgba(212, 175, 55, 0.1);
  color: var(--spa-gold);
  font-size: 1.1rem;
}
.emp-aadhar-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 0.4rem;
  border: 1px solid var(--spa-border);
  color: var(--spa-gold);
  text-decoration: none;
  font-size: 0.8rem;
  white-space: nowrap;
}
.emp-aadhar-badge:hover {
  border-color: var(--spa-gold);
  color: var(--spa-gold);
}
.emp-aadhar-badge-muted {
  color: var(--spa-muted);
}
.emp-photo-preview img,
.emp-photo-placeholder,
.emp-aadhar-preview img,
.emp-aadhar-placeholder {
  width: 140px;
  height: 140px;
  border-radius: 0.75rem;
  object-fit: cover;
  border: 1px solid var(--spa-border);
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.15);
  margin: 0 auto;
  display: block;
}
.emp-photo-placeholder,
.emp-aadhar-placeholder {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  background: rgba(212, 175, 55, 0.08);
  color: var(--spa-gold);
  font-size: 2.4rem;
  text-decoration: none;
}
.emp-aadhar-placeholder span {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--spa-muted);
  padding: 0 0.5rem;
  text-align: center;
}
.emp-aadhar-file:hover {
  border-color: var(--spa-gold);
  color: var(--spa-gold);
}
.emp-desig-add-row,
.inline-add-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.45rem;
}
.emp-desig-add-row.d-none,
.inline-add-row.d-none {
  display: none;
}
.emp-desig-add-row input,
.inline-add-row input {
  flex: 1;
  min-width: 0;
}
.emp-desig-add .btn-sm,
.inline-add .btn-sm {
  white-space: nowrap;
}
.emp-code-group .emp-code-prefix {
  font-weight: 600;
  letter-spacing: 0.02em;
  user-select: none;
  min-width: 3.5rem;
  justify-content: center;
}
.emp-code-group #emp_serial {
  max-width: 7rem;
  font-variant-numeric: tabular-nums;
}
.emp-remarks {
  min-height: 5.5rem;
  resize: vertical;
}

.emp-hr-banner {
  border: 1px solid var(--spa-border);
  border-radius: 0.6rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  background: var(--spa-surface);
}
.emp-hr-banner-pending {
  border-color: rgba(212, 175, 55, 0.45);
  color: var(--spa-gold);
}
.emp-hr-banner-grant {
  border-color: rgba(120, 180, 140, 0.45);
  color: #9dcea8;
}
.emp-hr-banner-locked {
  color: var(--spa-muted);
}
.emp-hr-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-inline-size: 0;
}
.emp-salary-hidden {
  border: 1px dashed var(--spa-border);
  border-radius: 0.4rem;
  padding: 0.55rem 0.75rem;
  color: var(--spa-muted);
  font-size: 0.9rem;
}
.emp-hr-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  border: 1px solid var(--spa-border);
  font-size: 0.75rem;
  color: var(--spa-muted);
  white-space: nowrap;
}
.emp-hr-badge-pending {
  color: var(--spa-gold);
  border-color: rgba(212, 175, 55, 0.45);
}
.emp-hr-badge-grant {
  color: #9dcea8;
}
.emp-hr-badge-locked {
  color: var(--spa-muted);
}

/* ΓÇöΓÇö Appointment / New Booking ΓÇöΓÇö */
.booking-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.booking-eyebrow {
  color: var(--spa-muted);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
}

/* 2├ù3 left|right matrix for New Booking panels */
.booking-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}
.booking-matrix-cell {
  min-width: 0;
}
.booking-matrix-actions {
  display: flex;
  flex-direction: column;
}
.booking-matrix-actions .booking-confirm-actions {
  margin-top: auto;
}
.booking-schedule-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
}
.booking-schedule-fields .booking-schedule-time {
  grid-column: 1 / -1;
}
@media (min-width: 576px) {
  .booking-schedule-fields {
    grid-template-columns: 1fr 1fr 1.15fr;
  }
  .booking-schedule-fields .booking-schedule-time {
    grid-column: auto;
  }
}
@media (max-width: 991.98px) {
  .booking-matrix {
    grid-template-columns: 1fr;
  }
}

.booking-panel {
  background: var(--spa-surface);
  border: 1px solid var(--spa-border);
  border-radius: 1rem;
  padding: 1.15rem 1.2rem 1.25rem;
  height: 100%;
}
.booking-panel-title {
  font-family: var(--spa-serif);
  font-size: 1.25rem;
  color: var(--spa-gold);
  margin: 0 0 1rem;
  font-weight: 600;
}

.client-results {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #0f1814;
  border: 1px solid var(--spa-border);
  border-radius: 0.75rem;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.client-result {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  color: var(--spa-text);
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
}
.client-result:last-child {
  border-bottom: 0;
}
.client-result:hover,
.client-result.is-active {
  background: rgba(212, 175, 55, 0.1);
  color: var(--spa-gold-soft);
}
.client-search-wrap {
  position: relative;
}
.client-result span {
  color: var(--spa-muted);
  font-size: 0.82rem;
}
.client-result-empty {
  padding: 0.85rem 1rem 0.4rem;
  color: var(--spa-muted);
  font-size: 0.95rem;
}
.client-result-actions {
  padding: 0.45rem 0.75rem 0.9rem;
}
.booking-client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.booking-client-action {
  font-size: 1.05rem;
  font-weight: 700;
  min-height: 2.75rem;
  padding: 0.55rem 1.15rem;
}
.selected-client {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: rgba(212, 175, 55, 0.06);
}
.selected-client-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(212, 175, 55, 0.12);
  color: var(--spa-gold);
  border: 1px solid var(--spa-border);
  font-size: 1.25rem;
}

.service-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.service-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: rgba(7, 11, 9, 0.45);
  color: var(--spa-text);
  min-width: 140px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.service-pill:hover {
  border-color: var(--spa-gold);
  transform: translateY(-1px);
}
.service-pill.active {
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.22), rgba(212, 175, 55, 0.08));
  border-color: var(--spa-gold);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.25);
}
.service-pill-name {
  font-weight: 500;
  font-size: 0.92rem;
}
.service-pill-meta {
  color: var(--spa-muted);
  font-size: 0.75rem;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.45rem;
}
.slot-period-filter {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.2rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(212, 175, 55, 0.22);
  background: rgba(7, 11, 9, 0.45);
}
.slot-period-btn {
  border: 1px solid transparent;
  border-radius: 0.55rem;
  background: transparent;
  color: var(--spa-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.7rem;
  min-width: 2.6rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.slot-period-btn:hover {
  color: var(--spa-gold-soft);
  border-color: rgba(212, 175, 55, 0.35);
}
.slot-period-btn.active {
  background: var(--spa-gold);
  border-color: var(--spa-gold);
  color: #1a1406;
}
.slot-btn.d-none,
.slot-btn[hidden] {
  display: none !important;
}
.booking-start-time {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  border-color: rgba(212, 175, 55, 0.55);
  min-height: 2.5rem;
}
.slot-btn {
  border-radius: 0.7rem;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: rgba(7, 11, 9, 0.5);
  color: var(--spa-text);
  padding: 0.55rem 0.35rem;
  font-size: 0.8rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.slot-btn:hover:not(:disabled) {
  border-color: var(--spa-gold);
  color: var(--spa-gold-soft);
}
.slot-btn.active {
  background: var(--spa-gold);
  border-color: var(--spa-gold);
  color: #1a1406;
  font-weight: 600;
}
.slot-btn.is-booked,
.slot-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  text-decoration: line-through;
}
.slot-btn.is-past {
  opacity: 0.32;
  cursor: not-allowed;
  text-decoration: line-through;
  background: rgba(20, 16, 12, 0.55);
}
.slot-btn.is-therapist-busy {
  opacity: 0.5;
  text-decoration: none;
  border-style: dashed;
}

.focus-group-title {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--spa-muted);
  margin-bottom: 0.35rem;
}
.focus-tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.focus-tag {
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}
.focus-tag input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.focus-tag span {
  display: inline-block;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: rgba(7, 11, 9, 0.45);
  color: var(--spa-text);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.8rem;
}
.focus-tag input:checked + span {
  background: var(--spa-gold);
  border-color: var(--spa-gold);
  color: #1a1406;
  font-weight: 600;
}
.focus-tag:hover span {
  border-color: var(--spa-gold);
}

.therapist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.65rem;
}
.therapist-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.85rem 0.55rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: rgba(7, 11, 9, 0.4);
  color: var(--spa-text);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.therapist-card:hover {
  border-color: var(--spa-gold);
  transform: translateY(-1px);
}
.therapist-card.active {
  border-color: var(--spa-gold);
  background: rgba(212, 175, 55, 0.12);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.12);
}
.therapist-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--spa-border);
}
.therapist-photo-empty {
  display: grid;
  place-items: center;
  background: rgba(212, 175, 55, 0.1);
  color: var(--spa-gold);
  font-size: 1.4rem;
}
.therapist-name {
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}
.therapist-meta {
  font-size: 0.72rem;
  color: var(--spa-muted);
}

.appt-status {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.appt-status-requested {
  color: #ffe7a3;
  background: rgba(212, 160, 23, 0.18);
  border-color: rgba(232, 196, 90, 0.55);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.45);
}
.appt-status-booked,
.appt-status-confirmed {
  color: #e8d59a;
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.3);
}
.appt-status-checked_in,
.appt-status-in_progress {
  color: #9fd4ff;
  background: rgba(90, 150, 200, 0.12);
  border-color: rgba(90, 150, 200, 0.3);
}
.appt-status-completed {
  color: #b6e4c8;
  background: rgba(61, 155, 106, 0.12);
  border-color: rgba(61, 155, 106, 0.3);
}
.appt-status-cancelled,
.appt-status-no_show,
.appt-status-skipped {
  color: #f0b4b4;
  background: rgba(196, 92, 92, 0.12);
  border-color: rgba(196, 92, 92, 0.3);
}
.appt-status-in_progress {
  color: #9fd4ff;
  background: rgba(90, 150, 200, 0.12);
  border-color: rgba(90, 150, 200, 0.3);
}
.appt-status-on_hold {
  color: #f0dfad;
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.35);
}
.appt-status-waiting {
  color: #c9b8ef;
  background: rgba(140, 120, 200, 0.12);
  border-color: rgba(140, 120, 200, 0.35);
}
.appt-status-room_hold {
  color: #c5c5c5;
  background: rgba(140, 140, 140, 0.12);
  border-color: rgba(140, 140, 140, 0.35);
}
.appt-status-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  max-width: 12rem;
}
.appt-status-hint {
  font-size: 0.68rem;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}
.appt-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  align-items: center;
  max-width: 24rem;
}
.appt-col-start {
  min-width: 7.5rem;
  vertical-align: middle;
}
.appt-col-start .btn-start-session {
  min-width: 5.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.35);
}
.appt-col-start .btn-start-session:disabled {
  opacity: 0.72;
  box-shadow: none;
}
.appt-col-start .appt-start-reason {
  display: block;
  max-width: 9rem;
  line-height: 1.25;
  text-align: center;
}
.appt-col-start .btn-open-session {
  min-width: 7.25rem;
  font-weight: 600;
  white-space: nowrap;
}
.appt-row-actions .btn-start-session {
  flex: 0 0 auto;
  order: -1;
  min-width: 5.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.appt-row-actions .btn-open-session {
  flex: 0 0 auto;
  order: -1;
}
.sessions-row-actions {
  max-width: 32rem;
}
.sessions-list-row.is-live > td:first-child {
  box-shadow: inset 3px 0 0 var(--spa-success);
}
.sessions-list-row.is-held > td:first-child {
  box-shadow: inset 3px 0 0 var(--spa-gold);
}
.sessions-list-table .session-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}
@media (max-width: 991.98px) {
  .appt-row-actions {
    max-width: none;
    min-width: 9rem;
  }
  .appt-row-actions .btn {
    min-height: 40px;
  }
}
.appt-status-present,
.appt-status-draft,
.appt-status-approved {
  color: #b6e4c8;
  background: rgba(61, 155, 106, 0.12);
  border-color: rgba(61, 155, 106, 0.3);
}
.appt-status-absent,
.appt-status-cancelled {
  color: #f0b4b4;
  background: rgba(196, 92, 92, 0.12);
  border-color: rgba(196, 92, 92, 0.3);
}
.appt-status-half_day,
.appt-status-leave,
.appt-status-holiday,
.appt-status-week_off,
.appt-status-clocked_out,
.appt-status-paid {
  color: #e8d59a;
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.3);
}
.appt-status-pending {
  color: #f0dfad;
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.3);
}
.appt-status-done {
  color: #b6e4c8;
  background: rgba(61, 155, 106, 0.12);
  border-color: rgba(61, 155, 106, 0.3);
}

/* —— Live therapy sessions —— */
.session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.9rem;
}
/* Dashboard billing: fixed 6-across on desktop; extras wrap to new rows */
#billingDashGrid.session-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (max-width: 1199.98px) {
  #billingDashGrid.session-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 991.98px) {
  #billingDashGrid.session-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 767.98px) {
  #billingDashGrid.session-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 575.98px) {
  #billingDashGrid.session-grid {
    grid-template-columns: 1fr;
  }
}
.session-card {
  background: var(--spa-surface);
  border: 1px solid var(--spa-border);
  border-radius: 1rem;
  padding: 1rem 1.05rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  position: relative;
  overflow: hidden;
}
.session-card.is-live {
  box-shadow: 0 0 0 1px rgba(61, 155, 106, 0.25), 0 12px 28px rgba(0, 0, 0, 0.25);
}
.session-card.is-live::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--spa-success);
}
.session-card.is-overdue:not(.is-held) {
  border-color: rgba(220, 70, 70, 0.55);
  box-shadow:
    0 0 0 1px rgba(200, 50, 50, 0.5),
    0 0 16px rgba(220, 45, 45, 0.55),
    0 0 32px rgba(180, 25, 25, 0.35),
    0 12px 28px rgba(0, 0, 0, 0.28);
}
.session-card.is-overdue:not(.is-held)::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #e04545;
  box-shadow: 0 0 10px rgba(224, 69, 69, 0.85);
}
.session-card.is-held {
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.28);
}
.session-card.is-held::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--spa-gold);
}
.session-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.session-room {
  font-family: var(--spa-serif);
  color: var(--spa-gold);
  font-size: 1.05rem;
  font-weight: 600;
}
.session-badge {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--spa-muted);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}
.session-client {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--spa-text);
}
.session-meta {
  color: var(--spa-muted);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.session-timer {
  font-family: var(--spa-serif);
  font-size: 2rem;
  letter-spacing: 0.06em;
  color: var(--spa-gold-soft);
  line-height: 1.1;
  margin-top: 0.25rem;
}
.session-timer.is-paused {
  color: #f0dfad;
  opacity: 0.85;
}
.session-timer.is-overdue {
  color: #f0b4b4;
}
.session-timer-hint,
.live-chip-timer-hint {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--spa-muted);
  line-height: 1;
}
.session-timer-hint {
  margin-top: 0.15rem;
}
.session-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.55rem;
}

/* —— Sessions board: live hero + startable cards —— */
.sessions-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.session-live-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
a.session-live-block {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
a.session-live-block:hover {
  border-color: rgba(61, 155, 106, 0.55);
  transform: translateY(-2px);
  color: inherit;
}
.session-live-wrap-actions {
  margin-top: 0;
  padding: 0 0.15rem;
}
.session-start-block .btn-start-session {
  min-width: 7.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding-left: 1.15rem;
  padding-right: 1.15rem;
}
.session-start-block .session-actions {
  align-items: center;
}
.session-start-block .js-start-session-form {
  flex: 1 1 auto;
  min-width: 7.5rem;
}
.session-start-block .js-start-session-form .btn-start-session {
  width: 100%;
}
.session-card.is-upcoming {
  opacity: 0.98;
}
.session-detail-hero {
  max-width: 52rem;
}
.session-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem 1.1rem;
  margin-top: 0.85rem;
}
.session-detail-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--spa-muted);
  margin-bottom: 0.2rem;
}
.session-detail-stat strong {
  color: var(--spa-text);
  font-weight: 560;
}

/* —— Dashboard billing cards (completed sessions) —— */
a.billing-dash-card {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
a.billing-dash-card:hover {
  border-color: rgba(212, 175, 55, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  color: inherit;
}
.billing-dash-card.is-pending {
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.28);
}
.billing-dash-card.is-pending::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--spa-gold);
}
.billing-dash-card.is-billed::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--spa-success);
}
.billing-dash-card.is-selected {
  border-color: rgba(212, 175, 55, 0.75);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.45), 0 10px 24px rgba(0, 0, 0, 0.28);
}
.billing-dash-select {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 2;
  margin: 0;
  cursor: pointer;
  padding: 0.15rem;
  border-radius: 0.35rem;
  background: rgba(8, 14, 11, 0.72);
}
.js-bill-together-card .session-card-top {
  padding-left: 1.6rem;
}
.billing-dash-select .form-check-input {
  margin: 0;
  cursor: pointer;
}
a.billing-dash-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}
a.billing-dash-card-link:hover {
  color: inherit;
}
.bill-together-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.bill-badge-pending {
  color: var(--spa-gold);
  border-color: rgba(212, 175, 55, 0.45);
}
.bill-badge-done {
  color: #8fd6ad;
  border-color: rgba(61, 155, 106, 0.4);
}
.bill-badge-warn {
  color: #e0b07a;
  border-color: rgba(200, 140, 60, 0.45);
}
.billing-dash-amount {
  font-family: var(--spa-serif);
  font-size: 1.55rem;
  letter-spacing: 0.04em;
  color: var(--spa-gold-soft);
  line-height: 1.1;
  margin-top: 0.2rem;
}
.billing-dash-cta {
  margin-top: 0.15rem;
}

/* —— Sticky live session bar (all pages) —— */
.live-session-bar {
  position: relative;
  z-index: 1;
  background: rgba(8, 14, 11, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(61, 155, 106, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.live-session-bar-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 1rem;
  overflow: hidden;
}
.live-session-bar-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fd6ad;
  font-weight: 600;
  white-space: nowrap;
}
.live-session-count {
  color: rgba(143, 214, 173, 0.75);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.live-session-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3d9b6a;
  box-shadow: 0 0 0 0 rgba(61, 155, 106, 0.55);
  animation: livePulse 1.6s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 155, 106, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(61, 155, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 155, 106, 0); }
}
.live-session-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding: 0.1rem 0;
}
.live-chip.session-card {
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0.28rem 0.45rem 0.28rem 0.2rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: rgba(12, 22, 17, 0.92);
  overflow: hidden;
  user-select: none;
  touch-action: pan-x;
}
.live-chip.session-card::before {
  width: 3px;
}
.live-chip.session-card.is-live:not(.is-overdue)::before {
  background: var(--spa-success, #3d9b6a);
}
.live-chip.session-card.is-overdue:not(.is-held) {
  border-color: rgba(220, 70, 70, 0.6);
  background: rgba(28, 12, 12, 0.95);
  box-shadow:
    0 0 0 1px rgba(210, 55, 55, 0.55),
    0 0 14px rgba(220, 50, 50, 0.65),
    0 0 28px rgba(190, 30, 30, 0.45);
  animation: liveOverGlow 1.7s ease-in-out infinite;
}
.live-chip.session-card.is-overdue:not(.is-held)::before {
  background: #e04545;
  box-shadow: 0 0 10px rgba(224, 69, 69, 0.95);
  width: 3px;
}
.live-chip.session-card.is-overdue:not(.is-held) .live-chip-timer-hint {
  color: #f0a0a0;
}
@keyframes liveOverGlow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(210, 55, 55, 0.55),
      0 0 12px rgba(220, 50, 50, 0.55),
      0 0 24px rgba(190, 30, 30, 0.35);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(230, 80, 80, 0.75),
      0 0 20px rgba(240, 60, 60, 0.85),
      0 0 40px rgba(200, 35, 35, 0.55);
  }
}
.live-chip.session-card.is-held {
  border-color: rgba(212, 175, 55, 0.45);
  animation: none;
}
.live-chip.session-card.is-dragging {
  opacity: 0.35;
}
.live-chip-handle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: rgba(212, 175, 55, 0.55);
  cursor: grab;
  touch-action: none;
  line-height: 1;
}
.live-chip-handle:hover,
.live-chip-handle:focus-visible {
  color: var(--spa-gold-soft, #d4af37);
  background: rgba(212, 175, 55, 0.1);
  outline: none;
}
.live-chip-handle:active {
  cursor: grabbing;
}
body.live-chip-dnd-active {
  cursor: grabbing;
  user-select: none;
}
body.live-chip-dnd-active .live-chip-link {
  pointer-events: none;
}
.live-chip-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.92;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  transform: translate(-9999px, -9999px);
}
.live-chip-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 1 1 auto;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  padding: 0.1rem 0.25rem 0.1rem 0;
}
.live-chip-link:hover {
  color: inherit;
}
.live-chip-link:hover .live-chip-chair,
.live-chip-link:focus-visible .live-chip-chair {
  color: var(--spa-gold-soft, #d4af37);
}
.live-chip-chair {
  flex: 0 1 auto;
  max-width: 7.5rem;
  font-family: var(--spa-serif);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--spa-gold, #d4af37);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-chip-timer-wrap {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-width: 4.6rem;
  line-height: 1.05;
}
.live-chip-timer.session-timer {
  font-size: 0.98rem;
  margin: 0;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}
.live-chip-timer-hint {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--spa-muted);
  line-height: 1;
}
.live-chip-hold-badge {
  flex: 0 0 auto;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f0dfad;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 999px;
  padding: 0.12rem 0.4rem;
  white-space: nowrap;
  background: rgba(212, 175, 55, 0.08);
}
.live-session-bar-cta {
  flex: 0 0 auto;
  align-self: center;
  min-width: 2rem;
  padding-left: 0.45rem;
  padding-right: 0.45rem;
}

.session-swap {
  position: relative;
}
.session-swap > summary {
  list-style: none;
  cursor: pointer;
}
.session-swap > summary::-webkit-details-marker {
  display: none;
}
.session-swap-form {
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 12.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  background: var(--spa-surface, #1a1a1a);
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.session-card .session-swap-form {
  left: 0;
  right: auto;
}
.session-card:has(.session-swap[open]) {
  overflow: visible;
  z-index: 120;
}
.session-swap[open] .session-swap-form {
  z-index: 200;
}
.session-segment-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  font-size: 0.72rem;
}
.session-segment-list li {
  color: var(--spa-muted);
  padding: 0.1rem 0;
}
.session-segment-list li.is-current {
  color: var(--spa-gold-soft, #d4af37);
}
.session-service-lines {
  margin-top: 0.35rem;
}
.booking-duration-box .booking-duration-input {
  max-width: 7rem;
}

.list-group-item {
  color: var(--spa-text);
}
.list-group-item.active {
  background: rgba(212, 175, 55, 0.14) !important;
  border-color: rgba(212, 175, 55, 0.35) !important;
  color: var(--spa-gold-soft) !important;
}
.list-group-item-action:hover {
  background: rgba(212, 175, 55, 0.08);
  color: var(--spa-gold-soft);
}
.appt-status-due,
.appt-status-partial {
  color: #f0dfad;
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.3);
}
.appt-status-paid {
  color: #b6e4c8;
  background: rgba(61, 155, 106, 0.12);
  border-color: rgba(61, 155, 106, 0.3);
}
.appt-status-void {
  color: #e4b6b6;
  background: rgba(180, 70, 70, 0.12);
  border-color: rgba(180, 70, 70, 0.3);
}

.report-card {
  display: block;
  height: 100%;
  padding: 1.25rem 1.2rem;
  border-radius: 1rem;
  border: 1px solid var(--spa-border);
  background: var(--spa-surface);
  color: var(--spa-text);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.report-card:hover {
  border-color: var(--spa-gold);
  color: var(--spa-text);
  transform: translateY(-2px);
  background: rgba(212, 175, 55, 0.06);
}
.report-card i {
  font-size: 1.5rem;
  color: var(--spa-gold);
  display: block;
  margin-bottom: 0.65rem;
}
.report-card h3 {
  font-family: var(--spa-serif);
  font-size: 1.25rem;
  color: var(--spa-gold-soft);
  margin: 0 0 0.35rem;
}
.report-card p {
  margin: 0;
  color: var(--spa-muted);
  font-size: 0.88rem;
}
.report-filters .form-label {
  font-size: 0.75rem;
}
.report-chrome-logo {
  object-fit: contain;
  opacity: 0.95;
  margin-top: 0.35rem;
}
.report-chrome-meta-bar {
  border: 1px solid var(--spa-border);
}
.report-chrome-meta {
  font-size: 0.9rem;
}
.report-empty {
  border: 1px dashed var(--spa-border);
  border-radius: var(--spa-radius);
  background: rgba(18, 28, 24, 0.35);
}
.report-export-btns .btn {
  touch-action: manipulation;
}
@media (max-width: 767.98px) {
  .report-chrome-meta-bar {
    font-size: 0.78rem;
  }
  .stat-card .stat-value {
    font-size: 1.15rem;
  }
}
.report-quick-filters .audit-chip.is-active {
  color: var(--spa-ink, #1a1a1a);
  border-color: var(--spa-gold);
  background: rgba(212, 175, 55, 0.22);
}

.badge-soft.audit-action-insert {
  color: #8fd4a8;
  border-color: rgba(143, 212, 168, 0.35);
  background: rgba(40, 120, 70, 0.2);
}
.badge-soft.audit-action-update {
  color: var(--spa-gold-soft);
}
.badge-soft.audit-action-delete {
  color: #f0a0a0;
  border-color: rgba(240, 160, 160, 0.35);
  background: rgba(140, 40, 40, 0.22);
}
.badge-soft.audit-action-login {
  color: #8ec8f0;
  border-color: rgba(142, 200, 240, 0.4);
  background: rgba(30, 90, 140, 0.22);
}
.badge-soft.audit-action-logout {
  color: #c8b8a0;
  border-color: rgba(200, 184, 160, 0.35);
  background: rgba(90, 70, 40, 0.2);
}
.audit-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--spa-border);
  color: var(--spa-muted);
  text-decoration: none;
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.18);
}
.audit-chip:hover {
  color: var(--spa-gold-soft);
  border-color: rgba(212, 175, 55, 0.4);
}
.audit-chip.is-active {
  color: var(--spa-gold);
  border-color: rgba(212, 175, 55, 0.55);
  background: rgba(212, 175, 55, 0.12);
}

.suggest-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.suggest-card {
  display: flex;
  gap: 0.9rem;
  padding: 1.1rem 1.15rem;
  border-radius: 1rem;
  border: 1px solid var(--spa-border);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.06), transparent 55%),
    var(--spa-surface);
}
.suggest-rank {
  flex: 0 0 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  color: #1a2e1f;
  background: var(--spa-gold);
  font-weight: 600;
}
.suggest-body {
  flex: 1;
  min-width: 0;
}
.suggest-name {
  font-family: var(--spa-serif);
  font-size: 1.2rem;
  color: var(--spa-gold-soft);
  margin: 0 0 0.15rem;
}
.suggest-phone {
  color: var(--spa-muted);
  font-size: 0.9rem;
}
.suggest-score {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--spa-gold);
  line-height: 1;
}
.suggest-reason {
  margin: 0.55rem 0 0.35rem;
  color: var(--spa-text);
}
.suggest-extra {
  margin: 0 0 0.4rem;
  padding-left: 1.1rem;
  color: var(--spa-muted);
  font-size: 0.88rem;
}
.suggest-action {
  color: var(--spa-muted);
  font-size: 0.9rem;
}
.kind-enquiry { border-color: rgba(212, 175, 55, 0.45); }
.kind-followup { border-color: rgba(120, 180, 220, 0.45); color: #b7d7ea; }
.kind-revisit { border-color: rgba(61, 155, 106, 0.45); color: #b6e4c8; }
.kind-lapsed { border-color: rgba(220, 160, 90, 0.45); color: #f0c9a0; }
.kind-recovery { border-color: rgba(200, 100, 100, 0.45); color: #e8b0b0; }

/* Yes / No confirm (delete, cancel, restore) */
.confirm-action-modal .modal-content {
  background: var(--spa-surface);
  border: 1px solid var(--spa-border);
}
.confirm-action-modal .modal-title {
  color: var(--spa-text);
}
.confirm-action-modal #confirmActionYes {
  min-width: 5.5rem;
}
.confirm-action-modal #confirmActionNo {
  min-width: 5.5rem;
}

/* End session — therapist duration popup (sticky footer, scroll body) */
.end-session-modal-dialog {
  max-width: 28rem;
  margin: 0.5rem auto;
  max-height: calc(100dvh - 1rem);
}
.end-session-modal-content {
  max-height: calc(100dvh - 1rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.end-session-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}
.end-session-modal-body {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.end-session-modal-footer {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--spa-surface);
}
.end-session-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.end-session-summary-row--session-time {
  align-items: center;
}
.end-session-overall-input-wrap {
  flex: 0 0 auto;
}
/* Shared minutes input size: Session Time + therapist Minutes */
.end-session-overall-input-wrap .form-control,
.end-session-seg-field .form-control {
  width: 7rem;
  min-width: 7rem;
  max-width: 7rem;
  text-align: right;
  box-sizing: border-box;
}
.end-session-segments {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.end-session-seg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--spa-border);
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
}
.end-session-seg-title {
  font-weight: 600;
  margin-bottom: 0;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.3;
}
.end-session-seg-fields {
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
  align-items: center;
  margin: 0;
}
.end-session-seg-field {
  display: block;
  flex: 0 0 auto;
  margin: 0;
  min-width: 0;
}
@media (max-width: 575.98px) {
  .end-session-modal-dialog {
    margin: 0.5rem;
    max-width: none;
    max-height: calc(100dvh - 1rem);
  }
}

/* Global ops alerts modal */
.ops-alert-modal .modal-title {
  color: var(--spa-text);
}
.ops-alert-urgent .modal-header {
  border-bottom-color: rgba(200, 140, 60, 0.55) !important;
}
.ops-alert-urgent #opsAlertIcon {
  color: #e0b07a;
}
.ops-alert-meta {
  line-height: 1.4;
}

/* Live session timer alerts (ending soon / on-time / overtime Continue) */
.session-timer-alert-modal {
  background: var(--spa-surface);
  border: 1px solid var(--spa-border);
}
.session-timer-alert-modal .modal-title {
  color: var(--spa-text);
}
.session-timer-alert-modal.is-warn {
  border-color: rgba(220, 180, 60, 0.55);
  box-shadow: 0 0 24px rgba(220, 180, 60, 0.25);
}
.session-timer-alert-modal.is-warn .modal-header {
  border-bottom-color: rgba(220, 180, 60, 0.45) !important;
}
.session-timer-alert-modal.is-warn #sessionTimerAlertIcon {
  color: #e0c060;
}
.session-timer-alert-modal.is-danger {
  border-color: rgba(220, 70, 70, 0.65);
  box-shadow: 0 0 28px rgba(220, 50, 50, 0.4);
}
.session-timer-alert-modal.is-danger .modal-header {
  border-bottom-color: rgba(220, 70, 70, 0.55) !important;
}
.session-timer-alert-modal.is-danger #sessionTimerAlertIcon {
  color: #f08080;
}
.session-timer-alert-meta {
  line-height: 1.4;
}
.session-timer-alert-danger .modal-dialog {
  filter: drop-shadow(0 0 18px rgba(200, 40, 40, 0.35));
}
.session-timer-alert-warn .modal-dialog {
  filter: drop-shadow(0 0 14px rgba(200, 160, 40, 0.28));
}

/* Daily follow-up alerts */
.fu-alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.65rem 1rem;
  background: rgba(212, 175, 55, 0.12);
  border-bottom: 1px solid rgba(212, 175, 55, 0.35);
}
.fu-alert-banner[hidden] {
  display: none !important;
}
.fu-alert-banner-copy {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--spa-text);
  font-size: 0.92rem;
}
.fu-alert-banner-copy .bi {
  color: var(--spa-gold);
}
.fu-alert-banner-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.fu-dash-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.08);
}
.fu-dash-strip[hidden] {
  display: none !important;
}
.fu-dash-strip-copy {
  color: var(--spa-text);
  font-weight: 500;
}
.fu-alert-section-label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--spa-muted);
  margin: 0.35rem 0 0.45rem;
}
.fu-alert-list {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}
.fu-alert-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--spa-border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.02);
}
.fu-alert-row:hover {
  border-color: rgba(212, 175, 55, 0.55);
  color: inherit;
}
.fu-alert-name {
  font-weight: 600;
}
.fu-alert-meta,
.fu-alert-notes {
  font-size: 0.82rem;
  color: var(--spa-muted);
}
.fu-alert-row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: flex-end;
}
.fu-nav-badge {
  margin-left: auto;
  min-width: 1.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--spa-gold);
  color: #1a1408;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}
.nav-link {
  display: flex;
  align-items: center;
}

/* SMS / WhatsApp masters setup */
.msg-placeholders {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  display: grid;
  gap: 0.35rem;
}
.msg-placeholders li {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--spa-muted);
}
.msg-placeholders code,
.msg-chips code {
  color: var(--spa-gold-soft);
}
.msg-preview {
  max-width: 420px;
  white-space: pre-wrap;
  color: var(--spa-muted);
  font-size: 0.86rem;
}
.msg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.msg-live-preview {
  background: rgba(243, 239, 228, 0.04);
  border: 1px dashed var(--spa-border);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  white-space: pre-wrap;
  color: var(--spa-text);
  min-height: 4.5rem;
}


/* ΓÇöΓÇö Google reviews ΓÇöΓÇö */
.gr-stars { color: var(--spa-gold); letter-spacing: 0.05em; }
.gr-stars .bi-star { opacity: 0.35; }
.gr-panel td { vertical-align: top; }
.gr-dash-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.gr-dash-stat {
  min-width: 8.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: rgba(212, 175, 55, 0.06);
}
.gr-dash-stat .stat-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--spa-muted);
  margin-bottom: 0.15rem;
}
.gr-dash-stat .stat-value {
  display: block;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--spa-text);
}
.gr-dash-list {
  display: grid;
  gap: 0.75rem;
}
.gr-dash-item {
  border: 1px solid var(--spa-border);
  border-radius: 0.85rem;
  padding: 0.75rem 0.9rem;
  background: rgba(212, 175, 55, 0.04);
}
@media (min-width: 768px) {
  .gr-dash-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.report-cohort-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.report-cohort-tabs .btn.active {
  background: rgba(212, 175, 55, 0.16);
}
.stat-card .text-muted.small {
  margin-top: 0.25rem;
}

/* Log Follow-up: exclusive client vs enquiry */
.fu-kind-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.fu-kind-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: rgba(7, 11, 9, 0.45);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.fu-kind-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.fu-kind-card:hover,
.fu-kind-card.is-on {
  border-color: var(--spa-gold);
}
.fu-kind-card.is-on {
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.22), rgba(212, 175, 55, 0.08));
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.25);
}
.fu-kind-title {
  font-weight: 600;
  color: var(--spa-text);
}
.fu-kind-meta {
  font-size: 0.8rem;
  color: var(--spa-muted);
}

.birthday-offer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.18);
  color: var(--spa-gold);
  vertical-align: middle;
  font-size: 0.75rem;
}
.birthday-offer-card {
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.16), rgba(212, 175, 55, 0.05));
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
}
.birthday-offer-icon {
  color: var(--spa-gold);
  font-size: 1.25rem;
  margin-top: 0.1rem;
}
.birthday-offer-inline {
  color: var(--spa-gold);
  font-size: 0.82rem;
  font-weight: 600;
}
.fu-form .fu-client-block,
.fu-form .fu-enquiry-block,
.fu-form .fu-rest {
  display: none;
}
.fu-form:has([name="subject_kind"][value="client"]:checked) .fu-client-block,
.fu-form:has([name="subject_kind"][value="client"]:checked) .fu-rest,
.fu-form:has([name="subject_kind"][value="enquiry"]:checked) .fu-enquiry-block,
.fu-form:has([name="subject_kind"][value="enquiry"]:checked) .fu-rest,
.fu-form.fu-form-locked .fu-rest {
  display: block;
}
.fu-form .fu-edge {
  margin-bottom: 1rem;
}
.fu-form-page {
  max-width: 880px;
  margin: 0 auto;
}
.fu-form-card {
  width: 100%;
}
.fu-section-title {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--spa-gold);
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.fu-person-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: rgba(7, 11, 9, 0.35);
}
.fu-person-id {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.55rem;
  min-width: 0;
  flex: 1 1 12rem;
}
.fu-person-name,
.fu-person-phone {
  overflow-wrap: anywhere;
}
.fu-person-summary > .btn,
.fu-person-summary > a.btn {
  flex-shrink: 0;
}
.fu-form-page,
.fu-form-card,
.fu-form,
.fu-section,
.fu-form .row,
.fu-form .row > [class*="col-"] {
  min-width: 0;
  max-width: 100%;
}
.fu-form .form-control,
.fu-form .form-select,
.fu-form textarea.form-control,
.fu-form input[type="date"] {
  min-width: 0;
  max-width: 100%;
}
.fu-notes textarea.form-control {
  max-width: 100%;
  width: 100%;
}
/* Schedule dates, and outcome + next action, sit side by side once the card is wide enough. */
@media (min-width: 768px) {
  .fu-form.spa-form-vertical .fu-split .row > [class*="col-"] {
    flex: 0 0 auto;
    width: 50%;
    max-width: 50%;
  }
  /* Outcome stays full width until Next action is shown. */
  .fu-form.spa-form-vertical #callOutcomeSection .row:has(> .d-none) > [class*="col-"]:not(.d-none) {
    width: 100%;
    max-width: 100%;
  }
  .fu-form.spa-form-vertical #callOutcomeSection .row:has(> .d-none) > [class*="col-"]:not(.d-none) > .form-select,
  .fu-form.spa-form-vertical #callOutcomeSection .row:has(> .d-none) > [class*="col-"]:not(.d-none) > .form-control {
    max-width: 100%;
  }
}
@media (max-width: 767.98px) {
  .fu-form-page .page-heading {
    font-size: 1.45rem;
  }
  .fu-person-summary {
    align-items: stretch;
    padding: 0.75rem;
  }
  .fu-person-summary > .btn,
  .fu-person-summary > a.btn {
    width: 100%;
    text-align: center;
  }
  .fu-form-actions {
    flex-direction: column;
  }
  .fu-form-actions .btn {
    width: 100%;
  }
}

/* Call List — full content width, no horizontal scroll, readable columns */
.cl-page {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.cl-page .cd-directory.card-surface,
.cl-page .cd-table-wrap,
.cl-page .table-responsive {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.cl-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  min-width: 0 !important;
}
.cl-table th,
.cl-table td {
  min-width: 0;
  overflow: hidden;
  vertical-align: middle;
}
.cl-table thead th {
  white-space: nowrap;
}
.cl-table .cd-sort {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cl-col-due { width: 10%; }
.cl-col-person { width: 18%; }
.cl-col-phone { width: 12%; }
.cl-col-interest { width: 12%; }
.cl-col-outcome { width: 12%; }
.cl-col-logged { width: 12%; }
.cl-col-notes { width: 16%; }
.cl-col-actions { width: 8%; text-align: right; white-space: nowrap; }
.cl-outcome-inline { display: none; }
.cl-table .cd-name,
.cl-table .cd-cell-value,
.cl-notes-preview,
.cl-phone,
.cl-ellip {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cl-phone {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--spa-gold-soft);
  font: inherit;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
  text-align: left;
  display: block;
  width: 100%;
}
.cl-phone:hover { color: var(--spa-gold); }
.cl-kind {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.08rem 0.38rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--spa-gold);
  margin-right: 0.25rem;
}
.cl-kind-enquiry {
  border-color: rgba(120, 180, 220, 0.45);
  color: #b7d7ea;
}
.cl-badge {
  display: inline-block;
  font-size: 0.68rem;
  padding: 0.08rem 0.38rem;
  border-radius: 0.35rem;
  background: rgba(212, 175, 55, 0.14);
  color: var(--spa-gold);
  margin-top: 0.12rem;
}
.cl-badge-overdue { background: rgba(200, 80, 80, 0.18); color: #e8a0a0; }
.cl-badge-done { background: rgba(80, 160, 110, 0.18); color: #9dceb0; }
.cl-badge-cancelled,
.cl-badge-skipped { background: rgba(140, 140, 140, 0.18); color: #b0b0b0; }
.cl-badge-upcoming { background: rgba(120, 180, 220, 0.16); color: #b7d7ea; }

/* ≤1400px: drop Interest so Logged By / Notes stay readable */
@media (max-width: 1399.98px) {
  .cl-col-interest { display: none; }
  .cl-col-due { width: 11%; }
  .cl-col-person { width: 22%; }
  .cl-col-phone { width: 14%; }
  .cl-col-outcome { width: 14%; }
  .cl-col-logged { width: 14%; }
  .cl-col-notes { width: 17%; }
  .cl-col-actions { width: 8%; }
}
/* Tablet: keep Due + Person + Actions; phone and outcome under name */
@media (max-width: 991.98px) {
  .cl-col-phone,
  .cl-col-logged,
  .cl-col-notes,
  .cl-col-outcome { display: none; }
  .cl-outcome-inline { display: inline-block; }
  .cl-page .cd-phone-inline { display: block; }
  .cl-col-due { width: 28%; }
  .cl-col-person { width: 60%; }
  .cl-col-actions { width: 12%; }
}
@media (max-width: 767.98px) {
  .cl-page .cd-search {
    max-width: none;
    flex: 1 1 100%;
  }
}
@media (max-width: 576px) {
  .fu-kind-grid { grid-template-columns: 1fr; }
}

/* Enquiry directory (Clients-style table) */
.enq-page {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.enq-page .cd-directory.card-surface,
.enq-page .cd-table-wrap,
.enq-page .table-responsive {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.enq-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  min-width: 0 !important;
}
.enq-table th,
.enq-table td {
  min-width: 0;
  overflow: hidden;
  vertical-align: middle;
}
.enq-table thead th { white-space: nowrap; }
.enq-table .cd-sort {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.enq-col-name { width: 20%; }
.enq-col-phone { width: 16%; }
.enq-col-source { width: 8%; }
.enq-col-location { width: 8%; }
.enq-col-date { width: 11%; }
.enq-col-call { width: 11%; }
.enq-col-status { width: 8%; text-align: center; }
.enq-col-handler { width: 9%; }
.enq-table .enq-col-actions { width: 9%; text-align: right; white-space: nowrap; }
.enq-table .cd-name,
.enq-table .cd-cell-value,
.enq-ellip {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.enq-badge-converted {
  color: #b7d7ea;
  background: rgba(120, 180, 220, 0.16);
}
.enq-badge-lost {
  color: #e7c9a4;
  background: rgba(180, 120, 70, 0.18);
}
.enq-phone-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  min-width: 0;
}
.enq-phone-num {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--spa-text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
a.enq-phone-num:hover { color: var(--spa-gold-soft); }
.enq-wa {
  color: var(--spa-gold-soft);
  text-decoration: none;
  line-height: 1.2;
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.enq-wa:hover { color: var(--spa-gold); }
.enq-overdue {
  color: #e6c98a;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.enq-table tr.is-overdue .enq-fu { color: #e6c98a; }
.enq-filters > div { flex: 1 1 9rem; min-width: min(100%, 9rem); }
.enq-filters .enq-search { flex: 1 1 12rem; min-width: min(100%, 12rem); }
.enq-filters .form-select,
.enq-filters .form-control { width: 100%; min-width: 0; }
.enq-form-page {
  width: min(100%, 60rem);
  margin-inline: auto;
}
.enq-card {
  padding: 1rem 1.15rem 1.15rem;
  margin-bottom: 0.85rem;
}
.enq-card .ce-section-title { margin-bottom: 0.9rem; }
.enq-form .enq-primary { font-weight: 600; }
.enq-facts {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1.25rem;
  margin: 0;
}
@media (min-width: 992px) {
  .enq-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.enq-detail-split {
  display: grid;
  gap: 1rem 1.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .enq-detail-split { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
  .enq-detail-split .enq-detail-block { margin-top: 0; }
}
.enq-facts dt {
  margin: 0;
  color: var(--spa-muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}
.enq-facts dd {
  margin: 0.12rem 0 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.enq-facts > div { min-width: 0; }
.enq-detail-phone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
}
.enq-detail-split .enq-detail-block { margin-top: 0; min-width: 0; }
.enq-detail-block p { white-space: pre-wrap; overflow-wrap: anywhere; }
.enq-status-form,
.enq-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.enq-status-form .form-select { width: auto; min-width: 12rem; max-width: 100%; }
.enq-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.enq-timeline li {
  position: relative;
  padding: 0 0 0.9rem 1.05rem;
  border-left: 1px solid rgba(212, 175, 55, 0.28);
}
.enq-timeline li::before {
  content: "";
  position: absolute;
  left: -0.28rem;
  top: 0.35rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--spa-gold);
  box-shadow: 0 0 0 3px rgba(7, 11, 9, 0.95);
}
.enq-timeline li:last-child { padding-bottom: 0; }
.enq-timeline-title { font-weight: 600; }
.enq-timeline-detail,
.enq-timeline-when {
  color: var(--spa-muted);
  font-size: 0.85rem;
}
@media (max-width: 1199.98px) {
  .enq-col-location,
  .enq-col-phone { display: none; }
  .enq-page .cd-phone-inline { display: block; }
  .enq-col-name { width: 28%; }
  .enq-col-source { width: 13%; }
  .enq-col-date { width: 13%; }
  .enq-col-call { width: 13%; }
  .enq-col-status { width: 10%; }
  .enq-col-handler { width: 11%; }
  .enq-table .enq-col-actions { width: 12%; }
}
@media (max-width: 991.98px) {
  .enq-col-phone,
  .enq-col-source,
  .enq-col-handler { display: none; }
  .enq-page .cd-phone-inline { display: block; }
  .enq-col-name { width: 34%; }
  .enq-col-date { width: 20%; }
  .enq-col-call { width: 22%; }
  .enq-col-status { width: 14%; }
  .enq-table .enq-col-actions { width: 10%; }
}
@media (max-width: 767.98px) {
  .enq-table th,
  .enq-table td { font-size: 0.8125rem; }
  .enq-col-call { display: none; }
  .enq-col-name { width: 38%; }
  .enq-col-date { width: 30%; }
  .enq-col-status { width: 14%; }
  .enq-table .enq-col-actions { width: 18%; }
  .enq-form-page .client-form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .enq-form-page .client-form-actions .btn { width: 100%; min-height: 44px; }
  .enq-status-form .form-select { width: 100%; }
}

/* Enquiry list uses the same directory card, tabs, and table as Clients.
   Keep only the bits that do not change that surface. */
.enq-filters .btn { align-self: flex-end; min-height: 44px; }
.enq-dnd {
  display: inline-block;
  margin-top: 0.1rem;
  color: var(--spa-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.enq-table td.enq-col-actions,
.enq-table td.enq-col-phone { overflow: visible; }
.enq-phone-actions { flex-wrap: wrap; }
.enq-kicker {
  margin: 0 0 0.75rem;
  color: var(--spa-gold);
  font-family: var(--spa-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.enq-sheet .ce-section-title { margin-bottom: 0.85rem; }
.enq-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--spa-gold);
  text-decoration: none;
  touch-action: manipulation;
}
.enq-back:hover { color: var(--spa-gold-soft); }
.enq-chip {
  border: 0;
  background: transparent;
  color: var(--spa-gold);
  min-height: 44px;
  padding: 0.35rem 0.15rem;
  font-size: 0.85rem;
  touch-action: manipulation;
}
.enq-chip:hover,
.enq-chip:focus { color: var(--spa-gold-soft); }
.enq-sheet .ce-savebar-actions { align-items: center; }
.enq-detail {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 1.15rem 1.25rem 1.25rem;
}
.enq-hero { margin-bottom: 0.15rem; }
.enq-detail-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  margin: 0 0 0.4rem;
  font-size: clamp(1.65rem, 2.2vw, 2.15rem);
  line-height: 1.15;
}
.enq-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--spa-border);
  font-family: var(--spa-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}
.enq-pill-open {
  color: var(--spa-gold-soft);
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(212, 175, 55, 0.12);
}
.enq-pill-converted {
  color: #b7d7ea;
  border-color: rgba(106, 159, 181, 0.5);
  background: rgba(106, 159, 181, 0.12);
}
.enq-pill-lost {
  color: #e7c9a4;
  border-color: rgba(212, 160, 23, 0.45);
  background: rgba(212, 160, 23, 0.1);
}
.enq-pill-closed {
  color: var(--spa-muted);
  background: rgba(154, 168, 159, 0.08);
}
.enq-detail .enq-reason { margin-left: 0; }
.enq-detail .enq-dnd { margin-top: 0; }
.enq-prefs-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0.2rem 0 0;
  color: var(--spa-muted);
  font-size: 0.78rem;
}
.enq-pref.is-on { color: var(--spa-text); }
.enq-pref-dot { opacity: 0.55; }
.enq-facts-wrap,
.enq-notes {
  margin-top: 1rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(212, 175, 55, 0.16);
}
.enq-notes .enq-kicker { margin-bottom: 0.35rem; }
.enq-notes p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.enq-empty { color: var(--spa-muted); }
.enq-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(212, 175, 55, 0.16);
}
.enq-toolbar-main,
.enq-toolbar-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.enq-toolbar-main > form,
.enq-toolbar-danger { display: inline-flex; margin: 0; }
.enq-toolbar-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  max-width: 100%;
}
.enq-toolbar-danger { flex: 1 1 100%; }
.enq-toolbar .btn {
  min-height: 44px;
  width: auto;
  border-radius: 0.75rem;
}
.enq-toolbar .form-select {
  width: 12.5rem;
  max-width: 100%;
  flex: 0 0 auto;
  min-height: 44px;
}
.enq-lower {
  display: grid;
  gap: 1.15rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(212, 175, 55, 0.16);
}
.enq-lower .enq-kicker { margin-bottom: 0.55rem; }
.enq-lower .table-responsive { min-width: 0; }
.enq-detail-name { min-width: 0; overflow-wrap: anywhere; }
.enq-status {
  font-family: var(--spa-sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.enq-status-open { color: var(--spa-gold); }
.enq-status-converted { color: #b7d7ea; }
.enq-status-lost { color: #e7c9a4; }
.enq-status-closed { color: var(--spa-muted); }
.enq-reason {
  display: inline-block;
  margin-left: 0.4rem;
  color: var(--spa-muted);
  font-size: 0.85rem;
}
.enq-contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  color: var(--spa-text);
}
.enq-contact-line strong { font-weight: 600; }
.enq-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 1.15rem;
  margin-top: 1.15rem;
}
.enq-detail .enq-detail-actions,
.enq-detail .enq-status-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 1.15rem;
  margin: 0;
}
.enq-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.2rem 0;
  border: 0;
  background: transparent;
  color: var(--spa-muted);
  text-decoration: none;
  touch-action: manipulation;
}
.enq-action:hover,
.enq-action:focus { color: var(--spa-text); }
.enq-action.is-primary { color: var(--spa-gold); }
.enq-action.is-primary:hover { color: var(--spa-gold-soft); }
.enq-action.is-danger { color: #e7b4b4; }
.enq-action.is-danger:hover { color: #f3d0d0; }
.enq-detail .enq-status-form .form-select {
  min-height: 44px;
}
.enq-detail .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--spa-text);
  --bs-table-hover-bg: transparent;
  border-color: rgba(212, 175, 55, 0.16);
}
.enq-detail .table thead th {
  color: var(--spa-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom-color: rgba(212, 175, 55, 0.2);
}
@media (max-width: 991.98px) {
  .content .card-surface.enq-sheet:has(table) { overflow-x: visible; }
}
@media (max-width: 767.98px) {
  .enq-sheet .ce-savebar-actions {
    justify-content: space-between;
    align-items: center;
  }
  .enq-sheet .ce-savebar-actions .btn {
    flex: 0 0 auto;
    width: auto;
    min-width: 7.5rem;
  }
  .enq-toolbar,
  .enq-toolbar-main,
  .enq-toolbar-status {
    width: 100%;
    margin-left: 0;
  }
  .enq-toolbar-status .form-select,
  .enq-toolbar .form-select { width: 100%; flex-basis: 100%; }
  .enq-facts > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .enq-detail .enq-history thead { display: none; }
  .enq-detail .enq-history,
  .enq-detail .enq-history tbody,
  .enq-detail .enq-history tr,
  .enq-detail .enq-history td { display: block; width: 100%; }
  .enq-detail .enq-history tr {
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.16);
  }
  .enq-detail .enq-history tr:last-child { border-bottom: 0; }
  .enq-detail .enq-history td {
    display: grid;
    grid-template-columns: 7.25rem minmax(0, 1fr);
    gap: 0.35rem 0.75rem;
    align-items: baseline;
    padding: 0.2rem 0;
    border: 0;
  }
  .enq-detail .enq-history td::before {
    content: attr(data-label);
    color: var(--spa-muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
}

/* Our Clients list pages: stay inside the content column */
.cd-page,
.cl-page,
.enq-page,
.content:has(.cd-page),
.content:has(.cl-page),
.content:has(.enq-page) {
  min-width: 0;
  max-width: 100%;
}
.content .cd-directory.card-surface:has(.cd-table),
.content .cd-directory.card-surface:has(.cl-table),
.content .cd-directory.card-surface:has(.enq-table) {
  overflow-x: hidden;
}
/* Enquiry / suggestions / auto-queue: wrap filters, fit table to screen */
.oc-responsive {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}
.oc-responsive .card-surface {
  max-width: 100%;
  min-width: 0;
}
.oc-responsive .table-responsive {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.oc-responsive table.table {
  width: 100%;
  min-width: 0;
}
@media (max-width: 991.98px) {
  .oc-responsive.oc-hide-mid table.table .oc-mid {
    display: none;
  }
  .oc-responsive form.d-flex {
    max-width: 100%;
  }
  .oc-responsive .form-select,
  .oc-responsive .form-control {
    max-width: 100%;
    min-width: 0 !important;
  }
}

.staff-roster-table {
  font-size: 0.86rem;
}
.staff-roster-table th,
.staff-roster-table td {
  white-space: nowrap;
}

@media print {
  @page {
    size: landscape;
    margin: 10mm;
  }
  .sidebar,
  .sidebar-backdrop,
  .sticky-header-stack,
  .topbar,
  .pwa-install-banner,
  .no-print,
  .sidebar-footer {
    display: none !important;
  }
  .app-shell {
    display: block;
    background: #fff;
    min-height: auto;
  }
  .main-area {
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .staff-roster-report,
  .staff-roster-report .card-surface,
  .staff-roster-report .stat-card {
    background: #fff !important;
    color: #111 !important;
    box-shadow: none !important;
    border-color: #ccc !important;
  }
  .staff-roster-report .page-heading,
  .staff-roster-report h3,
  .staff-roster-report .stat-value {
    color: #111 !important;
  }
  .staff-roster-table {
    font-size: 9px;
    color: #111;
  }
  .staff-roster-table th,
  .staff-roster-table td {
    border-color: #ccc !important;
  }
  .d-print-block {
    display: block !important;
  }
}

/* —— Roles & Access screen panel —— */
.access-help-label {
  font-family: var(--spa-serif);
  color: var(--spa-gold-soft);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.access-section-title {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--spa-gold);
  margin: 0 0 0.65rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--spa-border);
}
.access-screen-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.access-screen-card {
  border: 1px solid var(--spa-border);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.18);
}
.access-screen-card.is-locked {
  border-color: rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.06);
}
.access-screen-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
}
.access-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  align-items: center;
}
.access-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.92rem;
  cursor: pointer;
  user-select: none;
}
.access-toggle.is-na {
  cursor: default;
  opacity: 0.65;
}
.access-toggle .form-check-input {
  margin-top: 0;
}
.access-menu-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--spa-border);
}
.access-menu-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--spa-border);
  background: rgba(18, 28, 24, 0.55);
  font-size: 0.8rem;
  color: var(--spa-muted);
  cursor: pointer;
}
.access-menu-chip.is-locked {
  opacity: 0.9;
  border-color: rgba(212, 175, 55, 0.4);
  cursor: default;
}
.access-menu-chip .form-check-input {
  margin-top: 0;
}
.access-lock-hint {
  display: block;
  width: 100%;
  font-size: 0.75rem;
  color: var(--spa-gold-soft);
  margin-top: 0.15rem;
}
@media (max-width: 767.98px) {
  .access-screen-head {
    flex-direction: column;
  }
  .access-toggles {
    width: 100%;
  }
  .access-toggle {
    flex: 1 1 auto;
    min-width: 9.5rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--spa-border);
    border-radius: 0.55rem;
    background: rgba(0, 0, 0, 0.12);
  }
}

/* —— Roles & Access screen panel —— */
.access-help-label {
  font-family: var(--spa-serif);
  color: var(--spa-gold-soft);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.access-section-title {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--spa-gold);
  margin: 0 0 0.65rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--spa-border);
}
.access-screen-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.access-screen-card {
  border: 1px solid var(--spa-border);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.18);
}
.access-screen-card.is-locked {
  border-color: rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.06);
}
.access-screen-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
}
.access-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  align-items: center;
}
.access-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.92rem;
  cursor: pointer;
  user-select: none;
}
.access-toggle.is-na {
  cursor: default;
  opacity: 0.65;
}
.access-toggle .form-check-input {
  margin-top: 0;
}
.access-menu-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--spa-border);
}
.access-menu-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--spa-border);
  background: rgba(18, 28, 24, 0.55);
  font-size: 0.8rem;
  color: var(--spa-muted);
  cursor: pointer;
}
.access-menu-chip.is-locked {
  opacity: 0.9;
  border-color: rgba(212, 175, 55, 0.4);
  cursor: default;
}
.access-menu-chip .form-check-input {
  margin-top: 0;
}
.access-lock-hint {
  display: block;
  width: 100%;
  font-size: 0.75rem;
  color: var(--spa-gold-soft);
  margin-top: 0.15rem;
}
@media (max-width: 767.98px) {
  .access-screen-head {
    flex-direction: column;
  }
  .access-toggles {
    width: 100%;
  }
  .access-toggle {
    flex: 1 1 auto;
    min-width: 9.5rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--spa-border);
    border-radius: 0.55rem;
    background: rgba(0, 0, 0, 0.12);
  }
}

/* —— Client Membership & wallet panel —— */
.membership-wallet-panel {
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 0.9rem;
  padding: 1.1rem 1.15rem 1.15rem;
  background:
    linear-gradient(160deg, rgba(212, 175, 55, 0.12), rgba(212, 175, 55, 0.03) 42%, transparent 70%),
    rgba(0, 0, 0, 0.14);
}
.membership-wallet-title {
  font-family: var(--spa-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--spa-text);
}
.membership-wallet-status {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid var(--spa-border);
  background: rgba(0, 0, 0, 0.18);
}
.membership-wallet-status.status-active {
  color: #c8e6c9;
  border-color: rgba(76, 175, 80, 0.45);
  background: rgba(76, 175, 80, 0.12);
}
.membership-wallet-status.status-expiring_soon {
  color: var(--spa-gold);
  border-color: rgba(212, 175, 55, 0.55);
  background: rgba(212, 175, 55, 0.14);
}
.membership-wallet-status.status-expired,
.membership-wallet-status.status-inactive,
.membership-wallet-status.status-cancelled {
  color: #ef9a9a;
  border-color: rgba(229, 115, 115, 0.4);
  background: rgba(229, 115, 115, 0.1);
}
.membership-wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr));
  gap: 0.75rem;
}
.membership-wallet-stat {
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid var(--spa-border);
  border-radius: 0.75rem;
  padding: 0.75rem 0.85rem;
}
.membership-wallet-stat--hero {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.08);
}
.membership-wallet-label {
  display: block;
  color: var(--spa-muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.membership-wallet-value {
  display: block;
  font-family: var(--spa-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--spa-text);
  line-height: 1.25;
  margin-top: 0.2rem;
}
.membership-wallet-value--sm {
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 500;
}
.membership-wallet-balance {
  color: var(--spa-gold);
  font-size: 1.65rem;
}
.membership-wallet-note,
.membership-wallet-copy {
  display: block;
  margin-top: 0.35rem;
  color: var(--spa-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}
.membership-wallet-block {
  border-top: 1px solid rgba(212, 175, 55, 0.18);
  padding-top: 0.85rem;
}
.membership-wallet-offers li {
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}
.membership-wallet-offer-code {
  color: var(--spa-gold);
  font-weight: 600;
}
.membership-wallet-ledger th {
  color: var(--spa-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.membership-wallet-ledger td {
  vertical-align: top;
  font-size: 0.88rem;
}
.membership-wallet-empty {
  padding: 0.15rem 0.1rem 0.25rem;
}
/* Guest profile scrolls inside history tables, not the whole card.
   .content .card-surface:has(table) would otherwise pan the profile sideways. */
.client-detail,
.client-detail-card,
.client-detail-title,
.membership-wallet-panel {
  min-width: 0;
  max-width: 100%;
}
.client-detail-title .page-heading,
.membership-wallet-copy,
.membership-wallet-note,
.membership-wallet-offers li,
.membership-wallet-ledger td {
  overflow-wrap: anywhere;
}
@media (max-width: 991.98px) {
  .content .card-surface.client-detail-card,
  .content .card-surface.client-register-card,
  .content .card-surface.client-register,
  .content .card-surface.client-edit,
  .content .card-surface.client-profile-panes {
    overflow: visible;
    min-width: 0;
    max-width: 100%;
  }
}

.client-profile {
  min-width: 0;
  max-width: 100%;
}
.client-profile-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.85rem 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}
.client-profile-title {
  min-width: 0;
}
.client-profile-title .page-heading {
  overflow-wrap: anywhere;
}
.client-profile-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.client-profile-guest-status {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--spa-border);
}
.client-profile-guest-status.is-active {
  color: #c8e6c9;
  border-color: rgba(76, 175, 80, 0.45);
  background: rgba(76, 175, 80, 0.12);
}
.client-profile-guest-status.is-inactive {
  color: #ef9a9a;
  border-color: rgba(229, 115, 115, 0.4);
  background: rgba(229, 115, 115, 0.1);
}
.client-profile-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  gap: 0.75rem 1rem;
}
.client-profile-member-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr));
  gap: 0.75rem 1rem;
  align-content: start;
}
.client-profile-facts {
  margin-bottom: 0.9rem;
}
.client-profile-fact {
  min-width: 0;
}
.client-profile-fact-value,
.client-profile-fact span {
  overflow-wrap: anywhere;
}
.client-profile-fact-value {
  display: block;
  margin-top: 0.15rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.client-profile-fact-caption {
  display: block;
  margin-top: 0.15rem;
  color: var(--spa-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}
.client-profile-member {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: stretch;
}
.client-profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.client-profile-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border-bottom: 1px solid var(--spa-border);
  gap: 0.15rem;
  margin-bottom: 0;
  max-width: 100%;
}
.client-profile-tabs .nav-link {
  color: var(--spa-muted);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  white-space: nowrap;
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  touch-action: manipulation;
}
.client-profile-tabs .nav-link:hover,
.client-profile-tabs .nav-link:focus {
  color: var(--spa-gold-soft);
  border-color: transparent;
}
.client-profile .client-profile-tabs.nav-tabs .nav-link.active,
.client-profile .client-profile-tabs.nav-tabs .nav-link.active:hover,
.client-profile .client-profile-tabs.nav-tabs .nav-link.active:focus {
  color: var(--spa-gold);
  background: transparent;
  border-color: transparent;
  border-bottom: 2px solid var(--spa-gold);
  font-weight: 600;
  box-shadow: none;
}
.extra-wallet-modal .modal-content {
  background: var(--spa-surface-solid);
  color: var(--spa-text);
  border: 1px solid rgba(212, 175, 55, 0.35);
}
.extra-wallet-modal .modal-header,
.extra-wallet-modal .modal-footer {
  border-color: rgba(212, 175, 55, 0.22);
}
.extra-wallet-modal .modal-title {
  color: var(--spa-gold);
}
.client-profile-panes,
.client-profile-panes > .tab-pane {
  height: auto;
  max-height: none;
  overflow: visible;
}
.client-profile-panes {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  min-width: 0;
  max-width: 100%;
  padding: 1rem 1.1rem 1.15rem;
}
.client-profile-panes .table-responsive {
  max-width: 100%;
}
.client-profile-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.client-profile-tile {
  min-width: 0;
  border: 1px solid var(--spa-border);
  border-radius: 0.75rem;
  padding: 0.85rem 0.9rem;
  background: rgba(0, 0, 0, 0.16);
}
.client-profile-tile-title {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--spa-gold);
  margin: 0 0 0.65rem;
}
.client-profile-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}
.client-profile-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.client-profile-list-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.1rem;
}
.client-profile-contact {
  display: grid;
  gap: 0.55rem;
}
.client-profile-membership {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: start;
}
.client-profile-wallet-title {
  font-weight: 600;
  color: var(--spa-text);
}
.client-profile-wallet-balance {
  color: var(--spa-gold);
  font-weight: 600;
}
.client-profile-empty {
  padding: 0.15rem 0 0.1rem;
}
.client-profile-empty .btn {
  min-height: 44px;
}
@media (max-width: 991.98px) {
  .client-profile-member {
    grid-template-columns: 1fr;
  }
  .client-profile-member-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .client-profile-membership {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 767.98px) {
  .client-profile-head,
  .client-profile-member,
  .client-profile-overview {
    display: flex;
    flex-direction: column;
  }
  .client-profile-member-facts,
  .client-profile-membership {
    grid-template-columns: 1fr;
  }
  .client-profile .btn {
    min-height: 44px;
  }
  .client-profile-head-actions,
  .client-profile-actions {
    width: 100%;
  }
  .client-profile-head-actions .btn,
  .client-profile-actions .btn {
    flex: 1 1 auto;
    min-height: 44px;
  }
  .extra-wallet-modal .modal-footer {
    flex-direction: column;
  }
  .extra-wallet-modal .modal-footer .btn {
    width: 100%;
  }
}
@media (max-width: 767.98px) {
  .client-stack-table {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }
  .client-stack-table thead {
    display: none;
  }
  .client-stack-table tbody,
  .client-stack-table tr,
  .client-stack-table td {
    display: block;
    width: 100%;
  }
  .client-stack-table tr {
    border: 1px solid var(--spa-border);
    border-radius: 0.75rem;
    padding: 0.65rem 0.75rem 0.35rem;
    margin-bottom: 0.65rem;
    background: rgba(0, 0, 0, 0.16);
  }
  .client-stack-table td {
    border: 0;
    padding: 0.35rem 0;
    text-align: left !important;
    max-width: none;
    white-space: normal;
  }
  .client-stack-table td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--spa-gold-soft);
  }
  .table-responsive:has(.client-stack-table) {
    overflow: visible;
  }
  .client-stack-table .appt-status-cell {
    max-width: none;
  }
  .membership-wallet-stat--hero {
    grid-column: 1 / -1;
  }
  .membership-wallet-panel .d-flex.align-items-end > .btn {
    width: 100%;
  }
}
@media (max-width: 575.98px) {
  .membership-wallet-panel {
    padding: 0.95rem 0.9rem;
  }
  .membership-wallet-balance {
    font-size: 1.4rem;
  }
  .client-detail-head {
    align-items: stretch !important;
  }
  .client-detail-actions {
    width: 100%;
  }
  .client-detail-actions .btn {
    flex: 1 1 auto;
  }
  .membership-wallet-empty > .btn {
    display: flex;
    width: 100%;
    margin-left: 0 !important;
    justify-content: center;
  }
}

/* Billing: use the screen width, and stack data-entry tables on a phone */
.billing-page {
  min-width: 0;
  max-width: 100%;
}
.bill-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.35rem 0 0.85rem;
}
.bill-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 4.1rem;
  padding: 0.65rem 0.8rem;
  background: var(--spa-surface);
  border: 1px solid var(--spa-border);
  border-radius: 0.9rem;
}
.bill-stat-label {
  color: var(--spa-muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.25;
}
.bill-stat-value {
  margin-top: 0.15rem;
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--spa-gold-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bill-stat--due .bill-stat-value { color: #f0dfad; }
.bill-directory,
.bill-directory .cd-table-wrap,
.bill-directory .table-responsive {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.bill-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  min-width: 0 !important;
}
.bill-table th,
.bill-table td {
  min-width: 0;
  overflow: hidden;
  vertical-align: middle;
}
.bill-table .bill-col-actions { overflow: visible; text-align: right; }
.bill-table .cd-menu-btn { width: 2.75rem; height: 2.75rem; }
.bill-table .appt-status {
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
}
.bill-table .cd-sort {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bill-col-pick { width: 4%; text-align: center; }
.bill-col-client { width: 16%; }
.bill-col-invoice { width: 18%; }
.bill-col-date { width: 12%; }
.bill-col-total { width: 14%; }
.bill-col-paid { width: 11%; }
.bill-col-mode { width: 13%; }
.bill-col-status { width: 10%; }
.bill-col-actions { width: 6%; }
.bill-table-merge .bill-col-client { width: 14%; }
.bill-table-merge .bill-col-invoice { width: 16%; }
.bill-table-merge .bill-col-mode { width: 13%; }
.bill-table .cd-name,
.bill-table .cd-code,
.bill-table .cd-cell-value,
.bill-ellip {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bill-inline-invoice,
.bill-inline-mode {
  display: none;
  color: var(--spa-muted);
  font-size: 0.78rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 991.98px) {
  .bill-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bill-col-mode { display: none; }
  .bill-inline-mode { display: block; }
  .bill-col-client { width: 20%; }
  .bill-col-invoice { width: 20%; }
  .bill-col-date { width: 14%; }
  .bill-col-total { width: 15%; }
  .bill-col-paid { width: 13%; }
  .bill-col-status { width: 10%; }
  .bill-col-actions { width: 8%; }
  .bill-table-merge .bill-col-client { width: 16%; }
}
@media (max-width: 767.98px) {
  .bill-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; }
  .bill-stat { min-height: 3.5rem; padding: 0.5rem 0.65rem; }
  .bill-stat-value { font-size: 1rem; }
  .billing-page .bill-directory,
  .billing-page .bill-directory .cd-table-wrap,
  .billing-page .bill-directory .table-responsive {
    overflow-x: hidden;
  }
  .bill-col-invoice { display: none; }
  .bill-inline-invoice { display: block; }
  .bill-col-client { width: 30%; }
  .bill-col-date { width: 16%; }
  .bill-col-total { width: 16%; }
  .bill-col-paid { width: 14%; }
  .bill-col-status { width: 12%; }
  .bill-col-actions { width: 12%; }
  .bill-table-merge .bill-col-client { width: 26%; }
  .bill-table .cd-menu-btn { width: 2.25rem; height: 2.25rem; }
}
.billing-page .booking-panel,
.billing-page .row > [class*="col-"] {
  min-width: 0;
}
.billing-table-wrap {
  max-width: 100%;
  min-width: 0;
}
.billing-toolbar .form-control[type="date"] {
  width: auto;
  max-width: 12rem;
}
.billing-tip-field {
  flex: 1 1 9rem;
  min-width: 0;
}
.billing-tip-field .form-control {
  width: 100%;
  min-width: 0;
}
.billing-totals {
  margin-left: auto;
  max-width: 24rem;
  text-align: right;
}
.billing-pay-line,
.billing-wallet-panel .billing-pay-line {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.12rem 0;
  text-align: left;
}
.billing-pay-line > span:last-child {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.billing-wallet-panel {
  margin-left: auto;
  max-width: 24rem;
  border: 1px solid var(--spa-border);
  border-radius: 0.75rem;
  padding: 0.75rem 0.9rem;
}
.billing-wallet-after {
  font-weight: 600;
}
#billingForm .input-group > .form-control,
#billingForm .input-group > .form-select {
  min-width: 0;
}
@media (max-width: 991.98px) {
  #billingForm table.table {
    min-width: 0;
  }
}
@media (max-width: 767.98px) {
  #billLines,
  #tipTipsTable {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }
  #billLines thead,
  #tipTipsTable thead {
    display: none;
  }
  #billLines tbody,
  #tipTipsTable tbody,
  #billLines tr,
  #tipTipsTable tr,
  #billLines td,
  #tipTipsTable td {
    display: block;
    width: 100%;
  }
  #billLines tr,
  #tipTipsTable tr {
    border: 1px solid var(--spa-border);
    border-radius: 0.75rem;
    padding: 0.65rem 0.75rem 0.4rem;
    margin-bottom: 0.75rem;
    background: rgba(0, 0, 0, 0.16);
  }
  #billLines td,
  #tipTipsTable td {
    border: 0;
    padding: 0.35rem 0;
    text-align: left !important;
  }
  #billLines td[data-label]:not([data-label=""])::before,
  #tipTipsTable td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--spa-gold-soft);
  }
  .billing-table-wrap {
    overflow: visible;
  }
  .billing-tip-pay {
    flex-direction: column;
    align-items: stretch !important;
  }
  .billing-totals,
  .billing-wallet-panel {
    margin-left: 0;
    max-width: none;
    text-align: left;
  }
}
@media (max-width: 575.98px) {
  .billing-page-head {
    align-items: stretch !important;
  }
  .billing-page-head > .page-header-actions,
  .billing-page-head > .d-flex,
  .billing-page-head > .billing-toolbar,
  .billing-toolbar,
  .billing-toolbar .form-control,
  .billing-toolbar .form-select,
  .billing-page-head .btn,
  .billing-submit .btn,
  #payConfirmModal .modal-footer .btn,
  .billing-toolbar .form-control[type="date"] {
    width: 100%;
    max-width: none;
  }
  .billing-page-head > .page-header-actions,
  .billing-page-head > .d-flex,
  #payConfirmModal .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }
  #payConfirmModal .modal-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }
}

/* Prepare Bill puts the form in a side column. Size fields from that
   panel, not the browser, so date / discount / pay stay readable. */
.billing-page .booking-panel {
  container-type: inline-size;
  container-name: billpanel;
}

@container billpanel (max-width: 44rem) {
  .row > .col-sm-6,
  .row > .col-md-2,
  .row > .col-md-3,
  .row > .col-md-4,
  .row > .col-md-5,
  .row > .col-lg-3,
  .row > .col-lg-4 {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
  }
}

@container billpanel (max-width: 44rem) {
  #billLines,
  #tipTipsTable {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }
  #billLines thead,
  #tipTipsTable thead {
    display: none;
  }
  #billLines tbody,
  #tipTipsTable tbody,
  #billLines tr,
  #tipTipsTable tr,
  #billLines td,
  #tipTipsTable td {
    display: block;
    width: 100%;
  }
  #billLines tr,
  #tipTipsTable tr {
    border: 1px solid var(--spa-border);
    border-radius: 0.75rem;
    padding: 0.65rem 0.75rem 0.4rem;
    margin-bottom: 0.75rem;
    background: rgba(0, 0, 0, 0.16);
  }
  #billLines td,
  #tipTipsTable td {
    border: 0;
    padding: 0.35rem 0;
    text-align: left !important;
  }
  #billLines td[data-label]:not([data-label=""])::before,
  #tipTipsTable td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--spa-gold-soft);
  }
  .billing-table-wrap,
  #tipTipsTable {
    overflow: visible;
  }
  .table-responsive:has(#tipTipsTable) {
    overflow: visible;
  }
}

/* Bootstrap loads .d-flex { display:flex !important } after [hidden], so a
   row with both stays visible. Later rule, same importance, wins. */
[hidden] {
  display: none !important;
}

/* Subscription screen — edit/delete actions and forms */
.sub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
.sub-actions form {
  margin: 0;
}
.sub-actions .btn,
.sub-crud-form .btn,
.sub-edit-panel > summary {
  touch-action: manipulation;
}
.sub-edit-panel {
  scroll-margin-top: 4.5rem;
  border-top: 1px solid var(--spa-border);
  padding-top: 0.75rem;
}
.sub-edit-panel > summary {
  cursor: pointer;
  color: var(--spa-gold-soft);
}
@media (max-width: 991.98px) {
  .sub-crud-form .btn {
    width: 100%;
  }
}
@media (max-width: 767.98px) {
  .sub-actions {
    justify-content: stretch;
  }
  .sub-actions .btn,
  .sub-actions form,
  .sub-actions a.btn {
    flex: 1 1 100%;
    width: 100%;
  }
  .sub-edit-panel .btn {
    width: 100%;
  }
}

/* Clients directory */
.cd-page { min-width: 0; }
.cd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}
.cd-title {
  margin: 0;
  color: var(--spa-gold);
  font-size: 1.75rem;
  line-height: 1.05;
}
.cd-branch {
  margin: 0.2rem 0 0;
  color: var(--spa-muted);
  font-size: 0.84rem;
}
.cd-add {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  touch-action: manipulation;
  white-space: nowrap;
  border-radius: 999px;
  padding-inline: 1rem;
}
.cd-tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 0.65rem;
  padding-bottom: 0.1rem;
  scrollbar-width: none;
}
.cd-tabs::-webkit-scrollbar { display: none; }
.cd-tab {
  flex: 0 0 auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--spa-border);
  background: rgba(18, 28, 24, 0.65);
  color: var(--spa-text);
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
}
.cd-tab:hover {
  color: var(--spa-text);
  border-color: rgba(212, 175, 55, 0.55);
}
.cd-tab.is-active:hover {
  color: #1a1406;
  border-color: transparent;
}
.cd-tab.is-active {
  background: linear-gradient(135deg, var(--spa-gold-soft), var(--spa-gold));
  color: #1a1406;
  border-color: transparent;
  font-weight: 600;
}
.cd-tab-count { margin-left: 0.4rem; font-variant-numeric: tabular-nums; font-weight: 700; }
.cd-tab.is-active .cd-tab-count { opacity: 0.8; }
.cd-tab-short { display: none; }
.cd-row.is-inactive { opacity: 0.72; }
.cd-form { margin: 0; }
.cd-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.cd-search {
  display: flex;
  flex: 1 1 16rem;
  max-width: 22rem;
  min-width: min(100%, 12rem);
  align-items: flex-start;
}
.cd-search .client-search-wrap { flex: 1; min-width: 0; }
.cd-search-field .cd-search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--spa-gold);
  pointer-events: none;
  z-index: 1;
}
.cd-search-field .cd-search-input { padding-left: 2.3rem; }
.cd-search-input { min-height: 44px; touch-action: manipulation; }
.cd-tool { display: none; }
.cd-filters {
  display: flex;
  flex: 1 1 22rem;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.cd-filters-grid {
  display: flex;
  flex: 1 1 22rem;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.cd-field { flex: 1 1 9.2rem; min-width: min(100%, 9.2rem); max-width: 14rem; }
.cd-field-membership { flex-basis: 11rem; min-width: min(100%, 11rem); max-width: 16rem; }
.cd-filter {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  min-height: 44px;
  min-width: 0;
  padding: 0.2rem 0.6rem 0.2rem 0.7rem;
  border: 1px solid var(--spa-border);
  border-radius: 0.75rem;
  background: rgba(7, 11, 9, 0.55);
  color: var(--spa-gold);
  cursor: pointer;
}
.cd-filter-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.cd-filter-kicker {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--spa-gold);
  line-height: 1.1;
}
.cd-filter-select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--spa-text);
  font-size: 0.84rem;
  line-height: 1.2;
  height: 1.25rem;
  min-height: 0;
  width: 100%;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
  /* Match enquiry .form-select: html[data-bs-theme=dark] paints a dark popup.
     A white option background forces the light menu. */
  color-scheme: dark;
}
.cd-filter-select option {
  background-color: #2b2b2b;
  color: #f3efe4;
}
.cd-filter-select option:checked {
  background-color: #454545;
  color: #ffffff;
}
.cd-filter-select:focus { outline: none; box-shadow: none; }
.cd-filter:focus-within {
  border-color: var(--spa-gold);
  box-shadow: 0 0 0 0.15rem rgba(212, 175, 55, 0.18);
}
.cd-filter-chevron { font-size: 0.7rem; color: var(--spa-gold); flex-shrink: 0; }
.cd-label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--spa-gold);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.cd-custom-dates {
  display: flex;
  flex: 1 0 100%;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  align-items: flex-end;
}
.cd-custom-dates .form-control { width: auto; min-width: 10.5rem; min-height: 44px; }
.cd-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  margin-left: auto;
  padding: 0 0.2rem;
  color: var(--spa-gold-soft);
  white-space: nowrap;
  touch-action: manipulation;
}
.cd-clear-btn:hover { color: var(--spa-gold); }
.cd-sheet-head,
.cd-sheet-actions { display: none; }
.cd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0.55rem 0 0;
}
.cd-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--spa-border);
  background: rgba(212, 175, 55, 0.08);
  color: var(--spa-text);
  touch-action: manipulation;
}
.cd-clear-link {
  color: var(--spa-gold-soft);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  touch-action: manipulation;
}
.cd-directory.card-surface {
  display: flex;
  flex-direction: column;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: var(--spa-surface-solid);
  padding: 1rem;
  overflow: visible;
  margin-top: 0.65rem;
}
.cd-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.cd-table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}
@media (min-width: 992px) {
  .cd-table { table-layout: fixed; }
  .ops-list-table.cd-table { table-layout: auto; }
  .ops-list-table .cd-col-actions { width: auto; white-space: nowrap; }
  .cd-col-client { width: 17%; }
  .cd-col-phone { width: 14%; }
  .cd-col-membership { width: 14%; }
  .cd-col-wallet { width: 8%; }
  .cd-col-registered { width: 13%; }
  .cd-col-visit { width: 13%; }
  .cd-col-wa { width: 7%; }
  .cd-col-status { width: 8%; }
  .cd-col-actions { width: 6%; }
}
.cd-table thead th {
  vertical-align: middle;
}
.ops-list-table .cd-wallet,
.ops-list-table .ops-nowrap {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ops-list-table .ops-ellip {
  display: block;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ops-list-table .cd-col-actions .btn,
.ops-list-table .cd-col-actions form {
  margin: 0.1rem 0;
}
.cd-table td {
  padding: 0.55rem 0.6rem;
  vertical-align: middle;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  color: var(--spa-text);
}
.cd-row { cursor: pointer; }
.cd-row:hover td { background: rgba(212, 175, 55, 0.08); }
.cd-sort {
  position: relative;
  background: none;
  border: 0;
  padding: 0 1.15rem 0 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  touch-action: manipulation;
}
.cd-table thead th .cd-sort::before,
.cd-table thead th .cd-sort::after {
  position: absolute;
  right: 0;
  display: block;
  opacity: 0.125;
  line-height: 9px;
  font-size: 0.8em;
  font-weight: 400;
}
.cd-table thead th .cd-sort::before {
  content: "▲";
  bottom: 50%;
}
.cd-table thead th .cd-sort::after {
  content: "▼";
  top: 50%;
}
.cd-table thead th[aria-sort="ascending"] .cd-sort::before,
.cd-table thead th[aria-sort="descending"] .cd-sort::after {
  opacity: 0.6;
}
.cd-client { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.cd-avatar {
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--spa-gold);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.cd-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--spa-text);
  font-weight: 600;
}
.cd-name:hover { color: var(--spa-gold-soft); }
.cd-code { color: var(--spa-muted); font-size: 0.78rem; line-height: 1.3; }
.cd-plan {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.12);
  color: #f0e2b0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.cd-plan-essence {
  color: #d7f5c8;
  background: rgba(90, 160, 90, 0.16);
  border-color: rgba(120, 190, 110, 0.4);
}
.cd-plan-elevate {
  color: #d4e4ff;
  background: rgba(80, 130, 210, 0.18);
  border-color: rgba(120, 160, 230, 0.45);
}
.cd-plan-prestige {
  color: #f0d9ff;
  background: rgba(150, 90, 190, 0.16);
  border-color: rgba(190, 130, 220, 0.4);
}
.cd-plan-legacy {
  color: #ffe7c2;
  background: rgba(180, 120, 50, 0.16);
  border-color: rgba(212, 160, 80, 0.4);
}
.cd-phone-inline { display: none; color: var(--spa-muted); font-size: 0.85rem; }
.cd-col-phone { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cd-today {
  display: block;
  color: var(--spa-gold);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.15;
  text-transform: uppercase;
}
.cd-col-registered .cd-cell-value,
.cd-col-visit .cd-cell-value { white-space: nowrap; }
.cd-wallet { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cd-wallet.is-zero { color: var(--spa-muted); }
.cd-wallet-zero { display: block; color: var(--spa-muted); font-size: 0.75rem; }
.cd-empty { color: var(--spa-muted); }
.cd-cell-label { display: none; }
.cd-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.72rem;
  line-height: 1.35;
  white-space: nowrap;
}
.cd-badge-active { color: #d9ffe8; background: rgba(61, 155, 106, 0.22); }
.cd-badge-inactive { color: #c5cec8; background: rgba(154, 168, 159, 0.16); }
.cd-badge-wa-on { color: #b7ebc8; background: rgba(37, 211, 102, 0.12); }
.cd-badge-wa-off { color: var(--spa-muted); background: rgba(154, 168, 159, 0.1); }
.cd-badge-mem { margin-top: 0.2rem; }
.cd-badge-pending_payment,
.cd-badge-suspended { color: #ffe7b0; background: rgba(212, 160, 23, 0.16); }
.cd-badge-exhausted { color: var(--spa-muted); background: rgba(154, 168, 159, 0.14); }
.cd-badge-cancelled,
.cd-badge-refunded { color: #f3c1c1; background: rgba(196, 92, 92, 0.16); }
.cd-expand { display: none; }
.cd-open { display: none; }
.cd-col-wa,
.cd-col-status { text-align: center; }
.cd-col-actions { text-align: right; white-space: nowrap; }
.cd-menu { display: inline-flex; }
.cd-menu-btn {
  width: 44px;
  height: 44px;
  border-radius: 0.7rem;
  border: 1px solid var(--spa-border);
  background: transparent;
  color: var(--spa-gold);
  touch-action: manipulation;
}
.cd-menu-pop {
  position: fixed;
  z-index: 1080;
  min-width: 12.5rem;
  background: #121c18;
  border: 1px solid var(--spa-border);
  border-radius: 0.8rem;
  padding: 0.35rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.cd-menu-pop a,
.cd-menu-pop button {
  display: flex;
  width: 100%;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: var(--spa-text);
  text-align: left;
  touch-action: manipulation;
}
.cd-menu-pop a:hover,
.cd-menu-pop button:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--spa-gold-soft);
}
.cd-menu-pop .cd-danger { color: #f0b4b4; }
.cd-menu-sep {
  height: 1px;
  margin: 0.2rem 0.45rem;
  background: rgba(212, 175, 55, 0.2);
}
.cd-empty-state { padding: 0.4rem 0 0.2rem; }
.cd-empty-title {
  margin: 0;
  color: var(--spa-text);
  font-size: 1.05rem;
}
.cd-empty-hint {
  margin: 0.35rem 0 0;
  color: var(--spa-muted);
}
.confirm-action-modal #confirmActionYes.is-danger {
  background: #7a2e2e;
  border-color: #c45c5c;
  color: #fff;
}
.cd-more td { background: rgba(212, 175, 55, 0.05); }
.cd-more-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  color: var(--spa-text);
}
.cd-more-grid span {
  display: block;
  color: var(--spa-gold);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cd-pager {
  order: -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  color: var(--spa-muted);
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}
.cd-pager-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}
.cd-page-size {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: var(--spa-muted);
  font-size: 0.82rem;
}
.cd-page-size select,
.cd-page-btn { min-height: 36px; touch-action: manipulation; }
.cd-page-size select {
  min-width: 4.2rem;
  background: rgba(7, 11, 9, 0.55);
  border: 1px solid var(--spa-border);
  color: var(--spa-text);
  border-radius: 0.55rem;
  padding: 0.15rem 0.4rem;
}
.cd-page-nav { display: flex; gap: 0.3rem; }
.cd-page-btn {
  min-width: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--spa-border);
  background: transparent;
  color: var(--spa-text);
  border-radius: 0.55rem;
  padding: 0.2rem 0.45rem;
  text-decoration: none;
}
a.cd-page-btn:hover:not(.is-current) {
  color: var(--spa-gold-soft);
  border-color: var(--spa-gold);
}
.cd-page-btn.is-current {
  background: linear-gradient(135deg, var(--spa-gold-soft), var(--spa-gold));
  border-color: transparent;
  color: #1a1406;
  font-weight: 700;
}
.cd-page-btn:disabled,
a.cd-page-btn.is-disabled { opacity: 0.4; pointer-events: none; }

/* DataTables lists use the same pager as Clients, and only when another page exists. */
.dataTables_wrapper .dt-search-row {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 0.45rem;
}
.dataTables_wrapper .dt-search-row[hidden] { display: none !important; }
.dataTables_wrapper .dt-search-row .dataTables_filter {
  float: none;
  text-align: left;
  margin: 0;
}
.dataTables_wrapper .dt-search-row .dataTables_filter label {
  display: block;
  margin: 0;
}
.dataTables_wrapper .dt-search-row .dataTables_filter input {
  width: min(100%, 16rem);
  margin: 0;
  min-height: 36px;
  background: rgba(7, 11, 9, 0.55);
  border: 1px solid var(--spa-border);
  color: var(--spa-text);
  border-radius: 0.55rem;
}
.dataTables_wrapper .cd-pager { margin: 0 0 0.35rem; }
.dataTables_wrapper .dataTables_info { padding: 0; }
.dataTables_wrapper .cd-page-nav .pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0;
}
.dataTables_wrapper .cd-page-nav .page-item { margin: 0; }
.dataTables_wrapper .cd-page-nav .page-link {
  min-width: 2.15rem;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0;
  border: 1px solid var(--spa-border);
  background: transparent;
  color: var(--spa-text);
  border-radius: 0.55rem;
  padding: 0.2rem 0.45rem;
  box-shadow: none;
  touch-action: manipulation;
}
.dataTables_wrapper .cd-page-nav .page-item.active .page-link {
  background: linear-gradient(135deg, var(--spa-gold-soft), var(--spa-gold));
  border-color: transparent;
  color: #1a1406;
  font-weight: 700;
}
.dataTables_wrapper .cd-page-nav .page-item.disabled .page-link {
  opacity: 0.4;
  background: transparent;
  color: var(--spa-text);
  pointer-events: none;
}
.dataTables_wrapper .cd-page-nav .page-link:focus {
  box-shadow: 0 0 0 0.15rem rgba(212, 175, 55, 0.35);
}
.dataTables_wrapper .cd-page-size .dataTables_length,
.dataTables_wrapper .cd-page-size label {
  display: inline-flex;
  align-items: center;
  margin: 0;
}
.dataTables_wrapper .cd-page-size select {
  width: auto;
}
.dataTables_wrapper .cd-page-size::after {
  content: "per page";
  color: var(--spa-muted);
  font-size: 0.82rem;
}
.table-responsive:has(> .dataTables_wrapper) { overflow-x: visible; }
.cd-empty-row td {
  text-align: center;
  color: var(--spa-muted);
  padding: 1.5rem 1rem;
}
body.cd-sheet-open { overflow: hidden; }

@media (max-width: 991.98px) {
  .content .card-surface.cd-directory:has(table) {
    overflow-x: visible;
  }
  .cd-page { max-width: 100%; overflow-x: hidden; }
  .cd-clear-btn { display: none; }
  .cd-search { flex: 1 1 12rem; }
  .cd-tool {
    display: inline-flex;
    flex: 0 0 auto;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0 0.8rem;
    border-radius: 0.75rem;
    border: 1px solid var(--spa-border);
    background: rgba(18, 28, 24, 0.9);
    color: var(--spa-text);
    touch-action: manipulation;
  }
  .cd-tool-count {
    min-width: 1.3rem;
    height: 1.3rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--spa-gold);
    color: #1a1406;
    font-size: 0.72rem;
    font-weight: 700;
  }
  .cd-filters {
    position: fixed;
    inset: 0;
    z-index: 1045;
    display: flex;
    flex: none;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: stretch;
    gap: 0;
    background: rgba(0, 0, 0, 0.55);
    visibility: hidden;
    pointer-events: none;
  }
  .cd-filters.is-open { visibility: visible; pointer-events: auto; }
  .cd-sheet-head,
  .cd-filters-grid,
  .cd-custom-dates,
  .cd-sheet-actions {
    background: #121c18;
    width: 100%;
  }
  .cd-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.9rem 0.2rem;
    border-radius: 1rem 1rem 0 0;
    border-top: 1px solid var(--spa-border);
  }
  .cd-sheet-head h3 {
    margin: 0;
    color: var(--spa-gold);
    font-size: 1.35rem;
  }
  .cd-sheet-close {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 0.7rem;
    background: transparent;
    color: var(--spa-text);
    touch-action: manipulation;
  }
  .cd-filters-grid {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    max-height: min(62vh, 34rem);
    overflow-y: auto;
    padding: 0.4rem 0.9rem 0.6rem;
    gap: 0.65rem;
  }
  .cd-filter,
  .cd-field-membership .cd-filter { max-width: none; width: 100%; }
  .cd-filter-select,
  .cd-page-size select { font-size: 16px; height: auto; min-height: 1.35rem; }
  .cd-custom-dates {
    flex: none;
    padding: 0 0.9rem 0.7rem;
    gap: 0.45rem;
  }
  .cd-custom-dates .form-control { width: 100%; min-width: 0; }
  .cd-sheet-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.7rem 0.9rem calc(0.8rem + env(safe-area-inset-bottom));
  }
  .cd-sheet-actions .btn { flex: 1; min-height: 44px; }
}
@media (max-width: 991.98px) and (min-width: 768px) {
  .cd-phone-inline { display: none; }
  .cd-wa-label { display: none; }
  .cd-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .cd-table td,
  .cd-table thead th { padding: 0.45rem 0.4rem; }
}

@media (max-width: 767.98px), (min-width: 992px) {
  tr.cd-more { display: none !important; }
}

@media (max-width: 767.98px) {
  .cd-page { max-width: 100%; overflow-x: hidden; }
  .cd-tab-long { display: none; }
  .cd-tab-short { display: inline; }
  .cd-title { font-size: 1.65rem; }
  .cd-add {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 0.75rem;
  }
  .cd-add-text { display: none; }
  .cd-chip { min-height: 44px; }
  .cd-page-btn,
  .cd-page-size select { min-height: 44px; }
  .cd-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .cd-pager { padding-left: 0; padding-right: 0; }
}

/* Edit / Register Client — full content width, sticky save after changes */
.client-edit {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 1.25rem 1.35rem 1.1rem;
  min-width: 0;
  overflow: visible;
}
.client-edit-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.85rem 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.16);
}
.client-edit-head-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem 1.15rem;
  flex-wrap: wrap;
}
.ce-sub,
.ce-who {
  color: var(--spa-muted);
  font-size: 0.92rem;
}
.ce-who { display: none; margin-top: 0.2rem; color: var(--spa-text); }
.client-edit-form,
.ce-section,
.ce-grid,
.ce-mem {
  min-width: 0;
  max-width: 100%;
}
.ce-section + .ce-section {
  margin-top: 1.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(212, 175, 55, 0.16);
}
.ce-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.85rem 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.ce-section-title {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
}
.ce-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  margin-top: 0.15rem;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.16);
  color: var(--spa-gold);
  font-weight: 600;
  font-size: 0.82rem;
  flex: 0 0 auto;
}
.ce-heading {
  font-family: var(--spa-serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0;
  color: var(--spa-text);
}
.ce-heading .bi { color: var(--spa-gold); margin-right: 0.35rem; }
.ce-k {
  display: block;
  color: var(--spa-gold-soft);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}
.ce-hint,
.client-edit-form .form-text {
  display: block;
  color: var(--spa-muted);
  font-size: 0.8rem;
}
.ce-readonly,
.ce-readonly-inline {
  display: flex;
  gap: 1.25rem 1.75rem;
  flex-wrap: wrap;
}
.ce-readonly strong,
.ce-readonly-inline strong,
.ce-mem strong {
  font-weight: 600;
}
.ce-grid {
  display: grid;
  gap: 1rem 1.15rem;
  grid-template-columns: 1fr;
}
.client-edit-form .form-control,
.client-edit-form .form-select,
.client-edit-form .input-group,
.client-edit-form textarea.form-control {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
}
.client-edit-form textarea.form-control {
  min-height: 8.5rem;
  resize: vertical;
}
.client-edit-form input[type="date"] {
  display: block;
}
.client-edit-form .input-group {
  flex-wrap: nowrap;
}
.client-edit-form .spa-phone-input > .form-control,
.client-edit-form .spa-phone-input > .form-select {
  width: auto;
  min-width: 0;
}
.client-edit-form .spa-phone-input > .spa-phone-cc {
  flex: 0 1 7.5rem;
  width: 7.5rem;
  max-width: 42%;
}
.client-edit-form .spa-phone-input > .spa-phone-custom-cc {
  flex: 0 1 5.25rem;
  width: 5.25rem;
  max-width: 5.5rem;
}
.client-edit-form .spa-phone-input > .spa-phone-national {
  flex: 1 1 0%;
  width: 1%;
  min-width: 0;
  max-width: none;
}
.ce-combo { position: relative; }
.ce-combo.is-ready > select.ce-combo-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  pointer-events: none;
}
.ce-combo-btn {
  text-align: left;
  width: 100%;
  min-height: 44px;
  touch-action: manipulation;
}
.ce-combo-panel {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 0.3rem);
  background: #121c18;
  border: 1px solid var(--spa-border);
  border-radius: 0.75rem;
  padding: 0.45rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}
.ce-combo-list {
  max-height: 14rem;
  overflow: auto;
  margin-top: 0.4rem;
}
.ce-combo-opt {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--spa-text);
  padding: 0.45rem 0.7rem;
  border-radius: 0.5rem;
  min-height: 44px;
  touch-action: manipulation;
}
.ce-combo-opt.is-selected,
.ce-combo-opt:hover,
.ce-combo-opt:focus {
  background: rgba(212, 175, 55, 0.14);
  color: var(--spa-gold-soft);
}
.ce-combo-empty {
  margin: 0.35rem 0.5rem 0.5rem;
  color: var(--spa-muted);
  font-size: 0.85rem;
}
.ce-add,
.ce-manage {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.15rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--spa-gold-soft);
  font-size: 0.88rem;
  touch-action: manipulation;
}
.ce-add:hover,
.ce-manage:hover { color: var(--spa-gold); }
.ce-manage { margin-top: 0; font-size: 0.8rem; }
.ce-reveal { margin-top: 0.35rem; }
.ce-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.35rem;
}
.client-edit-form .form-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  margin-bottom: 0;
  padding-left: 0;
}
.client-edit-form .form-check-input {
  position: static;
  float: none;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
}
.client-edit-form .form-check-label {
  padding-top: 0.15rem;
  touch-action: manipulation;
}
.ce-mem {
  display: grid;
  gap: 0.85rem 1rem;
  align-items: start;
}
.ce-mem-plan {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.6rem;
}
.ce-money { font-variant-numeric: tabular-nums; }
.ce-mem-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ce-mem-actions .btn,
.ce-mem-empty .btn,
.ce-savebar .btn {
  min-height: 44px;
  touch-action: manipulation;
}
.ce-status { max-width: 16rem; }
.ce-late {
  max-width: 28rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--spa-border);
  border-radius: 0.75rem;
}
.ce-savebar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem 1rem;
  margin-top: 1.35rem;
  padding-top: 1rem;
}
.ce-savebar-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--spa-gold-soft);
  font-size: 0.9rem;
}
.ce-savebar-note[hidden] { display: none !important; }
.ce-savebar-actions {
  display: flex;
  gap: 0.55rem;
  margin-left: auto;
}
@media (min-width: 768px) {
  .ce-grid-2,
  .ce-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ce-span { grid-column: 1 / -1; }
  .ce-mem { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ce-savebar.is-dirty {
    position: sticky;
    bottom: 0.35rem;
    z-index: 25;
    justify-content: space-between;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(18, 28, 24, 0.97);
    border: 1px solid var(--spa-border);
    border-radius: 0.85rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  }
}
@media (min-width: 992px) {
  .ce-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ce-mem {
    grid-template-columns: 1.3fr 1fr 1fr 0.85fr auto;
    align-items: center;
  }
  .ce-mem-actions { flex-direction: column; align-items: stretch; }
}
@media (max-width: 767.98px) {
  .client-edit-form .form-control,
  .client-edit-form .form-select,
  .client-edit-form .ce-combo-btn,
  .client-edit-form .ce-add,
  .client-edit-form .form-check {
    scroll-margin-bottom: 5.5rem;
  }
  .client-edit { padding: 1rem 0.9rem 0.75rem; }
  .ce-who { display: block; }
  .ce-status { max-width: none; }
  .ce-savebar {
    position: sticky;
    bottom: 0;
    z-index: 25;
    flex-wrap: wrap;
    justify-content: stretch;
    margin: 1rem 0 0;
    padding: 0.7rem 0 calc(0.7rem + env(safe-area-inset-bottom));
    background: #101815;
    border-top: 1px solid var(--spa-border);
  }
  .ce-savebar-note { width: 100%; }
  .ce-savebar-actions { width: 100%; margin-left: 0; }
  .ce-savebar-actions .btn { flex: 1 1 0; }
  .ce-mem-actions .btn,
  .ce-mem-empty .btn { flex: 1 1 8rem; }
}

/* Register Client — same edit-form system, centered, section cards */
.client-register .ce-section {
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 0.95rem;
  padding: 0.95rem 1rem 1rem;
  background: rgba(8, 14, 12, 0.28);
}
.client-register .ce-section + .ce-section {
  margin-top: 0.8rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}
.client-register .ce-section-title { margin-bottom: 0.85rem; }
.client-register .cr-id-note { margin-top: 0.35rem; }
.client-register .cr-fields,
.client-register .cr-membership,
.client-register .cr-plan-select,
.client-register .cr-combo-row { min-width: 0; max-width: 100%; }
.client-register [hidden] { display: none !important; }
.client-register .cr-plan-select { width: 100%; max-width: 28rem; }
.client-register .cr-combo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem 0.75rem;
}
.client-register .cr-combo-row .ce-combo { flex: 1 1 12rem; min-width: 0; }
.client-register .cr-combo-row .ce-add { margin-top: 0; }
.client-edit .cr-fields > .ce-readonly { margin-bottom: 0.85rem; }
.client-register-form .form-check-input:checked {
  background-color: var(--spa-gold);
  border-color: var(--spa-gold-deep);
}
.cr-plan-card {
  display: grid;
  gap: 0.65rem 1rem;
  margin-top: 0.85rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 0.85rem;
  background: rgba(212, 175, 55, 0.06);
}
.cr-plan-card[hidden],
.cr-bill-note[hidden] { display: none !important; }
.cr-plan-name strong {
  font-family: var(--spa-serif);
  font-size: 1.05rem;
}
.cr-bill-note {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(212, 175, 55, 0.22);
  color: var(--spa-text);
  font-size: 0.86rem;
}
.cr-bill-note .bi { color: var(--spa-gold); margin-top: 0.12rem; flex: 0 0 auto; }
@media (min-width: 768px) {
  .cr-plan-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cr-plan-name { grid-column: 1 / -1; }
}
@media (min-width: 992px) {
  .client-register .ce-section {
    display: grid;
    grid-template-columns: 15.5rem minmax(0, 1fr);
    column-gap: 1.15rem;
    align-items: start;
  }
  /* Detail sections are a record, not a side-title form. */
  .enq-detail.client-register .ce-section { display: block; }
  .client-register .ce-section-title { margin-bottom: 0; }
  .client-register .ce-heading { font-size: 1.2rem; }
  .client-register .cr-membership.is-chosen {
    display: grid;
    grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
    gap: 0.75rem 1rem;
    align-items: start;
  }
  .client-register .cr-membership.is-chosen .cr-plan-select { max-width: none; }
  .client-register .cr-membership.is-chosen .cr-plan-card {
    grid-column: 2;
    margin-top: 0;
  }
  .client-register .cr-membership.is-chosen .cr-bill-note { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
  .client-register .cr-plan-select { max-width: none; }
  .client-register .cr-combo-row { flex-direction: column; align-items: stretch; }
  .client-register .cr-combo-row .ce-add { justify-content: flex-start; }
  .client-register .ce-combo-panel {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    top: auto;
    bottom: calc(4.75rem + env(safe-area-inset-bottom));
    max-height: min(50vh, 22rem);
    z-index: 40;
  }
  .client-register .ce-combo-list { max-height: min(34vh, 16rem); }
}

/* —— Attendance list & day sheet —— */
.att-page {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.att-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.att-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}
.att-stat {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 4.25rem;
  padding: 0.7rem 0.85rem;
  background: var(--spa-surface);
  border: 1px solid var(--spa-border);
  border-radius: 0.9rem;
}
.att-stat-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--spa-gold);
  flex: 0 0 auto;
}
.att-stat--present .att-stat-icon,
.att-stat--working .att-stat-icon {
  background: rgba(106, 159, 181, 0.14);
  color: #9fd4ff;
}
.att-stat--completed .att-stat-icon {
  background: rgba(61, 155, 106, 0.14);
  color: #b6e4c8;
}
.att-stat--open .att-stat-icon {
  background: rgba(154, 168, 159, 0.12);
  color: var(--spa-muted);
}
.att-stat-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.att-stat-label {
  color: var(--spa-muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.25;
}
.att-stat-value {
  font-family: var(--spa-serif);
  font-size: 1.55rem;
  line-height: 1.1;
  color: var(--spa-gold-soft);
}
.att-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 0.75rem;
  padding: 0.75rem 0.85rem;
}
.att-date-form {
  display: flex;
  flex: 1 1 9.5rem;
  min-width: 0;
}
.att-date-form .att-field { flex: 1 1 auto; width: 100%; }
.att-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1 1 9.5rem;
}
.att-field > span {
  color: var(--spa-muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.att-field--grow { flex: 1.4 1 14rem; }
.att-clear {
  flex: 0 0 auto;
  min-height: 38px;
  touch-action: manipulation;
}
.att-sheet { padding: 0.85rem 0.85rem 0.75rem; }
.att-table { width: 100%; }
.att-table th {
  vertical-align: middle;
}
.att-table td {
  vertical-align: middle;
  border-color: rgba(212, 175, 55, 0.12);
}
.att-table .form-select,
.att-table .form-control {
  min-width: 0;
}
.att-emp-meta,
.att-shift-hours,
.att-clock-note {
  color: var(--spa-muted);
  font-size: 0.75rem;
  line-height: 1.3;
}
.att-shift-name { font-size: 0.88rem; }
.att-ot-text { font-variant-numeric: tabular-nums; white-space: nowrap; }
.att-ot-flag {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f0dfad;
  border: 1px solid rgba(212, 175, 55, 0.45);
  vertical-align: middle;
}
.att-clock-label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  line-height: 1.3;
}
.att-clock-label--in { color: #9fd4ff; }
.att-clock-label--out { color: #b6e4c8; }
.att-clock-label--not_in { color: var(--spa-muted); }
.att-inline-error {
  margin: 0.35rem 0 0;
  color: #f0b4b4;
  font-size: 0.75rem;
  line-height: 1.35;
}
.att-row.has-error > td:first-child {
  box-shadow: inset 3px 0 0 #c45c5c;
}
.att-clock {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.att-clock .btn,
.att-btn-in,
.att-btn-out,
.att-ot-edit,
.att-ot-done {
  touch-action: manipulation;
}
.att-clock-note { margin-top: 0.2rem; }
.att-footnote { margin-top: 0.85rem; }
.att-table tr.is-filter-hidden { display: none !important; }
.att-row .att-clock-dash { display: none; }
.att-row.is-noclock .att-clock-fields { display: none; }
.att-row.is-noclock .att-clock-dash { display: inline; }
.att-row.is-dirty > td:first-child {
  box-shadow: inset 3px 0 0 var(--spa-gold);
}
.att-ot-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.att-ot-readout {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.att-ot-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.4rem;
  margin-top: 0.35rem;
}
.att-ot-editor[hidden] { display: none !important; }
.att-ot-lab {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--spa-muted);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.att-ot-lab .form-control,
.att-ot-lab .input-group { min-width: 5.5rem; }
.att-savebar {
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.35rem;
  padding: 0.75rem 0.9rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(18, 28, 24, 0.97);
  border: 1px solid var(--spa-border);
  border-radius: 0.9rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.att-savebar-note {
  margin: 0;
  color: var(--spa-gold-soft);
  font-size: 0.9rem;
}
.att-savebar .btn {
  min-height: 44px;
  touch-action: manipulation;
}
.appt-status-not_marked {
  color: var(--spa-muted);
  background: rgba(154, 168, 159, 0.12);
  border-color: rgba(154, 168, 159, 0.35);
}
.appt-status-working {
  color: #9fd4ff;
  background: rgba(106, 159, 181, 0.14);
  border-color: rgba(106, 159, 181, 0.4);
}
.appt-status-completed {
  color: #b6e4c8;
  background: rgba(61, 155, 106, 0.14);
  border-color: rgba(61, 155, 106, 0.4);
}
.appt-status-half_day {
  color: #f0dfad;
  background: rgba(212, 175, 55, 0.14);
  border-color: rgba(212, 175, 55, 0.4);
}
.appt-status-leave {
  color: #c9b8ef;
  background: rgba(140, 120, 200, 0.14);
  border-color: rgba(140, 120, 200, 0.4);
}
.appt-status-holiday {
  color: #9fd4c8;
  background: rgba(80, 160, 150, 0.14);
  border-color: rgba(80, 160, 150, 0.4);
}
.appt-status-week_off {
  color: #e8d59a;
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.28);
}
@media (max-width: 991.98px) {
  .att-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .att-sheet { padding: 0.65rem; }
  .att-table th,
  .att-table td { padding: 0.45rem 0.4rem; }
  .att-stat { min-height: 3.6rem; padding: 0.55rem 0.7rem; }
  .att-stat-value { font-size: 1.35rem; }
}
@media (max-width: 767.98px) {
  .att-summary { gap: 0.45rem; }
  .att-stat-icon { width: 1.7rem; height: 1.7rem; font-size: 0.85rem; }
  .att-stat-value { font-size: 1.25rem; }
  .att-field,
  .att-field--grow { flex: 1 1 calc(50% - 0.5rem); }
  .att-clear { flex: 1 1 100%; }
  .att-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .att-clock .btn,
  .att-btn-in,
  .att-btn-out {
    min-height: 44px;
    min-width: 3.25rem;
  }
  .att-table .form-control,
  .att-table .form-select { font-size: 1rem; }
  .att-savebar {
    position: sticky;
    bottom: 0;
    flex-wrap: wrap;
    border-radius: 0.85rem 0.85rem 0 0;
  }
  .att-savebar-actions { margin-left: auto; }
  .att-savebar .btn { min-width: 9.5rem; }
}

/* Salary advances list */
.adv-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.adv-field { flex: 1 1 11rem; min-width: 0; max-width: 16rem; }
.adv-field .form-label { margin-bottom: 0.25rem; }
.adv-field .form-select,
.adv-field .form-control { width: 100%; }
.adv-custom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  min-width: 0;
}
.adv-custom[hidden] { display: none !important; }
.adv-apply { min-height: 38px; }
.adv-reset {
  align-self: flex-end;
  margin-bottom: 0.45rem;
  color: var(--spa-gold);
  white-space: nowrap;
}
.adv-filters .form-select,
.adv-filters .form-control,
.adv-filters .btn,
.adv-reset { touch-action: manipulation; }
.adv-status {
  font-size: 0.68rem;
  padding: 0.1rem 0.45rem;
  letter-spacing: 0.03em;
}
.appt-status-open {
  color: #f0dfad;
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.3);
}
.appt-status-partial {
  color: #9fd4ff;
  background: rgba(90, 150, 200, 0.12);
  border-color: rgba(90, 150, 200, 0.3);
}
.appt-status-recovered {
  color: #b6e4c8;
  background: rgba(61, 155, 106, 0.12);
  border-color: rgba(61, 155, 106, 0.3);
}
.adv-cards { display: none; }
.adv-card { position: relative; padding: 0.9rem 1rem 2.6rem; }
.adv-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.adv-card-name { font-weight: 600; }
.adv-card-amount {
  margin-top: 0.65rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--spa-gold);
}
.adv-card-due { font-weight: 500; }
.adv-card-meta { color: var(--spa-muted); font-size: 0.82rem; }
.adv-card-actions { position: absolute; right: 0.25rem; bottom: 0.15rem; }
.adv-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.25rem;
}
.adv-detail dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--spa-muted);
}
.adv-detail dd { margin: 0.15rem 0 0; }
.adv-detail-wide { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .adv-detail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 992px) {
  .adv-filters { flex-wrap: nowrap; }
}
@media (max-width: 767.98px) {
  .adv-table-wrap { display: none; }
  .adv-cards { display: flex; flex-direction: column; gap: 0.75rem; }
  .adv-filters { flex-direction: column; align-items: stretch; }
  .adv-field,
  .adv-custom { flex: 1 1 auto; max-width: none; width: 100%; }
  .adv-custom { flex-direction: column; align-items: stretch; }
  .adv-apply,
  .adv-reset { align-self: flex-start; margin-bottom: 0; }
}

/* ── Payroll register & generate ── */
.pay-page { margin-bottom: 1.5rem; }
.pay-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.85rem 1rem;
  margin-bottom: 1rem;
}
.pay-subtitle {
  color: var(--spa-muted);
  font-size: 0.92rem;
  margin-top: 0.2rem;
}
.pay-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.pay-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.pay-field { min-width: 0; }
.pay-field .form-control,
.pay-field .form-select { min-height: 38px; }
.pay-field-search { flex: 1 1 10rem; max-width: 14rem; }
.pay-filters .form-control,
.pay-filters .form-select,
.pay-header-actions .btn,
.pay-header-actions .cd-menu-btn { touch-action: manipulation; }

.pay-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.pay-stat {
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.pay-stat-label {
  color: var(--spa-muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pay-stat-value {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--spa-text);
  font-variant-numeric: tabular-nums;
}
.pay-stat-gold { color: var(--spa-gold); }
.pay-stat-note {
  font-size: 0.72rem;
  color: var(--spa-muted);
}

.pay-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 0.45rem;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.pay-badge-draft {
  color: #c8d0c9;
  background: rgba(154, 168, 159, 0.12);
  border-color: rgba(154, 168, 159, 0.28);
}
.pay-badge-approved {
  color: #f0dfad;
  background: rgba(212, 175, 55, 0.14);
  border-color: rgba(212, 175, 55, 0.35);
}
.pay-badge-paid {
  color: #b6e4c8;
  background: rgba(61, 155, 106, 0.14);
  border-color: rgba(61, 155, 106, 0.35);
}
.pay-badge-cancelled {
  color: #e0a8a8;
  background: rgba(160, 70, 70, 0.14);
  border-color: rgba(160, 70, 70, 0.32);
}

.pay-register { padding: 0.85rem 1rem 1rem; }
.pay-table { width: 100%; }
.pay-emp { display: flex; flex-direction: column; min-width: 0; }
.pay-emp-name { font-weight: 600; }
.pay-emp-meta { color: var(--spa-muted); font-size: 0.78rem; }
.pay-net {
  font-weight: 700;
  color: var(--spa-gold);
  font-variant-numeric: tabular-nums;
}
.pay-expand-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  border: 1px solid var(--spa-border);
  background: transparent;
  color: var(--spa-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}
.pay-expand-btn.is-open i { transform: rotate(90deg); }
.pay-expand-btn i { transition: transform 0.15s ease; }
.pay-detail-row td {
  background: rgba(212, 175, 55, 0.05);
  padding: 0.75rem 1rem !important;
}
.pay-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 1.25rem;
}
.pay-detail-label {
  display: block;
  font-size: 0.72rem;
  color: var(--spa-muted);
  margin-bottom: 0.1rem;
}
.pay-empty {
  text-align: center;
  padding: 2.5rem 1.25rem;
}
.pay-empty-title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--spa-text);
}
.pay-empty-hint {
  margin: 0.45rem 0 1.1rem;
  color: var(--spa-muted);
}
.pay-cards { display: none; }
.pay-card { position: relative; padding: 0.95rem 1rem 2.6rem; }
.pay-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.pay-card-name { font-weight: 600; }
.pay-card-net {
  margin-top: 0.55rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--spa-gold);
}
.pay-card-meta { color: var(--spa-muted); font-size: 0.82rem; }
.pay-card-details { margin-top: 0.55rem; }
.pay-card-details summary {
  cursor: pointer;
  color: var(--spa-gold);
  font-size: 0.85rem;
  touch-action: manipulation;
}
.pay-card-dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
  margin: 0.55rem 0 0;
}
.pay-card-dl dt {
  margin: 0;
  font-size: 0.72rem;
  color: var(--spa-muted);
}
.pay-card-dl dd { margin: 0; font-weight: 500; }
.pay-card-actions { position: absolute; right: 0.25rem; bottom: 0.15rem; }

.pay-rules-list {
  margin: 0;
  padding-left: 1.1rem;
}
.pay-rules-list li { margin-bottom: 0.55rem; }

.pay-gen-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
  gap: 1rem;
  align-items: start;
}
.pay-gen-main { display: flex; flex-direction: column; gap: 0.85rem; min-width: 0; }
.pay-gen-section { padding: 1.1rem 1.15rem; }
.pay-gen-title {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--spa-gold-soft);
}
.pay-auto-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
}
.pay-field-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.35rem;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--spa-muted);
  background: rgba(154, 168, 159, 0.12);
  border: 1px solid rgba(154, 168, 159, 0.22);
}
.pay-field-tag.is-modified {
  color: #f0dfad;
  background: rgba(212, 175, 55, 0.16);
  border-color: rgba(212, 175, 55, 0.4);
}
.pay-mod-summary {
  padding-top: 0.65rem;
  border-top: 1px solid rgba(212, 175, 55, 0.14);
}
.auto-hint {
  min-height: 1.1em;
  font-size: 0.75rem;
}
.pay-preview-panel { padding: 1.1rem 1.15rem; }
.pay-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.pay-preview-table td,
.pay-preview-table th {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}
.pay-preview-table .pay-preview-sub td {
  font-weight: 600;
  border-bottom-color: rgba(212, 175, 55, 0.28);
}
.pay-preview-table tfoot th {
  padding-top: 0.7rem;
  border-bottom: 0;
  font-size: 1rem;
}
.pay-preview-note {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--spa-muted);
}
@media (min-width: 992px) {
  .sticky-lg {
    position: sticky;
    top: 5.5rem;
  }
}
@media (max-width: 991.98px) {
  .pay-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pay-gen-layout { grid-template-columns: 1fr; }
  .pay-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .pay-summary { grid-template-columns: 1fr 1fr; }
  .pay-header-actions { width: 100%; }
  .pay-filters { width: 100%; }
  .pay-field,
  .pay-field-search { flex: 1 1 100%; max-width: none; }
  .pay-header-actions > .btn-gold { flex: 1 1 100%; }
  .pay-table-wrap { display: none; }
  .pay-cards { display: flex; flex-direction: column; gap: 0.75rem; }
  .pay-auto-grid { grid-template-columns: 1fr; }
  .pay-detail-grid { grid-template-columns: 1fr 1fr; }
}

/* Inventory — clients-style list, cards on phone */
.inv-page { min-width: 0; }
.inv-page .cd-head {
  align-items: flex-start;
  flex-wrap: wrap;
}
.inv-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}
.inv-head-actions .btn,
.inv-toolbar .btn,
.inv-submit {
  min-height: 44px;
  touch-action: manipulation;
}
.inv-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
}
.inv-search {
  position: relative;
  flex: 1 1 16rem;
  min-width: min(100%, 12rem);
  max-width: 24rem;
}
.inv-search .bi-search {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--spa-gold);
  pointer-events: none;
}
.inv-search .form-control {
  min-height: 44px;
  padding-left: 2.3rem;
  touch-action: manipulation;
}
.inv-section-title {
  margin: 0;
  color: var(--spa-gold-soft);
  font-size: 1.05rem;
  font-weight: 600;
}
.inv-list.card-surface { overflow: visible; }
.inv-item-name { font-weight: 600; }
.inv-meta {
  color: var(--spa-muted);
  font-size: 0.78rem;
}
.inv-qty {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.inv-badge-low {
  color: #ffe7b0;
  background: rgba(212, 160, 23, 0.18);
}
.inv-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
.inv-actions-row .btn {
  min-height: 36px;
  touch-action: manipulation;
}
.inv-cards,
.inv-issue-cards,
.inv-purchase-cards { display: none; }
.inv-card {
  border: 1px solid var(--spa-border);
  border-radius: 0.85rem;
  padding: 0.85rem 0.9rem;
  background: rgba(7, 11, 9, 0.35);
}
.inv-card.is-low { border-color: rgba(212, 160, 23, 0.5); }
.inv-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.inv-card-qty {
  margin-top: 0.45rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--spa-gold);
  font-variant-numeric: tabular-nums;
}
.inv-unit {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--spa-muted);
}
.inv-card .inv-actions-row { margin-top: 0.75rem; }
.inv-card .inv-actions-row .btn {
  flex: 1 1 8rem;
  min-height: 44px;
}
.inv-filter-empty {
  margin: 0;
  padding: 1.25rem 0.5rem;
  text-align: center;
  color: var(--spa-muted);
}
.inv-purchase-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--spa-border);
  border-radius: 0.85rem;
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
  background: rgba(7, 11, 9, 0.35);
}
.inv-purchase-card:hover { color: inherit; border-color: rgba(212, 175, 55, 0.55); }
.inv-purchase-card .inv-card-qty { margin-top: 0; font-size: 1.05rem; }
.inv-modal {
  background: var(--spa-surface);
  border-color: var(--spa-border);
  color: var(--spa-text);
}
/* Form wraps header/body/footer on Add new item. Keep it a column flex so
   the scrollable dialog pins the footer instead of clipping Save item. */
.modal-dialog-scrollable .inv-modal > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}
.modal-dialog-scrollable .inv-modal > form > .modal-body,
.modal-dialog-scrollable .inv-modal > .modal-body {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.inv-modal .modal-header,
.inv-modal .modal-footer {
  flex-shrink: 0;
}
.inv-modal .modal-footer {
  gap: 0.4rem;
}
.inv-hint {
  color: var(--spa-muted);
  font-size: 0.84rem;
  min-height: 1.2em;
}
.inv-hint.is-short { color: #ffe7b0; }
.inv-table td { vertical-align: middle; }
.inv-item[hidden],
.inv-receive[hidden] { display: none !important; }

@media (max-width: 991.98px) {
  .inv-page { max-width: 100%; overflow-x: hidden; }
  .inv-head-actions {
    width: 100%;
    justify-content: stretch;
  }
  .inv-head-actions .btn {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 0;
    justify-content: center;
    white-space: normal;
  }
  .inv-search { max-width: none; flex-basis: 100%; min-width: 0; }
  .inv-toolbar .btn { flex: 1 1 auto; min-width: 0; }
  .inv-table-wrap,
  .inv-issue-table,
  .inv-purchase-table { display: none; }
  .inv-cards,
  .inv-issue-cards,
  .inv-purchase-cards {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }
  .inv-submit { width: 100%; }
  .content .card-surface.inv-receive:has(table) {
    overflow-x: hidden;
    max-width: 100%;
    min-width: 0;
  }
  .inv-receive-lines {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
  }
  .inv-receive-lines > table.table {
    width: max-content;
    min-width: 100%;
  }
}
@media (max-width: 767.98px) {
  .inv-head-actions .btn { flex: 1 1 100%; }
  .inv-modal .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .inv-modal .modal-footer .btn,
  .inv-correct-modes .btn {
    width: 100%;
    min-height: 44px;
  }
  .inv-correct-modes { flex-direction: column; }
  .inv-receive-head {
    flex-direction: column;
    align-items: stretch !important;
  }
  .inv-receive-head .btn,
  .inv-receive-actions .btn,
  .inv-receive-lines-head .btn {
    width: 100%;
    min-height: 44px;
  }
  .inv-receive-actions,
  .inv-receive-lines-head {
    flex-direction: column;
    align-items: stretch;
  }
}

