/* ── Sportifi · Navy / White Theme ──
   Bright white content surfaces, deep-navy chrome (sidebar, topbar,
   table headers, charts), royal-blue primary actions, amber accents. */
:root {
  --pitch-dark: #0a1730;
  --pitch-mid: #10294f;
  --pitch-light: #1d4ed8;
  --turf: #2563eb;
  --turf-glow: #3b82f6;
  --gold: #f5b301;
  --gold-deep: #b45309;
  --cream: #f6f9ff;                       /* light text for dark chrome */
  --ink: #101c31;                         /* near-black navy body text */
  --ink-soft: rgba(16, 28, 49, 0.65);
  --navy: #12294e;                        /* headings/labels on white */
  --accent: #1d4ed8;                      /* primary action blue */
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --surface-border: #e9edf5;
  --glass: rgba(16, 42, 84, 0.66);        /* dark glass (marketing/chrome) */
  --glass-border: rgba(146, 177, 235, 0.32);
  --glass-highlight: rgba(255, 255, 255, 0.06);
  /* Soft, layered shadows for the clean light theme (calm, not heavy) */
  --shadow-3d: 0 1px 2px rgba(16, 32, 68, 0.04), 0 8px 24px rgba(16, 32, 68, 0.06);
  --shadow-lift: 0 4px 10px rgba(16, 32, 68, 0.07), 0 16px 40px rgba(16, 32, 68, 0.10);
  --shadow-sm: 0 1px 2px rgba(16, 32, 68, 0.05), 0 2px 6px rgba(16, 32, 68, 0.04);
  --sidebar-w: 240px;
  --topbar-h: 58px;
  --font-display: "Sora", "Segoe UI", sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body.app-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: #f4f6fb;
  background-attachment: fixed;
}

body.app-body::before {
  content: none;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.app-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
}

.app-main {
  flex: 1;
  min-width: 0;
  padding: calc(var(--topbar-h) + 1.75rem) 2.25rem 3rem;
}

/* ── Top header bar ── */
.app-topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0 1.75rem;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--surface-border);
  box-shadow: 0 1px 3px rgba(16, 32, 68, 0.05);
  backdrop-filter: blur(14px);
}

.app-topbar__spacer { flex: 1; }

.app-topbar__biz {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.app-topbar__biz .form-label {
  white-space: nowrap;
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: 0.03em;
}
/* Active-business context must be unmissable in a multi-tenant app */
.app-topbar__biz .form-select {
  min-width: 190px;
  font-weight: 600;
  color: var(--navy);
  border: 1.5px solid rgba(37, 99, 235, 0.35);
  background-color: rgba(37, 99, 235, 0.05);
}
.app-topbar__biz .form-select:hover,
.app-topbar__biz .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.18);
}

.app-topbar__user {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: right;
}

.app-topbar__role {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
}

/* Desktop: account cluster fills the bar; mobile-only bits hidden */
.app-topbar__account {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex: 1;
}

.app-hamburger,
.app-topbar__brand-m,
.sidebar-backdrop,
.sidebar-account-m {
  display: none;
}

.app-hamburger {
  background: transparent;
  border: none;
  color: var(--navy);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.15rem 0.4rem;
  cursor: pointer;
}

.app-topbar__brand-m {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--navy);
}

/* ── Sidebar ── */
.cricket-sidebar {
  height: 100%;
  padding: 1.25rem 0.9rem;
  background: #ffffff;
  border-right: 1px solid var(--surface-border);
  box-shadow: none;
  overflow-y: auto;
}

.cricket-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
  padding: 0.5rem 0.25rem;
}

.cricket-sidebar__logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--turf-glow), var(--pitch-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.cricket-sidebar__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--navy);
}

.cricket-sidebar__subtitle {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  opacity: 0.9;
}

.cricket-sidebar .nav-link {
  color: #4a5878 !important;
  border-radius: 9px;
  padding: 0.5rem 0.8rem;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
  border: 1px solid transparent;
}

.cricket-sidebar .nav-link:hover {
  color: var(--accent) !important;
  background: rgba(37, 99, 235, 0.07);
  border-color: transparent;
}

.cricket-sidebar summary.nav-link {
  font-weight: 600;
  color: var(--navy) !important;
}

.cricket-sidebar .sidebar-section summary {
  cursor: pointer;
  list-style: none;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #8a93a8 !important;
}

.cricket-sidebar .sidebar-section summary::-webkit-details-marker { display: none; }

.cricket-sidebar .border-start {
  border-color: var(--surface-border) !important;
}

