/* ── Design tokens ─────────────────────────────────────────── */
:root {
  /* Brand — indigo */
  --brand:        #6366f1;
  --brand-dark:   #4f46e5;
  --brand-light:  #eef2ff;
  --brand-muted:  #a5b4fc;

  /* Accent — amber (maker energy, primary CTAs) */
  --accent:       #f97316;
  --accent-dark:  #ea6d09;
  --accent-light: #fff7ed;

  /* Navigation */
  --nav-bg:         #0f172a;
  --nav-text:       #94a3b8;
  --nav-text-hover: #f1f5f9;
  --nav-border:     rgba(255, 255, 255, .06);

  /* Surface */
  --surface:        #ffffff;
  --surface-alt:    #f8fafc;
  --surface-raised: #f1f5f9;

  /* Text */
  --text-1: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;

  /* Borders */
  --border:        #e2e8f0;
  --border-strong: #cbd5e1;

  /* Radius */
  --radius:      10px;
  --radius-sm:   6px;
  --radius-lg:   16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .05);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .12), 0 4px 12px rgba(0, 0, 0, .06);

  /* Category badge colours (matched by data-cat attribute) */
  --cat-equipment-bg:    #fef3c7; --cat-equipment-color:    #92400e;
  --cat-meeting_room-bg: #dbeafe; --cat-meeting_room-color: #1e40af;
  --cat-workbench-bg:    #dcfce7; --cat-workbench-color:    #166534;
  --cat-hot_spot-bg:     #fce7f3; --cat-hot_spot-color:     #9d174d;
  --cat-book-bg:         #f3e8ff; --cat-book-color:         #6b21a8;

  /* Status colours */
  --status-active-bg:      #dcfce7; --status-active-color:    #166534;
  --status-pending-bg:     #fef9c3; --status-pending-color:   #854d0e;
  --status-frozen-bg:      #dbeafe; --status-frozen-color:    #1e40af;
  --status-rejected-bg:    #fee2e2; --status-rejected-color:  #991b1b;
  --status-cancelled-bg:   #fee2e2; --status-cancelled-color: #991b1b;
  --status-completed-bg:   #f3f4f6; --status-completed-color: #374151;
  --status-returned-bg:    #dbeafe; --status-returned-color:  #1e40af;
  --status-suspended-bg:   #fee2e2; --status-suspended-color: #991b1b;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-1);
  background: var(--surface-alt);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
}

h1 {
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-1);
  letter-spacing: -.025em;
  line-height: 1.2;
}

h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 .75rem;
  color: var(--text-1);
  letter-spacing: -.015em;
}

h3 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-2);
}

/* ── Navigation ────────────────────────────────────────────── */
nav {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: var(--nav-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .875rem 2rem;
  border-bottom: 1px solid var(--nav-border);
  gap: 1.5rem;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 2px 12px rgba(0, 0, 0, .3);
}

.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -.01em;
  flex-shrink: 0;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  transition: opacity .15s;
}
.brand:hover { opacity: .85; }
.brand svg { flex-shrink: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-wrap: wrap;
}

.nav-links a,
.nav-links .nav-btn {
  color: var(--nav-text);
  text-decoration: none;
  padding: .4rem .75rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  transition: background .15s, color .15s;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: .75rem;
  right: .75rem;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform .2s cubic-bezier(.4, 0, .2, 1);
}

.nav-links a:hover {
  background: rgba(255, 255, 255, .07);
  color: var(--nav-text-hover);
}

.nav-links a:hover::after { transform: scaleX(1); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  border-radius: var(--radius-sm);
  transition: background .15s;
  order: 3;
  flex-shrink: 0;
}
.hamburger:hover { background: rgba(255, 255, 255, .08); }
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--nav-text);
  border-radius: 1px;
  transition: transform .2s, opacity .2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Avatar dropdown */
.user-menu { position: relative; }

.avatar-btn {
  display: flex;
  align-items: center;
  cursor: pointer;
  list-style: none;
}
.avatar-btn::-webkit-details-marker { display: none; }

.avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  font-weight: 600;
  user-select: none;
  border: 2px solid rgba(255, 255, 255, .2);
  transition: border-color .15s, box-shadow .15s;
}
.avatar-btn:hover .avatar-circle {
  border-color: rgba(255, 255, 255, .5);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .3);
}

