/* =========================================================
   Agoniva – Modern, accessible, responsive CSS
   ========================================================= */

:root {
  /* Brand */
  --primary: #0d9488;          /* teal-600 */
  --primary-hover: #0f766e;    /* teal-700 */
  --primary-light: #ccfbf1;    /* teal-100 */
  --accent: #f59e0b;           /* amber-500 */
  /* Secondary brand accent (used to visually distinguish the "owner" path from "athlete") */
  --violet: #8b5cf6;
  --violet-hover: #7c3aed;

  /* Neutrals */
  --bg: #0f172a;               /* slate-900 */
  --bg-card: #1e293b;          /* slate-800 */
  --bg-elevated: #334155;      /* slate-700 */
  --text: #f8fafc;             /* slate-50 */
  --text-muted: #94a3b8;       /* slate-400 */
  --border: #475569;           /* slate-600 */

  /* Semantic */
  --success: #22c55e;
  --warning: #eab308;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Layout */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.4);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --max-w: 1200px;

  /* Transitions */
  --ease: 0.2s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  /* Tells the browser to render native form controls (select dropdowns, scrollbars,
     checkboxes, date pickers, etc.) using dark-mode chrome instead of defaulting to a
     light popup with light-on-light or dark-on-dark text that becomes unreadable. */
  color-scheme: dark;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--ease);
}
a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* Belt-and-suspenders for the select's OPEN dropdown list: color-scheme covers most
   modern browsers, but explicit option colors help wherever support is partial. */
select {
  background-color: var(--bg);
  color: var(--text);
}
select option {
  background-color: var(--bg-elevated);
  color: var(--text);
}

/* -------------------- Coming Soon page -------------------- */
.coming-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  overflow: hidden;
}

.bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -100px;
  left: -100px;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: var(--accent);
  bottom: -80px;
  right: -60px;
  opacity: 0.25;
}

.shape-3 {
  width: 200px;
  height: 200px;
  background: #6366f1;
  top: 40%;
  right: 20%;
  opacity: 0.2;
}

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
}

.logo-mark {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(13, 148, 136, 0.15);
  border: 1px solid rgba(13, 148, 136, 0.4);
  color: #5eead4;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.pulse {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.actions {
  margin-bottom: 3rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.35);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: #475569;
  color: var(--text);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* -------------------- Owner Dashboard -------------------- */
