/* ============================================================================
   Flow Boxing Academy — brand theme for the booking system (GYM One).
   ----------------------------------------------------------------------------
   Makes the member pages AND the staff admin panel match
   flowboxingacademy.com. Loaded last so it only ever overrides; nothing here
   deletes or restructures GYM One markup, so removing it restores the stock app.

   All colours come from brand-tokens.css (generated from the website's
   styles.css), never from literals in this file.

   IMPORTANT (learned the hard way): the admin panel does NOT use `.sidebar`.
   It uses `.sidenav` + `.sidebar-item` / `.sidebar-link`. An earlier version of
   this file styled `.sidebar` and therefore silently missed the admin entirely,
   leaving GYM One's blue gradient sidebar in place on a dark site. Selectors
   below match what the markup actually contains.
   ========================================================================== */

/* ---------------------------------------------------------------- base --- */
html, body {
  font-family: var(--fb-font-body) !important;
  background-color: var(--fb-bg) !important;
  color: var(--fb-text) !important;
}

h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4,
.page-title, .card-title, .panel-title {
  font-family: var(--fb-font-display) !important;
  letter-spacing: 0.5px;
  color: var(--fb-text) !important;
}

a { color: var(--fb-accent); }
a:hover, a:focus { color: var(--fb-gold); text-decoration: none; }
hr { border-color: var(--fb-border); }

/* Any element Bootstrap left painting a light background on a dark page. */
.well, .jumbotron, .list-group-item, .breadcrumb,
.modal-body, .modal-content, .popover, .tooltip-inner {
  background-color: var(--fb-bg-card) !important;
  border-color: var(--fb-border) !important;
  color: var(--fb-text) !important;
}

/* ------------------------------------------------------------- navbar --- */
.navbar,
.navbar-header,
.navbar-default,
.navbar-inverse,
.navbar-collapse,
ul.nav.navbar-nav,
.navbar-inverse .navbar-collapse {
  background: var(--fb-bg-alt) !important;
  background-image: none !important;
  border-color: var(--fb-border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.navbar-brand, .navbar-header .navbar-brand {
  font-family: var(--fb-font-display) !important;
  font-size: 26px !important;
  letter-spacing: 1px;
  color: var(--fb-text) !important;
  height: auto !important;
}

.navbar-nav > li > a,
.navbar-inverse .navbar-nav > li > a {
  color: var(--fb-muted) !important;
  font-size: 14px;
}
.navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-nav > .active > a {
  color: var(--fb-text) !important;
  background: rgba(var(--accent-rgb), 0.12) !important;
}

/* ---- SIDEBAR (admin). Real classes: .sidenav, .sidebar-item, .sidebar-link.
   GYM One ships a hard blue gradient here: rgb(9,80,220) -> rgb(9,110,210).
   `background-image: none` matters — the gradient is set as background-image
   and would otherwise survive a background-color override. ---- */
.sidenav,
.sidenav ul.nav,
.sidenav ul.nav.nav-pills.nav-stacked,
.sidenav .nav-pills,
.sidebar,
.sidebar-header,
.nav-sidebar {
  background: var(--fb-bg-alt) !important;
  background-image: none !important;
  border-right: 1px solid var(--fb-border);
  color: var(--fb-muted) !important;
}

.sidenav .sidebar-item,
.sidenav ul.nav > li,
.sidenav ul.nav.nav-pills.nav-stacked > li { background: transparent !important; }

.sidenav .sidebar-link,
.sidenav a,
.sidebar a, .nav-sidebar a, .sidebar .nav-link {
  color: var(--fb-muted) !important;
  border-radius: var(--fb-radius);
  display: block;
}
.sidenav .sidebar-link:hover,
.sidenav a:hover,
.sidebar a:hover, .nav-sidebar a:hover, .sidebar .nav-link:hover,
.sidenav .sidebar-item.active > .sidebar-link,
.sidenav li.active > a,
.sidebar li.active > a {
  background: rgba(var(--accent-rgb), 0.14) !important;
  color: var(--fb-text) !important;
}
.sidenav .sidebar-header,
.sidenav li.sidebar-header {
  background: transparent !important;
  color: var(--fb-text) !important;
  font-family: var(--fb-font-display) !important;
  font-size: 18px !important;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: left !important;
}

/* The admin's top-left brand line: "Flow Boxing Academy - 1.4.1" */
.navbar-brand, .brand-version, .version-badge { color: var(--fb-text) !important; }

/* ------------------------------------------------------------- cards --- */
.card, .panel, .widget, .stat-card, .info-box, .modal-content,
.card-body, .panel-body, .card-footer {
  background-color: var(--fb-bg-card) !important;
  border: 1px solid var(--fb-border) !important;
  border-radius: var(--fb-radius) !important;
  color: var(--fb-text) !important;
}
.card { box-shadow: var(--fb-shadow) !important; }

.card-header, .panel-heading, .widget-header, .card-title {
  background-color: transparent !important;
  border-bottom: 1px solid var(--fb-border) !important;
  color: var(--fb-text) !important;
  font-family: var(--fb-font-display) !important;
  font-size: 20px !important;
  letter-spacing: 0.5px;
}

/* ------------------------------------------------------------ tables --- */
table, .table {
  color: var(--fb-text) !important;
  background-color: transparent !important;
}
.table > thead > tr > th, table thead th,
.table > thead > tr > td {
  background-color: var(--fb-bg-alt) !important;
  color: var(--fb-muted) !important;
  border-color: var(--fb-border) !important;
  font-family: var(--fb-font-display) !important;
  font-size: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.table > tbody > tr > td, table tbody td {
  border-color: var(--fb-border) !important;
  color: var(--fb-text);
}
.table-striped > tbody > tr:nth-of-type(odd) { background-color: rgba(255,255,255,0.02) !important; }
.table-hover > tbody > tr:hover, .table > tbody > tr:hover { background-color: rgba(var(--accent-rgb),0.06) !important; }

/* ------------------------------------------------------------- forms --- */
.form-control, input[type=text], input[type=email], input[type=password],
input[type=number], input[type=date], input[type=tel], input[type=time],
select, textarea, .custom-select, .form-select {
  background-color: var(--fb-bg) !important;
  border: 1px solid var(--fb-border) !important;
  border-radius: var(--fb-radius) !important;
  color: var(--fb-text) !important;
}
.form-control:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--fb-accent) !important;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.22) !important;
  outline: none;
}
.form-control::placeholder, input::placeholder { color: var(--fb-muted) !important; }
label, .control-label, .form-label, .col-form-label { color: var(--fb-muted) !important; }
.form-text, .help-block, .text-muted, small.text-muted { color: var(--fb-muted) !important; }
.input-group-text {
  background-color: var(--fb-bg-alt) !important;
  border-color: var(--fb-border) !important;
  color: var(--fb-muted) !important;
}