/* ── Page chrome ── */
.page-header {
  margin-bottom: 1.5rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

.page-subtitle {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0.25rem 0 0;
}

/* ── Cards / panels: bright white surfaces ── */
.panel-3d {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  box-shadow: var(--shadow-3d);
  transition: box-shadow 0.25s ease;
}

.panel-3d:hover {
  box-shadow: var(--shadow-lift);
}

.panel-3d .card-header {
  background: transparent;
  border-bottom: 1px solid var(--surface-border);
  color: var(--navy);
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 18px 18px 0 0 !important;
}

.panel-3d .card-body { color: var(--ink); }

/* ── Forms & inputs ── */
.app-body .form-label {
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.app-body .form-control,
.app-body .form-select {
  background: var(--surface);
  border: 1px solid #ccd7ea;
  color: var(--ink);
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.app-body .form-control:focus,
.app-body .form-select:focus {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--ink);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  transform: translateY(-1px);
}

.app-body .form-control::placeholder { color: rgba(16, 28, 49, 0.42); }

.app-body .form-select option {
  background: #ffffff;
  color: var(--ink);
}

.app-body .form-control[readonly] {
  background: var(--surface-2);
  opacity: 1;
}

/* ── Tabs ── */
.cricket-tabs {
  border-bottom: 1px solid var(--glass-border);
}

.cricket-tabs .nav-link {
  color: var(--ink-soft);
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.5rem 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: transparent;
}

.cricket-tabs .nav-link:hover {
  color: var(--ink);
  border-bottom-color: rgba(37, 99, 235, 0.45);
}

.cricket-tabs .nav-link.active {
  color: var(--accent);
  background: transparent;
  border-bottom-color: var(--accent);
}

/* ── Occupancy bars ── */
.occ-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.occ-label {
  width: 48px;
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.occ-bar {
  flex: 1;
  height: 14px;
  border-radius: 7px;
  background: rgba(16, 42, 84, 0.08);
  overflow: hidden;
}

.occ-fill {
  display: block;
  height: 100%;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--turf-glow), var(--gold));
  min-width: 2px;
}

.occ-val {
  width: 44px;
  flex-shrink: 0;
  text-align: right;
  font-size: 0.78rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ── Availability grid ── */
.availability-grid {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.7rem;
  color: var(--ink);
}

.availability-grid thead th {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, rgba(16, 42, 84, 0.98), rgba(10, 28, 58, 0.98));
  color: var(--gold);
  font-weight: 600;
  text-align: center;
  padding: 0.35rem 0;
  min-width: 22px;
  z-index: 2;
}

.availability-grid .avail-day-head {
  text-align: left;
  padding-left: 0.75rem;
  min-width: 90px;
  left: 0;
  z-index: 3;
}

.availability-grid .avail-day {
  white-space: nowrap;
  padding: 0 0.75rem;
  position: sticky;
  left: 0;
  background: var(--surface-2);
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
  height: 26px;
}

.availability-grid tbody td {
  border: 1px solid rgba(16, 42, 84, 0.10);
  height: 26px;
}

.availability-grid tbody tr.avail-weekend .avail-day { color: var(--accent); }

.slot-free { background: rgba(59, 130, 246, 0.22); }
.slot-free:hover { background: rgba(59, 130, 246, 0.45); }
.slot-booked { background: rgba(220, 53, 69, 0.6); }
.slot-booked:hover { background: rgba(220, 53, 69, 0.8); }

.slot-legend {
  display: inline-block;
  width: 20px;
  height: 10px;
  border-radius: 999px;
  vertical-align: middle;
  margin-right: 5px;
  border: none;
}

/* ── Show/Hide password toggle ── */
.pw-wrap {
  position: relative;
}

.pw-wrap input {
  padding-right: 3.6rem;
}

.pw-toggle {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--turf-glow);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
}

.pw-toggle:hover {
  color: #fff;
  background: rgba(59, 130, 246, 0.18);
}

/* ── Active sidebar link ── */
.cricket-sidebar .nav-link.is-active {
  color: var(--accent) !important;
  background: rgba(37, 99, 235, 0.10);
  border-color: transparent;
  font-weight: 600;
}

