/* ================================================================
   KitNinja – Main Stylesheet
   Light / Dark mode via [data-theme="dark"] on <html>
   ================================================================ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  /* Brand */
  --brand:        #6366F1;
  --brand-dark:   #4F46E5;
  --brand-light:  #EEF2FF;
  --brand-text:   #FFFFFF;

  /* Status */
  --success:      #10B981;
  --success-bg:   #ECFDF5;
  --warning:      #F59E0B;
  --warning-bg:   #FFFBEB;
  --danger:       #EF4444;
  --danger-bg:    #FEF2F2;
  --info:         #3B82F6;
  --info-bg:      #EFF6FF;

  /* Layout – Light */
  --bg:           #F0F4FF;
  --surface:      #FFFFFF;
  --surface-2:    #F8FAFF;
  --surface-3:    #EEF2FF;
  --border:       #E2E8F0;
  --border-focus: #6366F1;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:       0 4px 12px rgba(0,0,0,.1);
  --shadow-lg:    0 10px 30px rgba(0,0,0,.12);

  /* Typography – Light */
  --text:         #0F172A;
  --text-2:       #334155;
  --text-muted:   #64748B;
  --text-subtle:  #94A3B8;

  /* Misc */
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --radius-xl:    24px;
  --transition:   .2s ease;
  --font:         'Inter', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --bg:           #080E1D;
  --surface:      #111827;
  --surface-2:    #1A2235;
  --surface-3:    #1E2A42;
  --border:       #2D3748;
  --border-focus: #818CF8;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.4);
  --shadow:       0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:    0 10px 40px rgba(0,0,0,.6);
  --text:         #F1F5F9;
  --text-2:       #CBD5E1;
  --text-muted:   #94A3B8;
  --text-subtle:  #64748B;
  --brand-light:  #1E2040;
  --success-bg:   #064E3B;
  --warning-bg:   #78350F;
  --danger-bg:    #7F1D1D;
  --info-bg:      #1E3A5F;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Typography ─────────────────────────────────────────────── */
h1 { font-size: 2rem;   font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 1rem;   font-weight: 600; }
p  { color: var(--text-2); }
small { font-size: .85rem; color: var(--text-muted); }