.dashboard {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.topbar .brand span {
  font-size: 1.4rem;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* -------------------- Venue page topbar: name + back/edit live here -------------------- */
.venue-topbar {
  gap: 0.6rem;
}

.brand-compact {
  flex-shrink: 0;
}

.venue-topbar-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.venue-topbar-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.venue-topbar-badge {
  font-size: 0.65rem;
  padding: 0.12rem 0.45rem;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .venue-topbar .user-menu span,
  .venue-topbar .user-menu .btn-secondary:not(#logout-btn) {
    font-size: 0.78rem;
    padding: 0.35rem 0.55rem;
  }
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* Venue page: reclaim vertical space since owners live here daily */
.venue-page-container {
  padding-top: 0.75rem;
}

.tab-panel-flush {
  padding: 0;
}

/* Small recap block, shown only inside the Venue Info tab */
.venue-info-recap {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.venue-info-recap .detail-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.venue-info-recap .placeholder-logo {
  font-size: 1.3rem;
}

.venue-info-recap-text .detail-badges {
  margin-bottom: 0.3rem;
}

.venue-info-recap-text .detail-address {
  font-size: 0.85rem;
}

.venue-info-recap-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* Danger zone inside the venue edit modal */
.danger-zone {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.danger-zone label {
  color: var(--danger);
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.page-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card + .card {
  margin-top: 1.25rem;
}

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

.venue-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--ease), transform var(--ease);
  display: flex;
  flex-direction: column;
}

.venue-card-pending-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  background: var(--accent);
  color: #1a1200;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.venue-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.venue-card .logo-wrap {
  height: 140px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.venue-card .logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.venue-card .logo-wrap .placeholder {
  font-size: 3rem;
  opacity: 0.4;
}

.venue-card .body {
  padding: 1.1rem 1.25rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.venue-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.venue-card .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-open { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.badge-under_construction { background: rgba(234, 179, 8, 0.15); color: #facc15; }
.badge-closed,
.badge-temporarily_closed { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-coming_soon { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }

.sports-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.tag {
  background: var(--bg-elevated);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.team-name-tag {
  font-weight: 700;
  color: var(--primary);
  background: rgba(13, 148, 136, 0.14);
  padding: 0.05em 0.4em;
  border-radius: 4px;
  white-space: nowrap;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* Forms */
.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}

.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color var(--ease), box-shadow var(--ease);
}

/* Both a <select> and an <input list="..."> (datalist-backed) carry their
   own native browser chrome — a dropdown arrow, sometimes a different
   default background for that popup affordance — which isn't fully
   controlled by background/padding alone and can visibly mismatch a
   plain text input's own appearance, especially in a dark theme. Forcing
   the native appearance off and drawing a matching arrow only for real
   <select> elements normalizes both back to one consistent look.
   Explicitly excludes checkbox/radio — appearance:none on those strips
   them down to an invisible, unstyled box with nothing to replace it,
   since neither gets any custom checked-state styling of its own here. */
.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select {
  appearance: none;
  -webkit-appearance: none;
  height: 44px;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394a3b8'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.25rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.25);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

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

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.fb-tutorial-step {
  margin-top: 1rem;
}
.fb-tutorial-step h3 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.fb-tutorial-step p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.checkbox-item input {
  width: auto;
  accent-color: var(--primary);
}

/* A real switch, not a checkbox styled to look like one — used for the
   publish toggle specifically, since "is this venue live" reads more
   naturally as an on/off state than a checkbox tick. */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-switch-track {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-radius: 999px;
  transition: background 0.15s;
}
.toggle-switch-track::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.toggle-switch input:checked + .toggle-switch-track {
  background: var(--primary);
}
.toggle-switch input:checked + .toggle-switch-track::before {
  transform: translateX(18px);
}
.toggle-switch input:focus-visible + .toggle-switch-track {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Hours table */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.hours-table th,
.hours-table td {
  padding: 0.5rem 0.4rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.vc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.vc-table th,
.vc-table td {
  padding: 0.6rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.vc-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.vc-table th.vc-sortable {
  cursor: pointer;
  user-select: none;
}

.vc-table th.vc-sortable:hover {
  color: var(--text);
}

.vc-sort-ind {
  display: inline-block;
  min-width: 1em;
  color: var(--primary);
}

/* Search + type filter above the customers/athletes/teams table */
.vc-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0 0.75rem;
}

.vc-search {
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 340px;
}

.vc-count {
  margin-left: auto;
  font-size: 0.8rem;
}

/* One colour per kind, so a row's type reads at a glance without the
   Type column having to be read: customer / athlete / team. */
.vc-type {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}

.vc-type-customer {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent);
  border-color: rgba(245, 158, 11, 0.35);
}

.vc-type-athlete {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
  border-color: rgba(59, 130, 246, 0.35);
}

.vc-type-athleteTeam {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.35);
}

.vc-type-customerTeam {
  background: rgba(245, 158, 11, 0.08);
  color: var(--accent);
  border-color: rgba(245, 158, 11, 0.35);
  border-style: dashed;
}

.hours-table input[type="time"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.4rem;
  width: 110px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  z-index: 100;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 720px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transform: translateY(12px);
  transition: transform 0.2s;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.bk-flow-modal-box {
  max-width: 900px;
}

.modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal header h2 {
  font-size: 1.3rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem;
}
.modal-close:hover {
  color: var(--text);
}

/* Login screen */
.login-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
}

.login-card h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.login-card .subtitle {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* -------------------- Google Sign-In -------------------- */
.oauth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.oauth-divider::before,
.oauth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.oauth-btn-wrap {
  display: flex;
  justify-content: center;
  margin-top: 0.6rem;
}

.btn-facebook {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  max-width: 320px;
  background: #1877f2;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--ease);
}

.btn-facebook:hover {
  background: #166fe5;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.alert-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.hidden {
  display: none !important;
}

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .topbar {
    padding: 0.75rem 1rem;
  }
  .container {
    padding: 1rem 0.75rem 2rem;
  }
  .page-header h1 {
    font-size: 1.35rem;
  }
}

/* -------------------- Brand icon -------------------- */
.brand-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.brand {
  gap: 0.65rem;
}

/* -------------------- Agoniva logo -------------------- */
.brand-logo {
  height: 26px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.brand-compact .brand-logo {
  height: 22px;
}

.page-logo {
  position: absolute;
  top: 1.25rem;
  left: 1.5rem;
  display: block;
  z-index: 2;
}

.page-logo img {
  display: block;
  height: 34px;
  width: auto;
}

.login-screen {
  position: relative;
  padding-top: 4.25rem;
}

/* Owner dashboard: logo on top, the page title small underneath */
.topbar .brand.brand-stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.topbar .brand.brand-stack .brand-sub {
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

/* Landing page: logo in the top-left corner of the page */
.l2-topbar-page {
  position: absolute;
  top: max(1.1rem, env(safe-area-inset-top));
  left: 1.5rem;
  margin: 0;
  z-index: 3;
}

.l2-topbar-page + .l2-wrap {
  padding-top: max(4.75rem, calc(env(safe-area-inset-top) + 4rem));
}

.l2-logo-img {
  height: 34px;
  width: auto;
  display: block;
}

@media (max-width: 480px) {
  .page-logo { top: 1rem; left: 1rem; }
  .page-logo img { height: 26px; }
  .l2-topbar-page { left: 1rem; }
  .l2-logo-img { height: 28px; }
}

/* -------------------- Greeting -------------------- */
.greeting-block {
  margin-bottom: 0.5rem;
}

.greeting {
  font-size: 1.15rem;
  color: var(--text-muted);
  font-weight: 500;
}

.demo-banner {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #ddd6fe;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.publish-warning-banner {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* -------------------- Map -------------------- */
.map-container {
  height: 280px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  z-index: 1;
}

.leaflet-container {
  font-family: var(--font);
  background: var(--bg);
}

.i18n-lang-select {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* -------------------- Custom add row -------------------- */
.add-custom-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  align-items: center;
}

.add-custom-row input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
}

.add-custom-row input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.25);
}

/* Wider modal for map */
.modal-wide {
  max-width: 840px;
}

/* -------------------- Tabbed venue form -------------------- */
.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  position: relative;
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}

.tab-badge {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.tab-btn:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
}

.tab-panel {
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.venue-main-tabs {
  margin-top: 0.15rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
}

.venue-main-tabs .tab-btn {
  font-size: 0.92rem;
  padding: 0.5rem 1rem;
}

/* Icon-only — small footprint, more room for the actual content below */
.venue-main-tabs-icon .tab-btn {
  font-size: 1.15rem;
  line-height: 1;
  padding: 0.4rem 0.65rem;
}

/* The court-designer tab uses an inline SVG instead of an emoji; sized in em
   so it scales with the emoji beside it, and centred so it sits level. */
.venue-main-tabs .tab-icon-svg {
  display: block;
  width: 1.25em;
  height: 1.25em;
}

.map-container-lg {
  height: 380px;
}

@media (max-width: 640px) {
  .tab-nav {
    gap: 0.25rem;
  }
  .tab-btn {
    font-size: 0.78rem;
    padding: 0.35rem 0.6rem;
  }
  .map-container-lg {
    height: 280px;
  }
}

/* -------------------- Venue detail page (shared bits) -------------------- */
.detail-logo {
  width: 88px;
  height: 88px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.placeholder-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.5;
}

.detail-address {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.badge-rating {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.info-list {
  margin-top: 0.5rem;
}

.info-list > div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.info-list dt {
  color: var(--text-muted);
  font-weight: 500;
}

.info-list dd {
  margin: 0;
  word-break: break-word;
}

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

.detail-description {
  white-space: pre-wrap;
  line-height: 1.6;
  color: var(--text);
  font-size: 0.92rem;
}

.tag-lg {
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
}

.hours-open {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.hours-closed {
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 640px) {
  .info-list > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* Playgrounds section below venue data */
.venue-playgrounds {
  margin-top: 2rem;
  padding-top: 0.5rem;
}

.section-divider {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.section-divider-text {
  min-width: 200px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
}

/* -------------------- Accordion: each info section collapses independently -------------------- */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font);
  text-align: left;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}

.accordion-header:hover {
  background: var(--bg-elevated);
}

.accordion-chevron {
  color: var(--text-muted);
  transition: transform var(--ease);
  flex-shrink: 0;
}

.accordion-header.open .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-chevron.open {
  transform: rotate(180deg);
}

.accordion-body {
  padding: 0 1rem 1rem;
  font-size: 0.9rem;
}

.mini-section {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.mini-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.map-compact {
  height: 220px;
  margin-top: 0.25rem;
}

/* -------------------- Field Builder (embedded canvas, in venue.html) -------------------- */
.fb-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem 0.6rem;
  margin-bottom: 0.4rem;
}

.fb-icon-btn {
  min-width: 34px;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
  text-align: center;
}

.fb-toolbar-sep {
  width: 1px;
  align-self: stretch;
  background: var(--border);
  margin: 0 0.1rem;
}

.fb-toolbar-toggle {
  font-size: 0.82rem;
  white-space: nowrap;
}

.fb-toolbar-spacer {
  flex: 1;
}

.fb-save-status {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* The designer saves itself, so this line is the only feedback there is:
   it has to be trustworthy and calm when all is well, loud when it isn't. */
.fb-save-status.fb-saving {
  color: var(--text-muted);
}

.fb-save-status.fb-saved {
  color: var(--success);
  font-weight: 600;
}

.fb-save-status.fb-error {
  color: var(--danger);
  font-weight: 600;
}

/* A court missing one of its required details: held back from saving, so it gets a
   calmer colour than a failed save (there is nothing to retry, only something to fill in). */
.fb-save-status.fb-blocked {
  color: var(--warning);
  font-weight: 600;
}

/* Required-detail markers: a red field with its message, a dot on the tab that holds it,
   and a warning in the side list. */
.fb-invalid {
  border-color: var(--danger) !important;
}

.fb-req-msg {
  display: block;
  color: var(--danger);
}

.fb-req-msg.hidden {
  display: none;
}

.fb-panel-tabs .tab-btn.fb-tab-invalid::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 0.35rem;
  border-radius: 50%;
  background: var(--danger);
  vertical-align: middle;
}

.fb-field-list-warn {
  margin-left: 0.35rem;
  color: var(--warning);
}

.fb-retry {
  margin-left: 0.35rem;
  padding: 0.1rem 0.55rem;
  border: 1px solid var(--danger);
  border-radius: 999px;
  background: transparent;
  color: var(--danger);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.fb-retry:hover {
  background: var(--danger);
  color: #fff;
}

.fb-retry:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.fb-hint {
  margin-bottom: 0.75rem;
}

.fb-hint kbd {
  display: inline-block;
  padding: 0.05rem 0.3rem;
  font-size: 0.68rem;
  font-family: ui-monospace, monospace;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.fb-main {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.fb-canvas-wrap {
  flex: 1;
  min-width: 0;
}

#fb-canvas-container {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: #0b1220;
  overflow: hidden;
  min-height: 420px;
  height: 74vh;
  position: relative;
  cursor: grab;
}

#fb-canvas-container:active {
  cursor: grabbing;
}

.fb-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.fb-legend span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.fb-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

.fb-panel {
  width: 340px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  max-height: 74vh;
  overflow-y: auto;
}

/* Whole-panel collapse: gives the canvas full width to design in */
.fb-main.fb-panel-hidden .fb-panel {
  display: none;
}

.fb-template-select {
  padding: 0.4rem 0.6rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  max-width: 180px;
}

.fb-panel-tabs {
  margin: 0.75rem 0 0.75rem;
  padding-bottom: 0.6rem;
  gap: 0.3rem;
}

.fb-panel-tabs .tab-btn {
  font-size: 0.76rem;
  padding: 0.3rem 0.55rem;
}

.fb-panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.fb-panel-sub {
  font-size: 0.78rem;
  margin-bottom: 0.9rem;
}

.fb-panel .form-group,
.fb-panel .form-row {
  margin-bottom: 0.65rem;
}

.fbp-sport-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.fbp-sport-row select {
  flex: 1;
  min-width: 0;
}

.fbp-sport-row .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.fb-panel input:disabled,
.fb-panel select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.fb-field-list {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.fb-field-list h3 {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.fb-field-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.4rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
}

.fb-field-list-item:hover {
  background: var(--bg-elevated);
}

.fb-field-list-item.active {
  background: rgba(13, 148, 136, 0.18);
}

.fb-field-list-item.pending {
  opacity: 0.6;
  font-style: italic;
}

.fb-field-list-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .fb-main {
    flex-direction: column;
  }
  .fb-panel {
    width: 100%;
    max-height: none;
  }
  #fb-canvas-container {
    height: 50vh;
  }
}

/* -------------------- Bookings (day timeline) -------------------- */
.bk-container {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.bk-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.bk-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.15rem;
}

.bk-datebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.6rem;
}

.bk-datebar input[type="date"] {
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  width: auto;
}

.bk-range-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.bk-field-filter {
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  max-width: 180px;
}

.bk-flow-stepper {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.bk-flow-step {
  display: flex;
  align-items: center;
}

.bk-flow-step-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.bk-flow-step.active .bk-flow-step-dot {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* A completed step gets its own distinct color (not just a lighter shade of
   the "current" one) plus a checkmark in place of its number — a clearer,
   more at-a-glance "done" signal than the same hue at lower opacity. The
   dot's own step-number text is a plain text node (not a child element),
   so it can't be targeted or hidden directly — collapsing it to font-size:0
   and resetting the checkmark pseudo-element's own size is what actually
   replaces it rather than showing both at once. */
.bk-flow-step.done .bk-flow-step-dot {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
  font-size: 0;
}
.bk-flow-step.done .bk-flow-step-dot::before {
  content: '\2713';
  font-size: 0.8rem;
}

.bk-flow-step-connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 0.3rem;
  min-width: 8px;
}

.bk-flow-step-connector.done {
  background: #f59e0b;
}

.bk-flow-step-clickable {
  cursor: pointer;
  transition: opacity var(--ease);
}

.bk-flow-step-clickable:hover {
  opacity: 0.75;
}

/* The current step's own label — one full-width line below the whole
   stepper row, free to wrap and expand across the entire card instead of
   being squeezed under a single dot alongside five others. */
.bk-flow-step-current-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1.25rem;
}

.bk-step-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.bk-steps {
  display: flex;
  flex-direction: column;
  margin: 0.6rem 0 0.9rem;
}

.bk-step {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.bk-step-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.bk-step-label {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.bk-step-done .bk-step-dot {
  background: var(--primary);
  color: #fff;
}

.bk-step-done .bk-step-label {
  color: var(--text);
}

.bk-step-current .bk-step-dot {
  background: var(--accent);
  color: #1a1200;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

.bk-step-current .bk-step-label {
  color: var(--text);
  font-weight: 700;
}

.bk-step-connector {
  width: 2px;
  height: 14px;
  background: var(--border);
  margin-left: 13px;
}

.bk-info-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.9rem;
  margin-bottom: 0.75rem;
}

.bk-info-venue-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.bk-info-pin {
  font-size: 1rem;
  margin-top: 1px;
  flex-shrink: 0;
}

.bk-info-venue-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.bk-info-directions-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-top: 0.15rem;
  margin-left: 1.5rem;
}

.bk-info-directions-link:hover {
  color: var(--text);
}

.bk-info-date-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}

.bk-info-starts {
  color: var(--success);
  font-weight: 600;
}

.bk-steps-horizontal {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 0.9rem 0 1.1rem;
  padding: 0 4px;
}

/* One continuous line behind every dot, rather than separate connector
   segments between each pair — cleaner, and avoids the segments looking
   slightly uneven in width at different step counts. */
.bk-steps-horizontal::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 26px;
  right: 26px;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.bk-step-h {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  min-width: 0;
}

.bk-step-h .bk-step-dot {
  margin: 0;
}

.bk-step-h-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.25;
  padding: 0 0.15rem;
}

.bk-step-h.bk-step-done .bk-step-h-label {
  color: var(--text);
}

.bk-step-h.bk-step-current .bk-step-h-label {
  color: var(--text);
  font-weight: 700;
}

.bk-vs-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 1.1rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.bk-vs-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.bk-team-shield {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bk-vs-label {
  font-weight: 800;
  color: var(--text-muted);
  font-size: 1rem;
  flex-shrink: 0;
}

.bk-vs-team-name {
  font-weight: 700;
  font-size: 0.82rem;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.bk-vs-team-target {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.bk-attend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.bk-attend-box {
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.65rem;
  border: 1px solid;
  margin-bottom: 0.5rem;
}

.bk-attend-box-coming {
  background: rgba(13, 148, 136, 0.12);
  border-color: rgba(13, 148, 136, 0.4);
}

.bk-attend-box-pending {
  background: rgba(234, 179, 8, 0.1);
  border-color: rgba(234, 179, 8, 0.35);
}

.bk-attend-box-out {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.35);
}

.bk-attend-box-title {
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.bk-attend-box-coming .bk-attend-box-title { color: var(--primary); }
.bk-attend-box-pending .bk-attend-box-title { color: #facc15; }
.bk-attend-box-out .bk-attend-box-title { color: var(--danger); }

.bk-attend-count-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.bk-attend-name {
  font-size: 0.78rem;
  padding: 0.12rem 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
}

.bk-attend-name::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bk-attend-box-coming .bk-attend-name::before { background: var(--primary); }
.bk-attend-box-pending .bk-attend-name::before { background: #facc15; }
.bk-attend-box-out .bk-attend-name::before { background: var(--danger); }

.bk-attend-name-empty {
  color: var(--text-muted);
}

.bk-attend-name-empty::before {
  display: none;
}

.bk-attend-decide {
  margin-left: auto;
  display: inline-flex;
  gap: 0.3rem;
}

.bk-attend-decide-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}

.bk-attend-approve-btn {
  background: rgba(13, 148, 136, 0.25);
  color: var(--primary);
}

.bk-attend-decline-btn {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.bk-review-summary {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.bk-review-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.bk-review-row:last-child {
  border-bottom: none;
}

.bk-review-label {
  color: var(--text-muted);
  flex-shrink: 0;
}

.bk-review-value {
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

.bk-mode-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.bk-mode-toggle.hidden {
  display: none;
}

.bk-mode-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}

.bk-mode-btn:hover {
  color: var(--text);
}

.bk-mode-btn.active {
  background: var(--primary);
  color: #fff;
}

.bk-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.bk-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  margin-right: 0.3rem;
}

.bk-dot-confirmed { background: var(--primary); }
.bk-dot-open { background: #8b5cf6; }
.bk-dot-pending { background: var(--accent); }
.bk-dot-blocked { background: var(--danger); opacity: 0.75; }

.bk-grid-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.bk-grid {
  display: inline-flex;
  flex-direction: column;
  min-width: 100%;
}

.bk-grid-header,
.bk-row {
  display: flex;
  align-items: stretch;
}

.bk-grid-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.bk-row-label {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 190px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  font-size: 0.82rem;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bk-corner {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.bk-row-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.bk-row-name.bk-row-dim {
  color: var(--text-muted);
  font-style: italic;
}

.bk-hours {
  display: flex;
}

.bk-hour-mark {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0.5rem 0 0.5rem 0.35rem;
  border-left: 1px solid var(--border);
}

.bk-row {
  border-bottom: 1px solid var(--border);
}

.bk-row:last-child {
  border-bottom: none;
}

.bk-row-timeline {
  position: relative;
  flex-shrink: 0;
  min-height: 46px;
  cursor: pointer;
}

.bk-block {
  position: absolute;
  top: 5px;
  bottom: 5px;
  border-radius: 6px;
  padding: 0.2rem 0.4rem;
  font-size: 0.7rem;
  color: #fff;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.bk-block-confirmed { background: var(--primary); }
.bk-block-open { background: #8b5cf6; }

.bk-block-open-request {
  background: repeating-linear-gradient(45deg, rgba(139, 92, 246, 0.55) 0 6px, rgba(139, 92, 246, 0.3) 6px 12px);
  border: 1px dashed rgba(139, 92, 246, 0.9);
  cursor: default;
}
.bk-block-pending { background: var(--accent); color: #1a1200; }
.bk-block-cancelled { background: var(--bg-elevated); color: var(--text-muted); text-decoration: line-through; opacity: 0.6; }

.bk-block-past {
  background: var(--bg-elevated) !important;
  color: var(--text-muted) !important;
  opacity: 0.65;
}

.bk-block-blocked {
  background: repeating-linear-gradient(45deg, rgba(239, 68, 68, 0.55) 0 6px, rgba(239, 68, 68, 0.35) 6px 12px);
  border: 1px solid rgba(239, 68, 68, 0.7);
  cursor: default;
  z-index: 0;
}

.bk-block-owner-blocked {
  background: repeating-linear-gradient(45deg, rgba(71, 85, 105, 0.85) 0 8px, rgba(51, 65, 85, 0.85) 8px 16px);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #e2e8f0;
}

/* A small corner badge previewing a booking's payment-collection status —
   deliberately distinct in FORM (a small dot/tag, not a fill) from the
   block's own background color, which already encodes booking status
   (confirmed/pending/cancelled), so the two color systems never read as
   the same signal even when their hues happen to be similar. */
.bk-payment-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
}
.bk-payment-badge-complete {
  width: auto;
  height: auto;
  border-radius: 3px;
  background: #16a34a;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  padding: 1px 4px;
  border: none;
}

/* Single-court vertical view — hours run down the page instead of across
   it, and only one court is shown at a time, so this is its own parallel
   set of classes rather than trying to reuse the horizontal grid's
   left/width-based ones for a top/height layout. The .bk-block-* status
   color classes (confirmed/pending/cancelled/past/etc.) are still reused
   as-is on .bk-vblock elements, though — they only ever set color/
   background/opacity, never positioning, so they compose cleanly with
   either axis. */
.bk-row-label-clickable {
  cursor: pointer;
}
.bk-row-label-clickable:hover {
  background: var(--bg-elevated);
}

.bk-vgrid-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.6rem 0.2rem;
}

.bk-vgrid {
  display: flex;
  max-height: 70vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.bk-vgrid-hours {
  flex-shrink: 0;
  width: 56px;
  border-right: 1px solid var(--border);
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--bg-card);
}

.bk-vhour-mark {
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0.3rem 0 0 0.4rem;
  border-top: 1px solid var(--border);
  box-sizing: border-box;
}
.bk-vhour-mark:first-child {
  border-top: none;
}

.bk-vtimeline {
  position: relative;
  flex: 1;
  cursor: pointer;
}

.bk-vblock {
  position: absolute;
  left: 6px;
  right: 6px;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  font-size: 0.78rem;
  color: #fff;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.25;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.bk-vpast-overlay {
  position: absolute;
  left: 0;
  right: 0;
  background: repeating-linear-gradient(135deg, rgba(100, 116, 139, 0.28) 0 8px, rgba(100, 116, 139, 0.16) 8px 16px);
  cursor: not-allowed;
  z-index: 0;
  pointer-events: none;
}

/* Vertical equivalent of .bk-closed-overlay — same reddish diagonal
   stripes and centered label, just top/height instead of left/width. */
.bk-vclosed-overlay {
  position: absolute;
  left: 0;
  right: 0;
  background: repeating-linear-gradient(135deg, rgba(239, 68, 68, 0.16) 0 8px, rgba(239, 68, 68, 0.08) 8px 16px);
  cursor: not-allowed;
  z-index: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.bk-vclosed-overlay span {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--danger);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* The live "now" marker — dashed per the request, with a small solid dot
   at the left edge so it reads clearly even against the repeating grid
   lines behind it. Only ever exists on today's own vertical timeline;
   see bkNowLineHtml()'s own gating for why. */
.bk-now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 2px dashed #ef4444;
  z-index: 4;
  pointer-events: none;
}
.bk-now-line::before {
  content: '';
  position: absolute;
  left: -3px;
  top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
}

/* Beta-testing feedback widget's own floating button — a fixed circular
   FAB in the corner, present on every page that loads feedback-widget.js.
   Checked before adding: nothing else in this app uses position:fixed in
   a way that would sit in the same corner (only full-screen modal
   overlays and the landing page's own decorative background layer do),
   so there's no collision to design around. */
.feedback-widget-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--primary, #0d9488);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}
.feedback-widget-btn:hover {
  transform: scale(1.08);
}

.bk-past-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(135deg, rgba(100, 116, 139, 0.28) 0 8px, rgba(100, 116, 139, 0.16) 8px 16px);
  cursor: not-allowed;
  z-index: 0;
  pointer-events: none;
}

.bk-closed-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(135deg, rgba(239, 68, 68, 0.16) 0 8px, rgba(239, 68, 68, 0.08) 8px 16px);
  cursor: not-allowed;
  z-index: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bk-closed-overlay span {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--danger);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.bk-block:not(.bk-block-blocked) {
  z-index: 1;
}

.bk-block-time {
  font-weight: 700;
  white-space: nowrap;
}

.bk-block-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bk-duration-quick {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: -0.5rem 0 1rem;
  flex-wrap: wrap;
}

.bk-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 1.4rem 0 0.7rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
}

.bk-section-title:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* A quick computed readout so the owner/manager doesn't have to do the
   time-math themselves when they've typed a start and end time by hand. */
/* A dynamic currency suffix, not a hardcoded one — this app supports
   more than one currency per field/court, so the label here always has
   to reflect whichever field is actually currently selected. */
/* A read-only summary of whoever is actually selected right now (matched
   from search, or a customer just added) — shown in place of editable
   text boxes that would otherwise sit there regardless of whether
   anything had been picked yet. */
.bk-matched-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(13, 148, 136, 0.1);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  margin-top: 0.6rem;
}

.bk-matched-card-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.bk-matched-card-text {
  flex: 1;
  min-width: 0;
}

.bk-matched-card-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.bk-matched-card-detail {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.bk-matched-card-change {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
}

.bk-price-input-wrap {
  position: relative;
}

.bk-price-input-wrap input {
  padding-right: 3.5rem !important;
}

.bk-price-currency {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  pointer-events: none;
}

.bk-duration-badge {
  display: inline-block;
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin: -0.3rem 0 0.6rem;
}

.bk-chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.bk-chip:hover {
  border-color: var(--primary);
  color: var(--text);
}

.bk-chip-active {
  background: rgba(13, 148, 136, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.bk-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
}

.bk-switch-row-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.bk-switch-row-title {
  font-weight: 600;
}

.bk-switch-row-subtitle {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* A proper two-button segmented control — both options always fully
   visible and equally sized, rather than one small pill switch with text
   labels on either side of it. Larger touch targets, and there's no
   ambiguity about which state is "on" the way a bare switch can have. */
.bk-segmented {
  display: flex;
  gap: 0.5rem;
}

.bk-segmented-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.bk-segmented-btn:hover {
  border-color: var(--primary);
}

.bk-segmented-btn-active,
.bk-segmented-btn-active:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.bk-segmented-btn-icon {
  font-size: 1rem;
}

.bk-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.bk-switch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
  appearance: none;
  -webkit-appearance: none;
}

.bk-switch-slider {
  position: absolute;
  inset: 0;
  background: #64748b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: background var(--ease), border-color var(--ease);
  pointer-events: none;
}

.bk-switch-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  transition: transform var(--ease);
}

.bk-switch input:checked + .bk-switch-slider {
  background: var(--primary);
  border-color: var(--primary);
}

.bk-switch input:checked + .bk-switch-slider::before {
  transform: translateX(20px);
}

.bk-time-input-wrap {
  position: relative;
}

.bk-time-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 30;
  padding: 0.3rem;
}

.bk-time-option {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
}

.bk-time-option:hover,
.bk-time-option-active {
  background: var(--bg-elevated);
}

.bk-team-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.bk-team-chip-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
}

.bk-auto-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: #4ade80;
  margin: 0.3rem 0 0.7rem;
}

.bk-search-input-wrap {
  position: relative;
}

.bk-search-input-wrap input {
  padding-left: 2.4rem !important;
}

.bk-search-input-wrap .bk-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.95rem;
}

.bk-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.bk-modal-actions-left,
.bk-modal-actions-right {
  display: flex;
  gap: 0.6rem;
}

/* Week-glance cells (all fields x 7 days, no hour detail) */
.bk-week-daymark {
  font-weight: 600;
  text-align: center;
  padding: 0.5rem 0;
}

.bk-week-row {
  display: flex;
}

.bk-week-cell {
  flex-shrink: 0;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  border-left: 1px solid var(--border);
  transition: filter var(--ease);
}

.bk-week-cell:hover {
  filter: brightness(1.15);
}

.bk-week-cell-empty {
  background: transparent;
}

.bk-week-cell-confirmed {
  background: rgba(13, 148, 136, 0.35);
  color: #5eead4;
}

.bk-week-cell-open {
  background: rgba(139, 92, 246, 0.32);
  color: #d8b4fe;
}

.bk-week-cell-pending {
  background: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

.bk-week-cell-blocked {
  background: repeating-linear-gradient(45deg, rgba(239, 68, 68, 0.4) 0 6px, rgba(239, 68, 68, 0.22) 6px 12px);
  color: #fca5a5;
}

.bk-week-cell-owner-blocked {
  background: repeating-linear-gradient(45deg, rgba(71, 85, 105, 0.7) 0 6px, rgba(51, 65, 85, 0.7) 6px 12px);
  color: #e2e8f0;
}

.bk-week-cell-past {
  background: rgba(148, 163, 184, 0.18) !important;
  color: var(--text-muted) !important;
  opacity: 0.8;
}

@media (max-width: 640px) {
  .bk-row-label {
    width: 130px;
  }
}

/* -------------------- Mobile polish (small screens) -------------------- */
@media (max-width: 700px) {
  .topbar {
    flex-wrap: wrap;
    padding: 0.6rem 0.85rem;
    gap: 0.5rem;
  }

  .venue-topbar-info {
    order: 3;
    width: 100%;
    flex-basis: 100%;
  }

  .venue-topbar-name {
    font-size: 0.95rem;
    white-space: normal;
  }

  .user-menu {
    gap: 0.4rem;
  }

  .venue-page-container {
    padding-top: 0.5rem;
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }

  .venue-main-tabs .tab-btn {
    font-size: 0.78rem;
    padding: 0.35rem 0.6rem;
  }

  /* The icon-only variant is the owner dashboard's entire primary nav (only
     4 tabs: Bookings/Fields/Stats/Info) — shrinking it to match the generic
     text-label override above was making the whole dashboard's navigation
     harder to tap accurately on a touchscreen. Bigger here on purpose,
     overriding the rule right above it, since there's plenty of room for
     only 4 icons and touch accuracy matters more than compactness for the
     one nav that's used constantly. */
  .venue-main-tabs-icon .tab-btn {
    font-size: 1.5rem;
    padding: 0.6rem 0.9rem;
    min-width: 48px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* .bk-grid-wrap deliberately excluded here — -webkit-overflow-scrolling:
     touch is a well-documented WebKit quirk that breaks position:sticky
     stacking inside a touch-scrolled container, which is exactly what made
     confirmed/pending booking blocks render on top of the sticky court-name
     header while scrolling on mobile. Modern iOS Safari has momentum
     scrolling natively without this property anyway, so removing it here
     costs nothing. #fb-canvas-container has no sticky header inside it, so
     it keeps the property. */
  #fb-canvas-container {
    -webkit-overflow-scrolling: touch;
  }

  .fb-toolbar {
    gap: 0.3rem;
  }

  .fb-template-select {
    max-width: 130px;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }

  .modal {
    padding: 1.1rem;
  }

  .btn {
    touch-action: manipulation;
  }
}

/* -------------------- Statistics dashboard -------------------- */
.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.st-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
  margin-bottom: 1rem;
}

.st-custom-range {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.st-custom-range.hidden {
  display: none;
}

.st-custom-range input[type="date"] {
  padding: 0.3rem 0.5rem;
  font-size: 0.82rem;
  width: auto;
}

.st-card {
  margin-bottom: 1rem;
}

.st-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.st-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}

.st-kpi-icon {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.st-kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary);
}

.st-kpi-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.st-kpi-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.8;
  margin-top: 0.15rem;
}

.st-stacked-bar {
  display: flex;
  height: 20px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-elevated);
  margin: 0.5rem 0;
}

.st-stacked-bar-compact {
  height: 12px;
  margin: 0;
  min-width: 120px;
}

.st-stack-booked { background: var(--primary); }
.st-stack-blocked { background: repeating-linear-gradient(45deg, rgba(239,68,68,0.75) 0 5px, rgba(239,68,68,0.5) 5px 10px); }
.st-stack-idle { background: var(--bg-elevated); }

.st-stack-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.st-dot-idle {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  margin-right: 0.3rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.st-busiest-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.st-busiest-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.st-medal {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
}

.st-row-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex-shrink: 0;
  display: inline-block;
  margin-right: 0.4rem;
}

.st-busiest-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.88rem;
}

.st-busiest-pct {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 600;
}

.st-charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
  /* Grid items stretch to match their row's tallest sibling by default
     anyway, but made explicit here rather than relied upon implicitly --
     the two chart titles are different lengths ("Bookings by day of
     week" vs "Bookings by start hour"), so one wrapping to a second line
     at some card widths and not the other is exactly the kind of thing
     that should never visibly grow just one of these two cards. */
  align-items: stretch;
}

.st-chart-card {
  margin-bottom: 0;
}

.st-chart-card .card-title {
  /* Reserves room for a second line up front, on these two cards only,
     rather than reacting after the fact to whichever one happens to wrap
     — 2 lines at this font-size/line-height, so a one-line title still
     looks intentionally spaced rather than oddly padded. */
  min-height: 2.4em;
}

.st-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 140px;
  padding-top: 0.5rem;
}

.st-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  min-width: 0;
}

.st-bar-track {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  max-width: 28px;
  margin: 0 auto;
}

.st-bar-fill {
  width: 100%;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: height var(--ease);
}

.st-bar-value {
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 0.3rem;
}

.st-bar-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
  white-space: nowrap;
}

.st-field-table {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
}

.st-field-table-head,
.st-field-table-row {
  display: grid;
  grid-template-columns: 1.6fr 0.7fr 0.8fr 1.3fr 0.8fr 1fr;
  gap: 0.6rem;
  align-items: center;
  padding: 0.5rem 0.3rem;
}

.st-field-table-head {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.st-field-table-row {
  border-bottom: 1px solid var(--border);
}

.st-field-table-row:last-child {
  border-bottom: none;
}

.st-field-name {
  display: flex;
  align-items: center;
  font-weight: 500;
}

@media (max-width: 700px) {
  .st-field-table-head,
  .st-field-table-row {
    grid-template-columns: 1.3fr 0.6fr 1.2fr;
  }
  .st-field-table-head span:nth-child(3),
  .st-field-table-head span:nth-child(5),
  .st-field-table-head span:nth-child(6),
  .st-field-table-row span:nth-child(3),
  .st-field-table-row span:nth-child(5),
  .st-field-table-row span:nth-child(6) {
    display: none;
  }
}

/* -------------------- Player dashboard: sports rows -------------------- */
.sport-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.sport-row:last-child {
  border-bottom: none;
}

.sport-row-sport {
  flex: 1 1 160px;
  min-width: 140px;
}

.sport-row-skill,
.sport-row-position {
  flex: 1 1 130px;
  min-width: 120px;
}

/* Same treatment as .form-group input/select/textarea — these dropdowns live
   inside .sport-row instead of .form-group, so they never inherited the
   Profile section's padding/border/focus styling and looked like bare,
   unstyled browser defaults by comparison. */
.sport-row select,
.sport-row input[type="text"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.sport-row select:focus,
.sport-row input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.25);
}

.sport-row-primary {
  font-size: 0.8rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.sport-row [data-action="remove-sport"] {
  flex-shrink: 0;
}

/* -------------------- Player: avatar, nearby-venue pins, friends -------------------- */
.player-avatar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.player-avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
  padding: 0;
  position: relative;
}

.player-avatar-preview-clickable {
  cursor: pointer;
  transition: opacity var(--ease);
}

.player-avatar-preview-clickable:hover {
  opacity: 0.85;
}

.player-avatar-edit-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.player-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-avatar-placeholder {
  font-size: 1.6rem;
  opacity: 0.6;
}

.player-venue-pin {
  font-size: 1.1rem;
  text-align: center;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

.friend-invite-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.friend-invite-row input[type="email"] {
  flex: 1;
  min-width: 200px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  color: var(--text);
}

.friend-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.friend-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.friend-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.friend-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  font-size: 1rem;
}

.friend-name {
  flex: 1;
  font-weight: 500;
  font-size: 0.9rem;
}

.bk-pending-customer {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.bk-pending-customer a {
  color: var(--primary);
}

.friend-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* -------------------- Invite & Share modal redesign -------------------- */

.mi-intro {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: -0.25rem 0 1.1rem;
}

/* ---- Progress block: a real visual bar, red-to-green as it fills ---- */
.mi-progress-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--bg-elevated);
  margin-bottom: 1.1rem;
}

.mi-progress-bar {
  height: 8px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}

.mi-progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width var(--ease), background var(--ease);
}

.mi-progress-sub {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.mi-progress-details {
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---- Sections: a plain uppercase label + a collapsible "Info" aside,
   rather than a numbered card with the explanation always taking up
   space. ---- */
.mi-section {
  margin-top: 1.3rem;
}

.mi-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  gap: 0.5rem;
}

.mi-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mi-collapse-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.mi-collapse-btn:hover { color: var(--text); }

.mi-collapse-btn .mi-collapse-arrow {
  display: inline-block;
  transition: transform var(--ease);
  font-size: 0.7rem;
}

.mi-collapse-btn.open .mi-collapse-arrow {
  transform: rotate(90deg);
}

.mi-collapse-content {
  display: none;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--border);
}

.mi-collapse-content.show { display: block; }

.mi-sub-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  margin: 0.75rem 0 0.5rem;
}

.mi-sub-label:first-of-type {
  margin-top: 0.2rem;
}

/* ---- Candidate chips: the toggle IS the pill, with a small avatar. ---- */
.mi-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.7rem 0.35rem 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.mi-chip:hover {
  border-color: var(--primary);
}

.mi-chip.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.mi-chip-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}

.mi-chip.selected .mi-chip-avatar {
  background: rgba(15, 23, 42, 0.25);
}

.mi-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.mi-send-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* ---- Community request row: a compact number box, not a dropdown. ---- */
.mi-request-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  margin-top: 0.75rem;
}