/* ── Toast notifications ── */
.app-toasts {
  position: fixed;
  top: calc(var(--topbar-h) + 12px);
  right: 18px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.app-toast {
  padding: 0.8rem 1.1rem;
  border-radius: 12px;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  animation: toastIn 0.3s ease;
}

.app-toast--success { background: linear-gradient(145deg, #1d4ed8, #3b82f6); }
.app-toast--error { background: linear-gradient(145deg, #9d2235, #c1121f); }
.app-toast--hide { opacity: 0; transform: translateX(24px); transition: all 0.3s ease; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: none; }
}

/* ── Confirmation modal ── */
.app-modal {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(5, 8, 15, 0.62);
  backdrop-filter: blur(3px);
}

.app-modal[hidden] { display: none; }

.app-modal__box {
  max-width: 420px;
  width: 100%;
  padding: 1.5rem;
  animation: modalIn 0.2s ease;
}

.app-modal__msg {
  color: var(--ink);
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.app-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

/* High-blast-radius confirmations (cascading revokes, business deletes) */
.app-modal__box--danger {
  border: 1px solid rgba(255, 107, 107, 0.7);
  box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.35), var(--shadow-3d);
}

.app-modal__title {
  color: #ff9b9b;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 0.6rem;
  font-size: 1rem;
}
.app-modal__title[hidden] { display: none; }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* Confirm-password mismatch feedback */
.form-control.is-invalid {
  border-color: #ff6b6b !important;
  box-shadow: 0 0 0 0.15rem rgba(255, 107, 107, 0.25);
}

/* Horizontal-scroll affordance for wide tables (e.g. availability grid) */
.scroll-hint {
  color: var(--accent);
  font-size: 0.8rem;
  text-align: center;
  margin: 0 0 0.4rem;
  letter-spacing: 0.03em;
}
.scroll-shadow {
  background:
    linear-gradient(to right, var(--surface) 30%, rgba(255, 255, 255, 0)) left center / 24px 100% no-repeat,
    linear-gradient(to left, var(--surface) 30%, rgba(255, 255, 255, 0)) right center / 24px 100% no-repeat,
    radial-gradient(farthest-side at 0 50%, rgba(15, 32, 68, 0.22), rgba(15, 32, 68, 0)) left center / 14px 100% no-repeat,
    radial-gradient(farthest-side at 100% 50%, rgba(15, 32, 68, 0.22), rgba(15, 32, 68, 0)) right center / 14px 100% no-repeat;
  background-attachment: local, local, scroll, scroll;
}

/* Password strength meter (register) */
.pw-strength__bar {
  height: 5px;
  border-radius: 3px;
  background: rgba(16, 42, 84, 0.12);
  overflow: hidden;
  margin-bottom: 0.25rem;
}
.pw-strength__bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  transition: width 0.2s ease, background 0.2s ease;
}

/* ── Responsive tables ── */
@media (max-width: 768px) {
  /* Tables not opted into stacking simply scroll horizontally */
  .table-cricket:not(.table-stack) {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  /* Stacked tables: each row becomes a labelled card */
  .table-stack,
  .table-stack tbody,
  .table-stack tr,
  .table-stack td {
    display: block;
    width: 100%;
  }

  .table-stack thead {
    display: none;
  }

  .table-stack tr {
    margin: 0 0 0.85rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    background: var(--surface);
  }

  .table-stack td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    border: none;
    border-bottom: 1px solid rgba(16, 42, 84, 0.08);
    text-align: right;
    white-space: normal;
  }

  .table-stack tr td:last-child {
    border-bottom: none;
  }

  .table-stack td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--navy);
    text-align: left;
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Let forms/controls inside a stacked cell size naturally */
  .table-stack td form,
  .table-stack td .form-select,
  .table-stack td .d-flex {
    width: auto;
  }

  /* Touch targets: buttons in stacked rows must meet the 44px minimum */
  .table-stack td .btn,
  .table-stack td button[type="submit"] {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }

  .app-main {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ── Buttons ── */
.btn-cricket {
  background: linear-gradient(145deg, var(--turf-glow), var(--pitch-light));
  border: none;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 10px;
  padding: 0.5rem 1.25rem;
  box-shadow: 0 4px 12px rgba(29, 78, 176, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-cricket:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(29, 78, 176, 0.32);
}

.btn-cricket-gold {
  background: linear-gradient(145deg, var(--gold), var(--gold-deep));
  color: #1a1200;
  box-shadow: 0 6px 20px rgba(244, 196, 48, 0.35);
}

.btn-cricket-gold:hover { color: #1a1200; }

.btn-cricket-outline {
  background: var(--surface);
  border: 1px solid #c3d0e8;
  color: var(--navy);
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.2s;
}

.btn-cricket-outline:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: var(--accent);
  color: var(--accent);
}

.app-body .btn-primary {
  background: linear-gradient(145deg, var(--turf-glow), var(--pitch-light));
  border: none;
  box-shadow: 0 4px 14px rgba(29, 78, 176, 0.4);
}

.app-body .btn-success {
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  border: none;
}

.app-body .btn-outline-secondary {
  border-color: #c3d0e8;
  color: var(--navy);
}

.app-body .btn-outline-secondary:hover {
  background: rgba(16, 42, 84, 0.06);
  color: var(--ink);
}

.app-body .btn-outline-danger {
  border-color: rgba(220, 53, 69, 0.5);
}

/* ── Tables ── */
.table-cricket {
  --bs-table-bg: var(--surface);
  --bs-table-color: var(--ink);
  --bs-table-border-color: rgba(16, 42, 84, 0.09);
  --bs-table-striped-bg: rgba(37, 99, 235, 0.045);
  --bs-table-striped-color: var(--ink);
  --bs-table-hover-bg: rgba(37, 99, 235, 0.09);
  --bs-table-hover-color: var(--ink);
  --bs-table-active-bg: rgba(37, 99, 235, 0.09);
  --bs-table-active-color: var(--ink);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--surface-border);
}

/* Force dark cell text regardless of Bootstrap striped/hover state */
.table-cricket tbody td,
.table-cricket tbody th {
  color: var(--ink);
}

.table-cricket thead {
  background: var(--surface-2);
}

.table-cricket thead th {
  border-bottom: 1px solid var(--surface-border);
  color: #6b7488;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.7rem;
  padding: 0.85rem 0.9rem;
}

.table-cricket.table-hover tbody tr {
  transition: transform 0.2s;
}

/* Scannability: subtle hover tint on every table row (background only — no
   transform, so it doesn't imply the row is clickable). */
.table-cricket tbody tr:hover td,
.table-cricket tbody tr:hover th {
  background-color: rgba(37, 99, 235, 0.07);
}

/* Right-align numeric / currency columns for easier column scanning */
.table-cricket td.num,
.table-cricket th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ── Activity log details ── */
.log-details {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.15rem 0;
}

.log-head {
  font-weight: 600;
  color: var(--ink);
}

.log-change {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 0.35rem;
  font-size: 0.84rem;
}

/* Comma-separate consecutive changes: "Contact: a → b," then next on its own line */
.log-changes > .log-change:not(:last-child)::after {
  content: ",";
  color: rgba(16, 28, 49, 0.5);
}

.log-change__label {
  color: var(--navy);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.log-change__label::after {
  content: ":";
}

.log-change__old {
  color: #c0392b;
  text-decoration: line-through;
  text-decoration-color: rgba(192, 57, 43, 0.5);
}

.log-change__arrow {
  color: rgba(16, 28, 49, 0.5);
  font-weight: 700;
}

.log-change__new {
  color: var(--accent);
  font-weight: 600;
}

.log-changes > summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  list-style-position: inside;
}
.log-changes[open] > summary {
  margin-bottom: 0.3rem;
}
.log-changes > .log-change {
  margin-top: 0.25rem;
}
.log-changes__fields { color: var(--navy); font-weight: 700; }
.log-changes__hint { color: rgba(16, 28, 49, 0.5); font-weight: 400; font-size: 0.78rem; }

/* Actionable tables (opt-in via .table-hover) get only a background tint on hover */

/* ── Stat cards (sales) ── */
.stat-card-3d {
  /* Soft pastel-gradient KPI tile (clean-dashboard style) */
  background: linear-gradient(150deg, #eef3ff 0%, #f7f9ff 100%);
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 18px;
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-card-3d:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.stat-card-3d .stat-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: var(--ink-soft);
}

.stat-card-3d .stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-top: 0.15rem;
}

/* Emphasised "Results" cards (gross/net profit) — larger than the input cards */
.stat-card-3d.stat-card-lg {
  padding: 1.7rem 1.85rem;
}
.stat-card-3d.stat-card-lg .stat-value {
  font-size: 2.2rem;
}

/* Pastel palette per variant — soft tinted fills, saturated value text */
.stat-card-3d.stat-success {
  background: linear-gradient(150deg, #e6f7ee 0%, #f5fbf8 100%);
  border-color: rgba(30, 158, 106, 0.18);
}
.stat-card-3d.stat-danger {
  background: linear-gradient(150deg, #fdecee 0%, #fff6f7 100%);
  border-color: rgba(211, 61, 79, 0.18);
}
.stat-card-3d.stat-gold,
.stat-card-3d.stat-warning {
  background: linear-gradient(150deg, #fdf3e0 0%, #fffaf1 100%);
  border-color: rgba(180, 83, 9, 0.18);
}
.stat-card-3d.stat-primary {
  background: linear-gradient(150deg, #ece9ff 0%, #f7f6ff 100%);
  border-color: rgba(99, 91, 255, 0.18);
}
.stat-card-3d.stat-success .stat-value { color: #157a52; }
.stat-card-3d.stat-danger .stat-value { color: #c22e40; }
.stat-card-3d.stat-gold .stat-value,
.stat-card-3d.stat-warning .stat-value { color: #a16207; }
.stat-card-3d.stat-primary .stat-value { color: #4f46e5; }

/* ── Alerts ── */
.app-body .alert-danger {
  background: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.35);
  color: #b02a37;
  border-radius: 12px;
}

.app-body .alert-success {
  background: rgba(37, 99, 235, 0.07);
  border: 1px solid rgba(37, 99, 235, 0.3);
  color: var(--accent);
  border-radius: 12px;
}

.app-body .text-muted { color: rgba(16, 28, 49, 0.6) !important; }

/* Muted text sitting on dark chrome stays light */
.app-topbar .text-muted,
.cricket-sidebar .text-muted,
.home-3d__overlay .text-muted,
.pub-body .text-muted {
  color: rgba(246, 249, 255, 0.68) !important;
}
.sidebar-account-m .text-muted { color: rgba(16, 28, 49, 0.6) !important; }

/* ── Pagination ── */
.app-body .pagination .page-link {
  background: var(--surface);
  border-color: #ccd7ea;
  color: var(--navy);
  border-radius: 8px !important;
  margin: 0 2px;
}

.app-body .pagination .page-item.active .page-link {
  background: linear-gradient(145deg, var(--turf-glow), var(--pitch-light));
  border-color: var(--accent);
  color: #fff;
}

.app-body .pagination .page-link:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
}

.app-body .pagination .page-item.disabled .page-link {
  background: var(--surface-2);
  color: rgba(16, 28, 49, 0.35);
}

/* ── Home · Full 3D ── */
.home-3d {
  position: relative;
  flex: 1;
  min-height: 100vh;
  overflow: hidden;
}

.home-3d__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.home-3d__overlay {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: calc(var(--topbar-h) + 2rem) 3rem 3rem calc(var(--sidebar-w) + 2rem);
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(5, 8, 15, 0.55) 0%,
    rgba(5, 8, 15, 0.25) 45%,
    rgba(5, 8, 15, 0.08) 100%
  );
}

.home-3d__overlay > * { pointer-events: auto; }

.home-hero__badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.28);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.home-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 0.98;
  letter-spacing: 0.02em;
  color: var(--navy);
  margin: 0 0 0.5rem;
}

.home-hero__title span { color: var(--accent); }

.home-hero__tagline {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 520px;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.home-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 220px));
  justify-content: start;
  gap: 1.25rem;
  max-width: 900px;
}

.home-action-card {
  display: block;
  text-decoration: none;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  box-shadow: var(--shadow-3d);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.home-action-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(37, 99, 235, 0.35);
}

.home-action-card__icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.home-action-card__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--navy);
  margin: 0 0 0.35rem;
}

.home-action-card__desc {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 0;
}

.home-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.home-stat {
  text-align: center;
}

.home-stat__num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.home-stat__lbl {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(240, 234, 214, 0.45);
}

/* Home layout: sidebar floats over 3D */
.app-shell--home .app-sidebar {
  position: fixed;
  left: 0;
  top: 0;
}

.app-shell--home .home-3d {
  width: 100%;
}

/* Chart cards on sales page — kept deep navy so the light-tick charts pop
   and give the page its dark-contrast anchor */
.chart-panel {
  background: linear-gradient(160deg, #12294e 0%, #0a1730 100%);
  border: 1px solid rgba(146, 177, 235, 0.25);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(10, 23, 48, 0.35);
}

.chart-panel .card-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gold);
}

.chart-panel .text-muted { color: rgba(246, 249, 255, 0.6) !important; }

/* ── Items grid ── */
.items-section-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--navy);
  margin-bottom: 1rem;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.item-grid__card {
  padding: 1.25rem;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.item-grid__card:hover {
  transform: translateY(-4px) scale(1.02);
}

.item-grid__card.item-low {
  border-color: rgba(220, 53, 69, 0.5);
  box-shadow: var(--shadow-3d), inset 0 0 0 1px rgba(220, 53, 69, 0.35);
}

.item-grid__icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.item-grid__name {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.35rem;
  word-break: break-word;
}

.item-grid__stock {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.item-grid__stock strong {
  color: var(--accent);
}

.cricket-sidebar__user {
  font-size: 0.82rem;
}

.login-page {
  padding: 1rem;
}

.btn-cricket.btn-sm,
.btn-cricket-outline.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
}

@media (max-width: 768px) {
  .app-shell { flex-direction: column; }
  .app-sidebar {
    width: 100%;
    height: auto;
    position: static;
  }

  /* Fixed top bar with hamburger; account cluster hidden (moved into drawer) */
  .app-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-h);
    justify-content: flex-start;
    gap: 0.6rem;
    padding: 0 1rem;
    z-index: 450;
  }
  .app-hamburger { display: inline-flex; }
  .app-topbar__brand-m { display: inline; }
  .app-topbar__account { display: none; }

  /* Off-canvas nav drawer */
  .cricket-sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    bottom: 0;
    width: 264px;
    max-width: 82vw;
    height: auto;
    min-height: 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 440;
    overflow-y: auto;
  }
  body.drawer-open .cricket-sidebar { transform: none; }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: var(--topbar-h) 0 0 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 430;
  }
  body.drawer-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-account-m { display: block; }

  .app-main { padding: calc(var(--topbar-h) + 1rem) 1rem 2rem; }
  .home-3d__overlay { padding: calc(var(--topbar-h) + 1rem) 1.5rem 1.5rem; }
}