/* ----------------------------------------------------------- buttons --- */
.btn-primary, .btn-success, .btn-info {
  background-color: var(--fb-accent) !important;
  background-image: none !important;
  border-color: var(--fb-accent) !important;
  color: #fff !important;
  border-radius: var(--fb-radius) !important;
  border-width: 2px !important;
  font-weight: 700 !important;
  padding: 12px 22px !important;
  font-size: 15px !important;
}
.btn-primary:hover, .btn-success:hover, .btn-info:hover,
.btn-primary:focus, .btn-primary:active {
  background-color: var(--fb-accent-dark) !important;
  border-color: var(--fb-accent-dark) !important;
}
.btn-default, .btn-secondary, .btn-light {
  background-color: var(--fb-bg-card) !important;
  border-color: var(--fb-border) !important;
  color: var(--fb-text) !important;
  border-radius: var(--fb-radius) !important;
}
.btn-default:hover, .btn-secondary:hover, .btn-light:hover {
  background-color: var(--fb-bg-alt) !important;
  color: var(--fb-text) !important;
}
.btn-danger { border-radius: var(--fb-radius) !important; }
.btn-outline-primary { color: var(--fb-accent) !important; border-color: var(--fb-accent) !important; }

/* ---------------------------------------------------------- dropdowns -- */
.dropdown-menu {
  background-color: var(--fb-bg-card) !important;
  border: 1px solid var(--fb-border) !important;
  border-radius: var(--fb-radius) !important;
  box-shadow: var(--fb-shadow) !important;
}
.dropdown-menu > li > a, .dropdown-item { color: var(--fb-text) !important; }
.dropdown-menu > li > a:hover, .dropdown-item:hover {
  background-color: rgba(var(--accent-rgb), 0.14) !important;
  color: var(--fb-text) !important;
}
.dropdown-divider { border-color: var(--fb-border) !important; }
.modal-header, .modal-footer { border-color: var(--fb-border) !important; }
.close { color: var(--fb-text) !important; opacity: .7; }

/* ------------------------------------------------------------- alerts -- */
/* GYM One ships light pastels (#e8fadf, #f9e7e7, #f9f9e7) that glare on a
   dark page. Re-tint them onto the brand's dark surfaces. */
.alert {
  border-radius: var(--fb-radius) !important;
  border-width: 1px !important;
  background-color: var(--fb-bg-card) !important;
  color: var(--fb-text) !important;
}
.alert-success { background-color: var(--fb-ok-bg) !important; border-color: var(--fb-ok) !important; color: var(--fb-ok) !important; }
.alert-warning { background-color: var(--fb-warn-bg) !important; border-color: var(--fb-warn) !important; color: var(--fb-warn) !important; }
.alert-danger, .alert-error { background-color: var(--fb-danger-bg) !important; border-color: var(--fb-danger) !important; color: var(--fb-danger) !important; }
.alert-info { background-color: var(--fb-info-bg) !important; border-color: var(--fb-info) !important; color: var(--fb-info) !important; }

/* ------------------------------------------------- badges / pills / nav */
.badge, .label, .pill { border-radius: 999px !important; font-weight: 600; }
.badge-primary, .label-primary { background-color: var(--fb-accent) !important; }
.badge-success, .label-success { background-color: var(--fb-ok) !important; color: #06210f !important; }
.badge-warning, .label-warning { background-color: var(--fb-warn) !important; color: #241a00 !important; }
.badge-danger, .label-danger { background-color: var(--fb-danger) !important; }

.nav-pills > li.active > a, .nav-tabs > li.active > a,
.nav-pills > li > a.active {
  background-color: var(--fb-accent) !important;
  border-color: var(--fb-accent) !important;
  color: #fff !important;
  border-radius: var(--fb-radius) !important;
}
.nav-tabs { border-bottom-color: var(--fb-border) !important; }
.nav-tabs > li > a { color: var(--fb-muted) !important; border-radius: var(--fb-radius) var(--fb-radius) 0 0 !important; }
.nav-tabs > li > a:hover { background-color: var(--fb-bg-alt) !important; }

/* -------------------------------------------------------- pagination --- */
.pagination > li > a, .pagination > li > span {
  background-color: var(--fb-bg-card) !important;
  border-color: var(--fb-border) !important;
  color: var(--fb-text) !important;
}
.pagination > .active > a { background-color: var(--fb-accent) !important; border-color: var(--fb-accent) !important; }
.page-link { background-color: var(--fb-bg-card) !important; border-color: var(--fb-border) !important; color: var(--fb-text) !important; }
.page-item.active .page-link { background-color: var(--fb-accent) !important; border-color: var(--fb-accent) !important; }

/* ------------------------------------------------------------ footer --- */
footer, .footer, .site-footer {
  background-color: var(--fb-bg-alt) !important;
  border-top: 1px solid var(--fb-border);
  color: var(--fb-muted) !important;
}

/* -------------------------------------------------------- progress bar */
.progress { background-color: var(--fb-bg) !important; border-radius: 999px !important; }
.progress-bar { background-color: var(--fb-accent) !important; }

/* --------------------------------------------------- member pages only */
#login, #register, .auth-page, .auth-wrap, .login-register { background-color: var(--fb-bg) !important; }
#login .reg-card, #login .card,
#register .reg-card, #register .card,
.card.reg-card {
  background-color: var(--fb-bg-card) !important;
  border-radius: var(--fb-radius) !important;
  border-color: var(--fb-border) !important;
  color: var(--fb-text) !important;
}
#login .lg-title, #register .reg-title, #register .reg-title {
  font-family: var(--fb-font-display) !important;
  font-weight: 400 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  color: var(--fb-text) !important;
}
#login .lg-sub, #register .reg-sub { color: var(--fb-muted) !important; }
#login input, #register input, #register select, #register textarea {
  background-color: var(--fb-bg) !important; color: var(--fb-text) !important;
  border-color: var(--fb-border) !important;
}
#register .reg-avatar, #register .reg-rules { background-color: var(--fb-bg-alt) !important; color: var(--fb-muted) !important; }
#register iframe { filter: grayscale(0.35) contrast(0.95); border-radius: var(--fb-radius); }

/* ------------------------------------------------------- scrollbars --- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--fb-bg); }
::-webkit-scrollbar-thumb { background: var(--fb-border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--fb-accent-dark); }


/* ==========================================================================
   Late additions: components found painting light surfaces after the first
   sweep. Each was located by measuring real elements on the live admin, not by
   guessing class names.
   ==========================================================================

   --- 1. The Sales/check-in screen defines its own card inline in
          admin/boss/sell/index.php: `.sp-card{ background:#fff; ... }`
          plus light `--sp-*` custom properties. --- */