/* ── Utility ────────────────────────────────────────────────── */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem;  }
.mt-3 { margin-top: 1.5rem;}
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}
.navbar-logo {
  height: 42px;
  width: auto;
  display: block;
}
.navbar-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
  list-style: none;
}
.navbar-nav a {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .8rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.navbar-nav a:hover, .navbar-nav a.active {
  background: var(--surface-3);
  color: var(--brand);
}
.navbar-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.user-badge {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: .85rem;
}
.role-chip {
  padding: .15rem .5rem;
  border-radius: 9999px;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.role-chip.newuser           { background: var(--surface-3);  color: var(--text-muted); }
.role-chip.l4-sport-media    { background: #FEF9C3;           color: #854D0E; }
.role-chip.l5-sport-media    { background: var(--info-bg);    color: var(--info); }
.role-chip.l6-sport-media    { background: #F0FAFB;           color: #0E7490; }
.role-chip.l7-sport-broadcast{ background: #FDF4FF;           color: #7E22CE; }
.role-chip.staff             { background: var(--success-bg); color: var(--success); }
.role-chip.administrator     { background: var(--brand-light);color: var(--brand); }
[data-theme="dark"] .role-chip.l4-sport-media     { background: #422006; color: #FCD34D; }
[data-theme="dark"] .role-chip.l6-sport-media     { background: #0C2D38; color: #22D3EE; }
[data-theme="dark"] .role-chip.l7-sport-broadcast { background: #2E1065; color: #D8B4FE; }

/* ── Theme toggle button ─────────────────────────────────────── */
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition);
}
.theme-toggle:hover {
  background: var(--surface-2);
  color: var(--brand);
  border-color: var(--brand);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
}
.btn:disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); text-decoration: none; }
.btn-secondary {
  background: var(--surface);
  color: var(--text-2);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface-2); text-decoration: none; }
.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover { opacity: .88; text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.btn-sm { padding: .4rem .85rem; font-size: .82rem; }
.icon-btn { padding: .4rem .5rem; font-size: 1rem; line-height: 1; min-width: 2rem; text-align: center; }
.btn-lg { padding: .8rem 1.75rem; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-loading { position: relative; color: transparent !important; }
.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  color: #fff;
}

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-2);
}
.form-label span { color: var(--danger); margin-left: 2px; }
.form-control {
  padding: .65rem .9rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  width: 100%;
}
.form-control::placeholder { color: var(--text-subtle); }
.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.form-control.error { border-color: var(--danger); }
.form-control.success { border-color: var(--success); }
.form-hint { font-size: .78rem; color: var(--text-muted); }
.form-error { font-size: .8rem; color: var(--danger); display: flex; align-items: center; gap: .3rem; }
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrapper .form-control { padding-right: 2.5rem; }
.input-icon {
  position: absolute;
  right: .75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.input-icon:hover { color: var(--text); }

/* Password strength */
.pw-strength { display: flex; flex-direction: column; gap: .3rem; margin-top: .25rem; }
.pw-bar-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.pw-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .3s, background .3s;
}
.pw-label { font-size: .75rem; font-weight: 600; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card-body { padding: 1.5rem; }
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* ── Auth Page ──────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  gap: 1.5rem;
}
.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  text-align: center;
}
.auth-logo-img {
  width: 280px;
  max-width: 90vw;
  height: auto;
  display: block;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 460px;
  overflow: hidden;
}

/* Tabs */
.auth-tabs {
  display: flex;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.auth-tab {
  flex: 1;
  padding: .9rem 1rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.auth-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  background: var(--surface);
}
.auth-tab:hover:not(.active) { color: var(--text-2); }
.auth-panel { padding: 1.75rem; display: flex; flex-direction: column; gap: 1.1rem; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--text-subtle);
  font-size: .8rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Alert / Toast ───────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .9rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .87rem;
  line-height: 1.5;
}
.alert-icon { font-size: 1rem; flex-shrink: 0; margin-top: .05rem; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success); }
.alert-error   { background: var(--danger-bg);  color: var(--danger);  border: 1px solid var(--danger); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning); }
.alert-info    { background: var(--info-bg);    color: var(--info);    border: 1px solid var(--info); }

/* Toast */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  max-width: 360px;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: .85rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .87rem;
  animation: slideIn .3s ease;
}
.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast-msg  { flex: 1; color: var(--text-2); }
.toast-close { background: none; border: none; color: var(--text-muted); font-size: 1rem; padding: 0; line-height: 1; }
.toast-close:hover { color: var(--text); }
.toast.success .toast-icon { color: var(--success); }
.toast.error   .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info    .toast-icon { color: var(--info); }

/* ── Page Layout ─────────────────────────────────────────────── */
.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.page-header {
  margin-bottom: 2rem;
}
.page-header h2 { display: flex; align-items: center; gap: .6rem; }
.page-header p   { color: var(--text-muted); margin-top: .3rem; }