/* ══════════════════════════════════════════════════════════
   PUBLIC / MARKETING PAGES (landing, about, contact, faq, terms)
   ══════════════════════════════════════════════════════════ */
/* ── User detail page ── */
.detail-list > div {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(146, 177, 235, 0.14);
}
.detail-list > div:last-child { border-bottom: none; }
.detail-list dt {
  flex: 0 0 130px;
  margin: 0;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.detail-list dd {
  margin: 0;
  color: var(--ink);
  word-break: break-word;
}

.detail-biz {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(146, 177, 235, 0.14);
}
.detail-biz:last-child { border-bottom: none; }

/* ── Client-side table pagination ── */
.table-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--glass-border);
}
.table-pager__info {
  color: rgba(16, 28, 49, 0.55);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.table-pager__btns { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.table-pager__btn {
  min-width: 32px;
  padding: 0.25rem 0.55rem;
  background: var(--surface);
  border: 1px solid #ccd7ea;
  color: var(--navy);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.table-pager__btn:hover:not(:disabled) {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--accent);
}
.table-pager__btn.is-active {
  background: linear-gradient(145deg, var(--turf-glow), var(--pitch-light));
  border-color: var(--turf-glow);
  color: #fff;
}
.table-pager__btn:disabled { opacity: 0.4; cursor: default; }

/* ── Business cards + kebab (⋮) menus ── */
.biz-card { padding: 1.25rem 1.5rem; }

.biz-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.biz-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink);
  line-height: 1.15;
}

