/* Core Gym — dark green (lighter), white, black */
:root {
  --gym: #166534;
  --gym-hover: #14532d;
  --gym-text: #14532d;
  --gym-muted: #4a5f52;
  --white: #ffffff;
  --black: #0a0a0a;
  --surface: #fafafa;
}

* {
  -webkit-font-smoothing: antialiased;
}

html {
  font-size: 15px;
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--surface);
  color: var(--black);
  font-weight: 400;
  line-height: 1.5;
}

/* Sidebar layout when logged in */
body.app-with-sidebar {
  padding-left: 240px;
}

.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: var(--gym);
  color: var(--white);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}

/* Override Bootstrap/default link color so sidebar text is never blue */
.app-sidebar a,
.app-sidebar a:hover,
.app-sidebar a:visited,
.app-sidebar a:focus,
.app-sidebar a:active {
  color: rgba(255, 255, 255, 0.9) !important;
  text-decoration: none !important;
}
.app-sidebar a:hover,
.app-sidebar .sidebar-link:hover {
  color: var(--white) !important;
}
.app-sidebar .sidebar-brand a,
.app-sidebar .sidebar-brand a:hover {
  color: var(--white) !important;
}

.sidebar-brand {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-logo {
  display: block;
  width: 112px;
  max-width: 100%;
  height: auto;
  margin: 0.65rem 0 0.2rem;
}

.sidebar-brand a {
  display: block;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.sidebar-brand a:hover {
  color: var(--white);
}

.sidebar-tag {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0.2rem;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

/* Grouped admin links — heading aligns with main nav link text (same horizontal padding as .sidebar-link) */
.sidebar-nav-section {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar-nav-section-admin {
  margin-top: 0.65rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-nav-heading {
  padding: 0.35rem 1rem 0.4rem 1rem;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.2;
}

.sidebar-link-nested {
  padding-left: 1.5rem;
}

.sidebar-link {
  display: block;
  padding: 0.5rem 1rem;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.sidebar-link.active {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  font-weight: 600;
}
.app-sidebar .sidebar-link.active,
.app-sidebar .sidebar-link.active:hover {
  color: var(--white) !important;
}

.sidebar-link.sidebar-link-nested {
  font-weight: 400;
}

.sidebar-link.sidebar-link-nested.active {
  font-weight: 600;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--white);
}

.sidebar-user-role {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0.15rem;
}

.sidebar-signout {
  margin-top: 0.75rem;
  width: 100%;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.sidebar-signout:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
}

/* Main content area — wider, balanced padding */
.app-body {
  min-width: 0;
  padding: 1.5rem 1.75rem;
  max-width: calc(100vw - 240px);
}

.app-body main {
  max-width: min(1400px, calc(100vw - 240px - 3.5rem));
  margin: 0 auto;
  padding: 0 0.25rem;
}

/* When no sidebar (e.g. login), body is full width */
body:not(.app-with-sidebar) .app-body {
  padding: 0;
  max-width: none;
}

body:not(.app-with-sidebar) .app-body main {
  max-width: none;
  padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--gym-text);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.text-muted {
  color: var(--gym-muted) !important;
}

/* Cards */
.card-app {
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-app .card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gym-muted);
}

.card-app .card-value {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--black);
  letter-spacing: -0.02em;
}

/* Apple Human Interface shell (dashboard, members, …) */
.hig-shell {
  --hig-bg: #f5f5f7;
  --hig-card: #ffffff;
  --hig-separator: rgba(60, 60, 67, 0.12);
  --hig-label: rgba(60, 60, 67, 0.6);
  --hig-title: #1d1d1f;
  --hig-accent: #166534;
  --hig-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  font-family: var(--hig-font);
  letter-spacing: -0.011em;
  margin: 0;
  padding: 0 0 2.5rem;
  border-radius: 0;
  background: var(--hig-bg);
}

.hig-shell .dashboard-hig-title {
  font-size: clamp(1.75rem, 2.5vw, 2.125rem);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.1;
  color: var(--hig-title);
}

.dashboard-brand-logo {
  display: inline-block;
  width: 128px;
  max-width: 100%;
  height: auto;
}

.hig-shell .dashboard-hig-footnote {
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--hig-label);
}

.hig-shell .dashboard-page-header {
  padding: 0;
  border-radius: 0;
}

.hig-shell .dashboard-hig-hero {
  padding: 1.25rem 1.35rem 1.35rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--hig-separator);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 0 0 0.5px rgba(0, 0, 0, 0.04),
    0 4px 24px rgba(0, 0, 0, 0.06),
    0 12px 48px rgba(0, 0, 0, 0.04);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .hig-shell .dashboard-hig-hero {
    background: rgba(255, 255, 255, 0.96);
  }
}

.hig-shell .dashboard-hig-meta {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--hig-label);
  background: rgba(60, 60, 67, 0.06);
  border-radius: 100px;
  border: none;
  white-space: nowrap;
}

.hig-shell .dashboard-subtitle.dashboard-hig-meta {
  color: var(--hig-label);
}

.hig-shell .dashboard-kpi-card {
  border-radius: 16px;
  border: 0.5px solid var(--hig-separator);
  background: var(--hig-card);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.04);
}

.hig-shell .dashboard-kpi-card .card-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hig-label);
}

.hig-shell .dashboard-kpi-card .card-value {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--hig-title);
  font-variant-numeric: tabular-nums;
}

/* Index dashboard — KPI + branch metric rows: distinct colors + bold scan-friendly type */
.hig-shell .dashboard-kpi-card:is(
    .dashboard-kpi-card--members,
    .dashboard-kpi-card--revenue,
    .dashboard-kpi-card--ending,
    .dashboard-kpi-card--overdue,
    .dashboard-kpi-card--expired
  )
  .card-label,