/* This row sits outside .form-group (a horizontal layout, not that
   pattern's vertical stack), so the shared input look needs restating
   here directly rather than being inherited for free. */
.mi-request-row input {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: 44px;
  font-family: inherit;
  font-size: 0.9rem;
  appearance: none;
  -webkit-appearance: none;
}

.mi-request-row input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.85rem;
}

.mi-request-row input[type="number"] {
  flex: 0 0 56px;
  text-align: center;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

.mi-request-row button {
  flex-shrink: 0;
}

.mi-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.mi-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(13, 148, 136, 0.14);
  border: 1px solid rgba(13, 148, 136, 0.4);
  color: var(--primary);
  border-radius: 999px;
  padding: 0.3rem 0.5rem 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.mi-tag button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
  opacity: 0.7;
}

.mi-tag button:hover { opacity: 1; }

.mi-divider {
  height: 1px;
  background: var(--border);
  margin: 1.3rem 0;
}

.mi-share-input-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.mi-share-input-row input {
  flex: 1;
  font-size: 0.78rem;
  font-family: monospace;
}

.mi-social-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.mi-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.6rem 0.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.78rem;
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.mi-social-btn-whatsapp { background: #22c55e; }
.mi-social-btn-viber { background: #8b5cf6; }
.mi-social-btn-facebook { background: #3b82f6; }

.mi-social-btn:hover { filter: brightness(1.08); }

@media (max-width: 380px) {
  .mi-social-row { grid-template-columns: 1fr; }
}

/* -------------------- Venue mini-cards (reused by the landing page's venue list) -------------------- */
.venue-mini-card {
  display: flex;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.venue-mini-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}

.venue-mini-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.venue-mini-logo .placeholder {
  font-size: 1.4rem;
  opacity: 0.6;
}

.venue-mini-body h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.venue-mini-body .sports-tags {
  margin-top: 0.4rem;
}

.venue-mini-distance {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
}

/* -------------------- Login tabs (reused by the landing page's login card) -------------------- */
.login-tabs {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  width: fit-content;
}

.login-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}

.login-tab:hover {
  color: var(--text);
}

.login-tab.active {
  background: var(--primary);
  color: #fff;
}

/* =========================================================
   Landing page v2 — compact, app-style, single scroll
   ========================================================= */
.landing2 {
  overflow-x: hidden;
  position: relative;
}

/* ---- Atmosphere: animated gradient wash + floating orbs + a randomly-picked,
   purely decorative sport-court line-art watermark behind the hero. ---- */
.l2-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(13, 148, 136, 0.22), transparent 58%),
    radial-gradient(ellipse 55% 45% at 100% 30%, rgba(139, 92, 246, 0.14), transparent 52%),
    radial-gradient(ellipse 45% 35% at 0% 80%, rgba(245, 158, 11, 0.08), transparent 50%),
    var(--bg);
}