/* ── View toggle ─────────────────────────────────────────────── */
.view-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  margin-left: auto;
}
.view-toggle-btn {
  padding: .38rem .8rem;
  font-size: .85rem;
  font-weight: 500;
  background: var(--surface);
  border: none;
  cursor: pointer;
  color: var(--text-2);
  transition: background var(--transition), color var(--transition);
  line-height: 1;
  white-space: nowrap;
}
.view-toggle-btn + .view-toggle-btn { border-left: 1px solid var(--border); }
.view-toggle-btn.active { background: var(--brand); color: #fff; }
.view-toggle-btn:hover:not(.active) { background: var(--surface-3); }

/* ── Equipment Grid ──────────────────────────────────────────── */
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.equip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.equip-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.equip-photo {
  height: 180px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.equip-photo img { width: 100%; height: 100%; object-fit: contain; }

/* ── List view overrides ─────────────────────────────────────── */
.equipment-grid.list-view {
  grid-template-columns: 1fr;
  gap: .5rem;
}
.equipment-grid.list-view .equip-card {
  flex-direction: row;
  align-items: stretch;
  border-radius: var(--radius);
}
.equipment-grid.list-view .equip-card:hover {
  transform: none;
  box-shadow: var(--shadow);
}
.equipment-grid.list-view .equip-photo {
  width: 140px;
  height: auto;
  min-height: 90px;
  flex-shrink: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}
.equipment-grid.list-view .equip-body {
  flex: 1;
  padding: .75rem 1rem;
  justify-content: center;
}
.equipment-grid.list-view .equip-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.equipment-grid.list-view .equip-footer {
  border-top: none;
  border-left: 1px solid var(--border);
  padding: .75rem 1rem;
  width: 150px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.equipment-grid.list-view .equip-footer .btn { width: 100%; }
.equip-photo .no-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  color: var(--text-subtle);
  font-size: .75rem;
  text-align: center;
}
.equip-photo .no-photo-icon { font-size: 2.5rem; opacity: .5; line-height: 1; }
.equip-category-badge {
  position: absolute;
  top: .6rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 9999px;
  backdrop-filter: blur(4px);
  white-space: nowrap;
}
.equip-availability {
  position: absolute;
  bottom: .5rem;
  left: 50%;
  transform: translateX(-50%);
}
.avail-badge {
  display: flex;
  align-items: center;
  gap: .2rem;
  padding: .1rem .4rem;
  border-radius: 9999px;
  font-size: .58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.avail-badge.available   { background: var(--success); color: #fff; }
.avail-badge.unavailable { background: var(--danger);  color: #fff; }
.avail-badge::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: .8;
}

.equip-body { padding: 1rem 1.1rem; flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.equip-make { font-size: .78rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.equip-model { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.equip-serial { font-size: .78rem; color: var(--text-subtle); font-family: monospace; }
.equip-desc { font-size: .83rem; color: var(--text-muted); margin-top: .25rem; flex: 1; }
.equip-footer {
  padding: .8rem 1.1rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* ── Filters / Search bar ────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.toolbar .search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.toolbar .search-wrap input {
  padding-left: 2.4rem;
}
.toolbar .search-icon {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: .95rem;
  pointer-events: none;
}
.toolbar select.form-control { width: auto; min-width: 140px; }

/* ── Stats row ───────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-icon.purple { background: var(--brand-light); color: var(--brand); }
.stat-icon.green  { background: var(--success-bg);  color: var(--success); }
.stat-icon.orange { background: var(--warning-bg);  color: var(--warning); }
.stat-icon.blue   { background: var(--info-bg);     color: var(--info); }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: .8rem; color: var(--text-muted); margin-top: .15rem; }

/* ── Admin – User Table ──────────────────────────────────────── */
.table-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: auto;
  box-shadow: var(--shadow-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
thead th {
  padding: .85rem 1.1rem;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
tbody td { padding: .85rem 1.1rem; color: var(--text-2); vertical-align: middle; }
.td-user { display: flex; align-items: center; gap: .75rem; }
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, #818CF8 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: .8rem;
  flex-shrink: 0;
  text-transform: uppercase;
}
.td-verified { display: flex; align-items: center; gap: .4rem; font-size: .8rem; }
.td-verified.yes { color: var(--success); }
.td-verified.no  { color: var(--text-subtle); }

.role-select {
  padding: .35rem .65rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .82rem;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}
.role-select:focus { border-color: var(--border-focus); }

/* ── Verify Page ─────────────────────────────────────────────── */
.verify-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  gap: 1.5rem;
}
.verify-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  padding: 2rem;
  text-align: center;
}
.verify-icon {
  width: 72px; height: 72px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--brand) 0%, #818CF8 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  box-shadow: 0 8px 24px rgba(99,102,241,.3);
}
.code-inputs {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin: 1.5rem 0;
}
.code-digit {
  width: 52px; height: 60px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  caret-color: var(--brand);
}
.code-digit:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
  background: var(--surface);
}
.code-digit.filled { border-color: var(--success); }

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3.5rem; opacity: .4; margin-bottom: 1rem; }
.empty-state h3 { color: var(--text-2); margin-bottom: .5rem; }

/* ── Loading spinner ─────────────────────────────────────────── */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 2rem auto;
}
.loading-state { text-align: center; padding: 3rem; }

/* ── Dev mode banner ─────────────────────────────────────────── */
.dev-banner {
  background: var(--warning-bg);
  border-bottom: 2px solid var(--warning);
  padding: .45rem 1.5rem;
  font-size: .8rem;
  color: var(--warning);
  text-align: center;
  font-weight: 500;
}
.dev-code-box {
  background: var(--surface-2);
  border: 1px dashed var(--warning);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  text-align: center;
  font-size: .85rem;
  color: var(--warning);
}
.dev-code-box strong { font-size: 1.4rem; letter-spacing: .2em; display: block; margin-top: .25rem; }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn .4s ease both; }

/* ── Admin page tabs ─────────────────────────────────────────── */
.page-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 2rem;
  overflow-x: auto;
}
.page-tab {
  padding: .75rem 1.5rem;
  font-size: .92rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
  display: flex;
  align-items: center;
  gap: .45rem;
}
.page-tab:hover { color: var(--text-2); }
.page-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Equipment status badges ─────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .65rem;
  border-radius: 9999px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}