.hig-shell .dashboard-metric-card:is(
    .dashboard-metric-card--members,
    .dashboard-metric-card--revenue,
    .dashboard-metric-card--ending,
    .dashboard-metric-card--overdue,
    .dashboard-metric-card--expired
  )
  .card-label {
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hig-shell .dashboard-kpi-card:is(
    .dashboard-kpi-card--members,
    .dashboard-kpi-card--revenue,
    .dashboard-kpi-card--ending,
    .dashboard-kpi-card--overdue,
    .dashboard-kpi-card--expired
  )
  .card-value,
.hig-shell .dashboard-metric-card:is(
    .dashboard-metric-card--members,
    .dashboard-metric-card--revenue,
    .dashboard-metric-card--ending,
    .dashboard-metric-card--overdue,
    .dashboard-metric-card--expired
  )
  .card-value {
  font-size: clamp(2.125rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.hig-shell .dashboard-kpi-card.dashboard-kpi-card--members,
.hig-shell .dashboard-metric-card.dashboard-metric-card--members {
  background: linear-gradient(160deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: rgba(29, 78, 216, 0.28);
}
.hig-shell .dashboard-kpi-card.dashboard-kpi-card--members .card-label,
.hig-shell .dashboard-metric-card.dashboard-metric-card--members .card-label {
  color: #1e40af;
}
.hig-shell .dashboard-kpi-card.dashboard-kpi-card--members .card-value,
.hig-shell .dashboard-metric-card.dashboard-metric-card--members .card-value {
  color: #1e3a8a;
}

.hig-shell .dashboard-kpi-card.dashboard-kpi-card--revenue,
.hig-shell .dashboard-metric-card.dashboard-metric-card--revenue {
  background: linear-gradient(160deg, #d1fae5 0%, #a7f3d0 100%);
  border-color: rgba(5, 150, 105, 0.35);
}
.hig-shell .dashboard-kpi-card.dashboard-kpi-card--revenue .card-label,
.hig-shell .dashboard-metric-card.dashboard-metric-card--revenue .card-label {
  color: #047857;
}
.hig-shell .dashboard-kpi-card.dashboard-kpi-card--revenue .card-value,
.hig-shell .dashboard-metric-card.dashboard-metric-card--revenue .card-value {
  color: #065f46;
}

.hig-shell .dashboard-kpi-card.dashboard-kpi-card--ending,
.hig-shell .dashboard-metric-card.dashboard-metric-card--ending {
  background: linear-gradient(160deg, #fef3c7 0%, #fde68a 100%);
  border-color: rgba(180, 83, 9, 0.35);
}
.hig-shell .dashboard-kpi-card.dashboard-kpi-card--ending .card-label,
.hig-shell .dashboard-metric-card.dashboard-metric-card--ending .card-label {
  color: #b45309;
}
.hig-shell .dashboard-kpi-card.dashboard-kpi-card--ending .card-value,
.hig-shell .dashboard-metric-card.dashboard-metric-card--ending .card-value {
  color: #92400e;
}

.hig-shell .dashboard-kpi-card.dashboard-kpi-card--overdue,
.hig-shell .dashboard-metric-card.dashboard-metric-card--overdue {
  background: linear-gradient(160deg, #ffe4e6 0%, #fecdd3 100%);
  border-color: rgba(190, 18, 60, 0.35);
}
.hig-shell .dashboard-kpi-card.dashboard-kpi-card--overdue .card-label,
.hig-shell .dashboard-metric-card.dashboard-metric-card--overdue .card-label {
  color: #be123c;
}
.hig-shell .dashboard-kpi-card.dashboard-kpi-card--overdue .card-value,
.hig-shell .dashboard-metric-card.dashboard-metric-card--overdue .card-value {
  color: #9f1239;
}

.hig-shell .dashboard-kpi-card.dashboard-kpi-card--expired,
.hig-shell .dashboard-metric-card.dashboard-metric-card--expired {
  background: linear-gradient(160deg, #ede9fe 0%, #ddd6fe 100%);
  border-color: rgba(91, 33, 182, 0.32);
}
.hig-shell .dashboard-kpi-card.dashboard-kpi-card--expired .card-label,
.hig-shell .dashboard-metric-card.dashboard-metric-card--expired .card-label {
  color: #6d28d9;
}
.hig-shell .dashboard-kpi-card.dashboard-kpi-card--expired .card-value,
.hig-shell .dashboard-metric-card.dashboard-metric-card--expired .card-value {
  color: #5b21b6;
}

.hig-shell a.hig-dashboard-kpi-link {
  color: var(--hig-title);
  text-decoration: none;
  border-radius: 16px;
}

.hig-shell a.hig-dashboard-kpi-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.28);
}

.hig-shell a.hig-dashboard-kpi-link:focus-visible .dashboard-kpi-card,
.hig-shell a.hig-dashboard-kpi-link:focus-visible .dashboard-metric-card {
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 16px 40px rgba(0, 0, 0, 0.08) !important;
}

.dashboard-card-hover {
  transition:
    transform 0.22s cubic-bezier(0.25, 0.1, 0.25, 1),
    box-shadow 0.22s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.hig-shell .dashboard-card-hover:hover {
  transform: translateY(-1px) scale(1.008);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 16px 40px rgba(0, 0, 0, 0.08) !important;
}

.dashboard-delta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.hig-shell .dashboard-delta.positive {
  color: #1a7f37;
  background: rgba(52, 199, 89, 0.15);
  border: none;
}

.hig-shell .dashboard-delta.negative {
  color: #d70015;
  background: rgba(255, 59, 48, 0.12);
  border: none;
}

.hig-shell .dashboard-delta.neutral {
  color: var(--hig-label);
  background: rgba(60, 60, 67, 0.08);
  border: none;
}

.hig-shell .dashboard-empty-state {
  max-width: 640px;
  border-radius: 16px;
  border: 0.5px solid var(--hig-separator);
  background: var(--hig-card);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.hig-shell .dashboard-empty-title {
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--hig-title);
}

.hig-shell .dashboard-revenue-card {
  border-radius: 16px;
  border: 0.5px solid var(--hig-separator);
  background: var(--hig-card);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.06);
}

.hig-shell .dashboard-revenue-card h3,
.hig-shell .dashboard-revenue-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--hig-title);
  line-height: 1.2;
}

.hig-shell .dashboard-revenue-card .text-muted {
  color: var(--hig-label) !important;
}

.dashboard-revenue-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hig-shell .dashboard-revenue-bar-row {
  padding-bottom: 0.85rem;
  border-bottom: 0.5px solid var(--hig-separator);
}

.hig-shell .dashboard-revenue-bar-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dashboard-revenue-bar-row {
  display: grid;
  grid-template-columns: 220px 1fr 150px;
  gap: 1rem;
  align-items: center;
}

.hig-shell .dashboard-revenue-bar-label {
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  color: var(--hig-title);
}

.hig-shell .dashboard-revenue-bar-track {
  height: 8px;
  background: rgba(60, 60, 67, 0.08);
  border-radius: 100px;
  overflow: hidden;
}

.hig-shell .dashboard-revenue-bar-fill {
  background: linear-gradient(90deg, #1d7a42 0%, var(--hig-accent) 100%);
  border-radius: 100px;
  box-shadow: 0 0 12px rgba(22, 101, 52, 0.25);
}

.hig-shell .dashboard-revenue-top .dashboard-revenue-bar-track {
  background: rgba(22, 101, 52, 0.12);
  box-shadow: none;
}

.hig-shell .dashboard-revenue-bar-value {
  font-weight: 600;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  color: var(--hig-title);
}

.hig-shell .dashboard-revenue-card .dashboard-chart-hint {
  font-size: 0.75rem;
  font-weight: 500;
}

.hig-shell .dashboard-branch-title {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.015em;
  color: var(--hig-title);
}

.hig-shell .dashboard-accordion-sub {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--hig-label);
}

.hig-shell .dashboard-branch-accordion-item {
  border: 0.5px solid var(--hig-separator);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  background: var(--hig-card);
}

.hig-shell .dashboard-branch-accordion .accordion-item {
  border: none;
  background: transparent;
}

.hig-shell .dashboard-branch-accordion .accordion-button {
  background: rgba(245, 245, 247, 0.85);
  color: var(--hig-title);
  font-weight: 500;
  padding-top: 1rem;
  padding-bottom: 1rem;
  box-shadow: none;
}

.hig-shell .dashboard-branch-accordion .accordion-button:not(.collapsed) {
  background: rgba(245, 245, 247, 1);
  color: var(--hig-title);
}

.hig-shell .dashboard-branch-accordion .accordion-button::after {
  filter: opacity(0.45);
}

.hig-shell .dashboard-branch-accordion .accordion-button:focus {
  box-shadow: 0 0 0 4px rgba(22, 101, 52, 0.2);
  border-color: transparent;
}

.hig-shell .dashboard-branch-accordion .accordion-body {
  background: var(--hig-bg);
  border-top: 0.5px solid var(--hig-separator);
}

.hig-shell .dashboard-metric-card {
  border-radius: 12px;
  border: 0.5px solid var(--hig-separator);
  background: var(--hig-card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hig-shell .dashboard-metric-card .card-label {
  color: var(--hig-label);
  font-size: 0.6875rem;
}

.hig-shell .dashboard-metric-card .card-value {
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--hig-title);
  font-variant-numeric: tabular-nums;
}

.dashboard-branch-accordion-item + .dashboard-branch-accordion-item {
  margin-top: 0.65rem;
}

/* Members index — HIG */
.hig-shell .btn-hig-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.15rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #ffffff;
  background: var(--hig-accent);
  border: none;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.2s ease, filter 0.2s ease;
}

.hig-shell .btn-hig-primary:hover {
  color: #ffffff;
  filter: brightness(1.05);
  box-shadow: 0 4px 16px rgba(22, 101, 52, 0.35);
  transform: translateY(-1px);
}

.hig-shell .btn-hig-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(22, 101, 52, 0.25);
}

.hig-shell .hig-members-filter {
  border-radius: 16px;
  border: 0.5px solid var(--hig-separator);
  background: var(--hig-card);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.04);
}

.hig-shell .card-app.hig-members-filter {
  border-color: var(--hig-separator);
}

.hig-shell .hig-members-filter .form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--hig-label);
  margin-bottom: 0.35rem;
}