.l2-atmosphere::before {
  content: '';
  position: absolute;
  inset: -5%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: perspective(600px) rotateX(10deg) scale(1.1);
  transform-origin: center 55%;
  color: var(--primary);
  opacity: 0.9;
}

.l2-sport-football::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='600' viewBox='0 0 800 600'%3E%3Cg fill='none' stroke='currentColor' stroke-width='1.2' opacity='0.16'%3E%3Crect x='80' y='60' width='640' height='480' rx='8'/%3E%3Cline x1='400' y1='60' x2='400' y2='540'/%3E%3Ccircle cx='400' cy='300' r='70'/%3E%3Cpath d='M80 180 H200 Q280 180 280 300 Q280 420 200 420 H80'/%3E%3Cpath d='M720 180 H600 Q520 180 520 300 Q520 420 600 420 H720'/%3E%3C/g%3E%3C/svg%3E");
}
.l2-sport-basketball::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='600' viewBox='0 0 800 600'%3E%3Cg fill='none' stroke='currentColor' stroke-width='1.3' opacity='0.15'%3E%3Crect x='60' y='80' width='680' height='440' rx='6'/%3E%3Ccircle cx='400' cy='300' r='60'/%3E%3Cline x1='400' y1='80' x2='400' y2='520'/%3E%3Ccircle cx='110' cy='300' r='35'/%3E%3Ccircle cx='690' cy='300' r='35'/%3E%3Cpath d='M60 220 Q140 300 60 380'/%3E%3Cpath d='M740 220 Q660 300 740 380'/%3E%3C/g%3E%3C/svg%3E");
}
.l2-sport-tennis::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='600' viewBox='0 0 800 600'%3E%3Cg fill='none' stroke='currentColor' stroke-width='1.3' opacity='0.16'%3E%3Crect x='140' y='40' width='520' height='520' rx='4'/%3E%3Cline x1='140' y1='300' x2='660' y2='300'/%3E%3Cline x1='400' y1='40' x2='400' y2='560' stroke-dasharray='6 8'/%3E%3Crect x='200' y='100' width='400' height='400'/%3E%3Crect x='260' y='160' width='280' height='280'/%3E%3C/g%3E%3C/svg%3E");
}
.l2-sport-volleyball::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='600' viewBox='0 0 800 600'%3E%3Cg fill='none' stroke='currentColor' stroke-width='1.3' opacity='0.16'%3E%3Crect x='100' y='80' width='600' height='440' rx='4'/%3E%3Cline x1='400' y1='80' x2='400' y2='520' stroke-width='2'/%3E%3Cline x1='100' y1='200' x2='700' y2='200' stroke-dasharray='4 6' opacity='0.7'/%3E%3Cline x1='100' y1='400' x2='700' y2='400' stroke-dasharray='4 6' opacity='0.7'/%3E%3Ccircle cx='250' cy='300' r='50' opacity='0.5'/%3E%3Ccircle cx='550' cy='300' r='50' opacity='0.5'/%3E%3C/g%3E%3C/svg%3E");
}
.l2-sport-padel::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='600' viewBox='0 0 800 600'%3E%3Cg fill='none' stroke='currentColor' stroke-width='1.2' opacity='0.16'%3E%3Crect x='180' y='50' width='440' height='500' rx='6'/%3E%3Cline x1='180' y1='300' x2='620' y2='300'/%3E%3Cline x1='400' y1='50' x2='400' y2='550'/%3E%3Crect x='220' y='100' width='160' height='180'/%3E%3Crect x='420' y='100' width='160' height='180'/%3E%3Crect x='220' y='320' width='160' height='180'/%3E%3Crect x='420' y='320' width='160' height='180'/%3E%3C/g%3E%3C/svg%3E");
}

