/* ── Design Tokens ───────────────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:           #080808;
  --bg-surface:   #0f0f0f;
  --bg-elevated:  #161616;
  --bg-hover:     rgba(255,255,255,0.035);
  --bg-active:    rgba(255,255,255,0.06);

  /* Borders */
  --border:       rgba(255,255,255,0.07);
  --border-mid:   rgba(255,255,255,0.10);
  --border-focus: rgba(30,157,241,0.5);

  /* Text */
  --text:         #EDEDED;
  --text-soft:    rgba(255,255,255,0.55);
  --text-muted:   rgba(255,255,255,0.30);
  --text-faint:   rgba(255,255,255,0.15);

  /* Brand — FFL Blue */
  --accent:        #1e9df1;
  --accent-light:  #69c0f5;
  --accent-dim:    rgba(30,157,241,0.15);
  --accent-glow:   rgba(30,157,241,0.25);

  /* Full FFL brand token system */
  --primary:                    #1e9df1;
  --primary-foreground:         #ffffff;
  --ring:                       #1da1f2;
  --shadow-color:               rgba(30,157,241,0.15);
  --font-sans:                  'Open Sans', -apple-system, sans-serif;
  --font-mono:                  Menlo, monospace;
  --font-serif:                 Georgia, serif;

  /* Locations */
  --west:         #7c3aed;
  --west-dim:     rgba(124,58,237,0.15);
  --midtown:      #06b6d4;
  --midtown-dim:  rgba(6,182,212,0.15);

  /* Status */
  --green:        #22c55e;
  --green-dim:    rgba(34,197,94,0.12);
  --amber:        #f59e0b;
  --amber-dim:    rgba(245,158,11,0.12);
  --red:          #ef4444;
  --red-dim:      rgba(239,68,68,0.12);

  /* Sidebar */
  --sidebar-width: 220px;
  --sidebar-collapsed: 60px;

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
}

/* ── Skip Link ───────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.1s;
}
.skip-link:focus { top: 1rem; }

/* ── Reset / Base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; }

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Mobile overlay behind sidebar ─────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

.sidebar {
  width: var(--sidebar-collapsed);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 200;
  transition: width 0.3s ease, transform 0.2s ease;
  overflow-x: hidden;
  overflow-y: auto;
}

.sidebar.expanded {
  width: var(--sidebar-width);
}

.main-content {
  margin-left: var(--sidebar-collapsed);
  flex: 1;
  min-height: 100vh;
  background: transparent;
  transition: margin-left 0.3s ease;
}

.main-content.sidebar-expanded {
  margin-left: var(--sidebar-width);
}

.content-area {
  padding: 2rem 2.5rem;
  max-width: 1300px;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid var(--border);
  justify-content: center;
  min-height: 64px;
  overflow: hidden;
}

.sidebar.expanded .sidebar-brand {
  padding: 1.25rem 1rem 1rem;
  justify-content: flex-start;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
  filter: none;
}

.brand-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.brand-role {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.brand-text {
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  max-width: 0;
  transition: opacity 0.2s ease 0.05s, max-width 0.25s ease;
}

.sidebar.expanded .brand-text {
  opacity: 1;
  max-width: 160px;
}

.sidebar-nav {
  list-style: none;
  padding: 0.625rem 0.5rem;
  flex: 1;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.45rem 0;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.1s, color 0.1s;
  margin-bottom: 1px;
  line-height: 1;
  justify-content: center;
  min-height: 32px;
  white-space: nowrap;
}

.sidebar.expanded .sidebar-nav .nav-link {
  padding: 0.45rem 0.625rem;
  justify-content: flex-start;
}

.sidebar-nav .nav-link:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.sidebar-nav .nav-link.active {
  background: var(--bg-active);
  color: var(--text);
}

.sidebar-nav .nav-link i {
  font-size: 14px;
  width: 16px;
  text-align: center;
  opacity: 0.7;
  flex-shrink: 0;
}

.sidebar-nav .nav-link.active i { opacity: 1; }

.nav-section {
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 0.625rem 0.25rem;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  transition: max-height 0.2s ease, opacity 0.18s ease, padding 0.2s ease;
}

.sidebar.expanded .nav-section {
  max-height: 40px;
  opacity: 1;
  padding-top: 0.75rem;
  padding-bottom: 0.25rem;
}

/* ── Nav text labels (hidden when sidebar collapsed) ─────────────────── */
.nav-label {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  display: inline-block;
  transition: opacity 0.18s ease 0.05s, max-width 0.22s ease;
  vertical-align: middle;
}