.user-dropdown {
  display: none;
  flex-direction: column;
  position: absolute;
  right: 0;
  top: calc(100% + .5rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: 100;
  overflow: hidden;
}
.user-menu[open] .user-dropdown { display: flex; }

.user-dropdown-name {
  padding: .65rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-family: 'Space Grotesk', sans-serif;
}

.user-dropdown a,
.dropdown-logout {
  display: block;
  width: 100%;
  padding: .55rem 1rem;
  color: var(--text-1);
  text-decoration: none;
  font-size: .875rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s;
}
.user-dropdown a:hover,
.dropdown-logout:hover { background: var(--surface-alt); }

/* Avatar icon picker (profile page) */
.avatar-picker { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }

.avatar-option { display: none; }

.avatar-option + label {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}
.avatar-option + label:hover { transform: scale(1.1); }

.avatar-option:checked + label,
.avatar-option + label:hover {
  border-color: var(--brand);
  background: var(--brand-light);
}

.avatar-option-none + label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-2);
  background: var(--surface-alt);
  font-family: 'Space Grotesk', sans-serif;
}

/* ── Flash messages ────────────────────────────────────────── */
.messages { padding: .75rem 2rem 0; }

.flash {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .75rem 1rem .75rem 1.25rem;
  margin-top: .5rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  border: 1px solid transparent;
  border-left-width: 4px;
  transition: opacity .4s, transform .4s;
}
.flash.fade-out { opacity: 0; transform: translateY(-4px); }

.flash-icon {
  flex-shrink: 0;
  font-size: 1rem;
  font-style: normal;
  margin-top: .05rem;
  font-weight: 700;
}