.l2-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}
.l2-orb-1 { width: 280px; height: 280px; background: rgba(13, 148, 136, 0.35); top: -60px; right: -40px; animation: l2drift 18s ease-in-out infinite alternate; }
.l2-orb-2 { width: 220px; height: 220px; background: rgba(139, 92, 246, 0.28); bottom: 10%; left: -50px; animation: l2drift 22s ease-in-out infinite alternate-reverse; }
.l2-orb-3 { width: 160px; height: 160px; background: rgba(245, 158, 11, 0.12); bottom: -30px; right: 20%; animation: l2drift 14s ease-in-out infinite alternate; }
@keyframes l2drift {
  from { transform: translate(0, 0); }
  to { transform: translate(24px, 18px); }
}

.l2-wrap {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 1.25rem 1.2rem 2.5rem;
  padding-top: max(1.25rem, env(safe-area-inset-top));
  min-height: 100dvh;
}

.l2-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 2rem;
}

.l2-logo {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.l2-logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  box-shadow: 0 0 20px rgba(13, 148, 136, 0.45);
}

.l2-hero {
  text-align: center;
  margin-bottom: 1.75rem;
}

.l2-hero h1 {
  font-size: clamp(2.1rem, 8vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-bottom: 0.85rem;
}

.l2-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--primary), #5eead4 40%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.l2-hero-sub {
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 42ch;
  margin: 0 auto;
  line-height: 1.55;
}

.l2-cta-grid {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}
@media (min-width: 560px) {
  .l2-cta-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
}

.l2-cta {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  text-align: left;
  min-height: 168px;
  padding: 1.35rem 1.35rem 1.25rem;
  border-radius: 18px;
  cursor: pointer;
  font-family: var(--font);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.l2-cta-athlete {
  background: linear-gradient(145deg, rgba(13, 148, 136, 0.22) 0%, rgba(15, 23, 42, 0.95) 55%), var(--bg-card);
  border: 1px solid rgba(13, 148, 136, 0.35);
  box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.08), 0 20px 50px -20px rgba(13, 148, 136, 0.35);
}
.l2-cta-owner {
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.22) 0%, rgba(15, 23, 42, 0.95) 55%), var(--bg-card);
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.08), 0 20px 50px -20px rgba(139, 92, 246, 0.3);
}
.l2-cta:hover { transform: translateY(-4px) scale(1.01); }
.l2-cta-athlete:hover { box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.4), 0 28px 60px -18px rgba(13, 148, 136, 0.5); }
.l2-cta-owner:hover { box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.4), 0 28px 60px -18px rgba(139, 92, 246, 0.45); }

.l2-cta-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
  margin-bottom: 0.5rem;
}
.l2-cta-athlete .l2-cta-tag { color: #5eead4; }
.l2-cta-owner .l2-cta-tag { color: #c4b5fd; }

.l2-cta h2 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.l2-cta p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 22ch;
}

.l2-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-start;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  color: #fff;
  margin-top: 1rem;
}
.l2-cta-athlete .l2-cta-btn { background: linear-gradient(135deg, var(--primary), var(--primary-hover)); }
.l2-cta-owner .l2-cta-btn { background: linear-gradient(135deg, var(--violet), var(--violet-hover)); }

.l2-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

.l2-stat {
  text-align: center;
  padding: 0.85rem 0.5rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.l2-stat b {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.l2-stat span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.l2-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.l2-nearby-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.l2-nearby-head strong {
  color: var(--text);
}

.l2-nearby-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.l2-venue-grid {
  display: grid;
  gap: 0.75rem;
}

.sport-filter {
  position: relative;
}

.sport-filter-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.82rem;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}

.sport-filter-toggle:hover {
  border-color: var(--primary);
}

.sport-filter-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 20;
  min-width: 200px;
  max-height: 260px;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem;
  box-shadow: var(--shadow);
}

.sport-filter-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.sport-filter-option:hover {
  background: var(--bg-card);
}

.sport-filter-all {
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.3rem;
  padding-bottom: 0.5rem;
  font-weight: 600;
}

/* Shown once per browser, on first visit, until dismissed (see
   js/cookie-banner.js). Sits below modal overlays (z-index: 100) so an open
   modal is never covered by it, but above everything else on the page. */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
}