.hig-shell .hig-members-filter .form-control,
.hig-shell .hig-members-filter .form-select {
  border-radius: 10px;
  border: 0.5px solid var(--hig-separator);
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--hig-title);
}

.hig-shell .hig-members-filter .form-control:focus,
.hig-shell .hig-members-filter .form-select:focus {
  border-color: rgba(22, 101, 52, 0.45);
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.15);
}

.hig-shell .hig-members-filter .btn-gym {
  border-radius: 10px;
  font-weight: 600;
  padding: 0.5rem 1rem;
  letter-spacing: -0.01em;
}

.hig-shell .hig-members-filter .btn-outline-secondary {
  border-radius: 10px;
  border: 0.5px solid var(--hig-separator);
  color: var(--hig-title);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.hig-shell .hig-members-filter .btn-outline-secondary:hover {
  background: rgba(60, 60, 67, 0.06);
  border-color: var(--hig-separator);
  color: var(--hig-title);
}

.hig-shell .hig-members-filter .hig-typeahead-results,
.hig-shell .hig-contract-card .hig-typeahead-results {
  border-radius: 12px !important;
  border: 0.5px solid var(--hig-separator) !important;
  background: var(--hig-card) !important;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.06) !important;
  overflow: hidden;
}

.hig-shell .hig-members-filter .hig-typeahead-results .list-group-item,
.hig-shell .hig-contract-card .hig-typeahead-results .list-group-item {
  border: none;
  border-bottom: 0.5px solid var(--hig-separator);
  font-size: 0.875rem;
  color: var(--hig-title);
  padding: 0.55rem 0.85rem;
  letter-spacing: -0.01em;
}