.biz-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.biz-card__courts {
  margin-top: 1rem;
  border-top: 1px solid var(--glass-border);
  padding-top: 0.85rem;
}

.biz-card__courts-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.court-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(146, 177, 235, 0.12);
}
.court-item:last-child { border-bottom: none; }
.court-item__name { color: var(--ink); }

/* Kebab dropdown */
.kebab { position: relative; }
.kebab__btn {
  background: transparent;
  border: none;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.5rem;
  border-radius: 8px;
}
.kebab__btn:hover { background: rgba(37, 99, 235, 0.1); color: var(--accent); }

.kebab__menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.25rem;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  box-shadow: var(--shadow-lift);
  padding: 0.35rem;
  z-index: 400;
  display: none;
}
.kebab.is-open .kebab__menu { display: block; }

.kebab__item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--ink);
  text-decoration: none;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  font-size: 0.88rem;
  cursor: pointer;
}
.kebab__item:hover { background: rgba(37, 99, 235, 0.09); color: var(--accent); }

/* ── Contact messages ── */
.msg-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 0;
  padding: 0.25rem 0.35rem;
  border-radius: 6px;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}
.msg-toggle svg { display: block; }
.msg-toggle:hover { background: rgba(37, 99, 235, 0.1); transform: scale(1.15); }
.msg-toggle.is-unread { color: var(--accent); }
.msg-toggle.is-read { color: rgba(16, 28, 49, 0.4); }

.msg-preview {
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-body {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--surface-2);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  line-height: 1.6;
  color: var(--ink);
  min-height: 120px;
}

/* On stacked mobile tables the preview should wrap, not truncate */
@media (max-width: 768px) {
  .msg-preview {
    max-width: none;
    white-space: normal;
    text-align: right;
  }
}

/* ── Vendor pricing page ── */
.pricing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(146, 177, 235, 0.14);
}
.pricing-row__label { flex: 1; }
.pricing-row__input { max-width: 210px; }
.pricing-row[data-enabled="false"] { opacity: 0.72; }

.pricing-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: rgba(244, 196, 48, 0.1);
  border: 1px solid rgba(244, 196, 48, 0.3);
}
.pricing-total__amount {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0;
  color: #a16207;
  white-space: nowrap;
}

/* Fixed-width module count so the "Manage" button aligns across rows */
.module-count {
  min-width: 3.2rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  cursor: default;
}

html { scroll-behavior: smooth; }

.pub-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Offset anchor targets so the sticky nav doesn't cover the heading */
.pub-section[id],
#features {
  scroll-margin-top: 80px;
}

/* ── Public top nav ── */
.pub-nav {
  position: sticky;
  top: 0;
  z-index: 500;
  background: linear-gradient(180deg, rgba(9, 22, 46, 0.92), rgba(9, 22, 46, 0.72));
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
}

.pub-nav__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pub-nav__brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

.pub-nav__logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--turf-glow), var(--pitch-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.pub-nav__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--cream);
  line-height: 1;
}
.pub-nav__name span { color: var(--gold); }

.pub-nav__links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.pub-nav__links > a:not(.btn) {
  color: rgba(251, 247, 234, 0.82);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.pub-nav__links > a:not(.btn):hover { color: var(--gold); }
.pub-nav__links > a.is-active { color: var(--gold); }

.pub-nav__cta { white-space: nowrap; }

.pub-nav__check,
.pub-nav__burger { display: none; }

/* ── Hero + slideshow ── */
.pub-hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.pub-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.pub-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.2s ease, transform 6s ease;
}

.pub-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.pub-slideshow__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(5, 9, 18, 0.92) 0%, rgba(5, 9, 18, 0.72) 42%, rgba(5, 9, 18, 0.35) 100%),
    linear-gradient(0deg, rgba(5, 9, 18, 0.85), rgba(5, 9, 18, 0) 40%);
}

.pub-hero__content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  width: 100%;
}

.pub-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0.02em;
  color: #fff;
  margin: 0.6rem 0 1rem;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}
.pub-hero__title span { color: var(--gold); }

.pub-hero__lead {
  font-size: 1.15rem;
  line-height: 1.6;
  color: rgba(240, 234, 214, 0.85);
  max-width: 560px;
  margin-bottom: 2rem;
}

.pub-hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-lg { padding: 0.7rem 1.7rem; font-size: 1rem; }

.pub-hero__controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

.pub-hero__dots {
  display: flex;
  gap: 0.5rem;
}

.pub-pause {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: var(--cream);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.pub-pause:hover,
.pub-pause:focus-visible {
  background: rgba(0, 0, 0, 0.55);
  border-color: var(--gold);
}

.pub-dot {
  width: 28px;
  height: 5px;
  border-radius: 3px;
  border: none;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, width 0.3s;
}
.pub-dot.is-active { background: var(--gold); width: 44px; }

/* ── Sections ── */
.pub-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
  width: 100%;
}