.cookie-banner p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 60ch;
}

.cookie-banner p a {
  color: var(--text);
  text-decoration: underline;
}

.cookie-banner .btn {
  flex-shrink: 0;
}

@media (max-width: 520px) {
  .cookie-banner {
    justify-content: flex-start;
    text-align: left;
  }
  .cookie-banner .btn {
    width: 100%;
  }
}

/* Sits at the bottom of a .dashboard's own flex column — margin-top: auto
   pushes it down to the viewport's edge on a short page, and it simply
   follows the content on a long, scrolled one, either way never overlapping
   anything or needing position:fixed. */
.app-footer {
  margin-top: auto;
  padding: 1.25rem 1rem 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.app-footer a {
  color: var(--text-muted);
  text-decoration: underline;
}

.app-footer a:hover {
  color: var(--primary);
}

.l2-footer {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .l2-wrap {
    padding: 1rem 0.9rem 2rem;
  }
  .l2-cta {
    min-height: 150px;
  }
  .l2-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .l2-stat b {
    font-size: 1.2rem;
  }
}

/* -------------------- Book a Court (athlete search + booking) -------------------- */
.bk-search-card {
  overflow: visible; /* so the sport filter dropdown isn't clipped */
}

.bk-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.bk-filters-row2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.bk-radius-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  gap: 0.4rem;
}

.bk-court-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
}

.bk-court-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem;
}

.bk-court-body {
  flex: 1;
  min-width: 0;
}

.bk-court-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.bk-court-top h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.bk-court-meta {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.bk-court-price {
  font-weight: 700;
  color: var(--primary);
}

.bk-court-card > .btn {
  flex-shrink: 0;
  align-self: center;
}

.bk-status-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
}
.bk-status-confirmed { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.bk-status-open { background: rgba(139, 92, 246, 0.18); color: #c4b5fd; }
.bk-status-pending { background: rgba(234, 179, 8, 0.15); color: #facc15; }
.bk-status-cancelled { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; }
.bk-status-scheduled { background: rgba(59, 130, 246, 0.16); color: #60a5fa; }

@media (max-width: 640px) {
  .bk-court-card {
    flex-direction: column;
  }
  .bk-court-card > .btn {
    width: 100%;
  }
}

/* -------------------- Book a Court: upcoming panel, venue browser, schedule view -------------------- */
.bk-upcoming-card {
  padding: 0;
  overflow: hidden;
}

.bk-upcoming-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font);
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  text-align: left;
}

.bk-upcoming-header:hover {
  background: var(--bg-elevated);
}

.bk-upcoming-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.bk-countdown {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}

.bk-upcoming-body {
  padding: 0 1.1rem 1rem;
}

.bk-search-input {
  flex: 1;
  min-width: 180px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem;
  color: var(--text);
  font-size: 0.88rem;
}

.bk-liked-toggle {
  font-size: 0.85rem;
  white-space: nowrap;
}

.bk-venue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 0.85rem;
}

.bk-venue-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem;
  cursor: pointer;
  transition: border-color var(--ease), transform var(--ease);
}

.bk-venue-card:hover,
.bk-venue-card:focus-visible {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.bk-venue-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.bk-venue-body {
  flex: 1;
  min-width: 0;
}

.bk-venue-body h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.bk-like-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(15, 23, 42, 0.6);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--ease);
}

.bk-like-btn:hover {
  transform: scale(1.12);
}

.bk-schedule-header .bk-like-btn {
  position: static;
  background: var(--bg-elevated);
}

.bk-schedule-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.bk-schedule-head-actions {
  display: flex;
  gap: 0.5rem;
}

.bk-venue-info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem;
}

.bk-info-chip {
  background: var(--bg-elevated);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.bk-like-btn.preferred {
  background: rgba(245, 158, 11, 0.25);
}

.bk-schedule-venue-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
  line-height: 1.25;
}

.bk-row-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.bk-row-price {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 0.3rem;
}

.bk-row-info-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.15rem 0.3rem;
  margin-left: 0.15rem;
  border-radius: 4px;
}

.bk-row-info-btn:hover {
  background: var(--bg-card);
  color: var(--text);
}

.bk-block-taken {
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: default;
}

/* -------------------- Team match results (W/L/D form chips) -------------------- */
.team-form-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-right: 0.2rem;
}

.team-form-win { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.team-form-loss { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.team-form-draw { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }

.tm-star-rating-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.tm-star-rating-row > .field-hint {
  min-width: 120px;
  margin: 0;
}

.tm-star-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
}

.tm-star {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  padding: 0.1rem;
  color: var(--border);
  transition: color 0.1s ease, transform 0.1s ease;
}

.tm-star:hover {
  transform: scale(1.15);
}

.tm-star-filled {
  color: var(--accent);
}

.tm-star-value-label {
  margin-left: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  min-width: 90px;
}

/* ==================== Home tab (player dashboard landing page) ==================== */

.home-play-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  background: linear-gradient(135deg, #2dd4bf, #0d9488);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px -8px rgba(13, 148, 136, 0.55);
  transition: transform var(--ease), box-shadow var(--ease);
}

.home-play-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -8px rgba(13, 148, 136, 0.65);
}

.home-play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.home-section {
  margin-top: 1.5rem;
}

.home-light-wrapper {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 0.5rem;
}

.home-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.home-section-header h2 {
  font-size: 1.05rem;
  margin: 0;
}

.home-section-count {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
}

.home-view-all {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.home-view-all:hover {
  color: var(--primary-hover);
}

/* Carousel: arrows flank a horizontally-scrolling track. Scrolling itself is
   native overflow-x + scroll-snap, not a JS library — that's what keeps
   touch swipe working for free on mobile, which is the whole point. */
.home-carousel-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.home-carousel-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  transition: background var(--ease);
}

.home-carousel-arrow:hover {
  background: var(--bg-card);
}

.home-carousel-track {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  padding: 0.2rem 0.1rem 0.5rem;
  flex: 1;
  min-width: 0;
}

.home-carousel-track::-webkit-scrollbar {
  height: 6px;
}

.home-carousel-track::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.home-carousel-card {
  scroll-snap-align: start;
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  cursor: default;
}

.home-carousel-card[data-home-view-booking] {
  cursor: pointer;
  transition: background var(--ease);
}

.home-carousel-card[data-home-view-booking]:hover {
  background: var(--bg-card);
}

.home-carousel-card-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.home-carousel-sport-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.home-carousel-title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.92rem;
}

.home-carousel-date {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.15rem;
}

.home-carousel-divider {
  height: 1px;
  background: var(--border);
}

.home-carousel-matchup {
  font-weight: 600;
  color: var(--text);
  font-size: 0.88rem;
}

.home-carousel-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.home-carousel-log-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background var(--ease);
}

.home-carousel-log-btn:hover {
  background: var(--primary-hover);
}

.home-carousel-dismiss-btn {
  padding: 0.5rem 0.75rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background var(--ease);
}

.home-carousel-dismiss-btn:hover {
  background: var(--bg-card);
}

.home-carousel-danger-btn {
  padding: 0.5rem 0.75rem;
  background: none;
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: var(--danger);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--ease);
}

.home-carousel-danger-btn:hover {
  background: rgba(239, 68, 68, 0.12);
}

.home-empty-state {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  flex-wrap: wrap;
}

.home-empty-state-dashed {
  border: 1.5px dashed var(--border);
  background: transparent;
  justify-content: center;
  text-align: left;
}

.home-empty-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.home-empty-title {
  font-weight: 600;
  color: var(--text);
}

.home-empty-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.home-search-open-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--ease);
  flex-shrink: 0;
}

.home-search-open-btn:hover {
  background: var(--primary-hover);
}

.home-join-btn {
  width: 100%;
  padding: 0.7rem 1.25rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--ease);
}

.home-join-btn:hover {
  background: var(--primary-hover);
}

@media (max-width: 640px) {
  .home-carousel-card {
    flex: 0 0 240px;
  }
  .home-carousel-arrow {
    width: 34px;
    height: 34px;
    font-size: 1.2rem;
  }
  .home-empty-state-dashed {
    flex-direction: column;
    text-align: center;
  }
  .home-search-open-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==================== Player header: bell + avatar dropdown ==================== */

.player-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.player-bell-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  transition: background var(--ease);
}

.player-bell-btn:hover {
  background: var(--bg-elevated);
}

.player-bell-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--bg-card);
}

.player-avatar-wrap {
  position: relative;
}

.player-bell-wrap {
  position: relative;
}

.player-notif-menu {
  min-width: 300px;
  max-width: 340px;
  max-height: 400px;
  overflow-y: auto;
  padding: 0;
}

.player-notif-header {
  padding: 0.75rem 0.9rem 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.player-notif-item {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--ease);
}

.player-notif-item:last-child {
  border-bottom: none;
}

.player-notif-item:hover {
  background: var(--bg-elevated);
}

.player-notif-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
}

.player-avatar-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem;
  color: var(--text-muted);
}

/* Wraps just the circle (not the chevron next to it), and is what
   .player-avatar-dot is actually positioned against. Deliberately a
   sibling of the circle rather than nested inside it: setVenueAvatarInitials()
   sets the circle's .textContent directly, which would silently delete a
   child element sitting inside it every time the initials render. */
.player-avatar-circle-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.player-avatar-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* The unread-notifications marker, now on the account avatar itself rather
   than a separate bell button: same look as .player-bell-dot, repositioned
   for the smaller circle it sits on. */
.player-avatar-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--bg-card);
}

/* A Notifications section living at the top of the account dropdown
   (venue.html) instead of its own separate bell dropdown. Negative margin
   cancels the dropdown's own 0.4rem padding so the header/list can span
   edge-to-edge exactly like the old standalone .player-notif-menu did. */
.player-dropdown-notif-section {
  margin: -0.4rem -0.4rem 0;
}

.player-dropdown-notif-list {
  max-height: 220px;
  overflow-y: auto;
}

.player-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  min-width: 220px;
  padding: 0.4rem;
  z-index: 50;
}

.player-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--ease);
}

.player-dropdown-item:hover {
  background: var(--bg-elevated);
}

.player-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.4rem 0.25rem;
}

/* A non-clickable row for the language switcher inside the dropdown —
   the actual interaction is the <select> it holds, so this deliberately
   doesn't share .player-dropdown-item's own pointer cursor/hover
   background, which would otherwise suggest the whole row itself is a
   single clickable action. */
.player-dropdown-lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text);
}

/* ==================== Player dropdown destinations: Profile & Team popups ==================== */

