/*! 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-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar .brand {
  padding: 1.1rem 1rem 1rem;
  border-bottom: 1px solid var(--spa-border);
  text-align: center;
}

.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;
}

.sidebar .nav-link {
  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: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;
  min-width: 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);
}

.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;
}

.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 {
  white-space: nowrap;
  color: var(--spa-gold);
  font-weight: 500;
  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;
  touch-action: none;
}

.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 */
  .table-responsive,
  .dataTables_wrapper,
  .content .card-surface:has(table) {
    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;
  }

  /* 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-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-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 {
  display: block;
}
.fu-form .fu-edge {
  margin-bottom: 1rem;
}
@media (max-width: 576px) {
  .fu-kind-grid { grid-template-columns: 1fr; }
}

.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 {
  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(150px, 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;
}
@media (max-width: 575.98px) {
  .membership-wallet-panel {
    padding: 0.95rem 0.9rem;
  }
  .membership-wallet-balance {
    font-size: 1.4rem;
  }
}

/* Billing: use the screen width, and stack data-entry tables on a phone */
.billing-page {
  min-width: 0;
  max-width: 100%;
}
.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;
}
#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 {
    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-page-head .btn,
  .billing-submit .btn,
  #payConfirmModal .modal-footer .btn {
    width: 100%;
  }
  .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;
  }
}

/* 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%;
  }
}