.hig-shell .hig-members-filter .hig-typeahead-results .list-group-item:last-child,
.hig-shell .hig-contract-card .hig-typeahead-results .list-group-item:last-child {
  border-bottom: none;
}

.hig-shell .hig-members-filter .hig-typeahead-results .list-group-item-action:hover,
.hig-shell .hig-members-filter .hig-typeahead-results .list-group-item-action:focus,
.hig-shell .hig-contract-card .hig-typeahead-results .list-group-item-action:hover,
.hig-shell .hig-contract-card .hig-typeahead-results .list-group-item-action:focus {
  background: rgba(22, 101, 52, 0.08);
  color: var(--hig-accent);
}

.hig-shell .hig-members-filter .hig-typeahead-results .list-group-item.text-muted,
.hig-shell .hig-contract-card .hig-typeahead-results .list-group-item.text-muted {
  color: var(--hig-label) !important;
}

.hig-shell .hig-payments-range-total {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--hig-title);
  white-space: nowrap;
}

.hig-shell .hig-members-table-wrap {
  border-radius: 16px;
  border: 0.5px solid var(--hig-separator);
  background: var(--hig-card);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.06);
}

/* Members index — column headings stand out */
.hig-shell .hig-members-table-wrap .hig-table thead th {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--hig-title);
}

.hig-shell .hig-table {
  margin-bottom: 0;
  --bs-table-bg: transparent;
  --bs-table-hover-bg: rgba(60, 60, 67, 0.04);
}

.hig-shell .hig-table thead th {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hig-label);
  background: rgba(245, 245, 247, 0.98) !important;
  border: none;
  border-bottom: 0.5px solid var(--hig-separator);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  vertical-align: middle;
}

.hig-shell .hig-table tbody td {
  border: none;
  border-bottom: 0.5px solid var(--hig-separator);
  color: var(--hig-title);
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  vertical-align: middle;
}

.hig-shell .hig-table tbody tr:last-child td {
  border-bottom: none;
}

.hig-shell .hig-table tbody tr:hover td {
  background: rgba(60, 60, 67, 0.03);
}

.hig-shell .hig-table .text-muted {
  color: var(--hig-label) !important;
  font-size: 0.875rem;
}

.hig-shell .hig-table .btn-sm {
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.8125rem;
  padding: 0.35rem 0.65rem;
  letter-spacing: -0.01em;
}

.hig-shell .hig-table .btn-outline-secondary {
  border: 0.5px solid var(--hig-separator);
  color: var(--hig-title);
  background: rgba(255, 255, 255, 0.95);
}

.hig-shell .hig-table .btn-outline-secondary:hover {
  background: rgba(60, 60, 67, 0.06);
  border-color: var(--hig-separator);
  color: var(--hig-title);
}

.hig-shell .hig-table .btn-outline-primary {
  border: 0.5px solid rgba(22, 101, 52, 0.35);
  color: var(--hig-accent);
  background: rgba(255, 255, 255, 0.95);
}

.hig-shell .hig-table .btn-outline-primary:hover {
  background: rgba(22, 101, 52, 0.08);
  border-color: rgba(22, 101, 52, 0.45);
  color: var(--hig-accent);
}

.hig-shell .hig-table .btn-outline-danger {
  border: 0.5px solid rgba(220, 53, 69, 0.45);
  color: #c41e3a;
  background: rgba(255, 255, 255, 0.95);
}

.hig-shell .hig-table .btn-outline-danger:hover {
  background: rgba(220, 53, 69, 0.08);
  border-color: rgba(220, 53, 69, 0.55);
  color: #a01830;
}

.hig-shell .hig-empty-row {
  color: var(--hig-label) !important;
  font-size: 0.9375rem;
}

.hig-shell .hig-empty-row a {
  color: var(--hig-accent);
  font-weight: 500;
  text-decoration: none;
}

.hig-shell .hig-empty-row a:hover {
  text-decoration: underline;
}

.hig-shell .hig-index-row-link {
  color: var(--hig-title);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.hig-shell .hig-index-row-link:hover {
  color: var(--hig-accent);
}

.hig-shell .alert.alert-success {
  border: none;
  border-radius: 12px;
  background: rgba(52, 199, 89, 0.14);
  color: #1a7f37;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hig-shell .alert .btn-close {
  opacity: 0.5;
}

/* Contract create — HIG */
.hig-shell .hig-contract-card {
  border-radius: 16px;
  border: 0.5px solid var(--hig-separator) !important;
  background: var(--hig-card);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.04);
}

.hig-shell .hig-contract-section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--hig-label);
  margin-bottom: 0.35rem;
}