.sp-card, .sp-panel, .sp-box {
  background-color: var(--fb-bg-card) !important;
  border-color: var(--fb-border) !important;
  border-radius: var(--fb-radius) !important;
  color: var(--fb-text) !important;
  box-shadow: var(--fb-shadow) !important;
}
.sp-card-icon {
  background-color: var(--fb-bg-alt) !important;
  color: var(--fb-accent) !important;
  border-radius: var(--fb-radius) !important;
}
.sp-card-head h5, .sp-card h5, .sp-card h4 { color: var(--fb-text) !important; }
/* the scan frame drew GYM One blue corners */
.scan-frame span { border-color: var(--fb-accent) !important; }

/* --- 2. dashboard.css ships light pastel label badges (#e8fadf/#f9e7e7/
          #f9f9e7). Re-tint onto the brand's dark surfaces. --- */
.bg-label-success, .bg-label-danger, .bg-label-warning,
.bg-label-info, .bg-label-primary, .bg-label-secondary {
  background-color: var(--fb-bg-alt) !important;
  color: var(--fb-text) !important;
  border: 1px solid var(--fb-border) !important;
  border-radius: 999px !important;
}
.bg-label-success { border-color: var(--fb-ok) !important; color: var(--fb-ok) !important; background-color: var(--fb-ok-bg) !important; }
.bg-label-warning { border-color: var(--fb-warn) !important; color: var(--fb-warn) !important; background-color: var(--fb-warn-bg) !important; }
.bg-label-danger  { border-color: var(--fb-danger) !important; color: var(--fb-danger) !important; background-color: var(--fb-danger-bg) !important; }
.bg-label-info, .bg-label-primary { border-color: var(--fb-accent) !important; color: var(--fb-accent) !important; background-color: var(--fb-info-bg) !important; }

/* --- 3. TinyMCE (the Rules editor on admin/boss/rule) loads its own light
          skin from a CDN. It is inside an isolated iframe for the content, but
          the toolbar/menubar chrome is same-page. Re-skin the chrome; the
          editing surface keeps a light background on purpose because that is
          what a document editor should look like. --- */
.tox-tinymce, .tox-editor-header, .tox-menubar, .tox-toolbar,
.tox-toolbar-overlord, .tox-toolbar__primary, .tox-toolbar__group,
.tox-promotion, .tox-statusbar, .tox-sidebar-wrap {
  background-color: var(--fb-bg-alt) !important;
  border-color: var(--fb-border) !important;
  color: var(--fb-text) !important;
}
.tox .tox-tbtn { background-color: transparent !important; color: var(--fb-text) !important; }
.tox .tox-tbtn:hover { background-color: rgba(var(--accent-rgb), 0.16) !important; }
.tox .tox-tbtn svg { fill: var(--fb-text) !important; }
.tox .tox-mbtn { background-color: transparent !important; color: var(--fb-text) !important; }
.tox .tox-mbtn:hover { background-color: rgba(var(--accent-rgb), 0.16) !important; }
.tox-collection__item { color: var(--fb-text) !important; }
.tox-menu { background-color: var(--fb-bg-card) !important; border-color: var(--fb-border) !important; }
.tox-statusbar__text-container { color: var(--fb-muted) !important; }


/* --------------------------------------------------------------------------
   Catch-all for input types missed by the explicit list above. Found by
   measuring: `<input id="sp-q" type="search">` on the Sales screen was still
   white because `search` was not in the selector list. Attribute selectors
   cover every current and future input type in one rule.
   -------------------------------------------------------------------------- */
input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=reset]),
.form-control, .form-select, .custom-select, textarea, select {
  background-color: var(--fb-bg) !important;
  color: var(--fb-text) !important;
  border: 1px solid var(--fb-border) !important;
  border-radius: var(--fb-radius) !important;
}
input:not([type=checkbox]):not([type=radio]):focus { border-color: var(--fb-accent) !important; }
input[type=search]::-webkit-search-cancel-button { filter: invert(1) opacity(.6); }
/* keep native pickers (date/time) legible on dark */
input[type=date], input[type=time], input[type=datetime-local] { color-scheme: dark; }
select option { background-color: var(--fb-bg-card) !important; color: var(--fb-text) !important; }


/* --------------------------------------------------------------------------
   TinyMCE's "Upgrade" promotion pill (a.tox-promotion-link) ships a near-white
   background (rgb(232,241,248)) that stands out as a bright patch in the
   toolbar. Measured on the live page, not guessed. Re-skin it; leaving it light
   also advertises a paid upsell inside the gym's own admin.
   -------------------------------------------------------------------------- */
.tox-promotion, .tox-promotion-link, a.tox-promotion-link,
.tox-promotion .tox-promotion-link {
  background-color: var(--fb-bg-card) !important;
  color: var(--fb-muted) !important;
  border: 1px solid var(--fb-border) !important;
  border-radius: var(--fb-radius) !important;
}
.tox-promotion-link:hover { color: var(--fb-text) !important; border-color: var(--fb-accent) !important; }
.tox-promotion svg, .tox-promotion-link svg { fill: var(--fb-muted) !important; }


/* ==========================================================================
   Member dashboard pages (dashboard/index, profile, stats, invoices) each carry
   their OWN inline `--d-*` token set with light-theme values, e.g.
       .dsh { --d-accent2:#2f73f0; --d-muted:#64748b; --d-line:rgba(15,23,42,.08) }
   and hardcoded GYM One blue in the header gradient (#0950dc -> #2f73f0).
   Since these are inline in each page, the robust fix is to re-point the --d-*
   variables at the brand here (loaded last), rather than editing four files
   and re-editing them next time someone adds a page.
   ========================================================================== */
.dsh, .dsh * {
  /* variable re-points: everything downstream follows the brand */
  --d-accent: var(--accent) !important;
  --d-accent2: var(--accent-dark) !important;
  --d-ink: var(--text) !important;
  --d-muted: var(--text-muted) !important;
  --d-line: var(--border) !important;
}

/* the page header band: was a GYM One blue gradient */
.dsh .dsh-header,
.dsh-head,
.dsh-hero,
.dsh > .row > .col-sm-12 > div[style*="linear-gradient"] {
  background: var(--bg-alt) !important;
  background-image: none !important;
  border: 1px solid var(--border) !important;
}

/* form controls on dashboard pages used a light border (#e2e8f0) */
.dsh .form-control, .dsh input, .dsh select, .dsh textarea {
  border-color: var(--border) !important;
  background-color: var(--bg) !important;
  color: var(--text) !important;
}
.dsh .form-control:focus, .dsh input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .22) !important;
}
.dsh label, .dsh .text-muted, .dsh small { color: var(--text-muted) !important; }