.player-section-modal-box {
  max-width: 820px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.player-section-modal-box header {
  flex-shrink: 0;
}

.player-section-modal-box > div[id$="-tab-root"],
.player-section-modal-box .player-subtab-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.player-subtabs {
  display: flex;
  gap: 0.4rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
  overflow-x: auto;
  flex-shrink: 0;
}

.player-subtab-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.6rem 0.9rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--ease), border-color var(--ease);
}

.player-subtab-btn:hover {
  color: var(--text);
}

.player-subtab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

@media (max-width: 640px) {
  .player-section-modal-box {
    max-height: 90vh;
  }
}

/* ==================== "Who's playing?" step: big, unambiguous choice cards ==================== */

.bk-choice-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.bk-choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  padding: 1.5rem 1.25rem;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease), transform var(--ease);
}

.bk-choice-card:hover {
  border-color: var(--primary);
  background: var(--bg-card);
  transform: translateY(-2px);
}

.bk-choice-card-selected,
.bk-choice-card-selected:hover {
  border-color: var(--primary);
  background: rgba(13, 148, 136, 0.1);
  transform: none;
}

.bk-choice-cards-sm {
  gap: 0.6rem;
}

.bk-choice-cards-sm .bk-choice-card {
  padding: 0.85rem 0.75rem;
  gap: 0.2rem;
}

.bk-choice-cards-sm .bk-choice-card-icon {
  font-size: 1.3rem;
}

.bk-choice-cards-sm .bk-choice-card-title {
  font-size: 0.85rem;
}

.bk-choice-cards-sm .bk-choice-card-desc {
  font-size: 0.72rem;
}

.bk-choice-card-icon {
  font-size: 2rem;
}

.bk-choice-card-title {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
}

.bk-choice-card-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* A full-width, stacked list of radio-style option rows — icon, then a
   title with its own descriptive subtext underneath, then a radio dot on
   the far right. More context and a much larger tap target per option
   than a compact row of small side-by-side icon+label buttons, and there's
   no ambiguity about which one is currently selected. */
.bk-radio-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.bk-radio-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.9rem 1rem;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--ease), background var(--ease);
}

.bk-radio-card:hover {
  border-color: var(--primary);
}

.bk-radio-card-selected,
.bk-radio-card-selected:hover {
  border-color: var(--primary);
  background: rgba(13, 148, 136, 0.1);
}

.bk-radio-card-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.bk-radio-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.bk-radio-card-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.bk-radio-card-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.bk-radio-card-dot {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: border-color var(--ease);
}

.bk-radio-card-selected .bk-radio-card-dot {
  border-color: var(--primary);
  border-width: 6px;
}

@media (max-width: 560px) {
  .bk-choice-cards {
    grid-template-columns: 1fr;
  }
}

/* ==================== Opponent-request criteria filter panel ==================== */

.tm-star-rating-sm .tm-star {
  font-size: 1rem;
  padding: 0.05rem;
}

.tm-star-rating-sm .tm-star-value-label {
  display: none;
}

.bk-crit-card {
  margin-top: 0.85rem;
  padding: 1.1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.bk-crit-section {
  margin-top: 1rem;
}

.bk-crit-section:first-of-type {
  margin-top: 0.75rem;
}

.bk-crit-section-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* ---- Redesigned invite picker (avatar + row + pill + stepper) ---- */

.bk-invite-section-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0.9rem 0 0.4rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}

.bk-invite-section-label:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.bk-invite-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0;
}

.bk-invite-row-info {
  flex: 1;
  min-width: 0;
}

.bk-invite-row-name {
  font-weight: 600;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bk-invite-row-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* The checkbox is visually hidden but still fully present and functional —
   the row is a <label> wrapping it, so clicking anywhere on the row already
   natively toggles it without any extra JS, and it stays in the
   accessibility tree for screen readers rather than being removed outright. */
.bk-invite-row .bk-invite-checkbox-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bk-invite-row {
  cursor: pointer;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  margin: 0.15rem 0;
  transition: background var(--ease);
}

.bk-invite-row:hover {
  background: var(--bg-card);
}

.bk-invite-row-selected {
  background: rgba(13, 148, 136, 0.14);
}

.bk-invite-row-selected:hover {
  background: rgba(13, 148, 136, 0.2);
}


.bk-invite-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.bk-invite-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(13, 148, 136, 0.14);
  border: 1px solid rgba(13, 148, 136, 0.4);
  color: var(--primary);
  border-radius: 999px;
  padding: 0.25rem 0.5rem 0.25rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.bk-invite-pill button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0;
  opacity: 0.75;
}

.bk-invite-pill button:hover {
  opacity: 1;
}

.bk-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.bk-stepper-btn {
  background: var(--bg-elevated);
  border: none;
  color: var(--text);
  width: 40px;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.bk-stepper-btn:hover {
  background: var(--bg-card);
}

.bk-stepper-value {
  width: 56px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.bk-crit-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.bk-crit-pill {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ease);
}

.bk-crit-pill:hover {
  border-color: var(--primary);
  color: var(--text);
}

.bk-crit-pill-selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.bk-crit-input-wrap {
  position: relative;
  max-width: 320px;
}

.bk-crit-input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.6;
  pointer-events: none;
}

.bk-crit-input-wrap input {
  padding-left: 2.1rem !important;
}

.bk-crit-ratings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.bk-rating-range-group {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
}

.bk-rating-range-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.bk-rating-range-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bk-rating-range-side {
  flex: 1;
  min-width: 0;
}

.bk-rating-range-hint {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 0.1rem;
}

.bk-rating-range-sep {
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 0.9rem;
}

.bk-crit-age-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 260px;
}

.bk-crit-age-row input {
  min-width: 0;
}

.bk-crit-search-btn {
  margin-top: 1.1rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.bk-crit-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.7rem;
}

.bk-crit-result-card {
  position: relative;
  display: block;
  padding: 0.85rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}

.bk-crit-result-card:hover {
  border-color: var(--primary);
}

.bk-crit-result-card-selected {
  border-color: var(--primary);
  background: rgba(13, 148, 136, 0.1);
}

.bk-crit-result-check {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: transparent;
  transition: all var(--ease);
}

.bk-crit-result-card-selected .bk-crit-result-check {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.bk-crit-result-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-right: 1.5rem;
}

.bk-crit-result-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-elevated);
  font-size: 1rem;
  flex-shrink: 0;
}

.bk-crit-result-name {
  font-weight: 700;
  color: var(--text);
  font-size: 0.88rem;
}

.bk-crit-result-level {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: capitalize;
}

.bk-crit-result-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.6rem;
}

.bk-crit-chip {
  background: var(--bg-elevated);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==================== Home carousel: response-count badge ==================== */

.home-response-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* A real thing waiting on the organizer's decision — not just informational
   like the response count above, so it's deliberately louder: full-width,
   colored, sitting right at the top of the card before anything else. */
.home-needs-attention-badge {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  text-align: center;
}

/* A small notification dot on a button itself — pointing at exactly which
   action resolves whatever's waiting, rather than only saying so
   elsewhere on the card and leaving the person to guess where to click. */
.bk-notify-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #facc15;
  border: 2px solid var(--bg-card);
}

/* ==================== Pending bookings: clickable row + mobile layout ==================== */

.bk-pending-row {
  cursor: pointer;
  flex-wrap: wrap;
  transition: background var(--ease);
}

.bk-pending-row:hover {
  background: var(--bg-card);
}

.bk-pending-info {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.bk-pending-title {
  display: inline;
}

@media (max-width: 640px) {
  .bk-pending-row {
    align-items: flex-start;
    padding: 0.75rem;
  }

  .bk-pending-info {
    flex-basis: 100%;
    order: 1;
  }

  .bk-pending-actions {
    order: 2;
    width: 100%;
    margin-top: 0.6rem;
    justify-content: stretch;
  }

  .bk-pending-actions button {
    flex: 1;
  }
}

/* ---------- Admin feedback list: one compact line per record ----------
   The line is the <summary> of a <details>: type icon, status pill, the
   comment on a single line (ellipsis), and small Review / Close buttons.
   Everything else about the record (full text, reporter, date, page,
   browser, console errors) lives in the collapsed part. */
.adm-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.adm-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.adm-row > summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  list-style: none;
}

.adm-row > summary::-webkit-details-marker {
  display: none;
}

.adm-row > summary::before {
  content: '\25b8';
  flex-shrink: 0;
  width: 0.8rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: transform 0.12s;
}

.adm-row[open] > summary::before {
  transform: rotate(90deg);
}

.adm-type {
  flex-shrink: 0;
  font-size: 1.05rem;
  line-height: 1;
}