.flash.info    { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; border-left-color: #3b82f6; }
.flash.error   { background: #fef2f2; color: #991b1b; border-color: #fecaca; border-left-color: #ef4444; }
.flash.success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; border-left-color: #22c55e; }
.flash.warning { background: #fffbeb; color: #854d0e; border-color: #fde68a; border-left-color: #f59e0b; }

/* ── Main content container ────────────────────────────────── */
main {
  flex: 1;
  max-width: 520px;
  width: 100%;
  margin: 2.5rem auto;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

/* ── Page header (gradient banner inside main) ─────────────── */
.page-header {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  padding: 1.75rem 2.25rem 1.5rem;
  margin: -2rem -2.25rem 2rem;
  border-radius: var(--radius) var(--radius) 0 0;
  color: #fff;
}
.page-header h1 {
  color: #fff;
  margin-bottom: .2rem;
  font-size: 1.5rem;
}
.page-header p {
  color: rgba(255, 255, 255, .75);
  font-size: .9rem;
  margin: 0;
}

/* ── Typography ────────────────────────────────────────────── */
p { color: var(--text-1); }

/* ── Form elements ─────────────────────────────────────────── */
label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: .3rem;
  margin-top: .85rem;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: .55rem .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: inherit;
  color: var(--text-1);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}

textarea { resize: vertical; min-height: 80px; }

/* Form section card */
.form-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  background: var(--surface);
}

.form-section h2 {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  margin: 0 0 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
  font-family: 'Space Grotesk', sans-serif;
}

.field-hint {
  font-size: .78rem;
  color: var(--text-3);
  margin-top: .25rem;
  line-height: 1.5;
}

/* Two-column field layout */
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ── Submit button ─────────────────────────────────────────── */
button[type="submit"]:not(.btn-cancel):not(.btn-archive):not(.nav-btn):not(.btn-filter):not(.tab-btn) {
  margin-top: 1.25rem;
  width: 100%;
  padding: .65rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Space Grotesk', inherit;
  cursor: pointer;
  letter-spacing: .01em;
  box-shadow: 0 1px 3px rgba(249, 115, 22, .3);
  transition: background .15s, box-shadow .15s;
}
button[type="submit"]:not(.btn-cancel):not(.btn-archive):not(.nav-btn):not(.btn-filter):not(.tab-btn):hover {
  background: var(--accent-dark);
  box-shadow: 0 4px 12px rgba(249, 115, 22, .35);
}

.links {
  margin-top: 1rem;
  font-size: .875rem;
  color: var(--text-2);
}
.links a { color: var(--brand); text-decoration: none; }
.links a:hover { text-decoration: underline; }

/* ── Button system ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background .15s, box-shadow .15s, border-color .15s, transform .1s;
  white-space: nowrap;
  line-height: 1.4;
}
.btn:active { transform: scale(.98); }

.btn-primary, .btn-book, .add-link {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 1px 2px rgba(99, 102, 241, .2);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.btn-primary:hover, .btn-book:hover, .add-link:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  box-shadow: 0 3px 10px rgba(99, 102, 241, .3);
}

.btn-secondary {
  background: var(--surface);
  color: var(--brand);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--brand-light);
  border-color: var(--brand-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--surface-raised); }

.btn-danger, .btn-cancel {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
  display: inline-flex;
  align-items: center;
  padding: .35rem .8rem;
  text-decoration: none;
}
.btn-danger:hover, .btn-cancel:hover { background: #fee2e2; }

.btn-archive {
  background: none;
  border: none;
  color: #991b1b;
  cursor: pointer;
  font-size: .875rem;
  font-family: inherit;
  padding: 0;
}
.btn-archive:hover { text-decoration: underline; }

/* Size variants */
.btn-sm { padding: .28rem .65rem; font-size: .78rem; }
.btn-lg { padding: .7rem 1.5rem; font-size: 1rem; font-weight: 600; }

/* Filter submit button */
.btn-filter {
  display: inline-flex;
  align-items: center;
  padding: .42rem .9rem;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}
.btn-filter:hover { background: var(--brand-dark); }

.btn-clear {
  font-size: .8rem;
  color: var(--text-3);
  padding: .38rem .5rem;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-clear:hover { color: var(--text-2); text-decoration: underline; }

/* ── Shared table styles ───────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

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

th {
  text-align: left;
  padding: .65rem 1rem;
  background: var(--surface-alt);
  border-bottom: 2px solid var(--border);
  color: var(--text-3);
  font-weight: 600;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
  font-family: 'Space Grotesk', sans-serif;
}

td {
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-1);
}

tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--surface-alt); }
tbody tr:hover { background: var(--brand-light); transition: background .1s; }

/* ── Badges ────────────────────────────────────────────────── */
.category-badge,
.status-badge,
.status-active,
.status-cancelled,
.status-other {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .6rem;
  border-radius: var(--radius-full);
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
  font-family: 'Space Grotesk', sans-serif;
}

/* Dot indicator on status badges */
.status-badge::before,
.status-active::before,
.status-cancelled::before,
.status-other::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Category badge default + data-cat overrides */
.category-badge {
  background: var(--brand-light);
  color: #5b21b6;
}
.category-badge[data-cat="equipment"]    { background: var(--cat-equipment-bg);    color: var(--cat-equipment-color); }
.category-badge[data-cat="meeting_room"] { background: var(--cat-meeting_room-bg); color: var(--cat-meeting_room-color); }
.category-badge[data-cat="workbench"]    { background: var(--cat-workbench-bg);    color: var(--cat-workbench-color); }
.category-badge[data-cat="hot_spot"]     { background: var(--cat-hot_spot-bg);     color: var(--cat-hot_spot-color); }
.category-badge[data-cat="book"]         { background: var(--cat-book-bg);         color: var(--cat-book-color); }

/* Status badge variants */
.status-active,
.badge-active   { background: var(--status-active-bg);    color: var(--status-active-color); }
.badge-pending  { background: var(--status-pending-bg);   color: var(--status-pending-color); }
.badge-frozen   { background: var(--status-frozen-bg);    color: var(--status-frozen-color); }
.status-cancelled,
.badge-rejected,
.badge-cancelled,
.badge-suspended { background: var(--status-rejected-bg); color: var(--status-rejected-color); }
.badge-completed { background: var(--status-completed-bg); color: var(--status-completed-color); }
.badge-returned  { background: var(--status-returned-bg);  color: var(--status-returned-color); }
.status-other    { background: #f3f4f6; color: var(--text-2); }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s, transform .15s;
  box-shadow: var(--shadow-xs);
}
.card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--brand);
  border-radius: var(--radius) 0 0 var(--radius);
  opacity: 0;
  transition: opacity .2s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-muted);
  transform: translateY(-2px);
}
.card:hover::before { opacity: 1; }
.card h2 { font-size: 1rem; margin-bottom: .35rem; color: var(--text-1); margin-top: 0; }
.card p  { font-size: .875rem; color: var(--text-2); margin: 0; line-height: 1.5; }
.card.disabled { opacity: .45; pointer-events: none; }

.card-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--brand);
}

/* ── Resource card grid (member resources page) ────────────── */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.resource-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .15s;
  box-shadow: var(--shadow-xs);
}
.resource-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.resource-card-img {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-raised);
}
.resource-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}
.resource-card:hover .resource-card-img img { transform: scale(1.05); }

.resource-card-img .category-badge {
  position: absolute;
  top: .65rem;
  left: .65rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .6);
}