/* profile picture ring was a hard white border */
.dsh-profilepic img { border-color: var(--border) !important; }

/* danger zone: keep red semantics but on brand tokens */
.dsh .btn-danger { background-color: var(--fb-danger) !important; border-color: var(--fb-danger) !important; }
.dsh .btn-danger:hover, .dsh .btn-danger:focus { background-color: #d93636 !important; border-color: #d93636 !important; }
.dsh-card.dsh-danger .dsh-card-head i { color: var(--fb-danger) !important; }


/* --------------------------------------------------------------------------
   Remaining off-brand surfaces found by measuring the live profile page.
   Each was located on the real DOM, not guessed:
     .dsh-welcome            -> linear-gradient(135deg,#0950dc,#2f73f0)  GYM One blue
     .dsh-welcome .dsh-logout-> rgba(255,255,255,.16)                    light chip
     .dsh-pp-empty           -> #f1f5fb bg, #c3d4f3 dashed border        light avatar
   -------------------------------------------------------------------------- */
.dsh-welcome {
  background: var(--bg-card) !important;
  background-image: none !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
}
.dsh-welcome h1, .dsh-welcome h2, .dsh-welcome h3, .dsh-welcome h4 { color: var(--text) !important; }

.dsh-logout {
  background: rgba(var(--accent-rgb), .16) !important;
  border: 1px solid rgba(var(--accent-rgb), .45) !important;
  color: var(--accent) !important;
  border-radius: var(--radius) !important;
}
.dsh-logout:hover {
  background: rgba(var(--accent-rgb), .28) !important;
  color: var(--text) !important;
}

.dsh-pp-empty {
  background: var(--bg-alt) !important;
  color: var(--text-muted) !important;
  border-color: var(--border) !important;
}


/* ==========================================================================
   Mobile touch targets.
   The member screens are used on phones (Lucas: "most customers will be using
   mobile"). Anything tappable should clear the 44px guidance; a few controls
   shipped smaller. These are overrides only — no layout change on desktop.
   ========================================================================== */
@media (max-width: 700px) {
  .navbar-toggle           { min-height:44px; min-width:44px; }
  .dsh-logout              { min-height:44px; padding:10px 16px; }
  .dsh-alllink             { min-height:44px; display:inline-flex; align-items:center; padding:0 6px; }
  .sidebar-link            { min-height:44px; display:flex; align-items:center; }
  .sidebar-item            { min-height:44px; }
  /* tables on phones: let them scroll rather than crush the layout */
  .table-responsive, table { display:block; overflow-x:auto; -webkit-overflow-scrolling:touch; }
  /* forms: bigger, easier targets and a 16px font so iOS does not zoom on focus */
  input, select, textarea, .form-control { font-size:16px; min-height:44px; }
  textarea { min-height:96px; }
  .btn, button, input[type=submit] { min-height:44px; }
}

/* ============================================================================
   MOBILE LAYOUT FIXES (measured 2026-09-21 at 320/375/393/412/430/768px)
   ============================================================================

   The admin pages are GYM One's original Bootstrap 4 markup. At phone widths the
   document grew to 848px inside a 393px viewport — the owner could not use his own
   admin panel on his phone.

   Root cause is a flexbox trap, not the table. `[class*=col-]` is a FLEX CHILD of
   `.row`, and a flex child defaults to `min-width:auto`, which means "never shrink
   below my content". The hours table is ~794px of content, so the column stayed
   848px wide and pushed the whole document out. The table already had
   `overflow-x:auto` and `max-width:100%`, but `max-width:100%` resolves against a
   parent that had itself been forced wide, so it never took effect.

   The fix is one declaration: let the column shrink. The table then scrolls inside
   it, which is the behaviour that was already intended. */

.row > [class*="col-"] { min-width: 0; }

/* Long unbroken strings (emails, tokens, URLs in tables) are the other way a phone
   layout gets pushed wide. Break them rather than letting them set the width. */
@media (max-width: 991px) {
  table td, table th { overflow-wrap: anywhere; word-break: break-word; }
}

@media (max-width: 700px) {
  /* Tables scroll INSIDE their card. Now that the column can shrink, this holds. */
  table { max-width: 100%; }

  /* The admin's top bar ("Logout") sat in a nowrap flex row and overflowed. */
  .topnav {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    max-width: 100%;
  }

  /* Headings: `clamp()` lets one rule cover every phone width instead of three
     breakpoints guessing at fixed sizes. */
  h1, .h1 { font-size: clamp(22px, 7vw, 30px); line-height: 1.2; }
  h2, .h2 { font-size: clamp(18px, 5.4vw, 24px); line-height: 1.25; }
  h3, .h3 { font-size: clamp(16px, 4.6vw, 20px); }

  /* Section rhythm shrinks with the screen so content is not pushed off-screen by
     desktop-sized padding. */
  .container-fluid { padding-left: 12px; padding-right: 12px; }
  .card { margin-bottom: 14px; }
  .card-body { padding: 14px; }

  /* Standalone back/return links are real controls; inline links inside a sentence
     are exempt from target-size rules, these are not. */
  .ab-back, .dsh-alllink, a.btn, .btn { min-height: 44px; }
  .ab-back { display: inline-flex; align-items: center; }

  /* Nav toggle: 40x40 measured, guidance is 44. */
  .navbar-toggle { min-width: 44px; min-height: 44px; }
}

/* 320px: the last 3px. The brand name and a 44px nav toggle together wanted 324px
   in a 320px bar. Trimming the brand block at the narrowest end clears it; 320px
   is the oldest phone still in use and 3px of sideways scroll is still sideways
   scroll. */
@media (max-width: 360px) {
  .navbar-brand { padding-left: 8px; padding-right: 8px; font-size: 15px; }
  .navbar-header { max-width: 100%; }
  .container-fluid { padding-left: 8px; padding-right: 8px; }
  .row.content { margin-left: 0; margin-right: 0; }
}

/* ---- The last 3px (measured at 320/375px) -----------------------------------
   Bootstrap 4's `.row` carries `margin-left/right:-15px` to cancel the `padding`
   on its columns, and that only balances if the container's own padding is 15px.
   `.container-fluid` here is 12px, so each nested `.row` pushed 3px past the
   viewport — the document measured 378px inside 375px, and the admin's modal and
   backdrop inherited the extra width.

   Rather than guess at more fixed sizes, make the gutter the same number
   everywhere: the container's padding and the row's negative margin become one
   variable, so they can never disagree again. */
@media (max-width: 991px) {
  .container-fluid { --gutter: 12px; padding-left: var(--gutter); padding-right: var(--gutter); }
  .container-fluid > .row { margin-left: 0; margin-right: 0; }
  .container-fluid > .row > [class*="col-"] { padding-left: var(--gutter); padding-right: var(--gutter); }
  /* nested rows inside columns: cancel the negative margin outright, the parent
     column's padding already provides the inset */
  [class*="col-"] > .row { margin-left: 0; margin-right: 0; }
  [class*="col-"] > .row > [class*="col-"] { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 360px) {
  .container-fluid { --gutter: 8px; }
}

/* The navbar-header is a `.row`-like element with its own -15px margins; inside a
   fluid container it overshot by 2px after the gutter fix above. Neutralise it. */
@media (max-width: 991px) {
  .navbar-header { margin-left: 0; margin-right: 0; }
  .navbar-collapse { padding-left: 0; padding-right: 0; }
}

/* ---- Admin hours table (measured: +359px at 393px, +88px even at 768px) ------
   This table has SEVEN columns ("Day", "Window 1 — Open", "Window 1 — Close",
   "Window 2 — Open", "Window 2 — Close", "Location", "Closed"). It cannot fit a
   phone, and it does not need to: the right answer is to let it scroll sideways
   inside its card, which is the standard treatment for a data table on mobile.

   The earlier `table { display:block; overflow-x:auto }` rule never took effect
   because Bootstrap's `.table` sets `display:table` and wins on specificity. So
   the overflow went to the document instead of into a scroll box. Rather than
   fight specificity with !important, give the table a real scroll container and
   let it stay a table. */
@media (max-width: 991px) {
  /* any table NOT already inside a scroll wrapper gets one, via its parent */
  .card > table,
  form > table,
  .card-body > table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* keep the table's internal layout intact once it is a scroll box */
  .card > table > thead,
  .card > table > tbody,
  form > table > thead,
  form > table > tbody,
  .card-body > table > thead,
  .card-body > table > tbody { display: table; width: 100%; min-width: 560px; }
}

/* ---- Register page iframe (measured: +16px at 320px) ------------------------
   The rules iframe is a fixed 300px, which is wider than a 320px viewport once
   the card's padding is subtracted. Cap it to the container. */
#register .reg-rules iframe,
iframe { max-width: 100%; }

/* The decorative blobs are absolutely positioned and deliberately bleed past the
   viewport for a soft edge. They are pure decoration, so clip them at the page
   level rather than letting them widen the document. */
body { overflow-x: clip; }
@supports not (overflow-x: clip) {
  body { overflow-x: hidden; }
}

/* ---- The last 2px: Bootstrap 3 specificity on .navbar-header -----------------
   Measured at 375/393/430px the document was still 2px wider than the viewport,
   traced to `.navbar-header` keeping `margin-left/right:-15px`. My earlier
   `.navbar-header { margin: 0 }` (specificity 0,1,0) never applied because
   Bootstrap 3 ships `.container-fluid > .navbar-header` (0,2,0) and specificity
   beats source order. Matching the selector makes it apply with no !important.

   Scoped to the direct-child shape Bootstrap actually uses, so it cannot affect
   the flex `min-width:0` fix or the table scroll containers elsewhere. */
@media (max-width: 991px) {
  .container-fluid > .navbar-header,
  .container > .navbar-header {
    margin-left: 0;
    margin-right: 0;
  }
}

/* ---- The open hamburger menu overflowed both edges (measured 393px) ----------
   Symptom (reported by Lucas): "the mobile nav bar overflows" once logged into the
   member area. Measured on /book/dashboard/ with the menu open:

       div.container-fluid   L=1  R=392  w=391   (correct)
       div.navbar-collapse   L=-2 R=395  w=397   margin:-15px  -> +2px past right
       ul.nav.navbar-nav     L=-17 R=410 w=427   margin:-15px  -> +17px BOTH sides

   Bootstrap 3 gives `.navbar-collapse` and `ul.nav.navbar-nav` a -15px horizontal
   margin (to bleed out to the viewport edge on desktop). Inside a `.container-fluid`
   that already carries its own padding, those negative margins push the panel 17px
   past each edge, so every menu item is clipped at both sides.

   An earlier attempt here set `.navbar-collapse { padding-left:0; padding-right:0 }`
   — real, but the culprit is MARGIN, not padding, which is why the symptom survived.

   Matching the selectors Bootstrap uses so no !important is needed. */
@media (max-width: 991px) {
  .navbar-collapse,
  .navbar-inverse .navbar-collapse,
  .navbar-collapse.collapse,
  .navbar-collapse.collapse.in,
  ul.nav.navbar-nav,
  .navbar-nav {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }
  /* the collapse panel must not add its own inset on top of the container's */
  .navbar-collapse { padding-left: 0; padding-right: 0; }
  /* long item labels wrap instead of widening the nav */
  .navbar-nav > li > a,
  .sidebar-link { white-space: normal; overflow-wrap: anywhere; }
}

/* ===========================================================================
   PHONE DENSITY LAYER  (<=575px only)
   ---------------------------------------------------------------------------
   GYM One renders every screen as full-width cards in a single column with
   desktop padding, so on a 393px phone each page ran 2-3 screens tall
   (measured: member home 2.79, admin hours 2.44, admin home 2.10).

   This lives in brand.css because brand.css is ALREADY the last stylesheet on
   every page, so the rules win the cascade without a per-page edit or an
   !important arms race. Tuning each page's inline <style> block fixed one page
   at a time and re-broke whenever a page was restored.

   Rules: pair stat tiles 2-up, shrink card padding and rhythm, turn wide data
   tables into stacked row-cards, forbid mid-word breaks, keep 44px tap targets.
   Tablets and desktop are untouched.
   =========================================================================== */

/* ===========================================================================
   PHONE DENSITY  (<=575px only)
   =========================================================================== */
@media (max-width: 575px) {

  /* ---- 1. Vertical rhythm -------------------------------------------------
     Desktop 14-24px card padding and 16-20px gaps are ~40% of the wasted height
     on a phone. Tighten all of it in one place. */
  .dsh-card, .bk-card, .ab-card, .sp-card, .card {
    padding: 13px !important;
    margin-bottom: 11px !important;
  }
  .dsh-card-head, .bk-card-head, .ab-card-head {
    margin-bottom: 9px !important;
    padding-bottom: 8px !important;
  }
  .dsh-card-head h4, .dsh-card-head h3, .bk-card h2, .ab-card h2 { font-size: 15px !important; }
  .dsh-card-body { padding: 0 !important; }
  .container-fluid { padding-left: 10px !important; padding-right: 10px !important; }
  .row > [class*="col-"] { padding-left: 6px !important; padding-right: 6px !important; }
  .row.content { margin-left: 0 !important; margin-right: 0 !important; }

  /* ---- 2. Stat / metric tiles: 2-up, not stacked --------------------------
     These hold ONE short value each. Stacking four of them cost a third of a
     screen for four words. */
  .dsh-stats, .ab-stats, .sp-stats, .stat-grid, .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
  }
  .dsh-stat { padding: 11px 9px !important; gap: 9px !important; align-items: flex-start !important; }
  .dsh-stat-icon { width: 28px !important; height: 28px !important; min-width: 28px !important; font-size: 13px !important; }
  .dsh-stat-value { font-size: 14px !important; line-height: 1.3 !important; }
  .dsh-stat-label { font-size: 11px !important; line-height: 1.3 !important; }

  /* ---- 3. Words must not break mid-word -----------------------------------
     `word-break: break-word` split "12 Session Package" into
     "Sessi / on / Pack / age" once the tiles got narrow. */
  .dsh-stat-value, .dsh-stat-label, .dsh-card, .bk-card, td, th,
  .dsh-mem-row, .bk-slot, .ab-person {
    word-break: normal !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
  }

  /* ---- 4. Wide data tables become stacked row-cards -----------------------
     admin/hours has 7 columns ("Day, Window 1 Open, Window 1 Close, Window 2
     Open, Window 2 Close, Location, Closed") which measured 1876px tall on a
     phone while horizontally scrolling. As stacked cards each row is one block
     with its label next to its value. */
  /* The admin hours table has 6 columns, five of which are time inputs. Stacked
     one-per-line each row was 308px; seven rows = 2156px, WORSE than the 1876px
     horizontal scroll it replaced. As a 2-column grid (label | control) a row is
     about 150px and the month of settings is readable without sideways scrolling. */
  /* CRITICAL: a `display:block` <table> still lays its rows out inside an
     anonymous table box, so the row kept resolving to its content width (560px
     inside a 291px table) no matter what width/max-width I set on the <tr>.
     Killing the table formatting context with `display:block` on ALL of
     table/thead/tbody/tr/td and `table-layout:fixed` is what actually frees it. */
  .fb-stack-table,
  .fb-stack-table > thead,
  .fb-stack-table > tbody,
  .fb-stack-table > tfoot {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    overflow-x: visible !important;
  }
  .fb-stack-table thead { display: none !important; }
  .fb-stack-table tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 6px 10px !important;
    width: 100% !important; max-width: 100% !important;
    background: var(--bg-alt) !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    padding: 10px !important;
    margin-bottom: 8px !important;
  }
  .fb-stack-table td, .fb-stack-table th {
    display: flex !important;
    /* label on the left, control on the right, on ONE line: stacking them
       vertically made every cell 54px and the whole table 1540px */
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    width: auto !important; max-width: 100% !important; min-width: 0 !important;
    border: none !important;
    padding: 0 !important;
    text-align: left !important;
  }
  /* the row's own label acts as the card heading and spans both columns */
  .fb-stack-table td:first-child, .fb-stack-table th:first-child {
    grid-column: 1 / -1 !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    color: var(--text) !important;
    border-bottom: 1px solid var(--border) !important;
    padding-bottom: 6px !important;
    margin-bottom: 2px !important;
    flex-direction: row !important;
    align-items: center !important;
  }
  /* each cell shows its heading above its value/control */
  .fb-stack-table td::before {
    content: attr(data-label);
    display: block !important;
    color: var(--text-muted) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-align: left !important;
    flex: 0 0 auto !important;
    max-width: 52% !important;
  }
  /* inside a card the control is the row's content, so it fills the column and
     drops to a compact height - the 44px floor exists for real tap targets, and
     a narrow time input at 38px is still comfortably tappable */
  .fb-stack-table input, .fb-stack-table select {
    width: auto !important;
    max-width: 46% !important;
    min-width: 0 !important;
    flex: 0 1 auto !important;
    min-height: 38px !important;
    padding: 6px 8px !important;
    font-size: 15px !important;
  }
  .fb-stack-table input[type="checkbox"] { width: 22px !important; min-height: 22px !important; align-self: flex-start !important; }

  /* ---- 5. Horizontal scrollers keep their 44px touch targets --------------- */
  .bk-daybtn, .bk-loc a { min-height: 44px !important; }
  input, select, textarea, .form-control, .btn, button { min-height: 44px; }
}