/* Same three colours the status pill has always used */
.adm-status {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}
.adm-status-new { background: #2563eb; }
.adm-status-reviewed { background: #d97706; }
.adm-status-closed { background: #6b7280; }

.adm-msg {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.3rem;
}

.adm-act {
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.adm-act:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.adm-act:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

/* The two buttons are toggles: the one matching the current status is
   filled with that status's colour; pressing it again reopens the record.
   They stay in place (never removed/hidden) so keyboard focus survives an
   update. */
.adm-act[aria-pressed="true"] {
  color: #fff;
  border-color: transparent;
}
.adm-act[data-adm-act="reviewed"][aria-pressed="true"] { background: #d97706; }
.adm-act[data-adm-act="closed"][aria-pressed="true"] { background: #6b7280; }

.adm-row.adm-pending {
  opacity: 0.75;
}

/* A record whose status was just changed so it no longer matches the
   active status filter stays where it is (jumping or vanishing under the
   cursor is exactly what in-place updating is meant to avoid) but dims. */
.adm-row.adm-off-filter {
  opacity: 0.55;
}

.adm-err {
  flex-shrink: 0;
  color: var(--danger);
  font-size: 0.75rem;
}

.adm-detail {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem 0.75rem 2.1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

.adm-detail-msg {
  margin: 0.5rem 0 0.25rem;
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.adm-detail pre {
  margin-top: 0.25rem;
  padding: 0.5rem;
  border-radius: 6px;
  background: var(--bg-elevated);
  font-size: 0.75rem;
  white-space: pre-wrap;
}

@media (max-width: 560px) {
  .adm-row > summary {
    flex-wrap: wrap;
  }
  .adm-msg {
    flex: 1 1 8rem;
  }
  .adm-actions {
    margin-left: auto;
  }
}

/* -------------------- Subscription (billing) -------------------- */
.bill-banner { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 0.6rem 1rem; background: rgba(234, 179, 8, 0.14); border-bottom: 1px solid rgba(234, 179, 8, 0.45); color: var(--text); font-size: 0.9rem; }
.bill-banner.urgent { background: rgba(239, 68, 68, 0.16); border-bottom-color: rgba(239, 68, 68, 0.55); }
.bill-banner ul { margin: 0; padding-left: 1.1rem; flex: 1 1 18rem; }
#billing-body { padding: 0.25rem 1.25rem 1.25rem; }
.bill-intro { color: var(--text-muted); line-height: 1.5; }
.bill-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.85rem 1rem; margin: 0.75rem 0; }
.bill-card-head { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.bill-pub { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }
.bill-row { display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; padding: 0.4rem 0; border-top: 1px solid rgba(71, 85, 105, 0.5); align-items: center; }
.bill-status { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.bill-price { color: var(--text-muted); font-size: 0.85rem; }
.bill-badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.bill-badge.good { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.bill-badge.warn { background: rgba(234, 179, 8, 0.15); color: #facc15; }
.bill-badge.bad { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.bill-badge.info { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.bill-note { margin: 0.5rem 0 0; font-size: 0.85rem; color: var(--text-muted); }
.bill-note.bad { color: #f87171; }
.bill-h { margin: 1.25rem 0 0.5rem; font-size: 1rem; }
.bill-pay { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.75rem 1rem; line-height: 1.5; overflow-wrap: anywhere; }
.bill-help { font-size: 0.85rem; }
.bill-table-wrap { overflow-x: auto; }
.bill-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.bill-table th, .bill-table td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid rgba(71, 85, 105, 0.5); white-space: nowrap; }

.bill-pay-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.bill-notice { padding: 0.7rem 1rem; border-radius: var(--radius-sm); margin-bottom: 0.75rem; border: 1px solid var(--border); }
.bill-notice.good { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.5); }
.bill-notice.warn { background: rgba(234, 179, 8, 0.12); border-color: rgba(234, 179, 8, 0.5); }
.bill-toggle { display: inline-flex; align-items: center; gap: 0.5rem; background: none; border: 0; padding: 0.15rem 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.bill-toggle:hover { color: var(--primary); }
.bill-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
.bill-chev { display: inline-block; width: 1em; color: var(--text-muted); transition: transform 0.15s ease; }
.bill-toggle[aria-expanded="true"] .bill-chev { transform: rotate(90deg); }
.bill-detail { flex: 1 0 100%; padding: 0.5rem 0 0.25rem 1.5rem; color: var(--text-muted); font-size: 0.88rem; line-height: 1.5; }
.bill-detail p { margin: 0 0 0.5rem; }
.bill-detail .bill-fine { font-size: 0.82rem; }
.bill-both { display: flex; justify-content: flex-end; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.6rem; padding-top: 0.75rem; border-top: 1px solid rgba(71, 85, 105, 0.5); }
.bill-both-hint { color: var(--text-muted); font-size: 0.85rem; }

/* ---- Go-live checklist (js/verification.js) ---- */
.gl-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1.25rem; background: var(--card-bg, transparent); }
.gl-title { margin: 0 0 0.25rem; font-size: 1.15rem; }
.gl-step { border-top: 1px solid var(--border); padding: 0.85rem 0; }
.gl-step:first-of-type { border-top: 0; }
.gl-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.gl-num { width: 1.6rem; height: 1.6rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; border: 1px solid var(--border); flex: none; }
.gl-num.done { background: rgba(34, 197, 94, 0.2); border-color: rgba(34, 197, 94, 0.6); color: #4ade80; }
.gl-body { padding-left: 2.2rem; margin-top: 0.4rem; }
.gl-text { margin: 0.3rem 0 0.6rem; }
.gl-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 0.9rem; margin: 0.5rem 0; font-size: 0.92rem; }
.gl-facts dt { color: var(--text-muted, inherit); opacity: 0.8; }
.gl-facts dd { margin: 0; overflow-wrap: anywhere; }
.gl-link { background: none; border: 0; padding: 0; color: var(--primary, #60a5fa); text-decoration: underline; cursor: pointer; font: inherit; }
.gl-form { margin-top: 0.75rem; max-width: 34rem; }
.gl-error { color: #f87171; margin: 0.4rem 0; }
@media (max-width: 600px) { .gl-body { padding-left: 0; } .gl-facts { grid-template-columns: 1fr; } }
.gl-card .bill-fine { font-size: 0.82rem; opacity: 0.75; margin: 0.25rem 0; }
.publish-warning-banner.hidden { display: none; }

/* ---- Publish switch lock + review pill (venue edit form, venue header, venue cards) ---- */
.toggle-switch.is-locked { opacity: 0.6; cursor: not-allowed; }
.toggle-switch.is-locked input { cursor: not-allowed; }
.pub-gate { margin-top: 0.6rem; padding: 0.7rem 0.9rem; border: 1px dashed var(--border); border-radius: var(--radius-sm, 8px); }
.pub-gate-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.pub-gate-text { margin: 0.5rem 0 0; font-size: 0.9rem; }
.pub-lock { font-size: 1rem; }
.pub-how { margin-top: 0.5rem; font-size: 0.85rem; }
.pub-how summary { cursor: pointer; font-weight: 600; }
.pub-how ol { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.pub-pill.venue-topbar-badge { margin-left: 0.25rem; }
.pub-gate { margin: 0.4rem 0 0; padding: 0; border: 0; font-size: 0.88rem; color: var(--text-muted, inherit); opacity: 0.9; }
.pub-gate.hidden { display: none; }

/* ---- review: declined notice, help button + dialogs, duplicate warning ---- */
.bill-notice.bad { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.55); }
.adm-dup ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.adm-warn { color: #f87171; font-weight: 600; }
.vh-btn { display: inline-flex; align-items: center; justify-content: center; width: 1.35rem; height: 1.35rem; margin-left: 0.35rem; padding: 0;
  border-radius: 50%; border: 1px solid var(--border); background: transparent; color: inherit; font: 700 0.8rem/1 inherit; cursor: pointer; vertical-align: middle; }
.vh-btn:hover, .vh-btn:focus-visible { background: var(--primary, #6746f4); border-color: var(--primary, #6746f4); color: #fff; outline: none; }
.vh-overlay { position: fixed; inset: 0; z-index: 3000; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.vh-box { background: var(--card-bg, #1b1b2b); color: var(--text, inherit); border: 1px solid var(--border); border-radius: var(--radius, 12px);
  max-width: 34rem; width: 100%; max-height: 90vh; overflow-y: auto; padding: 1.25rem 1.4rem; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.vh-box h3 { margin: 0 0 0.6rem; }
.vh-list { padding-left: 1.2rem; margin: 0.5rem 0 0.9rem; }
.vh-list li { margin: 0.25rem 0; }
.vh-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.vh-check { list-style: none; padding: 0; margin: 0.4rem 0 0.6rem; }
.vh-check li.ok { color: #4ade80; }
.vh-check li.no { color: #f87171; }
.bill-banner.bad { background: rgba(239, 68, 68, 0.14); border-color: rgba(239, 68, 68, 0.55); }

/* ---- monthly plan: yearly / monthly choice and the plan box ---- */
.bill-period { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0.6rem 0; }
.bill-period-label { font-size: 0.85rem; opacity: 0.8; margin-right: 0.2rem; }
.bill-seg { background: transparent; color: inherit; border: 1px solid var(--border); border-radius: 999px; padding: 0.25rem 0.8rem; cursor: pointer; font: inherit; font-size: 0.88rem; }
.bill-seg small { opacity: 0.75; font-size: 0.75rem; }
.bill-seg.on { background: var(--primary, #6746f4); border-color: var(--primary, #6746f4); color: #fff; }
.bill-period .bill-fine { flex-basis: 100%; margin: 0.2rem 0 0; }
.bill-plan { border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); padding: 0.7rem 0.9rem; margin: 0.6rem 0; }
.bill-plan p { margin: 0.25rem 0 0.5rem; }
.bill-plan.warn { border-color: rgba(234, 179, 8, 0.6); background: rgba(234, 179, 8, 0.1); }
.bill-plan.bad { border-color: rgba(239, 68, 68, 0.6); background: rgba(239, 68, 68, 0.1); }
.bill-plan-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---- subscription tab, simplified: status lines + monthly/yearly switch + one pay button ---- */
.bill-row-simple { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.45rem 0; border-top: 1px solid rgba(71, 85, 105, 0.4); }
.bill-name { font-weight: 600; }
.bill-period { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; margin: 0.9rem 0 0.4rem; }
.bill-sw-label { cursor: pointer; opacity: 0.65; font-weight: 600; }
.bill-sw-label.on { opacity: 1; }
.bill-sw-label small { font-weight: 400; color: #4ade80; margin-left: 0.2rem; }
.bill-switch { position: relative; width: 2.8rem; height: 1.5rem; border-radius: 999px; border: 0; padding: 0; cursor: pointer; background: var(--border, #475569); transition: background 0.15s; flex: none; }
.bill-switch.yearly { background: var(--primary, #6746f4); }
.bill-knob { position: absolute; top: 0.15rem; left: 0.15rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.bill-switch.yearly .bill-knob { transform: translateX(1.3rem); }
.bill-switch:focus-visible { outline: 2px solid var(--primary, #6746f4); outline-offset: 2px; }
.bill-paybar { margin-top: 0.7rem; }

/* ---- subscription tab v3: two product rows (booking system, publishing) ---- */
.bill-prod { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; padding: 0.7rem 0; border-top: 1px solid rgba(71, 85, 105, 0.4); }
.bill-prod .bill-name { flex: 1 1 10rem; font-weight: 600; }
.bill-prod .bill-act { margin-left: auto; min-width: 6rem; text-align: right; }
.bill-card .bill-period { margin: 0.6rem 0 0.2rem; }
.bill-plan-line { margin: 0.5rem 0 0; font-size: 0.85rem; color: var(--text-muted); }
.bill-plan-line.warn { color: #fbbf24; }
.bill-plan-line.bad { color: #f87171; }
.bill-card .bill-fine { margin: 0 0 0.4rem; }

/* ---- subscription tab v4 ---- */
.bill-card .bill-row { display: block; padding: 0; border-top: 1px solid rgba(71, 85, 105, 0.4); }
.bill-card .bill-row .bill-prod { border-top: 0; }
.bill-card .bill-toggle[aria-expanded="true"] .bill-chev { transform: rotate(180deg); }
.bill-card .bill-detail { padding: 0 0 0.7rem 0; }
.bill-card .bill-period { justify-content: flex-end; }
.bill-card .bill-both { border-top: 1px solid rgba(71, 85, 105, 0.4); margin-top: 0; padding-top: 0.7rem; }
.bill-prod .bill-toggle { flex: 0 1 auto; margin-right: auto; }
.bill-prod .bill-act { margin-left: 0; }


/* Social media icons in the footers (filled by js/social-links.js; empty = hidden) */
.social-links {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  margin: 0 0 0.6rem;
}
.social-links:empty {
  display: none;
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: var(--text-muted);
  text-decoration: none !important;
  transition: color 0.15s, background 0.15s;
}
.social-link:hover,
.social-link:focus-visible {
  color: var(--primary);
  background: var(--border);
}