.hig-shell .hig-contract-lead {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--hig-label);
  margin-bottom: 1rem;
}

.hig-shell .hig-contract-card .form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--hig-label);
  margin-bottom: 0.35rem;
}

.hig-shell .hig-contract-card .form-label.fw-medium {
  color: var(--hig-title);
  font-weight: 600;
}

/* Add member & New contract — field titles easy to scan */
.hig-shell .hig-member-create .hig-contract-card .form-label:not(.visually-hidden),
.hig-shell .hig-contract-create .hig-contract-card .form-label:not(.visually-hidden) {
  color: var(--hig-title);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

/* Add member & New contract — label left, control right (stacks below sm) */
.hig-shell .hig-member-create .hig-member-field-row,
.hig-shell .hig-contract-create .hig-member-field-row {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 0.5rem;
  row-gap: 0.25rem;
  align-items: start;
}

@media (min-width: 576px) {
  .hig-shell .hig-member-create .hig-member-field-row,
  .hig-shell .hig-contract-create .hig-member-field-row {
    /* max-content: only as wide as the label text so short titles sit close to inputs */
    grid-template-columns: max-content 1fr;
    column-gap: 0.5rem;
  }

  .hig-shell .hig-member-create .hig-member-field-row > .form-label,
  .hig-shell .hig-contract-create .hig-member-field-row > .form-label {
    max-width: min(15rem, 44vw);
  }
}

.hig-shell .hig-member-create .hig-member-field-row > .form-label,
.hig-shell .hig-contract-create .hig-member-field-row > .form-label {
  margin-bottom: 0;
  padding-top: 0.5rem;
  padding-right: 0.15rem;
}

.hig-shell .hig-member-create .hig-member-field-body,
.hig-shell .hig-contract-create .hig-member-field-body {
  min-width: 0;
}

.hig-shell .hig-member-create .hig-member-field-body > .form-control,
.hig-shell .hig-member-create .hig-member-field-body > .form-select,
.hig-shell .hig-contract-create .hig-member-field-body > .form-control,
.hig-shell .hig-contract-create .hig-member-field-body > .form-select {
  width: 100%;
}

.hig-shell .hig-contract-card .form-control,
.hig-shell .hig-contract-card .form-select {
  border-radius: 10px;
  border: 0.5px solid var(--hig-separator);
  padding: 0.55rem 0.85rem;
  font-size: 0.9375rem;
  color: var(--hig-title);
  background: rgba(255, 255, 255, 0.98);
}

.hig-shell .hig-contract-card .form-control-lg,
.hig-shell .hig-contract-card .form-select-lg {
  padding: 0.65rem 1rem;
  font-size: 1rem;
  border-radius: 12px;
}

.hig-shell .hig-contract-card .form-control:focus,
.hig-shell .hig-contract-card .form-select:focus {
  border-color: rgba(22, 101, 52, 0.45);
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.12);
}

.hig-shell .hig-contract-card .small.text-muted {
  font-size: 0.8125rem;
  color: var(--hig-label) !important;
  margin-top: 0.25rem;
  display: block;
}

.hig-shell .hig-contract-readonly-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--hig-label);
  margin-bottom: 0.2rem;
}

.hig-shell .hig-contract-readonly-value {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--hig-title);
}

.hig-shell .hig-plan-callout {
  border-radius: 12px;
  padding: 1rem 1.15rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--hig-title);
  background: rgba(22, 101, 52, 0.07);
  border: 0.5px solid rgba(22, 101, 52, 0.14);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hig-shell .hig-plan-callout strong {
  font-weight: 600;
  color: var(--hig-accent);
}

.hig-shell .hig-contract-summary {
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  letter-spacing: -0.015em;
  color: rgba(255, 255, 255, 0.96);
  background: linear-gradient(155deg, #1e4d2f 0%, #166534 48%, #134028 100%);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 8px 28px rgba(22, 101, 52, 0.28);
}

.hig-shell .hig-contract-summary .fw-semibold {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.5rem;
}

.hig-shell .hig-payment-method-pill {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--hig-title);
  background: rgba(60, 60, 67, 0.06);
  border: 0.5px solid var(--hig-separator);
}

.hig-shell .hig-contract-actions {
  gap: 0.75rem !important;
}

.hig-shell .hig-contract-actions .btn-lg {
  border-radius: 12px;
  padding: 0.65rem 1.35rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.hig-shell .hig-contract-actions .btn-gym {
  box-shadow: 0 2px 8px rgba(22, 101, 52, 0.25);
}

.hig-shell .hig-contract-actions .btn-outline-secondary {
  border-radius: 12px;
  border: 0.5px solid var(--hig-separator);
  color: var(--hig-title);
  background: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  padding: 0.65rem 1.15rem;
}

.hig-shell .hig-contract-actions .btn-outline-secondary:hover {
  background: rgba(60, 60, 67, 0.06);
  border-color: var(--hig-separator);
  color: var(--hig-title);
}

.hig-shell .alert.alert-danger {
  border: none;
  border-radius: 12px;
  background: rgba(255, 59, 48, 0.1);
  color: #d70015;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hig-shell .hig-contract-back {
  border-radius: 10px;
  border: 0.5px solid var(--hig-separator);
  color: var(--hig-title);
  background: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.45rem 0.95rem;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hig-shell .hig-contract-back:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--hig-title);
}

.hig-shell .hig-contract-select-disabled:disabled {
  background: rgba(60, 60, 67, 0.06);
  color: var(--hig-title);
  border-color: var(--hig-separator);
  opacity: 1;
  cursor: not-allowed;
}

.hig-shell .hig-contract-current-day {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--hig-title);
}