/* ============================================================ mobile === */
/* Phone-only fixes. Everything here is scoped to <=767px so the desktop
   dashboard is untouched.

   THE HEADER BUG (reported 2026-10-26): GYM One's mobile bar is
   `position: relative` (Bootstrap default). Opening the menu and scrolling
   pushed the whole bar off the top of the screen, taking the hamburger with
   it — so the menu could be opened but not closed. Measured on
   /book/dashboard/ at 390x844: after scrolling 880px the nav sat at top:-880,
   the toggle at top:-871, elementFromPoint over the toggle returned nothing,
   and the menu was stranded open.
   Fix: pin the bar, and make the expanded menu a full-height panel underneath
   it, so the close control never leaves the screen. */
@media (max-width: 767px) {
  nav.navbar {
    position: sticky !important;
    top: 0;
    z-index: 1035;
  }

  .navbar-collapse.in,
  .navbar-collapse.collapsing {
    position: fixed;
    inset: 0;
    /* clears the pinned bar (~110px) plus breathing room */
    padding-top: 118px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    /* sits below the bar so the toggle stays tappable even with the menu open */
    z-index: 1034;
    background: inherit;
  }

  /* Tap targets: measured 41px tall in the mobile menu. */
  .navbar-nav > li > a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  /* Booking calendar cells measured 42x42. */
  a.cell {
    min-width: 44px !important;
    min-height: 44px !important;
  }

  /* iOS Safari zooms the whole page when a form control under 16px gets focus.
     The extras <select> measured 14px on the buy page. */
  select,
  input:not([type="hidden"]),
  textarea,
  .pk-extras-select {
    font-size: 16px !important;
  }
}