.pub-section__head,
.pub-page__head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.75rem;
}

.pub-eyebrow {
  display: inline-block;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.pub-h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: 0.02em;
  color: var(--cream);
  margin: 0 0 0.5rem;
}

.pub-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  letter-spacing: 0.02em;
  color: var(--cream);
  margin: 0 0 0.5rem;
}

.pub-sub {
  color: rgba(251, 247, 234, 0.72);
  font-size: 1.02rem;
  margin: 0;
}

/* ── Feature grid ── */
.pub-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.pub-feature {
  padding: 1.75rem;
}

.pub-feature__icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.pub-feature h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: 0.03em;
  color: var(--gold);
  margin: 0 0 0.85rem;
}

.pub-feature ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pub-feature li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.55rem;
  color: rgba(251, 247, 234, 0.85);
  font-size: 0.92rem;
  line-height: 1.4;
}

.pub-feature li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.9rem;
  top: 0.05rem;
}

/* ── Stats strip ── */
.pub-stats-strip {
  background: linear-gradient(180deg, rgba(16, 42, 84, 0.5), rgba(10, 28, 58, 0.5));
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  padding: 2.5rem 1.5rem;
}

.pub-stat { text-align: center; }
.pub-stat__num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--gold);
  line-height: 1;
}
.pub-stat__lbl {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(240, 234, 214, 0.6);
  margin-top: 0.3rem;
}

/* ── CTA ── */
.pub-cta {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
  width: 100%;
}

.pub-cta__box {
  text-align: center;
  padding: 3rem 2rem;
}
.pub-cta__box .pub-hero__actions { margin-top: 1.5rem; }
.justify-content-center { justify-content: center; }

/* ── Inner pages (about/contact/faq/terms) ── */
.pub-page {
  flex: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4.5rem;
  width: 100%;
}

.pub-prose {
  padding: 2.25rem;
  color: rgba(251, 247, 234, 0.88);
  line-height: 1.7;
}
.pub-prose h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  color: var(--gold);
  margin: 1.75rem 0 0.6rem;
}
.pub-prose p { margin: 0 0 1rem; }
.pub-prose ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.pub-prose li { margin-bottom: 0.4rem; }
.pub-prose a:not(.btn) { color: var(--turf-glow); }
.pub-prose__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.pub-page__foot {
  text-align: center;
  margin-top: 2.5rem;
}
.pub-page__foot p { color: rgba(251, 247, 234, 0.72); margin-bottom: 0.75rem; }

/* ── FAQ accordion ── */
.pub-faq {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.pub-faq__item {
  padding: 0;
  overflow: hidden;
}
.pub-faq__item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 1.4rem;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--cream);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pub-faq__item summary::-webkit-details-marker { display: none; }
.pub-faq__item summary::after {
  content: "\2039"; /* single chevron ‹ — rotated to point down/up as it toggles */
  color: var(--gold);
  font-size: 1.5rem;
  line-height: 1;
  transform: rotate(-90deg);
  transition: transform 0.25s;
}
.pub-faq__item[open] summary::after { transform: rotate(90deg); }
.pub-faq__item p {
  margin: 0;
  padding: 0 1.4rem 1.25rem;
  color: rgba(251, 247, 234, 0.82);
  line-height: 1.6;
}
.pub-faq__item a { color: var(--turf-glow); }

/* ── Contact ── */
.pub-contact {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 1.75rem;
  align-items: start;
}
.pub-contact__info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.pub-contact__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
}
.pub-contact__ico { font-size: 1.6rem; }
.pub-contact__item h4 {
  margin: 0 0 0.15rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.pub-contact__item a,
.pub-contact__item span { color: rgba(251, 247, 234, 0.88); text-decoration: none; }
.pub-contact__item a:hover { color: var(--turf-glow); }
.pub-contact__form { padding: 2rem; }

/* ── Public footer ── */
.pub-footer {
  margin-top: auto;
  background: linear-gradient(180deg, rgba(7, 16, 34, 0.7), rgba(5, 8, 15, 0.95));
  border-top: 1px solid var(--glass-border);
}
.pub-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}
.pub-footer__tag {
  color: rgba(251, 247, 234, 0.6);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 320px;
  margin: 0;
}
.pub-footer__col h6 {
  color: var(--gold);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 0.9rem;
}
.pub-footer__col a {
  display: block;
  color: rgba(251, 247, 234, 0.72);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}
.pub-footer__col a:hover { color: var(--turf-glow); }
.pub-footer__bar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(146, 177, 235, 0.12);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: rgba(251, 247, 234, 0.5);
  font-size: 0.82rem;
}

/* ── Auth pages: photographic background ── */
.login-photo {
  position: relative;
  background: linear-gradient(rgba(5, 9, 18, 0.55), rgba(5, 9, 18, 0.85)),
              url('/images/auth-bg.jpg') center / cover no-repeat fixed;
}
.login-card { position: relative; }
.login-back {
  position: absolute;
  top: 1rem;
  left: 1.25rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.login-back:hover { color: var(--accent); }

/* ── Public responsive ── */
@media (max-width: 860px) {
  .pub-contact { grid-template-columns: 1fr; }
  .pub-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .pub-nav__burger {
    display: inline-flex;
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--gold);
    font-size: 1.5rem;
    cursor: pointer;
  }
  .pub-nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 1rem 1.5rem 1.25rem;
    margin: 0;
    background: rgba(7, 16, 34, 0.98);
    border-bottom: 1px solid var(--glass-border);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.3s ease, opacity 0.25s ease;
  }
  .pub-nav__check:checked ~ .pub-nav__links {
    max-height: 460px;
    opacity: 1;
    pointer-events: auto;
  }
  .pub-nav__cta { text-align: center; }
  .pub-footer__inner { grid-template-columns: 1fr; }
  .pub-footer__bar { flex-direction: column; text-align: center; }
  .login-photo { background-attachment: scroll; }
}