.hig-shell .hig-contract-current-day-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hig-label);
  margin-bottom: 0.35rem;
}

.hig-shell .hig-contract-secondary-action {
  border-radius: 10px;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border: 0.5px solid rgba(22, 101, 52, 0.35);
  color: var(--hig-accent);
  background: rgba(255, 255, 255, 0.95);
}

.hig-shell .hig-contract-secondary-action:hover {
  background: rgba(22, 101, 52, 0.08);
  border-color: rgba(22, 101, 52, 0.45);
  color: var(--hig-accent);
}

/* Contract details — HIG */
.hig-shell .hig-contract-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}

.hig-shell .hig-contract-detail-actions .btn {
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hig-shell .hig-contract-detail-actions .btn-gym {
  box-shadow: 0 1px 3px rgba(22, 101, 52, 0.2);
}

.hig-shell .hig-contract-detail-actions .btn-outline-danger {
  border: 0.5px solid rgba(220, 53, 69, 0.45);
  color: #c41e3a;
  background: rgba(255, 255, 255, 0.95);
}

.hig-shell .hig-contract-detail-actions .btn-outline-danger:hover {
  background: rgba(220, 53, 69, 0.08);
  border-color: rgba(220, 53, 69, 0.55);
  color: #a01830;
}

.hig-shell .hig-contract-detail-actions .btn-outline-secondary {
  border: 0.5px solid var(--hig-separator);
  color: var(--hig-title);
  background: rgba(255, 255, 255, 0.95);
}

.hig-shell .hig-contract-detail-actions .btn-outline-secondary:hover {
  background: rgba(60, 60, 67, 0.06);
  border-color: var(--hig-separator);
  color: var(--hig-title);
}

.hig-shell .hig-contract-detail-grid .hig-contract-readonly-label {
  margin-bottom: 0.15rem;
}

.hig-shell .hig-contract-detail-grid .hig-contract-detail-muted {
  font-size: 0.8125rem;
  color: var(--hig-label);
  margin-top: 0.2rem;
  display: block;
  letter-spacing: -0.01em;
}

.hig-shell .hig-contract-detail-total {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--hig-title);
}

.hig-shell .hig-footnote-secondary {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--hig-label);
  margin-top: 0.35rem;
}

.hig-shell .hig-document-logo {
  display: block;
  width: 140px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.hig-shell .hig-text-emphasis {
  font-weight: 600;
  color: var(--hig-title);
}

.hig-shell .alert.alert-warning {
  border: none;
  border-radius: 12px;
  background: rgba(255, 193, 7, 0.16);
  color: #5c4a00;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hig-shell .alert.alert-warning .btn-warning {
  border-radius: 10px;
  font-weight: 600;
  border: none;
  background: rgba(255, 193, 7, 0.55);
  color: #3d3200;
}

.hig-shell .alert.alert-warning .btn-warning:hover {
  background: rgba(255, 193, 7, 0.85);
  color: #1f1900;
}

.hig-shell .hig-contract-card .form-check {
  padding-top: 0.25rem;
}

.hig-shell .hig-contract-card .form-check-input {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.2rem;
  border-radius: 5px;
  border: 0.5px solid var(--hig-separator);
  box-shadow: none;
}

.hig-shell .hig-contract-card .form-check-input:checked {
  background-color: var(--hig-accent);
  border-color: var(--hig-accent);
}

.hig-shell .hig-contract-card .form-check-input:focus {
  border-color: rgba(22, 101, 52, 0.45);
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.12);
}

.hig-shell .hig-contract-card .form-check-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--hig-title);
  letter-spacing: -0.01em;
}

.hig-shell .hig-contract-card textarea.form-control {
  min-height: 5rem;
  resize: vertical;
}

.hig-shell .modal-content {
  border-radius: 16px;
  border: 0.5px solid var(--hig-separator);
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.04),
    0 16px 48px rgba(0, 0, 0, 0.14);
  overflow: hidden;
}

.hig-shell .modal-header {
  border-bottom: 0.5px solid var(--hig-separator);
  padding: 1rem 1.25rem;
  background: rgba(245, 245, 247, 0.6);
}

.hig-shell .modal-title {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--hig-title);
}

.hig-shell .modal-body {
  padding: 1.25rem;
}

.hig-shell .modal-body .btn {
  border-radius: 10px;
  font-weight: 500;
}

/* Members index — read-only "View" modal (reference: centered title, grid + photo) */
.hig-shell .member-view-modal .modal-header {
  background: rgba(245, 245, 247, 0.85);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.hig-shell .member-view-modal .member-view-modal-body {
  background: rgba(250, 250, 252, 0.95);
}

.hig-shell .member-view-modal .member-view-field {
  background-color: rgba(245, 245, 247, 0.9);
  border-color: rgba(60, 60, 67, 0.18);
  color: var(--hig-title);
  cursor: default;
}

.hig-shell .member-view-modal .member-view-photo-wrap {
  width: 100%;
  max-width: 200px;
}

.hig-shell .member-view-modal .member-view-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  border: 0.5px solid var(--hig-separator);
  background: rgba(245, 245, 247, 0.9);
}

.hig-shell .member-view-modal .member-view-modal-footer {
  background: rgba(245, 245, 247, 0.85);
  border-top: 0.5px solid var(--hig-separator);
}