/* The expanded menu is a child of the navbar and is `position: fixed` with a
   z-index, so inside the navbar's own stacking context it paints OVER the bar
   and hides the hamburger — leaving the menu impossible to close. Lift the bar's
   contents above it. (Same media scope as the block above.) */
@media (max-width: 767px) {
  /* Scoped to a real Bootstrap navbar. The profile page carries stray
     .navbar-header markup with no navbar around it; lifting that above the
     shared menu made it swallow taps on the first link. */
  nav.navbar .navbar-header {
    position: relative;
    z-index: 1036;
  }
}

/* ---------------------------------------------- shared member mobile nav --- */
/* Used by dashboard/_mobile_nav.php on pages that had no header at all
   (book/, buy/, profile/). Self-contained: no Bootstrap JS required.
   Hidden from 768px up, where each page's own layout provides navigation. */
.fb-mnav { display: none; }

@media (max-width: 767px) {
  .fb-mnav {
    display: block;
    position: sticky;
    top: 0;
    z-index: 1035;
    background: var(--fb-bg-alt);
    border-bottom: 1px solid var(--fb-border);
    color: var(--fb-text);
  }
  .fb-mnav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    padding: 0 12px;
  }
  .fb-mnav-brand {
    display: flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
  }
  .fb-mnav-brand img { display: block; height: 24px; width: auto; }
  .fb-mnav-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: var(--fb-text);
    cursor: pointer;
  }
  .fb-mnav-bars { display: block; width: 20px; }
  .fb-mnav-bars i {
    display: block;
    height: 2px;
    margin: 4px 0;
    background: currentColor;
    border-radius: 1px;
  }
  /* The panel covers the screen below the bar, so opening the menu can never
     strand the close button off-screen — the bug reported on the dashboard. */
  .fb-mnav-panel {
    display: none;
    position: fixed;
    inset: 56px 0 0 0;
    background: var(--fb-bg-alt);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    z-index: 1034;
  }
  .fb-mnav.fb-open .fb-mnav-panel { display: block; }
  .fb-mnav-list { list-style: none; margin: 0; padding: 8px 16px 24px; }
  .fb-mnav-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--fb-border);
    color: var(--fb-text);
    text-decoration: none;
  }
  .fb-mnav-list a.is-active,
  .fb-mnav-list a[aria-current] { color: var(--fb-accent); }

  /* Buy page sub-nav measured 40px tall. */
  .pk-nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 767px) {
  /* Profile page carried a 263px horizontal overflow: a <pre> inside a modal with
     white-space:pre and long lines (measured scrollWidth 618 vs clientWidth 354).
     The page must never scroll sideways; the block may. */
  .modal-body pre,
  .modal pre,
  pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    max-width: 100%;
  }
  .modal,
  .modal-dialog,
  .modal-content {
    max-width: 100%;
    overflow-x: hidden;
  }
}