.status-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .8;
  flex-shrink: 0;
}
.status-badge.active        { background: var(--success-bg); color: var(--success); }
.status-badge.on\ loan      { background: var(--info-bg);    color: var(--info); }
.status-badge.suspended     { background: var(--warning-bg); color: var(--warning); }
.status-badge.decommissioned{ background: var(--surface-3);  color: var(--text-muted); }

/* Availability badge on cards */
.avail-badge.maintenance    { background: var(--warning); color: #fff; }
.avail-badge.decommissioned { background: var(--surface-3); color: var(--text-muted); }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeOverlay .2s ease;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 620px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  animation: slideModal .25s ease;
  overflow: hidden;
}
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-header h3 { margin: 0; font-size: 1.05rem; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  flex-shrink: 0;
}

/* Form grid inside modal */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 500px) { .form-grid { grid-template-columns: 1fr; } }

/* ── Photo upload UI ─────────────────────────────────────────── */
.photo-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}
.photo-upload-area:hover,
.photo-upload-area.drag-over {
  border-color: var(--brand);
  background: var(--brand-light);
}
.photo-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.photo-upload-icon { font-size: 2rem; margin-bottom: .5rem; opacity: .6; }
.photo-upload-label { font-size: .85rem; color: var(--text-muted); }
.photo-upload-label strong { color: var(--brand); }

.photo-preview-wrap {
  position: relative;
  display: inline-block;
}
.photo-preview-wrap img {
  width: 120px; height: 90px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.photo-remove-btn {
  position: absolute;
  top: -8px; right: -8px;
  width: 22px; height: 22px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: .7rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ── Equipment admin table thumbnail ─────────────────────────── */
.equip-thumb {
  width: 52px; height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-subtle);
  font-size: 1.2rem;
  flex-shrink: 0;
}
.equip-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.td-equip { display: flex; align-items: center; gap: .75rem; }
.td-equip-info .name  { font-weight: 600; font-size: .9rem; }
.td-equip-info .make  { font-size: .78rem; color: var(--text-muted); }
.td-equip-info .serial{ font-size: .72rem; color: var(--text-subtle); font-family: monospace; }

/* Action buttons in table */
.action-btns { display: flex; gap: .4rem; flex-wrap: wrap; }

/* ── Report styles ───────────────────────────────────────────── */
.report-section { margin-bottom: 2.5rem; }
.report-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--border);
}
.report-section-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.report-badge {
  padding: .2rem .6rem;
  border-radius: 9999px;
  font-size: .75rem;
  font-weight: 700;
  background: var(--brand-light);
  color: var(--brand);
}
.days-remaining { font-size: .8rem; }
.days-remaining.warning { color: var(--warning); font-weight: 600; }
.days-remaining.overdue { color: var(--danger); font-weight: 700; }