.hig-shell .member-view-modal .member-view-photo-placeholder {
  width: 100%;
  aspect-ratio: 1;
  max-width: 200px;
  border-radius: 10px;
  border: 0.5px dashed var(--hig-separator);
  background: rgba(245, 245, 247, 0.6);
  color: var(--gym-muted);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hig-shell .hig-contract-card .btn-sm.btn-outline-secondary {
  border-radius: 8px;
  border: 0.5px solid var(--hig-separator);
  font-weight: 500;
  color: var(--hig-title);
  background: rgba(255, 255, 255, 0.95);
}

.hig-shell .hig-contract-card .btn-sm.btn-outline-secondary:hover {
  background: rgba(60, 60, 67, 0.06);
  border-color: var(--hig-separator);
  color: var(--hig-title);
}

.hig-shell .hig-contract-card .small.text-success {
  color: #1a7f37 !important;
  font-weight: 500;
}

/* Fallback when not inside .hig-shell (other pages) */
.dashboard-page-header h2 {
  font-size: 1.5rem;
}

.dashboard-subtitle {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gym-muted);
  white-space: nowrap;
}

.dashboard-kpi-card .card-value {
  font-size: 2rem;
}

@media (max-width: 991.98px) {
  .dashboard-revenue-bar-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .dashboard-revenue-bar-value {
    text-align: left;
  }
}

/* Buttons */
.btn-gym {
  background: var(--gym);
  color: var(--white);
  font-weight: 500;
  border: none;
  border-radius: 6px;
}

.btn-gym:hover {
  background: var(--gym-hover);
  color: var(--white);
}

.btn:focus, .btn:active:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px rgba(22, 101, 52, 0.25);
}

.form-control {
  border-color: rgba(0, 0, 0, 0.12);
  border-radius: 6px;
}

.form-control:focus {
  border-color: var(--gym);
}

/* Login page — HIG (matches app shell) */
.hig-shell.hig-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem 2.5rem;
  box-sizing: border-box;
}

.hig-shell.hig-login-wrap .hig-login-panel {
  width: 100%;
  max-width: 420px;
  border-radius: 20px;
  border: 0.5px solid var(--hig-separator);
  background: var(--hig-card);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 24px 64px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.hig-shell.hig-login-wrap .hig-login-brand.dashboard-hig-hero {
  border-radius: 0;
  border: none;
  border-bottom: 0.5px solid var(--hig-separator);
  box-shadow: none;
  margin: 0;
  padding: 1.5rem 1.35rem 1.4rem;
}

.hig-shell.hig-login-wrap .hig-login-logo {
  display: block;
  width: 148px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 0.9rem;
}

.hig-shell.hig-login-wrap .hig-login-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hig-label);
}

.hig-shell.hig-login-wrap .hig-login-form-wrap {
  padding: 1.65rem 1.5rem 1.75rem;
  background: var(--hig-card);
}

.hig-shell.hig-login-wrap .hig-login-form-wrap .form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--hig-label);
  margin-bottom: 0.35rem;
}

.hig-shell.hig-login-wrap .hig-login-form-wrap .form-label.fw-medium {
  color: var(--hig-title);
  font-weight: 600;
}

.hig-shell.hig-login-wrap .hig-login-form-wrap .form-control,
.hig-shell.hig-login-wrap .hig-login-form-wrap .form-control-lg {
  border-radius: 12px;
  border: 0.5px solid var(--hig-separator);
  padding: 0.6rem 0.95rem;
  font-size: 1rem;
  color: var(--hig-title);
  background: rgba(255, 255, 255, 0.98);
}

.hig-shell.hig-login-wrap .hig-login-form-wrap .form-control:focus {
  border-color: rgba(22, 101, 52, 0.45);
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.12);
}

.hig-shell.hig-login-wrap .hig-login-form-wrap .form-check-input {
  width: 1.05em;
  height: 1.05em;
  margin-top: 0.2em;
  border-radius: 6px;
  border: 0.5px solid var(--hig-separator);
}

.hig-shell.hig-login-wrap .hig-login-form-wrap .form-check-input:checked {
  background-color: var(--hig-accent);
  border-color: var(--hig-accent);
}

.hig-shell.hig-login-wrap .hig-login-form-wrap .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.15);
  border-color: rgba(22, 101, 52, 0.45);
}

.hig-shell.hig-login-wrap .hig-login-form-wrap .form-check-label {
  font-size: 0.875rem;
  color: var(--hig-title);
}

.hig-shell.hig-login-wrap .hig-login-submit {
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 0.65rem 1.15rem;
  box-shadow: 0 2px 8px rgba(22, 101, 52, 0.25);
}

.hig-shell.hig-login-wrap .hig-login-submit:hover {
  box-shadow: 0 4px 14px rgba(22, 101, 52, 0.3);
}

.hig-shell.hig-login-wrap .hig-login-hint {
  margin-top: 1.35rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--hig-label);
  text-align: center;
}

.hig-shell.hig-login-wrap .hig-login-code {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: rgba(60, 60, 67, 0.06);
  color: var(--hig-title);
  border: 0.5px solid var(--hig-separator);
}

.hig-shell.hig-login-wrap .alert-danger {
  border-radius: 12px;
  border: 0.5px solid rgba(220, 53, 69, 0.25);
  font-size: 0.875rem;
}

/* Contract create: elite summary and plan description */
.contract-create-header h1 {
  color: var(--gym-text);
}
.contract-plan-description {
  transition: background 0.2s ease;
}
.contract-summary {
  letter-spacing: 0.01em;
  line-height: 1.5;
}