/* ------------------------------------------- login page: fit on one screen --- */
/* A login page that scrolls on a phone is a defect: the Next button ends up
   below the fold on common heights (measured 142-168px of overflow at
   375x667 and 360x640 with the logo at its authored 150px). Everything here
   is scoped to #login, which the page now actually carries. */
@media (max-width: 767px) {
  #login .lg-logo {
    width: 84px;
    height: 84px;
    max-width: 84px;
    margin-bottom: .45rem;
  }
  #login .lg-head {
    margin-bottom: .8rem;
  }
  #login .lg-title {
    font-size: 1.35rem;
  }
  #login .lg-sub {
    font-size: .82rem;
    margin-top: .15rem;
  }
  #login .form-group {
    margin-bottom: .55rem;
  }
  #login label {
    font-size: .8rem;
    margin-bottom: .2rem;
  }
  #login .form-control {
    padding: .55rem .75rem;
    font-size: 16px; /* keeps iOS from zooming the page on focus */
  }
  #login .btn-primary {
    padding: .7rem 1rem !important;
    font-size: .98rem;
  }
  #login .lg-links {
    margin-top: .6rem;
  }
  #login .lg-links small {
    font-size: .82rem;
  }
  #login .container > .row {
    padding-top: .5rem !important;
  }
  #login .card-body {
    padding: .9rem !important;
  }
}

/* Short phones (<=700px tall) get a tighter variant so the form never scrolls. */
@media (max-width: 767px) and (max-height: 700px) {
  #login .lg-logo {
    width: 64px;
    height: 64px;
    max-width: 64px;
    margin-bottom: .25rem;
  }
  #login .lg-head { margin-bottom: .5rem; }
  #login .lg-sub { display: none; }
  #login .form-group { margin-bottom: .45rem; }
  #login .lg-links { margin-top: .45rem; }
  #login .container > .row { padding-top: .25rem !important; }
}

/* The smallest phones (320x568 class) need one more step down. */
@media (max-width: 767px) and (max-height: 620px) {
  #login .lg-logo { width: 48px; height: 48px; max-width: 48px; margin-bottom: .1rem; }
  #login .lg-title { font-size: 1.15rem; }
  #login .form-group { margin-bottom: .35rem; }
  #login .lg-links { margin-top: .35rem; }
  #login .card-body { padding: .75rem !important; }
}

@media (max-width: 767px) and (max-height: 620px) {
  #login .lg-links small { font-size: .75rem; line-height: 1.3; }
  #login .lg-links { margin-top: .25rem; }
}

/* ------------------------------------- staff / admin login: put it on brand --- */
/* This screen was split dark | WHITE with near-white text sitting on the white
   half, a transparent-looking sign-in button and GYM One's own logo. It is the
   first thing every staff member sees, so it has to match the site. */
.split-container {
  background: var(--fb-bg);
}
.brand-side {
  background:
    radial-gradient(900px 520px at 18% 8%, rgba(74, 134, 255, .20), transparent 62%),
    radial-gradient(700px 500px at 90% 100%, rgba(74, 134, 255, .10), transparent 60%),
    var(--fb-bg-alt);
  border-right: 1px solid var(--fb-border);
}
.brand-logo {
  max-width: 132px;
  width: 132px;
  height: auto;
  margin-bottom: 1.4rem;
}
.brand-description {
  color: var(--fb-muted);
  font-size: .98rem;
  line-height: 1.6;
  max-width: 34ch;
}
.feature-item {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
}
.feature-item i {
  color: var(--fb-accent);
}
.feature-item h4 {
  color: var(--fb-text);
  font-size: .92rem;
}

.login-side {
  background: var(--fb-bg);
  color: var(--fb-text);
}
.admin-badge {
  background: rgba(74, 134, 255, .14);
  border: 1px solid rgba(74, 134, 255, .35);
  color: var(--fb-accent);
}
.login-header h1 {
  color: var(--fb-text);
  font-family: var(--fb-font-display);
  letter-spacing: .5px;
}
.login-header p {
  color: var(--fb-muted);
}
.login-side label,
.login-side .form-label {
  color: var(--fb-text);
  font-weight: 600;
}
.login-side .form-control {
  background: var(--fb-bg-alt);
  border: 1.5px solid var(--fb-border);
  color: var(--fb-text);
}
.login-side .form-control::placeholder {
  color: var(--fb-muted);
}
.login-side .form-control:focus {
  background: var(--fb-bg-alt);
  border-color: var(--fb-accent);
  box-shadow: 0 0 0 4px rgba(74, 134, 255, .16);
  color: var(--fb-text);
}
.login-side .input-icon {
  color: var(--fb-muted);
}
.login-side .btn-login {
  background: var(--fb-accent);
  box-shadow: 0 6px 18px rgba(74, 134, 255, .28);
}
.login-side .btn-login:hover {
  background: var(--fb-accent-dark);
  box-shadow: 0 10px 26px rgba(74, 134, 255, .34);
}
.login-side a {
  color: var(--fb-accent);
}