.resource-card-body {
  padding: 1rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.resource-card-name  { font-weight: 700; font-size: .95rem; color: var(--text-1); font-family: 'Space Grotesk', sans-serif; }
.resource-card-desc  { font-size: .82rem; color: var(--text-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.resource-card-avail { font-size: .78rem; color: var(--text-2); margin-top: auto; padding-top: .25rem; }

.location-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  color: var(--text-3);
  background: var(--surface-alt);
  border-radius: var(--radius-full);
  padding: .15rem .55rem;
  width: fit-content;
  border: 1px solid var(--border);
}

.resource-card-footer {
  padding: .75rem 1.1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-alt);
  gap: .5rem;
}

/* ── Category filter pills ─────────────────────────────────── */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.filter-pill {
  padding: .35rem .85rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  background: var(--surface);
  transition: background .15s, border-color .15s, color .15s;
  cursor: pointer;
}
.filter-pill:hover {
  border-color: var(--brand-muted);
  color: var(--brand);
  background: var(--brand-light);
}
.filter-pill.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* ── Filter bar (admin) ────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: .75rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.filter-bar label {
  font-size: .7rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  display: block;
  margin-bottom: .3rem;
  margin-top: 0;
}
.filter-bar select {
  font-size: .875rem;
  padding: .38rem .65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-1);
  width: auto;
}

/* ── Tabs (my bookings) ────────────────────────────────────── */
.tab-bar {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
  gap: 0;
}
.tab-btn {
  padding: .6rem 1.25rem;
  border: none;
  background: none;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: 'Space Grotesk', inherit;
  transition: color .15s, border-color .15s;
}
.tab-btn:hover { color: var(--brand); }
.tab-btn.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Info box / admin notice ───────────────────────────────── */
.info-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: .875rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.info-box strong { color: var(--text-1); }

.admin-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-sm);
  padding: .7rem 1rem;
  font-size: .82rem;
  color: #78350f;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.admin-notice strong { display: block; margin-bottom: .2rem; font-size: .85rem; }

/* ── Form actions row ──────────────────────────────────────── */
.form-actions {
  display: flex;
  gap: .75rem;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

/* ── Action forms (inline in table rows) ───────────────────── */
.action-forms {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  align-items: center;
}
.action-link {
  color: var(--brand);
  text-decoration: none;
  font-size: .875rem;
  margin-right: .5rem;
}
.action-link:hover { text-decoration: underline; }

/* ── Pagination ────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.5rem;
  font-size: .875rem;
}
.pagination a {
  padding: .35rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--brand);
  text-decoration: none;
  background: var(--surface);
  transition: background .12s, border-color .12s;
}
.pagination a:hover {
  background: var(--brand-light);
  border-color: var(--brand-muted);
}
.pagination .current-page {
  padding: .35rem .75rem;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}

/* ── Empty states ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3.5rem 2rem;
}
.empty-state .empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  color: var(--text-3);
  opacity: .5;
}
.empty-state p {
  font-size: .95rem;
  color: var(--text-2);
  margin-top: .35rem;
}
.empty {
  text-align: center;
  color: var(--text-3);
  padding: 2.5rem 0;
  font-size: .9rem;
}

/* ── Stat cards (super admin stats) ────────────────────────── */
.stat-cards {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  min-width: 140px;
  flex: 1;
  box-shadow: var(--shadow-xs);
}
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-1);
  line-height: 1;
}
.stat-label {
  font-size: .72rem;
  color: var(--text-3);
  margin-top: .35rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
}

/* ── Timeline (audit log) ──────────────────────────────────── */
.timeline {
  list-style: none;
  position: relative;
  padding-left: 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: .85rem;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--border);
  border-radius: 1px;
}
.timeline-item {
  position: relative;
  padding-left: 2.75rem;
  padding-bottom: 1.5rem;
}
.timeline-dot {
  position: absolute;
  left: .4rem;
  top: .35rem;
  width: .95rem;
  height: .95rem;
  border-radius: 50%;
  background: var(--brand-muted);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--brand-muted);
}
.timeline-ts {
  font-size: .72rem;
  color: var(--text-3);
  margin-bottom: .2rem;
  font-family: monospace;
}
.timeline-action {
  font-size: .85rem;
  font-family: 'Space Grotesk', monospace;
  color: var(--brand);
  font-weight: 600;
}
.timeline-actor {
  font-size: .82rem;
  color: var(--text-2);
}
.timeline-subject {
  font-size: .78rem;
  color: var(--text-3);
  margin-top: .1rem;
}
.timeline-payload details summary {
  font-size: .75rem;
  color: var(--text-3);
  cursor: pointer;
  margin-top: .35rem;
}
.timeline-payload details summary:hover { color: var(--brand); }
.timeline-payload pre {
  font-size: .72rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .5rem .75rem;
  max-height: 10rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin-top: .35rem;
}

