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

:root {
  --bg:           #ffffff;
  --bg-secondary: #f6f6f6;
  --border:       #e8e8e8;
  --text:         #111111;
  --muted:        #888888;
  --radius:       8px;
  --font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.hidden { display: none !important; }

/* ── Header ── */

header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 16px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.logo {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
  white-space: nowrap;
}

.header-divider { color: var(--border); }
.header-club    { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.nav-btn {
  font-family: var(--font);
  font-size: 13px;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
  position: relative;
}

.nav-btn:hover  { background: var(--bg-secondary); color: var(--text); }
.nav-btn.active { background: var(--text); color: #fff; }

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px;
  margin-left: 4px;
  vertical-align: middle;
}

.nav-sep  { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.nav-user { font-size: 13px; color: var(--muted); white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.nav-user-btn {
  font-size: 13px !important;
  color: var(--muted) !important;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-style: dotted;
}
.nav-user-btn:hover { color: var(--text) !important; }

.lang-btn {
  font-size: 16px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 3px 5px;
  border-radius: var(--radius);
  opacity: 0.35;
  transition: opacity 0.12s;
  line-height: 1;
}
.lang-btn:hover  { opacity: 0.65; }
.lang-btn.active { opacity: 1; }

/* ── Layout ── */

#app-main { padding: 40px 0; }

.page-section        { }
.page-section.narrow { max-width: 420px; margin: 0 auto; }

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.view-header h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

/* ── Back link ── */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  margin-bottom: 20px;
}
.back-link:hover { color: var(--text); }

/* ── Buttons ── */

.btn {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  padding: 8px 16px;
  cursor: pointer;
  transition: opacity 0.12s;
  white-space: nowrap;
}

.btn:hover    { opacity: 0.75; }
.btn:disabled { opacity: 0.38; cursor: not-allowed; }

.btn-primary   { background: var(--text); color: #fff; }
.btn-secondary { background: var(--bg-secondary); color: var(--text); }
.btn-outline   { background: none; color: var(--text); border: 1px solid var(--border); }
.btn-full      { width: 100%; text-align: center; }

.btn-xs { font-size: 12px; padding: 5px 10px; border: 1px solid var(--border); background: none; color: var(--text); }

.btn-approve { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.btn-approve:hover { opacity: 1; background: #dcfce7; }
.btn-reject  { border-color: #fecaca; background: #fef2f2; color: #dc2626; }
.btn-reject:hover  { opacity: 1; background: #fee2e2; }

/* ── Forms ── */

.form-stack { display: flex; flex-direction: column; gap: 16px; }

.form-group         { display: flex; flex-direction: column; gap: 7px; }
.form-group label   {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"] {
  font-family: var(--font);
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  width: 100%;
}
.form-group input:focus { border-color: var(--text); }

.form-error {
  font-size: 13px;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 10px 12px;
}

.form-hint { font-size: 12px; color: var(--muted); }

/* ── Club selector ── */

.clubs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.club-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.12s;
}
.club-card:hover { border-color: #aaa; }

.club-icon { font-size: 22px; margin-bottom: 12px; }
.club-name { font-size: 14px; font-weight: 600; }
.club-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }

.clubs-footer { margin-top: 8px; }

/* ── Auth card ── */

.auth-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }

.auth-tabs { display: flex; border-bottom: 1px solid var(--border); }

.auth-tab {
  flex: 1;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: none;
  padding: 14px;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color 0.12s, border-color 0.12s;
  margin-bottom: -1px;
}
.auth-tab.active { color: var(--text); border-bottom-color: var(--text); }

.auth-body { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.auth-hint { font-size: 12px; color: var(--muted); text-align: center; }

/* ── Date input ── */

.date-input {
  font-family: var(--font);
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  cursor: pointer;
}
.date-input:focus { border-color: var(--text); }

/* ── Spaces ── */

.spaces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.space-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.12s;
}
.space-card:hover { border-color: #bbb; }

.space-header   { display: flex; align-items: center; gap: 12px; }
.space-icon     {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.space-name     { font-size: 14px; font-weight: 600; }
.space-category { font-size: 12px; color: var(--muted); margin-top: 1px; }

.avail-label { font-size: 12px; color: var(--muted); }
.avail-bar   { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: 5px; }
.avail-fill  { height: 100%; border-radius: 2px; background: var(--text); transition: width 0.3s; }
.avail-fill.low  { background: #f59e0b; }
.avail-fill.none { background: var(--bg-secondary); }

/* ── Booking groups & items ── */

.booking-group        { margin-bottom: 28px; }
.booking-group.past   { opacity: 0.5; }

.booking-date-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.today-badge {
  font-size: 10px;
  background: var(--text);
  color: #fff;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.booking-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.booking-item.conflict-item { border-color: #fbbf24; background: #fffbeb; }

.booking-icon {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}

.booking-info   { flex: 1; min-width: 120px; }
.booking-space  { font-size: 14px; font-weight: 500; }
.admin-team-label { font-weight: 600; }
.booking-title  { font-size: 13px; font-weight: 500; margin-top: 2px; }
.booking-desc   { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 1px; }
.booking-meta   { font-size: 12px; color: var(--muted); margin-top: 2px; }
.booking-actions { display: flex; gap: 6px; }
.booking-actions-grouped { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.booking-actions-row     { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ── Status badges ── */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.status-pending  { color: #92400e; background: #fef3c7; }
.status-approved { color: #065f46; background: #d1fae5; }
.status-rejected { color: #7f1d1d; background: #fee2e2; }

/* Conflict badge (inline) */
.conflict-badge {
  display: inline-flex;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: #fef3c7;
  color: #92400e;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Filter tabs ── */

.filter-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }

.search-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.search-bar select,
.search-bar input[type="date"],
.search-bar input[type="text"] {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  height: 34px;
  box-sizing: border-box;
}
.search-bar input[type="text"] { flex: 1; min-width: 180px; }
.search-bar select            { min-width: 130px; }
.search-bar input[type="date"]{ min-width: 140px; }

.filter-tab {
  font-family: var(--font);
  font-size: 13px;
  border: 1px solid var(--border);
  background: none;
  border-radius: 20px;
  padding: 5px 14px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.12s;
}
.filter-tab.active { background: var(--text); color: #fff; border-color: var(--text); }

/* ── Modal ── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}

.modal {
  background: var(--bg);
  border-radius: 12px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 15px; font-weight: 600; }

.modal-close {
  background: none; border: none;
  font-size: 22px; line-height: 1;
  cursor: pointer; color: var(--muted);
  padding: 2px 5px;
}

.modal-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-footer {
  padding: 16px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.modal-footer-col { flex-direction: column; }

/* ── Time slots ── */

.time-slots {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}

.time-slot {
  font-family: var(--font);
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 4px;
  text-align: center;
  cursor: pointer;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.1s, background 0.1s;
}
.time-slot:hover:not([disabled]):not(.selected) { border-color: var(--text); }
.time-slot.selected   { background: var(--text); color: #fff; border-color: var(--text); }
.time-slot.taken      { background: var(--bg-secondary); color: var(--muted); cursor: not-allowed; text-decoration: line-through; }
.time-slot.mine       { background: #eff6ff; color: #3b82f6; border-color: #bfdbfe; cursor: default; }
.time-slot.contested  { border-color: #fbbf24; color: #92400e; }

/* ── Conflict modal ── */

.conflict-desc { font-size: 14px; margin-bottom: 18px; }

.conflict-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.conflict-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.conflict-label         { font-size: 11px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.conflict-name          { font-size: 14px; font-weight: 500; }
.conflict-booking-title { font-size: 13px; font-weight: 500; color: var(--text); margin-top: 2px; }
.conflict-vs            { font-size: 13px; color: var(--muted); text-align: center; }

/* ── Users list ── */

.user-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  flex-shrink: 0;
}

.user-info   { flex: 1; min-width: 120px; }
.user-name   { font-size: 14px; font-weight: 500; }
.user-email  { font-size: 12px; color: var(--muted); margin-top: 1px; }
.user-actions { display: flex; gap: 6px; }

.role-badge {
  font-size: 11px; font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.role-admin      { background: var(--text); color: #fff; }
.role-moderator  { background: #6366f1; color: #fff; }
.role-member     { background: var(--bg-secondary); color: var(--muted); }

.you-label { font-size: 12px; color: var(--muted); }

/* ── Groups ── */
.group-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.group-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.group-name { font-size: 15px; font-weight: 600; margin: 0; }
.group-actions { display: flex; gap: 6px; }
.group-restrictions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.group-restriction-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.group-restriction-label { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; min-width: 100px; flex-shrink: 0; }
.group-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.group-chip { font-size: 12px; padding: 3px 9px; background: var(--bg-secondary); border-radius: 20px; border: 1px solid var(--border); }
.group-chip-all  { background: none; border-color: transparent; color: var(--muted); padding-left: 0; }
.group-chip-none { background: none; border-color: transparent; color: var(--muted); padding-left: 0; }
.group-members-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.group-member-count { font-size: 13px; font-weight: 500; }
.group-member-initials { display: flex; gap: 3px; }
.group-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--text); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.group-avatar-more { background: var(--muted); font-size: 10px; }
.group-avatar-sm   { width: 24px; height: 24px; font-size: 11px; }

/* Group modal */
.modal-lg { max-width: 580px; }
.group-modal-section { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 4px; }
.group-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
  margin-top: 8px;
}
.group-check-item {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; padding: 7px 10px;
  border-radius: 8px; border: 1px solid var(--border);
  font-size: 13px; user-select: none;
}
.group-check-item:hover { background: var(--bg-secondary); }
.group-check-item input[type="checkbox"] { width: 15px; height: 15px; flex-shrink: 0; cursor: pointer; }
.group-member-list {
  max-height: 220px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
  border: 1px solid var(--border); border-radius: 8px; padding: 5px;
}
.group-member-item { border: none !important; border-radius: 6px; }
.group-member-email { color: var(--muted); font-size: 12px; }

/* ── Empty state ── */

.empty-state { text-align: center; padding: 64px 24px; color: var(--muted); }
.empty-state h3 { font-size: 15px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.empty-state p  { font-size: 14px; }

/* ── Toast ── */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 11px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  z-index: 300;
  white-space: nowrap;
  animation: fadeUp 0.18s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── View header right group ── */

.view-header-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── Paused space ── */

.space-card.paused { opacity: 0.6; }

.paused-badge {
  display: inline-flex;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: #fef3c7;
  color: #92400e;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.paused-note { font-size: 12px; color: var(--muted); }

.space-admin-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}

/* ── Time slot range selection ── */

.time-slot.in-range {
  background: #e5e7eb;
  border-color: #9ca3af;
  color: var(--text);
}

.time-slot.range-start { border-radius: 6px 0 0 6px; }
.time-slot.range-end   { border-radius: 0 6px 6px 0; }

.range-summary {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  min-height: 18px;
}

.repeat-preview {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.series-badge {
  display: inline-flex;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: #ede9fe;
  color: #5b21b6;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Icon picker ── */

.icon-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
}

.icon-opt {
  font-size: 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 4px;
  background: none;
  cursor: pointer;
  line-height: 1;
  transition: border-color 0.1s, background 0.1s;
}

.icon-opt:hover    { border-color: #aaa; background: var(--bg-secondary); }
.icon-opt.selected { border-color: var(--text); background: var(--bg-secondary); }

/* ── Select input ── */

.form-group select {
  font-family: var(--font);
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  width: 100%;
  cursor: pointer;
}

.form-group select:focus { border-color: var(--text); }

.form-group textarea {
  font-family: var(--font);
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  width: 100%;
  resize: vertical;
  min-height: 72px;
  line-height: 1.5;
}
.form-group textarea:focus { border-color: var(--text); }

.field-required { color: #dc2626; margin-left: 2px; }
.field-optional  { font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 11px; }

/* ── Conflict time ── */

.conflict-time { font-size: 12px; color: var(--muted); margin-bottom: 4px; }

/* ── Calendar filter bar ── */
.cal-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.cal-filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cal-filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-right: 2px;
}
.cal-team-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  user-select: none;
  transition: opacity .15s, border-color .15s;
}
.cal-team-chip:has(input:not(:checked)) { opacity: 0.35; }
.cal-team-chip:has(input[data-team-id]:checked) { border-color: var(--chip-color, var(--primary)); }
.cal-team-chip input[type="checkbox"] { display: none; }
.cal-team-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Declined bulk-delete controls ── */
.declined-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.decline-cb {
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--danger, #ef4444);
}

/* ── Calendar ── */

.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.cal-title { font-size: 18px; font-weight: 600; }
.btn-sm { padding: 4px 12px; font-size: 18px; line-height: 1; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 0 8px;
}
.cal-day {
  min-height: 72px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.cal-day.other-month  { opacity: 0.25; background: var(--bg-secondary); }
.cal-day.is-today     { border-color: var(--text); border-width: 2px; }
.cal-day.is-past      { background: var(--bg-secondary); }
.cal-day.clickable    { cursor: pointer; }
.cal-day.clickable:hover { border-color: var(--text); }
.cal-day-num { font-size: 11px; font-weight: 600; margin-bottom: 3px; color: var(--muted); }
.cal-booking-pill {
  display: block;
  font-size: 10px;
  padding: 3px 5px;
  border-radius: 4px;
  background: var(--text);
  color: #fff;
  margin-top: 3px;
  overflow: hidden;
  line-height: 1.4;
}
.pill-meta {
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0.88;
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
}
.pill-id   { font-weight: 700; }
.pill-sep  { opacity: 0.6; }
.pill-icon { }
.pill-time { }
.pill-title {
  display: block;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-more { font-size: 10px; color: var(--muted); display: block; margin-top: 2px; }

.cal-export-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

/* ── Super admin ── */

.sa-clubs-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.sa-club-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

/* ── Footer ── */

footer {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  text-align: center;
  margin-top: 48px;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.footer-center { display: flex; align-items: center; gap: 12px; }
.footer-admin-btn {
  font-size: 11px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius);
  opacity: 0.4;
  transition: opacity 0.15s;
}
.footer-admin-btn:hover { opacity: 1; }
.footer-copy {
  font-size: 11px;
  color: var(--muted);
}
.footer-copy a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-copy a:hover { color: var(--text); }
.footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.footer-changelog-btn {
  font-size: 10px;
  color: var(--muted);
  opacity: 0.5;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  transition: opacity .15s;
  font-family: inherit;
}
.footer-changelog-btn:hover { opacity: 0.9; }
.footer-build {
  font-size: 10px;
  color: var(--muted);
  opacity: 0.4;
  font-family: monospace;
}

/* ── Changelog modal ── */
.cl-entry { margin-bottom: 20px; }
.cl-entry:last-child { margin-bottom: 0; }
.cl-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.cl-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cl-list li { font-size: 13px; color: var(--text); }

/* ── Teams ── */
.teams-list { display: flex; flex-direction: column; gap: 10px; }
.team-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.team-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(0,0,0,0.1);
}
.team-info { flex: 1; display: flex; align-items: center; gap: 10px; }
.team-ident {
  font-size: 11px;
  color: var(--muted);
  font-family: monospace;
  background: var(--surface);
  padding: 1px 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.team-actions { display: flex; gap: 6px; }

/* ── Responsive ── */

@media (max-width: 640px) {
  #app-main { padding: 28px 0; }

  .view-header { margin-bottom: 20px; }
  .view-header h1 { font-size: 19px; }

  .spaces-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

  .time-slots { grid-template-columns: repeat(3, 1fr); }

  .conflict-grid { grid-template-columns: 1fr; }
  .conflict-vs   { display: none; }

  .nav-user { display: none; }
  .nav-sep  { display: none; }

  .clubs-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
  .spaces-grid { grid-template-columns: 1fr; }
  .time-slots  { grid-template-columns: repeat(2, 1fr); }
  .clubs-grid  { grid-template-columns: 1fr; }
}