/* Phones: the split stacks, so kill the divider and the heavy side padding. */
@media (max-width: 991px) {
  .brand-side {
    border-right: 0;
    border-bottom: 1px solid var(--fb-border);
  }
  .login-side {
    padding: 24px 18px !important;
  }
  .brand-logo {
    max-width: 96px;
    width: 96px;
    margin-bottom: .8rem;
  }
}

/* On a phone the decorative feature grid pushes the form below the fold, so it
   goes. The logo and the one-line description carry the branding instead. */
@media (max-width: 991px) {
  .brand-side {
    padding: 20px 18px !important;
  }
  .feature-grid {
    display: none;
  }
  .brand-description {
    font-size: .88rem;
    line-height: 1.45;
    margin: 0;
  }
  .login-side {
    padding: 14px !important;
  }
  .login-header h1 {
    font-size: 1.5rem;
    margin-bottom: .25rem;
  }
  .login-side .btn-login {
    padding: 13px;
  }
}

/* ========================== MOBILE AUDIT FIXES (2026-10-27) =================
   Found by measuring all 30 member/admin/coach pages at 390x844.
   ========================================================================== */
:root {
  /* White on the brand blue measured 3.42:1 — below the 4.5 body-text floor.
     These two shades carry white text past it. */
  --fb-accent-solid: #2f6bd8;
  --fb-danger-solid: #b03a35;
}

/* 1. Primary buttons: white on #4a86ff failed on every single page. */
.btn-primary,
.btn.btn-primary,
.pk-buy,
.btn-login {
  background-color: var(--fb-accent-solid) !important;
  border-color: var(--fb-accent-solid) !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus,
.btn.btn-primary:hover, .btn.btn-primary:focus,
.pk-buy:hover, .btn-login:hover {
  background-color: #2456b0 !important;
  border-color: #2456b0 !important;
}
/* Danger buttons: white on #d9534f was 3.96:1, and the profile "delete account"
   button was 3.27:1 on #ff4d4d. */
.btn-danger, .btn.btn-danger,
button[style*="ff4d4d"], .dsh-danger {
  background-color: var(--fb-danger-solid) !important;
  border-color: var(--fb-danger-solid) !important;
  color: #fff !important;
}

/* 2. Coach availability ("My availability") drew white cards on the dark theme:
   white heading on white card measured 1.11:1. */
.av-card {
  background-color: var(--fb-bg-card) !important;
  border-color: var(--fb-border) !important;
  color: var(--fb-text) !important;
}
.av-card h2 { color: var(--fb-text) !important; }
.av-card p.hint { color: var(--fb-muted) !important; }
.av-day { border-top-color: var(--fb-border) !important; }
.av-day-name { color: var(--fb-text) !important; }
.av-slot {
  background-color: var(--fb-bg-alt) !important;
  color: var(--fb-text) !important;
}
.av-empty { color: var(--fb-muted) !important; }
.av-grid label { color: var(--fb-text) !important; }
.av-grid input, .av-grid select {
  background-color: var(--fb-bg-alt) !important;
  color: var(--fb-text) !important;
  border-color: var(--fb-border) !important;
}

/* 3. Charts and the rich-text editor kept light-theme ink on dark surfaces
   (1.55:1 legend text, 1.22:1 editor status bar). */
.apexcharts-legend-text { color: var(--fb-text) !important; }
.tox .tox-statusbar,
.tox .tox-statusbar__path-item,
.tox .tox-statusbar a,
.tox .tox-statusbar__wordcount { color: var(--fb-text) !important; }
.tox .tox-statusbar {
  background-color: var(--fb-bg-alt) !important;
  border-top-color: var(--fb-border) !important;
}

/* 4. Register page: the avatar dropzone and info panels were light, so themed
   muted text landed on them at 2.24:1. */
#register .reg-avatar {
  background: var(--fb-bg-alt) !important;
  border-color: var(--fb-border) !important;
  color: var(--fb-muted) !important;
}
#register .tips-section,
#register .footer {
  background: var(--fb-bg-card) !important;
  color: var(--fb-muted) !important;
}

/* 5. Member dashboard small actions sat at 4.06-4.3:1. */
.dsh-logout,
.dsh-buymore,
.dsh-chip { color: #9dbdff !important; }

/* 6. Controls that were 38px tall (register fields, venue-hours inputs) and
   22px checkboxes. */
@media (max-width: 767px) {
  input:not([type=checkbox]):not([type=radio]),
  select, textarea, .form-control,
  .form-control-file { min-height: 44px !important; }
  input[type=checkbox], input[type=radio] {
    width: 24px !important;
    height: 24px !important;
  }
  .av-wrap a, .av-actions a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* 7. A file input wider than its column gave settings 12px of sideways scroll. */
input[type=file], .form-control-file { max-width: 100% !important; }

/* Buttons that come through .btn-success / .btn-info also carried the light
   accent (3.42:1 with white); extend the solid shade to them. */
.btn-success, .btn.btn-success,
.btn-info, .btn.btn-info {
  background-color: var(--fb-accent-solid) !important;
  border-color: var(--fb-accent-solid) !important;
  color: #fff !important;
}
.btn-success:hover, .btn-info:hover {
  background-color: #2456b0 !important;
  border-color: #2456b0 !important;
}
/* Bootstrap's danger ink on a dark card was 2.93:1. */
.text-danger { color: #ff8a85 !important; }
/* Coach availability: secondary buttons were near-white text on a light chip. */
.av-card .btn, .av-card button.btn {
  background-color: var(--fb-bg-alt) !important;
  border-color: var(--fb-border) !important;
  color: var(--fb-text) !important;
}

/* Register fields sat at 15.68px, which makes iOS Safari zoom the whole page on
   focus; and its checkboxes were 20px. */
@media (max-width: 767px) {
  #register input:not([type=checkbox]):not([type=radio]),
  #register select, #register textarea { font-size: 16px !important; }
  #register .form-check-input,
  #register input[type=checkbox] { width: 24px !important; height: 24px !important; }
  /* venue hours: the weekday row checkboxes */
  .fb-stack-table input[type="checkbox"] { width: 26px !important; height: 26px !important; }
}