/* ============================================================
   Second UI/UX audit — shared additions
   ============================================================ */

/* Line-icon set: single stroke weight, one color, replaces emoji icons */
.ui-icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.pub-feature__icon .ui-icon {
  width: 2.2rem;
  height: 2.2rem;
  color: var(--gold);
}
.home-action-card__icon .ui-icon {
  width: 2rem;
  height: 2rem;
  color: var(--turf-glow);
}

/* Amber "idle / churn-risk" signal — distinct from red error states */
.stat-card-3d.stat-warning .stat-value { color: #b45309; }
.badge.text-bg-idle {
  background-color: rgba(244, 196, 48, 0.9) !important;
  color: #1a1200 !important;
}

/* ============================================================
   Navy/white retheme — scoped fixes
   ============================================================ */

/* Marketing pages keep the dark navy glass aesthetic; the light card
   styles above are for the authenticated app + auth pages. */
.pub-body .panel-3d {
  background: var(--glass);
  border-color: var(--glass-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
}
.pub-body .form-label { color: rgba(246, 249, 255, 0.9); }
.pub-body .items-section-title { color: var(--gold); }

/* Sora display headings: bold + slightly tighter sizes than Bebas needed */
.pub-h1, .pub-h2, .pub-hero__title, .home-hero__title { font-weight: 800; }
.pub-hero__title { font-size: clamp(2.2rem, 5vw, 3.8rem); }
.pub-h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.pub-h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.home-hero__title { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.pub-feature h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.01em; }
.pub-prose h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.01em; }
.pub-stat__num { font-size: 1.6rem; font-weight: 800; }

/* Auth pages: bright white card over a lighter navy-tinted photo scrim */
.login-photo {
  background: linear-gradient(rgba(11, 24, 48, 0.42), rgba(11, 24, 48, 0.72)),
              url('/images/auth-bg.jpg') center / cover no-repeat fixed;
}
.login-card .page-subtitle { color: var(--ink-soft); }

/* Top bar account button text stays light on the navy bar */
.account-menu__toggle { color: var(--navy); }
.account-menu__toggle .app-topbar__role { color: var(--accent); }

/* Approvals chevron + section titles on the light page background */
.approval-section > summary::before { color: var(--accent); }

/* Danger buttons should read clearly on white rows */
.app-body .btn-outline-danger {
  color: #c22e40;
  border-color: rgba(210, 60, 78, 0.55);
}
.app-body .btn-outline-danger:hover {
  background: #d33d4f;
  border-color: #d33d4f;
  color: #fff;
}

/* Vendors: module-adoption bar tiered by how much is configured */
.module-adoption {
  display: inline-flex;
  gap: 3px;
  vertical-align: middle;
}
.module-adoption__seg {
  width: 12px;
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
}
.module-adoption__seg.is-on { background: var(--turf-glow); }
.module-adoption--low .module-adoption__seg.is-on { background: #ff6b6b; }
.module-adoption--mid .module-adoption__seg.is-on { background: var(--gold); }

/* Negative running-stock flag in the inventory log */
.stock-negative {
  color: #ff6b6b !important;
  font-weight: 700;
}

/* Carousel dots: 44px hit target + autoplay progress fill on the active dot */
.pub-dot {
  position: relative;
  overflow: hidden;
}
.pub-dot::before {
  /* invisible 44px-tall touch target without changing the visual size */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 44px;
  transform: translateY(-50%);
}
.pub-dot.is-active {
  background: rgba(255, 255, 255, 0.28);
}
.pub-dot.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--gold);
  animation: dotProgress 5s linear forwards;
}
.pub-hero__dots.is-paused .pub-dot.is-active::after,
.pub-hero__dots.no-autoplay .pub-dot.is-active::after {
  animation: none;
  width: 100%;
}
@keyframes dotProgress { to { width: 100%; } }

/* Sales tabs: never overflow — scroll horizontally on narrow widths */
.cricket-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.cricket-tabs .nav-item { flex: 0 0 auto; }

/* Compact account menu in the top bar */
.account-menu { position: relative; }
.account-menu__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  color: var(--navy);
  cursor: pointer;
}
.account-menu__toggle:hover { border-color: var(--accent); }
.account-menu__avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--turf-glow), var(--pitch-light));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}
.account-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 210px;
  padding: 0.75rem;
  z-index: 60;
  display: none;
}
.account-menu.is-open .account-menu__panel { display: block; }
.account-menu__panel .btn { width: 100%; }

/* Required-field marker */
.req { color: #ff6b6b; font-weight: 700; }

/* ── Customer autocomplete (booking form) ── */
.ac-wrap { position: relative; }
.ac-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  max-height: 260px;
  overflow-y: auto;
}
.ac-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  border-bottom: 1px solid var(--surface-border);
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item:focus { background: rgba(37, 99, 235, 0.08); }
.ac-item .ac-name { font-weight: 600; color: var(--navy); }
.ac-item .ac-contact { color: var(--ink-soft); font-size: 0.85rem; font-variant-numeric: tabular-nums; }

/* Receivables per-customer subtotal row */
.receivable-subtotal td {
  background: rgba(59, 130, 246, 0.06);
  border-top: 1px dashed rgba(146, 177, 235, 0.3);
}

/* Collapsible approval sections */
.approval-section > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.approval-section > summary::-webkit-details-marker { display: none; }
.approval-section > summary::before {
  content: "\2039";
  color: var(--gold);
  font-size: 1.2rem;
  transform: rotate(-90deg);
  transition: transform 0.2s;
}
.approval-section[open] > summary::before { transform: rotate(90deg); }

/* Filter chips (users role/status, expenses categories) */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #c3d0e8;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip.is-active {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .pub-dot.is-active::after { animation: none; width: 100%; }
}

/* ══════════════════════════════════════════════════════════════════
   Auth pages — split-screen card (photo panel + white form) on a light page
   ══════════════════════════════════════════════════════════════════ */