.sidebar.expanded .nav-label {
  opacity: 1;
  max-width: 160px;
}

.sidebar-footer {
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.sidebar.expanded .sidebar-footer {
  padding: 0.75rem;
  flex-direction: row;
  justify-content: space-between;
  gap: 8px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
}

.user-info span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-avatar {
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 10px;
  color: white;
  flex-shrink: 0;
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 600;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 5px 10px;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  flex-shrink: 0;
  text-decoration: none;
}
.logout-btn:hover {
  color: #f87171;
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.2);
}
.logout-label { letter-spacing: 0.01em; }

/* ── Topbar ──────────────────────────────────────────────────────────────── */
.topbar {
  padding: 0.6rem 1.25rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 101;
}
.topbar-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}
.topbar-user {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.ffl-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 1.25rem;
  border: 1px solid;
}
.ffl-alert.success { background: var(--green-dim);  border-color: rgba(34,197,94,0.25);  color: #4ade80; }
.ffl-alert.danger  { background: var(--red-dim);    border-color: rgba(239,68,68,0.25);  color: #f87171; }
.ffl-alert.info    { background: var(--accent-dim); border-color: rgba(30,157,241,0.25); color: #93d4f8; }
.ffl-alert.warning { background: var(--amber-dim);  border-color: rgba(245,158,11,0.25); color: #fcd34d; }

/* Bootstrap alert overrides */
.alert-success { background: var(--green-dim)  !important; border: 1px solid rgba(34,197,94,0.2)  !important; color: #4ade80 !important; border-radius: var(--radius-md) !important; font-size:13px; }
.alert-danger  { background: var(--red-dim)    !important; border: 1px solid rgba(239,68,68,0.2)  !important; color: #f87171 !important; border-radius: var(--radius-md) !important; font-size:13px; }
.alert-info    { background: var(--accent-dim) !important; border: 1px solid rgba(30,157,241,0.2) !important; color: #93d4f8 !important; border-radius: var(--radius-md) !important; font-size:13px; }
.alert-warning { background: var(--amber-dim)  !important; border: 1px solid rgba(245,158,11,0.2) !important; color: #fcd34d !important; border-radius: var(--radius-md) !important; font-size:13px; }
.btn-close { filter: invert(1) brightness(0.5); }

/* ── Page Header ─────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 3px;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.ffl-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Stat Cards ──────────────────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 6px;
}

.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-bottom: 0.75rem;
}

.stat-icon.blue   { background: var(--accent-dim); color: #69c0f5; }
.stat-icon.green  { background: var(--green-dim);  color: #4ade80; }
.stat-icon.amber  { background: var(--amber-dim);  color: #fcd34d; }
.stat-icon.red    { background: var(--red-dim);    color: #f87171; }
.stat-icon.purple { background: var(--west-dim);   color: #69c0f5; }
.stat-icon.teal   { background: var(--midtown-dim);color: #22d3ee; }

/* ── Balance Bar ─────────────────────────────────────────────────────────── */
.balance-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.balance-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.5s ease;
}

.balance-fill.complete { background: var(--green); }
.balance-fill.low      { background: var(--amber); }

/* ── Location Badges ─────────────────────────────────────────────────────── */
.loc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.loc-badge.west    { background: var(--west-dim);    color: #69c0f5; }
.loc-badge.midtown { background: var(--midtown-dim); color: #22d3ee; }
.loc-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ── Status Chips ────────────────────────────────────────────────────────── */
.status-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-chip.scheduled { background: var(--accent-dim); color: #93d4f8; }
.status-chip.completed { background: var(--green-dim);  color: #4ade80; }
.status-chip.missed    { background: var(--red-dim);    color: #f87171; }
.status-chip.cancelled { background: rgba(255,255,255,0.05); color: var(--text-muted); }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.ffl-table {
  width: 100%;
  border-collapse: collapse;
}

.ffl-table th {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  padding: 0 0.875rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.ffl-table td {
  padding: 0.75rem 0.875rem;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

.ffl-table tbody tr:hover td { background: var(--bg-hover); }

/* ── Session Row ─────────────────────────────────────────────────────────── */
.session-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
}

.session-row:last-child { border-bottom: none; padding-bottom: 0; }

.session-time-col {
  min-width: 70px;
  flex-shrink: 0;
}

.time-main {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  display: block;
  line-height: 1.2;
}

.time-sub {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}

.loc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.session-label .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.session-label .meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ── Promo & Event Cards ─────────────────────────────────────────────────── */
.promo-item {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--accent);
}

.promo-item.seasonal { border-left-color: var(--amber); }
.promo-item.pack     { border-left-color: var(--green); }
.promo-item.event    { border-left-color: var(--west); }

.promo-item .p-title { font-size: 13px; font-weight: 600; color: var(--text); }
.promo-item .p-desc  { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-top: 3px; }
.promo-item .p-date  { font-size: 10px; color: var(--text-faint); margin-top: 6px; }

.event-row {
  display: flex;
  gap: 0.875rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

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

.event-date-chip {
  text-align: center;
  background: var(--accent-dim);
  border: 1px solid rgba(30,157,241,0.2);
  border-radius: 6px;
  padding: 4px 8px;
  min-width: 38px;
  flex-shrink: 0;
}

.event-date-chip .e-month { font-size: 9px; font-weight: 700; color: #93d4f8; text-transform: uppercase; letter-spacing: 0.05em; }
.event-date-chip .e-day   { font-size: 16px; font-weight: 800; color: var(--text); line-height: 1.1; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  display: block;
}

.form-control,
.form-select,
textarea.form-control {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-mid) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text) !important;
  font-size: 13px !important;
  padding: 0.5rem 0.75rem !important;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit !important;
}

.form-control::placeholder,
.form-select option { color: var(--text-muted) !important; }

.form-control:focus,
.form-select:focus {
  border-color: var(--border-focus) !important;
  box-shadow: 0 0 0 2px rgba(30,157,241,0.15) !important;
  outline: none !important;
  background: var(--bg-elevated) !important;
  color: var(--text) !important;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 12px !important;
  -webkit-appearance: none !important;
}

.form-select option { background: #1a1a1a; color: var(--text); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary,
.btn-ffl {
  background: var(--accent) !important;
  border: 1px solid transparent !important;
  color: white !important;
  border-radius: var(--radius-sm) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 0.45rem 1rem !important;
  transition: opacity 0.15s, box-shadow 0.15s !important;
  cursor: pointer;
}

.btn-primary:hover,
.btn-ffl:hover {
  opacity: 0.88 !important;
  box-shadow: none !important;
}

.btn-outline-secondary,
.btn-ghost {
  background: transparent !important;
  border: 1px solid var(--border-mid) !important;
  color: var(--text-soft) !important;
  border-radius: var(--radius-sm) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 0.45rem 0.875rem !important;
  transition: background 0.15s, color 0.15s, border-color 0.15s !important;
  cursor: pointer;
}

.btn-outline-secondary:hover,
.btn-ghost:hover {
  background: var(--bg-hover) !important;
  color: var(--text) !important;
  border-color: var(--border-mid) !important;
}

.btn-outline-danger {
  background: transparent !important;
  border: 1px solid rgba(239,68,68,0.3) !important;
  color: #f87171 !important;
  border-radius: var(--radius-sm) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 0.45rem 0.875rem !important;
  transition: background 0.15s !important;
}

.btn-outline-danger:hover { background: var(--red-dim) !important; }

.btn-sm {
  font-size: 11px !important;
  padding: 0.3rem 0.65rem !important;
}

/* ── Conflict Alert ──────────────────────────────────────────────────────── */
#conflictAlert {
  background: var(--red-dim);
  border: 1px solid rgba(239,68,68,0.25);
  color: #f87171;
  border-radius: var(--radius-sm);
  font-size: 12px;
  padding: 0.75rem 1rem;
}

#balanceInfo {
  background: var(--accent-dim);
  border: 1px solid rgba(30,157,241,0.25);
  color: #93d4f8;
  border-radius: var(--radius-sm);
  font-size: 12px;
  padding: 0.75rem 1rem;
}

/* ── Calendar ────────────────────────────────────────────────────────────── */
.fc {
  --fc-border-color: rgba(255,255,255,0.06);
  --fc-button-bg-color: var(--bg-elevated);
  --fc-button-border-color: var(--border-mid);
  --fc-button-hover-bg-color: var(--bg-hover);
  --fc-button-hover-border-color: var(--border-mid);
  --fc-button-active-bg-color: var(--accent);
  --fc-button-active-border-color: var(--accent);
  --fc-button-text-color: var(--text-soft);
  --fc-today-bg-color: rgba(30,157,241,0.05);
  --fc-now-indicator-color: var(--accent);
  --fc-neutral-bg-color: var(--bg-surface);
  --fc-page-bg-color: var(--bg-surface);
  --fc-list-event-hover-bg-color: var(--bg-hover);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.fc .fc-toolbar { padding: 1rem 1.25rem 0; }
.fc .fc-toolbar-title { font-size: 14px !important; font-weight: 700 !important; color: var(--text) !important; letter-spacing: -0.01em; }

.fc .fc-button {
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.3rem 0.7rem !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.fc .fc-col-header-cell-cushion,
.fc .fc-daygrid-day-number {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted) !important;
  text-decoration: none !important;
}

.fc .fc-timegrid-slot-label-cushion {
  font-size: 10px;
  color: var(--text-faint);
}

.fc-event {
  border-radius: 4px !important;
  border: none !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  padding: 1px 4px !important;
}

.fc .fc-timegrid-slot { height: 36px !important; }
.fc .fc-scrollgrid-sync-inner { background: var(--bg-surface); }
.fc td, .fc th { border-color: var(--fc-border-color) !important; }
.fc .fc-view-harness { background: var(--bg-surface); }
.fc-theme-standard .fc-scrollgrid { border-color: var(--border) !important; }
.fc .fc-list-event:hover td { background: var(--bg-hover) !important; }

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.875rem;
}

.filter-select {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 1.75rem 0.35rem 0.625rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  transition: border-color 0.15s;
}

.filter-select:focus { outline: none; border-color: var(--border-mid); }
.filter-select option { background: #1a1a1a; }

.legend-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

/* ── Login ───────────────────────────────────────────────────────────────── */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(30,157,241,0.08) 0%, transparent 100%);
}

.login-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 380px;
}

.login-logo {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  color: white;
  margin: 0 auto 1.5rem;
  letter-spacing: -0.02em;
}

.login-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.login-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 2rem;
}

/* ── Divider ─────────────────────────────────────────────────────────────── */
.ffl-divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}

/* ── Trainerize Button ───────────────────────────────────────────────────── */
.btn-trainerize {
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  padding: 0.4rem 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}

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

/* ── Client avatar grid ──────────────────────────────────────────────────── */
.client-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.client-chip:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border-mid); }

/* ── Error page ──────────────────────────────────────────────────────────── */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.error-code {
  font-size: 5rem;
  font-weight: 900;
  color: var(--text-faint);
  letter-spacing: -0.05em;
  line-height: 1;
}

/* ── Chat message bubbles ─────────────────────────────────────────────────── */
.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 75%;
}
.chat-msg-sent { align-self: flex-end; align-items: flex-end; }
.chat-msg-recv { align-self: flex-start; align-items: flex-start; }
.chat-bubble {
  padding: 0.5rem 0.875rem;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}
.chat-msg-sent .chat-bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg-recv .chat-bubble {
  background: var(--bg-elevated);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.chat-time {
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 3px;
  padding: 0 4px;
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
/*
 * TOP NAV STRATEGY (≤767px / ≤768px via base.html override):
 *
 * iPhone Safari places its URL bar at the BOTTOM (~50px) and the home
 * indicator safe area is ~34px — together ~84px of bottom obstruction.
 * To keep ALL navigation controls out of that danger zone, the topbar is
 * promoted to position:fixed at the TOP of the screen.
 *
 * Safe-area breakdown:
 *   iOS status bar height  → env(safe-area-inset-top)  (~44–54px)
 *   Topbar inner height    → 48px  (0.6rem padding × 2 + ~36px content)
 *   Total push-down        → 48px + env(safe-area-inset-top)
 *
 *   Bottom breathing room  → env(safe-area-inset-bottom) + 50px Safari URL bar
 *
 * The viewport meta MUST include viewport-fit=cover (set in base.html)
 * for env() safe-area values to work on iOS.
 */
@media (max-width: 767px) {
  /* ── Topbar: fixed to top, clear iOS status bar ── */
  .topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding-top: calc(0.6rem + env(safe-area-inset-top, 0px));
    padding-bottom: 0.6rem;
    z-index: 210;
  }

  /* ── Main content: push down by fixed topbar height + status bar ── */
  .main-content {
    margin-left: 0 !important;
    padding-top: calc(48px + env(safe-area-inset-top, 0px));
  }

  /* ── Content area: side padding + bottom safe area for home indicator ── */
  .content-area {
    padding: 1rem;
    padding-bottom: calc(1rem + 50px + env(safe-area-inset-bottom, 0px));
  }

  /* ── Sidebar: start below the fixed topbar, not at top:0 ── */
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
    top: calc(48px + env(safe-area-inset-top, 0px));
    height: calc(100vh - 48px - env(safe-area-inset-top, 0px));
  }

  /* ── Sidebar overlay: also start below the fixed topbar ── */
  .sidebar-overlay {
    top: calc(48px + env(safe-area-inset-top, 0px));
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(0,0,0,0.6);
  }
  /* When open on mobile, treat as expanded so labels show */
  .sidebar.open .nav-label,
  .sidebar.open .brand-text {
    opacity: 1;
    max-width: 160px;
  }
  .sidebar.open .nav-section {
    max-height: 40px;
    opacity: 1;
    padding-top: 0.75rem;
    padding-bottom: 0.25rem;
  }
  .sidebar.open .sidebar-brand { padding: 1.25rem 1rem 1rem; justify-content: flex-start; }
  .sidebar.open .sidebar-nav .nav-link {
    padding: 0.75rem 1rem;
    justify-content: flex-start;
    min-height: 48px;
    font-size: 15px;
    font-weight: 600;
    gap: 12px;
    border-radius: 10px;
  }
  .sidebar.open .sidebar-nav .nav-link i {
    font-size: 20px;
    width: 24px;
    opacity: 0.85;
  }
  .sidebar.open .sidebar-nav .nav-link.active i { opacity: 1; }
  .sidebar.open .sidebar-nav { padding: 0.5rem 0.625rem; }
  .sidebar.open .nav-section {
    font-size: 11px;
    padding-top: 1rem;
    padding-bottom: 0.35rem;
  }
  .sidebar.open .sidebar-footer { padding: 0.75rem; flex-direction: row; justify-content: space-between; }
  .page-title { font-size: 1.1rem; }
}

/* ── Animations & Keyframes ──────────────────────────────────────────────── */
@keyframes fadeInUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes pulseGlow { 0%,100% { box-shadow: none; } 50% { box-shadow: none; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes countUp { from { opacity:0; transform:scale(0.85); } to { opacity:1; transform:scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ringFill { from { stroke-dashoffset: 251; } to { stroke-dashoffset: var(--target-offset, 0); } }

/* ── Enhanced Card Styles ────────────────────────────────────────────────── */
.ffl-card {
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.ffl-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.ffl-card.card-accent-left {
  border-left: 3px solid var(--accent) !important;
}
.ffl-card.card-west {
  border-left: 3px solid var(--west) !important;
}
.ffl-card.card-midtown {
  border-left: 3px solid var(--midtown) !important;
}

/* ── KPI / Stat Cards (Enhanced) ─────────────────────────────────────────── */
.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s ease;
}
.stat-card:hover {
  border-color: var(--border-mid);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-bottom: 0;
}
.stat-icon.accent { background: var(--accent-dim); color: var(--accent); }
.stat-icon.teal   { background: var(--midtown-dim); color: var(--midtown); }
.stat-number {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  animation: countUp 0.4s ease both;
}
.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* ── Status Badges (Enhanced) ────────────────────────────────────────────── */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-status.scheduled { background: var(--accent-dim); color: var(--accent); }
.badge-status.scheduled::before { }
.badge-status.completed { background: var(--green-dim); color: var(--green); }
.badge-status.missed    { background: var(--red-dim); color: var(--red); }
.badge-status.cancelled { background: rgba(255,255,255,0.06); color: var(--text-muted); }

/* ── Location Badges (Enhanced) ──────────────────────────────────────────── */
.loc-badge.west    { border: 1px solid rgba(124,58,237,0.2); }
.loc-badge.midtown { border: 1px solid rgba(6,182,212,0.2); }

/* ── Avatar Initials ─────────────────────────────────────────────────────── */
.user-avatar-lg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}
.user-avatar-lg.trainer { background: var(--west-dim); color: var(--west); }
.user-avatar-lg.client  { background: var(--midtown-dim); color: var(--midtown); }

/* ── Gallery Component ───────────────────────────────────────────────────── */
.ffl-gallery-section {
  margin: 2rem 0;
}
.ffl-gallery-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}
.ffl-gallery-heading {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.ffl-gallery-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}
.ffl-gallery-controls {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.ffl-gallery-controls button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-mid);
  background: var(--bg-elevated);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ffl-gallery-controls button:hover:not(:disabled) {
  border-color: var(--border-mid);
  color: var(--text);
}
.ffl-gallery-controls button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.ffl-gallery {
  overflow: hidden;
}
.ffl-gallery__viewport {
  overflow: hidden;
}
.ffl-gallery__container {
  display: flex;
  gap: 1rem;
  touch-action: pan-y;
}
.ffl-gallery__slide {
  flex: 0 0 320px;
  min-width: 0;
}
.gallery-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
}
.gallery-card:hover {
  border-color: rgba(30,157,241,0.25);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
.gallery-card__img {
  aspect-ratio: 3/2;
  overflow: hidden;
  background: var(--bg-surface);
}
.gallery-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}
.gallery-card:hover .gallery-card__img img {
  transform: scale(1.05);
}
.gallery-card__body {
  padding: 1rem;
}
.gallery-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gallery-card__summary {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.gallery-card__link {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.15s ease;
}
.gallery-card:hover .gallery-card__link { gap: 8px; }

/* ── Quick Action Buttons ─────────────────────────────────────────────────── */
.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s ease;
  cursor: pointer;
  text-align: center;
}
.quick-action-btn i { font-size: 1.25rem; }
.quick-action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}
.quick-action-btn.primary {
  background: linear-gradient(135deg, #1e9df1, #0a7abf);
  border-color: transparent;
  color: #fff;
}
.quick-action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30,157,241,0.4);
  color: #fff;
}

/* ── Enhanced Form Controls ──────────────────────────────────────────────── */
.form-control,
.form-select {
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 3px rgba(30,157,241,0.15);
}

/* ── Custom Scrollbar ────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── Page Header Enhancements ────────────────────────────────────────────── */
.page-header {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.page-title {
  animation: fadeInUp 0.3s ease both;
}

/* ── Enhanced Button ─────────────────────────────────────────────────────── */
.btn-ffl {
  background: linear-gradient(135deg, #1e9df1, #0a7abf) !important;
  border: none !important;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}
.btn-ffl:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(30,157,241,0.4) !important;
}
.btn-ffl:active {
  transform: translateY(0) !important;
}

/* ── Sidebar Nav Link Enhancements ───────────────────────────────────────── */
.nav-link.active {
  background: linear-gradient(90deg, var(--accent-dim), transparent) !important;
  border-left: 2px solid var(--accent) !important;
  padding-left: calc(1.25rem - 2px) !important;
}
.nav-link:hover:not(.active) {
  background: var(--bg-hover) !important;
  transform: translateX(2px);
}

/* ── Responsive Updates ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .ffl-gallery__slide { flex: 0 0 280px; }
  .stat-number { font-size: 1.5rem; }
}

/* ── Comprehensive Mobile Responsive ─────────────────────────────────────── */

/* Tablet (max 991px) */
@media (max-width: 991px) {
  /* KPI / stat grids */
  .stats-grid-4 { grid-template-columns: 1fr 1fr !important; }
  .stats-grid-3 { grid-template-columns: 1fr 1fr !important; }

  /* Two-column splits → stack */
  .col-split-2 { flex-direction: column !important; }

  /* Admin dashboard two-column lower */
  .admin-lower-grid { grid-template-columns: 1fr !important; }

  /* Gallery */
  .ffl-gallery__slide { flex: 0 0 320px; }

  /* Quick actions */
  .quick-actions-row { grid-template-columns: repeat(3, 1fr) !important; }

  /* Stat card compact */
  .stat-card { padding: 1rem !important; }
  .stat-icon { width: 40px; height: 40px; font-size: 1rem; }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {

  /* ── Layout ── */
  .row.g-3 > [class*="col-lg"] { width: 100% !important; }
  .col-lg-7, .col-lg-4, .col-lg-5, .col-lg-8 { width: 100% !important; }

  /* ── Gallery ── */
  .ffl-gallery__slide { flex: 0 0 85vw; max-width: 85vw; }
  .ffl-gallery-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .ffl-gallery-controls { align-self: flex-end; }

  /* ── Stat cards ── */
  .stat-card { padding: 0.875rem !important; gap: 0.75rem; }
  .stat-number { font-size: 1.4rem; }
  .stat-icon { width: 36px; height: 36px; font-size: 0.9rem; }

  /* ── Quick actions ── */
  .quick-actions-row { grid-template-columns: 1fr 1fr !important; gap: 0.5rem !important; }
  .quick-action-btn { padding: 0.75rem 0.5rem; font-size: 11px; }
  .quick-action-btn i { font-size: 1.1rem; }

  /* ── Badge / pill wrapping ── */
  .badge-status, .loc-badge { font-size: 10px; padding: 0.15rem 0.4rem; }

  /* ── Calendar legend bar ── */
  .cal-legend-bar, .loc-legend-bar { flex-wrap: wrap; gap: 0.4rem; }
  .loc-pill { font-size: 10px; padding: 0.2rem 0.5rem; }

  /* ── Client cards grid ── */
  .clients-grid { grid-template-columns: 1fr !important; }

  /* ── Client stats row ── */
  .clients-stats-row { grid-template-columns: 1fr 1fr !important; }
  .clients-stat-card { padding: 0.75rem !important; }

  /* ── Profile header ── */
  .profile-header-inner { flex-direction: column !important; align-items: flex-start !important; }
  .profile-actions { margin-top: 0.75rem; flex-wrap: wrap; }
  .detail-stats-row { grid-template-columns: 1fr 1fr !important; }

  /* ── Session form grid ── */
  .session-form-grid { grid-template-columns: 1fr !important; }

  /* ── Duration pills ── */
  .dur-pills-row { flex-wrap: wrap; gap: 0.375rem; }
  .dur-pill { flex: 1 0 calc(33% - 0.375rem); text-align: center; }

  /* ── Session detail hero ── */
  .sd-hero-inner { flex-direction: column !important; }
  .sd-details-grid { grid-template-columns: 1fr !important; }

  /* ── Admin stat rows ── */
  .admin-stats-row { grid-template-columns: 1fr 1fr !important; }
  .admin-stat-card { padding: 0.75rem !important; }

  /* ── Event timeline ── */
  .event-timeline-row { flex-direction: column !important; gap: 0.5rem !important; }
  .event-date-chip { flex-direction: row !important; padding: 0.4rem 0.75rem !important; min-width: unset !important; }

  /* ── Package cards ── */
  .pkg-cards-grid { grid-template-columns: 1fr !important; }

  /* ── User list table ── */
  .users-table td, .users-table th { padding: 0.5rem 0.75rem !important; }
  .users-table .user-email { display: none; } /* hide email on tiny screens */

  /* ── Error page ── */
  .error-code { font-size: clamp(3.5rem, 15vw, 6rem) !important; }

  /* ── Topbar ── */
  .topbar-user { display: none; }

  /* ── Page header flex ── */
  .page-header { flex-direction: column !important; align-items: flex-start !important; gap: 0.5rem; }
  .page-header > a, .page-header > button { align-self: flex-start; }
}

/* Small mobile (max 480px) */
@media (max-width: 480px) {
  /* Preserve bottom safe-area padding — only tighten top/side */
  .content-area {
    padding: 0.75rem;
    padding-bottom: calc(0.75rem + 50px + env(safe-area-inset-bottom, 0px));
  }
  .ffl-card { padding: 1rem !important; }
  .ffl-gallery__slide { flex: 0 0 92vw; max-width: 92vw; }
  .quick-actions-row { grid-template-columns: 1fr 1fr !important; }
  .clients-stats-row { grid-template-columns: 1fr !important; }
  .detail-stats-row { grid-template-columns: 1fr !important; }
  .admin-stats-row { grid-template-columns: 1fr !important; }
  .stat-card { flex-direction: row; }
}

/* ── Mobile touch-target & layout fixes (P1/P2 audit) ─────────────────────── */

/* Ensure topbar has enough height so sidebar top-offset doesn't gap (Issue 2) */
.topbar { min-height: 48px; }

/* Topbar: hide logout button — sidebar already has Sign Out (Issue 3) */
@media (max-width: 767px) {
  .topbar .logout-btn { display: none !important; }

  /* Hamburger + home button: raise to 44px iOS minimum (Issue 1) */
  #sidebarToggle { min-width: 44px; min-height: 44px; padding: 0 !important; display:flex; align-items:center; justify-content:center; }
  .topbar-home-btn { width: 44px !important; height: 44px !important; }

  /* Calendar nav buttons: 30→44px (Issue 7) */
  .mcal-nav-btn { width: 44px !important; height: 44px !important; }

  /* Session filter toggle buttons: raise touch target (Issue 14) */
  .cal-show-toggle { min-height: 44px; padding: 6px 12px; }

  /* Workout log inputs: raise touch target from ~25px to 44px (Issue 10) */
  .log-field-wrap input { min-height: 44px; padding: 0.75rem 0.6rem; }

  /* Workout form exercise row inputs: P1 fix — raise from ~20px to 44px (Issue 12) */
  .exercise-row input[type="number"],
  .exercise-row input[type="text"] { min-height: 44px; padding: 0.65rem 0.5rem; }

  /* Exercise library: lower minmax so 320px screens get 2 usable columns (Issue 11) */
  .ex-library { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* Filter pills: icon-only text at very small screens so they don't wrap (Issue 6) */
@media (max-width: 479px) {
  #btnAllSessions .btn-text,
  #btnMySessions .btn-text { display: none; }
}