/* ── Auth split layout ─────────────────────────────────────── */
.auth-split {
  display: flex;
  min-height: calc(100vh - 60px);
  max-width: none;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0 auto;
  border-radius: 0;
}
.auth-panel {
  flex: 0 0 400px;
  background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 100%);
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1.5rem;
  color: #fff;
}
.auth-panel .panel-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}
.auth-panel .panel-tagline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -.02em;
}
.auth-panel .panel-tagline em {
  font-style: normal;
  color: var(--accent);
}
.auth-panel .panel-sub {
  font-size: .9rem;
  color: var(--nav-text);
  line-height: 1.6;
  max-width: 300px;
}
.auth-panel .panel-dots {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  opacity: .2;
}
.auth-panel .panel-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  display: block;
}
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: var(--surface);
}
.auth-form-inner {
  width: 100%;
  max-width: 380px;
}
.auth-form-inner h1 { margin-bottom: .25rem; }
.auth-form-inner > p { font-size: .9rem; color: var(--text-2); margin-bottom: 1.25rem; }

/* ── Section groups (super admin dashboard) ────────────────── */
.section-group { margin-bottom: 2.5rem; }
.section-heading {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 .75rem;
  font-family: 'Space Grotesk', sans-serif;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.section-group-warning .section-heading { color: var(--status-pending-color); }
.section-group-active  .section-heading { color: var(--status-active-color); }
.section-group-suspended .section-heading { color: var(--status-rejected-color); }

/* ── Misc shared ───────────────────────────────────────────── */
.new-booking-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--brand);
  text-decoration: none;
  font-size: .9rem;
}
.new-booking-link:hover { text-decoration: underline; }

.badge-soon {
  display: inline-block;
  margin-left: .4rem;
  font-size: .65rem;
  padding: .1rem .45rem;
  background: var(--surface-raised);
  color: var(--text-3);
  border-radius: var(--radius-full);
  vertical-align: middle;
  font-weight: 600;
  letter-spacing: .04em;
}

.tag-admin {
  font-size: .7rem;
  color: var(--text-3);
  font-weight: 500;
  margin-left: .35rem;
}

/* ── Super admin context override ──────────────────────────── */
.super-admin-context nav {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 2px solid var(--accent);
}
.super-admin-context .brand { color: #fbbf24; }
.super-admin-context .brand svg { color: #fbbf24; }

/* ── Footer ────────────────────────────────────────────────── */
footer {
  background: var(--nav-bg);
  color: var(--nav-text);
  padding: 3rem 2rem 0;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, .05);
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.footer-brand .brand {
  font-size: 1rem;
  margin-bottom: .6rem;
  display: inline-flex;
}
.footer-brand p {
  font-size: .875rem;
  color: var(--text-3);
  line-height: 1.6;
  max-width: 260px;
}

.footer-col h4 {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #fff;
  margin-bottom: .85rem;
  font-family: 'Space Grotesk', sans-serif;
}
.footer-col a {
  display: block;
  color: var(--nav-text);
  text-decoration: none;
  font-size: .875rem;
  margin-bottom: .45rem;
  transition: color .15s;
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.footer-bottom p { font-size: .8rem; color: var(--text-3); }
.footer-version { font-size: .72rem; color: var(--text-3); font-family: monospace; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  main { margin: 1.5rem 1rem; padding: 1.5rem 1.25rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .auth-panel { flex: 0 0 320px; }
  .auth-panel .panel-tagline { font-size: 1.6rem; }
}

@media (max-width: 700px) {
  .auth-split { flex-direction: column; min-height: auto; }
  .auth-panel { flex: none; min-height: 180px; padding: 2rem 1.5rem; gap: .75rem; }
  .auth-panel .panel-tagline { font-size: 1.4rem; }
}

@media (max-width: 640px) {
  nav { padding: .75rem 1rem; }
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: 56px;
    left: 0; right: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    flex-direction: column;
    padding: 1rem;
    gap: .25rem;
    z-index: 199;
    border-bottom: 1px solid var(--nav-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  }
  .nav-links.open { display: flex; }
  .nav-links a, .nav-links .nav-btn { width: 100%; padding: .7rem 1rem; }
  .user-dropdown { position: fixed; right: 1rem; top: auto; }
  main { margin: 1rem .5rem; padding: 1.25rem 1rem; border-radius: var(--radius-sm); }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .resource-grid { grid-template-columns: 1fr; }
  .row-2 { grid-template-columns: 1fr; }
  .stat-cards { flex-direction: column; }
}