.auth-split {
  display: flex;
  width: min(1080px, 100% - 3rem);
  margin: clamp(1.5rem, 5vh, 3.5rem) auto;
  min-height: min(640px, 86vh);
  background: #ffffff;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(16, 32, 68, 0.18);
}

/* ── Left: bright photo panel with a blue→green brand wash ── */
.auth-visual {
  flex: 1 1 44%;
  position: relative;
  padding: 2.75rem 2.5rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(158deg, rgba(37, 99, 235, 0.72) 0%, rgba(56, 130, 220, 0.42) 46%, rgba(16, 185, 129, 0.62) 100%),
    url('/images/auth-bg.jpg') center / cover no-repeat;
}
.auth-visual__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}
.auth-visual__logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  backdrop-filter: blur(6px);
}
.auth-visual__body { margin-top: auto; }
.auth-visual__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 2.6vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.9rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.28);
}
.auth-visual__title span { color: #a7f3d0; }
.auth-visual__text {
  font-size: 0.98rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  max-width: 32ch;
  margin: 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.22);
}
.auth-visual__chips {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.9rem;
  flex-wrap: wrap;
}
.auth-chip {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  padding: 0.65rem 0.4rem;
  min-width: 74px;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
}
.auth-chip span { display: block; font-size: 1.2rem; margin-bottom: 0.2rem; }
.auth-visual__foot {
  margin-top: 1.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
}

/* ── Right: white form panel ── */
.auth-formside {
  flex: 1 1 56%;
  position: relative;
  background: #ffffff;
  padding: 2.75rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-form { width: 100%; max-width: 380px; margin: 0 auto; }
.auth-form--wide { max-width: 520px; }
.auth-form__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin: 0 0 0.25rem;
}
.auth-form__subtitle {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin: 0 0 1.4rem;
}
/* Compact fields so the register form needs minimal scrolling */
.auth-formside .form-label { margin-bottom: 0.15rem; font-size: 0.76rem; font-weight: 600; }
.auth-formside .form-control { padding: 0.45rem 0.8rem; font-size: 0.9rem; }
.auth-formside .row { --bs-gutter-y: 0.5rem; }
.auth-formside .form-text { font-size: 0.72rem; margin-top: 0.15rem; }
.auth-formside .alert { padding: 0.55rem 0.8rem; font-size: 0.85rem; margin-bottom: 0.9rem; }
.auth-formside .mb-3 { margin-bottom: 0.8rem !important; }
.auth-formside .btn-cricket { padding: 0.6rem 1.25rem; }
.auth-back {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.auth-back:hover { color: var(--accent); }
.auth-form__alt {
  text-align: center;
  margin: 1.1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.87rem;
}
.auth-form__alt a { font-weight: 700; color: var(--accent); text-decoration: none; }
.auth-form__alt a:hover { text-decoration: underline; }
.auth-section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: #8a93a8;
  margin: 0.85rem 0 0.4rem;
}
.auth-section-label:first-of-type { margin-top: 0.1rem; }

@media (max-width: 860px) {
  .auth-split { flex-direction: column; min-height: auto; }
  .auth-visual { flex: none; padding: 2rem 1.75rem 2.25rem; }
  .auth-visual__chips, .auth-visual__foot { display: none; }
  .auth-visual__body { margin-top: 1.25rem; }
  .auth-visual__title { font-size: 1.6rem; }
  .auth-formside { padding: 2rem 1.75rem 2.5rem; }
  .auth-form, .auth-form--wide { max-width: 100%; }
}

/* ══════════════════════════════════════════════════════════════════
   Public/marketing pages → clean light theme (readable on light bg)
   Hero slideshow, top nav and footer keep their own dark backgrounds.
   ══════════════════════════════════════════════════════════════════ */
.pub-body .pub-h1,
.pub-body .pub-h2,
.pub-body .pub-page__head h1 { color: var(--navy); }
.pub-body .pub-sub { color: var(--ink-soft); }

/* Flat white cards instead of the dark 3D "pitch" glass */
.pub-body .panel-3d {
  background: var(--surface);
  border-color: var(--surface-border);
  box-shadow: var(--shadow-3d);
  backdrop-filter: none;
}

/* Feature cards */
.pub-body .pub-feature h3 { color: var(--navy); }
.pub-body .pub-feature li { color: var(--ink); }
.pub-body .pub-feature li::before { color: var(--accent); }
.pub-body .pub-feature__icon { filter: none; }
.pub-body .pub-feature__icon .ui-icon { color: var(--accent); }

/* Stats strip */
.pub-body .pub-stats-strip {
  background: var(--surface-2);
  border-color: var(--surface-border);
}
.pub-body .pub-stat__num { color: var(--accent); }
.pub-body .pub-stat__lbl { color: var(--ink-soft); }

/* Inner pages: prose + contact */
.pub-body .pub-prose { color: var(--ink); }
.pub-body .pub-prose h3 { color: var(--navy); }
.pub-body .pub-prose a:not(.btn) { color: var(--accent); }
.pub-body .pub-contact__item h4 { color: var(--navy); }
.pub-body .pub-contact__item a,
.pub-body .pub-contact__item span { color: var(--ink); }
.pub-body .pub-contact__item a:hover { color: var(--accent); }

/* Form labels inside light cards */
.pub-body .form-label { color: var(--navy); }

/* Landing hero sits over the dark slideshow — keep its badge light there */
.pub-body .pub-hero .home-hero__badge {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}

/* FAQ accordion text on the light cards */
.pub-body .pub-faq__item summary { color: var(--navy); }
.pub-body .pub-faq__item p { color: var(--ink); }
.pub-body .pub-faq__item a { color: var(--accent); }

/* Make form fields clearly visible on the white public cards (contact form) */
.pub-body .form-control {
  background: var(--surface-2);
  border: 1px solid #cfd8ea;
  color: var(--ink);
}
.pub-body .form-control:focus {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
.pub-body .form-control::placeholder { color: rgba(16, 28, 49, 0.45); }
.pub-body .pub-contact__form .items-section-title { color: var(--navy); }