/* Sidebar mobile: fixed top bar */
@media (max-width: 767.98px) {
  body.app-with-sidebar {
    padding-left: 0;
    padding-top: 3.5rem;
  }
  .app-sidebar {
    width: 100%;
    height: auto;
    min-height: 3.5rem;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
  }
  .sidebar-brand { border-bottom: none; padding: 0; }
  .sidebar-nav { flex: none; flex-direction: row; padding: 0; }
  .sidebar-footer { border-top: none; padding: 0; margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
  .sidebar-user-name { display: inline; }
  .sidebar-user-role { display: inline; margin-left: 0.5rem; }
  .app-body {
    padding: 1rem 1.25rem;
    max-width: none;
  }
  .app-body main {
    max-width: none;
    padding: 0;
  }
}

/* Member statement — HIG */
.hig-shell .hig-statement-print-header {
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.2);
}

.hig-shell .hig-statement-print-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: #1d1d1f;
}

.hig-shell .hig-statement-print-sub {
  font-size: 0.875rem;
  color: rgba(60, 60, 67, 0.6);
  margin-top: 0.25rem;
}

.hig-shell .hig-statement-profile-img {
  display: block;
  width: 96px;
  height: 96px;
  max-width: 96px;
  max-height: 96px;
  object-fit: cover;
  border-radius: 12px;
  border: 0.5px solid var(--hig-separator);
}

.hig-shell .hig-statement-kv {
  margin-bottom: 0.45rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.hig-shell .hig-statement-k {
  display: inline-block;
  min-width: 8.25rem;
  color: var(--hig-label);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-right: 0.5rem;
  vertical-align: top;
}

.hig-shell .hig-statement-v {
  color: var(--hig-title);
  font-weight: 500;
}

.hig-shell .hig-statement-balance {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 0.5px solid var(--hig-separator);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--hig-title);
}

.hig-shell .hig-statement-table-card {
  padding: 0 !important;
}

.hig-shell .hig-statement-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-bottom: 0.5px solid var(--hig-separator);
  background: rgba(245, 245, 247, 0.88);
}

.hig-shell .hig-statement-card-title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hig-label);
}

.hig-shell .hig-statement-card-sub {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--hig-label);
}

.hig-shell .hig-statement-schedule {
  padding: 1rem 1.25rem 1.25rem 2rem;
  background: rgba(245, 245, 247, 0.65);
  border-top: 0.5px solid var(--hig-separator);
}

.hig-shell .hig-statement-schedule-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hig-label);
  margin-bottom: 0.5rem;
}

.hig-shell .hig-statement-schedule-metrics {
  font-size: 0.8125rem;
  color: var(--hig-title);
  letter-spacing: -0.01em;
  line-height: 1.5;
}

.hig-shell .hig-statement-nested-table thead th {
  border: none;
  border-bottom: 0.5px solid var(--hig-separator);
  padding: 0.55rem 0.45rem 0.55rem 0;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hig-label);
  background: transparent !important;
}

.hig-shell .hig-statement-nested-table tbody td {
  border: none;
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.08);
  vertical-align: middle;
}

.hig-shell .hig-statement-cell {
  font-size: 0.8125rem;
  letter-spacing: -0.01em;
  color: var(--hig-title);
}

.hig-shell .hig-statement-pay-link {
  padding: 0.15rem 0.45rem !important;
  font-size: 0.7rem !important;
  font-weight: 600;
  border-radius: 6px;
}

.hig-shell .hig-statement-history-table thead th {
  padding: 0.65rem 0.5rem;
}

.hig-shell .hig-statement-history-table thead th:first-child {
  padding-left: 0;
}

.hig-shell .hig-statement-history-table tbody td {
  padding: 0.55rem 0.5rem;
  font-size: 0.875rem;
}

.hig-shell .hig-statement-history-table tbody td:first-child {
  padding-left: 0;
}

.hig-shell .hig-table td.hig-empty-row {
  color: var(--hig-label) !important;
  font-size: 0.9375rem;
}

.hig-shell .hig-table .btn-sm.btn-outline-primary,
.hig-shell .hig-table .btn-sm.btn-outline-secondary {
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.8125rem;
}

.hig-shell .hig-statement-table-card .hig-table thead th {
  background: rgba(245, 245, 247, 0.98) !important;
}

.hig-shell .hig-statement-contract-tbody--cancelled {
  position: relative;
}

.hig-shell .hig-statement-contract-tbody--cancelled > tr > td {
  position: relative;
  z-index: 1;
}

.hig-shell .hig-statement-contract-tbody--cancelled::after {
  content: "CANCELLED";
  position: absolute;
  left: 50%;
  top: 45%;
  z-index: 2;
  transform: translate(-50%, -50%) rotate(-32deg);
  transform-origin: center center;
  font-size: clamp(2.25rem, 8vmin, 5rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(185, 28, 28, 0.38);
  white-space: nowrap;
  pointer-events: none;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Print-friendly layout for statements */
@media print {
  .hig-shell .hig-document-logo {
    width: 120px !important;
  }
  body.app-with-sidebar {
    padding-left: 0 !important;
  }
  .app-sidebar {
    display: none !important;
  }
  .app-body {
    padding: 0.5rem 1rem !important;
    max-width: none !important;
    background: #ffffff !important;
  }
  .app-body main {
    max-width: none !important;
    padding: 0 !important;
  }
  .hig-shell {
    background: #ffffff !important;
    padding: 0 !important;
  }
  .hig-shell .card-app.hig-contract-card,
  .hig-shell .card-app.hig-statement-table-card {
    box-shadow: none !important;
    border: 1px solid #bbbbbb !important;
    break-inside: avoid;
  }
  .hig-shell .hig-statement-schedule {
    background: #f5f5f5 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .hig-shell .hig-statement-card-head {
    background: #eeeeee !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .btn,
  .sidebar-signout,
  .alert,
  .d-print-none {
    display: none !important;
  }
  .card-app {
    box-shadow: none !important;
    border-color: #cccccc !important;
  }
}