/* ── Confirm dialog ──────────────────────────────────────────── */
.confirm-dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  max-width: 380px;
  width: 100%;
  animation: slideModal .2s ease;
}
.confirm-dialog p { margin: .5rem 0 1.5rem; color: var(--text-2); }
.confirm-dialog .btn-row { display: flex; gap: .75rem; justify-content: flex-end; }

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeOverlay {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideModal {
  from { opacity: 0; transform: translateY(-12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── Reservation status chips ────────────────────────────────── */
.res-status {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .65rem;
  border-radius: 9999px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.res-status::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.8; }
/* Request status badges */
.res-status.pending    { background: var(--info-bg);    color: var(--info); }
.res-status.approved   { background: var(--success-bg); color: var(--success); }
.res-status.rejected   { background: var(--danger-bg);  color: var(--danger); }
.res-status.cancelled  { background: var(--surface-3);  color: var(--text-muted); }

/* Processing status badges (shown alongside request status when approved) */
.proc-status {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: .2rem .55rem;
  border-radius: 9999px;
}
.proc-status::before { content:''; width:5px; height:5px; border-radius:50%; background:currentColor; opacity:.8; }
.proc-status.pending              { background: var(--info-bg);     color: var(--info); }
.proc-status.ready_for_collection { background: #FFF7ED;             color: #C2410C; }
.proc-status.collected            { background: var(--primary-bg);   color: var(--brand); }
.proc-status.returned             { background: var(--success-bg);   color: var(--success); }
.proc-status.checked_in           { background: var(--surface-3);    color: var(--text-muted); }
[data-theme="dark"] .proc-status.ready_for_collection { background: #431407; color: #FB923C; }

/* ── Reservation cards (My Reservations tab) ─────────────────── */
.reservation-list { display: flex; flex-direction: column; gap: 5rem; }
.res-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.res-card:hover { box-shadow: var(--shadow); }
@keyframes res-card-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 40%, transparent); }
  50%  { box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 15%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 0%, transparent); }
}
.res-card-highlight {
  animation: res-card-pulse 1.2s ease 2;
  border-color: var(--brand) !important;
}
.res-card-header {
  padding: .9rem 1.25rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.res-card-meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.res-dates { font-weight: 600; font-size: .92rem; }
.res-duration { font-size: .8rem; color: var(--text-muted); }
.res-id { font-size: .75rem; color: var(--text-subtle); font-family: monospace; }
.res-card-header-right { display: flex; align-items: center; gap: .5rem; }
.res-card-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  padding: .1rem .25rem;
  border-radius: var(--radius-sm);
  transition: transform var(--transition), color var(--transition);
}
.res-card-toggle:hover { color: var(--text); }
.res-card.collapsed .res-card-toggle { transform: rotate(-90deg); }
.res-card.collapsed .res-card-body,
.res-card.collapsed .res-admin-notes,
.res-card.collapsed .res-card-footer { display: none; }
.res-card.collapsed .res-card-header { border-bottom: none; }
.res-card-body { padding: 1rem 1.25rem; }
.res-items { display: flex; flex-direction: column; gap: .5rem; }
.res-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem .75rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.res-item-thumb {
  width: 44px; height: 34px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--surface-3);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--text-subtle);
}
.res-item-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.res-item-info .name  { font-size: .88rem; font-weight: 600; }
.res-item-info .make  { font-size: .76rem; color: var(--text-muted); }
.res-notes {
  margin-top: .75rem;
  padding: .6rem .9rem;
  background: var(--surface-2);
  border-left: 3px solid var(--border-focus);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .85rem;
  color: var(--text-2);
}
.res-card-footer {
  padding: .75rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.res-card-footer .created-at { font-size: .76rem; color: var(--text-subtle); }

/* ── Admin notes on reservation cards ───────────────────────── */
.res-admin-notes {
  border-top: 1px solid var(--border);
  padding: .75rem 1.25rem;
  background: var(--surface-2);
}
.res-admin-notes-header {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.res-no-notes { font-size: .82rem; color: var(--text-subtle); margin: 0 0 .6rem; }
.res-note-item {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .82rem;
}
.res-note-item:last-of-type { border-bottom: none; margin-bottom: .25rem; }
.res-note-meta { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.res-note-author { font-weight: 600; color: var(--text); }
.res-note-time   { font-size: .73rem; color: var(--text-subtle); }
.res-note-text   { color: var(--text-2); line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.res-note-form   { display: flex; gap: .5rem; align-items: flex-end; margin-top: .5rem; }
.res-note-form textarea { flex: 1; font-size: .82rem; resize: none; }

/* ── Reservation modal – equipment checklist ─────────────────── */
.equip-checklist { display: flex; flex-direction: column; gap: .5rem; }
.equip-check-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  user-select: none;
}
.equip-check-item:hover { border-color: var(--brand); background: var(--brand-light); }
.equip-check-item.checked { border-color: var(--brand); background: var(--brand-light); }
.equip-check-item.unavailable { opacity: .5; cursor: not-allowed; }
.equip-check-item input[type="checkbox"] {
  width: 17px; height: 17px;
  accent-color: var(--brand);
  cursor: pointer;
  flex-shrink: 0;
}
.equip-check-thumb {
  width: 44px; height: 34px;
  border-radius: 4px;
  background: var(--surface-2);
  overflow: hidden;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: var(--text-subtle);
}
.equip-check-thumb img { width:100%; height:100%; object-fit:cover; }
.equip-check-info { flex: 1; }
.equip-check-info .name { font-size: .88rem; font-weight: 600; }
.equip-check-info .meta { font-size: .75rem; color: var(--text-muted); }

.res-dates-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.duration-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .85rem;
  background: var(--brand-light);
  color: var(--brand);
  border-radius: 9999px;
  font-size: .82rem;
  font-weight: 600;
}
.section-divider {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  padding: .4rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: .25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.no-equip-msg { text-align:center; padding:1.5rem; color:var(--text-muted); font-size:.9rem; }
.modal-lg { max-width: 700px; }

/* ── Admin reservation table ─────────────────────────────────── */
.res-items-summary { display: flex; flex-direction: column; gap: .2rem; }
.res-items-summary .item-line { font-size: .8rem; color: var(--text-2); }
.res-items-summary .more      { font-size: .75rem; color: var(--text-muted); }

/* ── Availability Browser ────────────────────────────────────── */
.avail-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.avail-mode-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.avail-mode-btn {
  padding: .4rem .9rem;
  font-size: .85rem;
  font-weight: 500;
  background: var(--surface);
  border: none;
  cursor: pointer;
  color: var(--text-2);
  transition: background var(--transition), color var(--transition);
}
.avail-mode-btn + .avail-mode-btn { border-left: 1px solid var(--border); }
.avail-mode-btn.active {
  background: var(--brand);
  color: #fff;
}
.avail-mode-btn:hover:not(.active) { background: var(--surface-3); }
.avail-dates-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: flex-end;
}

/* ── Reservations Planner Calendar ──────────────────────────── */
.planner-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.pcal-hdr {
  text-align: center;
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding: .5rem 0 .75rem;
}
/* Default day cell: subtle green = no reservations */
.pcal-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 1rem .5rem .85rem;
  min-height: 120px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius);
  text-align: center;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
[data-theme="dark"] .pcal-day {
  background: rgba(16,185,129,.1);
  border-color: rgba(16,185,129,.25);
}
/* Weekend: slightly deeper green tint */
.pcal-day.pcal-wknd {
  background: #DCFCE7;
  border-color: #86EFAC;
}
[data-theme="dark"] .pcal-day.pcal-wknd {
  background: rgba(16,185,129,.16);
  border-color: rgba(16,185,129,.32);
}
.pcal-day.pcal-past {
  opacity: .45;
}
/* Today: brand border, keep green fill unless it has reservations */
.pcal-day.pcal-today {
  border-color: var(--brand);
  border-width: 2px;
  background: var(--brand-light);
  opacity: 1;
}
[data-theme="dark"] .pcal-day.pcal-today {
  background: rgba(99,102,241,.18);
}
/* Days with reservations: red */
.pcal-day.pcal-has-res {
  background: #FEF2F2;
  border-color: #FECACA;
  cursor: pointer;
  opacity: 1;
}
[data-theme="dark"] .pcal-day.pcal-has-res {
  background: rgba(239,68,68,.14);
  border-color: rgba(239,68,68,.35);
}
.pcal-day.pcal-has-res:hover,
.pcal-day.pcal-has-res:focus-visible {
  background: #FEE2E2;
  border-color: #EF4444;
  outline: none;
  box-shadow: 0 0 0 3px rgba(239,68,68,.25);
}
[data-theme="dark"] .pcal-day.pcal-has-res:hover,
[data-theme="dark"] .pcal-day.pcal-has-res:focus-visible {
  background: rgba(239,68,68,.22);
  border-color: rgba(239,68,68,.55);
}
/* Today + reservations: brand border, red fill */
.pcal-day.pcal-today.pcal-has-res {
  background: #FEF2F2;
  border-color: var(--brand);
  border-width: 2px;
}
[data-theme="dark"] .pcal-day.pcal-today.pcal-has-res {
  background: rgba(239,68,68,.14);
}
.pcal-date-num {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.pcal-today .pcal-date-num {
  color: var(--brand);
}
.pcal-month-lbl {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  line-height: 1;
}
.pcal-icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-top: 3px;
}
.pcal-count {
  font-size: .75rem;
  font-weight: 700;
  background: #EF4444;
  color: #fff;
  border-radius: 9999px;
  min-width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  line-height: 1;
}
/* Collect / return indicators inside a day cell */
.pcal-indicators {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
  width: 100%;
}
.pcal-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.pcal-ind-icon { font-size: 1.3rem; line-height: 1; user-select: none; }
.pcal-ind-count {
  font-size: .72rem;
  font-weight: 700;
  border-radius: 9999px;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
}
.pcal-ind-collect { background: var(--warning); color: #fff; }
.pcal-ind-return  { background: var(--info);    color: #fff; }

/* Planner day detail groups */
.planner-group-heading {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: .9rem;
}
.planner-group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: var(--surface-alt);
  font-size: .72rem;
  font-weight: 700;
  padding: 0 .35rem;
  margin-left: .25rem;
  vertical-align: middle;
}

/* Planner day detail panel */
.planner-detail-row {
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}
.planner-detail-row:last-child { border-bottom: none; }
.planner-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-bottom: .4rem;
}
.planner-detail-equip {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding-left: .25rem;
}
.planner-equip-line {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
}
.planner-equip-thumb {
  width: 36px;
  height: 28px;
  object-fit: contain;
  border-radius: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.planner-equip-no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
}

/* ── Print styles ────────────────────────────────────────────── */
@media print {
  .navbar, .page-tabs, .toolbar, .action-btns, .btn,
  #toast-container, .dev-banner { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border: 1px solid #ccc; box-shadow: none; }
  .report-section { break-inside: avoid; }
  table { font-size: .8rem; }
  thead th { background: #f0f0f0; color: #333; }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  h1 { font-size: 1.5rem; }
  .page-wrapper { padding: 1.25rem 1rem; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .search-wrap { width: 100%; }
  .navbar-nav { display: none; }
}
@media (max-width: 480px) {
  .auth-card, .verify-card { border-radius: var(--radius-lg); }
  .stats-row { grid-template-columns: 1fr; }
  .equipment-grid { grid-template-columns: 1fr; }
  .code-digit { width: 42px; height: 52px; font-size: 1.2rem; }
}

/* ── Group badges & checkboxes ──────────────────────────────── */
.group-badge {
  display: inline-block;
  font-size: .68rem;
  padding: .1rem .4rem;
  border-radius: 9999px;
  font-weight: 500;
  margin: .1rem .15rem .1rem 0;
  white-space: nowrap;
}
.group-badge.l4-sport-media     { background: #FEF9C3; color: #854D0E; }
.group-badge.l5-sport-media     { background: var(--info-bg); color: var(--info); }
.group-badge.l6-sport-media     { background: #F0FAFB; color: #0E7490; }
.group-badge.l7-sport-broadcast { background: #FDF4FF; color: #7E22CE; }

.group-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
}
.group-check-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .88rem;
  cursor: pointer;
}
