/* admin.html — styles used only on this page (OSC Admin).
   Shared styles: assets/site.css. Bump ?v= on the <link> after editing. */

/* ─── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  background: #f1f3f6;
  color: #1a1a2e;
  -webkit-font-smoothing: antialiased;
  display: flex;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea {
  font-family: inherit;
  font-size: 14px;
}

/* ─── Layout ─────────────────────────────────────────────────── */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #0d1b2a;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.main {
  flex: 1;
  overflow-y: auto;
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────────── */
.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo img {
  height: 48px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .9;
}
.sidebar-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: 20px 20px 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,.55);
  font-size: 13px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all .15s;
  cursor: pointer;
}
.nav-item:hover {
  color: white;
  background: rgba(255,255,255,.05);
}
.nav-item.active {
  color: white;
  background: rgba(245,166,35,.1);
  border-left-color: #f5a623;
}
.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; }
.nav-item .nav-badge {
  margin-left: auto;
  background: #f5a623;
  color: #0d1b2a;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
}
.sidebar-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,.08);
  margin: 10px 0;
}
.sidebar-footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.4);
  font-size: 12px;
  transition: color .15s;
}
.sidebar-footer a:hover { color: rgba(255,255,255,.8); }

/* ─── Topbar ─────────────────────────────────────────────────── */
.topbar {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: #0d1b2a;
}
.topbar-title span { color: #f5a623; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0d1b2a;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

/* ─── Content Area ───────────────────────────────────────────── */
.content { padding: 28px; }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  transition: all .15s;
  white-space: nowrap;
}
.btn-primary { background: #0d1b2a; color: white; }
.btn-primary:hover { background: #1e3250; }
.btn-gold { background: #f5a623; color: #0d1b2a; }
.btn-gold:hover { background: #ffc044; }
.btn-outline {
  background: white;
  color: #374151;
  border: 1.5px solid #d1d5db;
}
.btn-outline:hover { border-color: #9ca3af; }
.btn-danger { background: #fee2e2; color: #dc2626; border: 1.5px solid #fecaca; }
.btn-danger:hover { background: #fecaca; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-success { background: #d1fae5; color: #065f46; border: 1.5px solid #a7f3d0; }
.btn-success:hover { background: #a7f3d0; }

/* ─── View Panels ────────────────────────────────────────────── */
.view { display: none; }
.view.active { display: block; }

/* ─── Page Header ────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h1 {
  font-size: 22px;
  font-weight: 700;
}
.page-header p {
  font-size: 13px;
  color: #6b7280;
  margin-top: 2px;
}

/* ─── Cards / Panels ─────────────────────────────────────────── */
.card {
  background: white;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-header h2 { font-size: 15px; font-weight: 600; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card-body { padding: 20px; }

/* ─── Stats Row ──────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px 20px;
}
.stat-card .stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 6px;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #0d1b2a;
  line-height: 1;
}
.stat-card .stat-sub {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
}
.stat-card .stat-icon {
  font-size: 22px;
  float: right;
  opacity: .5;
}

/* ─── Table ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6b7280;
  padding: 10px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  white-space: nowrap;
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }
.td-title { font-weight: 600; color: #111827; }
.td-meta { font-size: 12px; color: #6b7280; margin-top: 2px; }
.td-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ─── Badge / Status ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-published { background: #d1fae5; color: #065f46; }
.badge-draft     { background: #f3f4f6; color: #6b7280; }
.badge-upcoming  { background: #dbeafe; color: #1e40af; }
.badge-past      { background: #f3f4f6; color: #9ca3af; }
.sport-badge {
  display: inline-flex;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 4px;
  background: rgba(13,27,42,.07);
  color: #374151;
}

/* ─── Form Styles ────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  letter-spacing: .02em;
}
.field label .required { color: #dc2626; margin-left: 2px; }
.field input,
.field select,
.field textarea {
  padding: 9px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  color: #111827;
  background: white;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: #0d1b2a;
  box-shadow: 0 0 0 3px rgba(13,27,42,.08);
}
.field textarea { resize: vertical; min-height: 80px; }
.field .field-hint {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.4;
}
.field-error {
  font-size: 11px;
  color: #dc2626;
}
.field input.error,
.field select.error { border-color: #dc2626; }

/* Form section divider */
.form-section {
  margin: 24px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}
.form-section h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #6b7280;
}

/* ─── Quill Editor Overrides ──────────────────────────────────── */
.ql-toolbar.ql-snow {
  border: 1.5px solid #d1d5db;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: #f9fafb;
}
.ql-container.ql-snow {
  border: 1.5px solid #d1d5db;
  border-radius: 0 0 6px 6px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
}
.ql-editor {
  min-height: 280px;
  line-height: 1.7;
}
.ql-editor:focus { outline: none; }
/* Pictures: click one in the article editor to pick its size (admin.html addImageSizer) */
.ql-editor img { cursor: pointer; }
.ql-editor img[width] { display: block; margin: 6px auto; height: auto; }
.img-sizer-frame {
  position: absolute; z-index: 5; pointer-events: none;
  outline: 3px solid #bf1e2e; outline-offset: 1px; border-radius: 4px;
}
.img-sizer {
  position: absolute; top: 6px; left: 6px; pointer-events: auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  background: #0d1b2a; color: #fff; padding: 5px 6px; border-radius: 6px;
  font-size: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.img-sizer span { padding: 0 4px; opacity: .8; }
.img-sizer button {
  border: 0; border-radius: 4px; padding: 4px 9px; cursor: pointer;
  background: rgba(255,255,255,.15); color: #fff; font: inherit;
}
.img-sizer button:hover { background: rgba(255,255,255,.3); }
.img-sizer button.on { background: #bf1e2e; }
.ql-container.ql-snow:focus-within {
  border-color: #0d1b2a;
  box-shadow: 0 0 0 3px rgba(13,27,42,.08);
}
.ql-toolbar.ql-snow:focus-within + .ql-container.ql-snow,
.ql-container.ql-snow:focus-within {
  border-color: #0d1b2a;
}

/* ─── Form Action Bar ────────────────────────────────────────── */
.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  flex-wrap: wrap;
}
.form-actions .save-note {
  font-size: 12px;
  color: #9ca3af;
  margin-right: auto;
}

/* ─── Tabs ───────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 24px;
}
.tab {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.tab:hover { color: #0d1b2a; }
.tab.active { color: #0d1b2a; border-bottom-color: #f5a623; }

/* ─── Alert / Toast ──────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0d1b2a;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  z-index: 999;
  transform: translateY(80px);
  opacity: 0;
  transition: all .3s cubic-bezier(.175,.885,.32,1.275);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: #065f46; }
.toast.error   { background: #dc2626; }

/* ─── Image Upload Preview ───────────────────────────────────── */
.img-preview {
  width: 100%;
  height: 140px;
  border: 2px dashed #d1d5db;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: #9ca3af;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s;
  overflow: hidden;
  position: relative;
}
.img-preview:hover { border-color: #9ca3af; }
.img-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-preview .img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: none;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 600;
}
.img-preview:hover .img-overlay { display: flex; }

/* ─── Empty State ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #9ca3af;
}
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state h3 { font-size: 15px; font-weight: 600; color: #6b7280; margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ─── Search / Filter Bar ────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  padding: 7px 12px;
  flex: 1;
  min-width: 180px;
  transition: border-color .15s;
}
.search-input:focus-within { border-color: #0d1b2a; }
.search-input input {
  border: none;
  outline: none;
  background: none;
  font-size: 13px;
  color: #111827;
  width: 100%;
}
.search-input span { color: #9ca3af; font-size: 14px; }
.filter-select {
  padding: 8px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
  background: white;
  cursor: pointer;
}

/* ─── Mobile Sidebar Toggle ──────────────────────────────────── */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 200;
  background: #0d1b2a;
  color: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 99;
}

/* ─── Character Counter ───────────────────────────────────────── */
.char-counter { font-size: 11px; color: #9ca3af; text-align: right; margin-top: 3px; }

/* Role checkboxes in user modal */
.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1.5px solid #d1d5db;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.role-chip:hover { border-color: #0d1b2a; }
.role-chip.selected {
  background: #0d1b2a;
  color: white;
  border-color: #0d1b2a;
}
.role-chip.admin-role.selected { background: #dc2626; border-color: #dc2626; }
.role-chip.editor-role.selected { background: #2563eb; border-color: #2563eb; }

/* Sport access banner for restricted users */
.sport-access-banner {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: #92400e;
  margin-bottom: 16px;
}
.char-counter.over { color: #dc2626; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: -240px;
    top: 0;
    z-index: 100;
    transition: left .3s;
  }
  .sidebar.open { left: 0; }
  .sidebar-overlay.open { display: block; }
  .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid.cols-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .content { padding: 16px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .form-grid.cols-3 { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .card-header { flex-wrap: wrap; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
}
/* ─── Shared modal (board / add member / import) ──────────────── */
.admin-modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200; align-items: center; justify-content: center; padding: 20px; }
.admin-modal-box { background: white; border-radius: 12px; width: 100%; max-height: 90vh; overflow-y: auto; }
.admin-modal-head { padding: 20px 24px; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: white; z-index: 1; }
.admin-modal-head h2 { font-size: 17px; font-weight: 700; }
.admin-modal-x { background: none; border: none; font-size: 20px; color: #9ca3af; cursor: pointer; }
.admin-modal-body { padding: 24px; }
.admin-modal-foot { padding: 16px 24px; border-top: 1px solid #e5e7eb; display: flex; justify-content: flex-end; gap: 10px; }
.order-btns { display: flex; gap: 4px; }
.order-btns button { width: 28px; height: 28px; border: 1.5px solid #d1d5db; background: white; border-radius: 6px; cursor: pointer; font-size: 13px; color: #374151; }
.order-btns button:hover:not(:disabled) { border-color: #0d1b2a; }
.order-btns button:disabled { opacity: .3; cursor: default; }
.imp-summary { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.imp-chip { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 20px; background: #f3f4f6; color: #374151; }
.imp-chip.ok { background: #dcfce7; color: #166534; }
.imp-chip.bad { background: #fee2e2; color: #991b1b; }
/* Sport chairs see only the payments tab (see isChairOnly) */
body.chair-mode #view-members .stats-row,
body.chair-mode #member-gender,
body.chair-mode #view-members .tabs,
body.chair-mode #sync-btn,
body.chair-mode #members-last-sync { display: none !important; }
/* Documents */
.doc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.doc-big-btn { display: flex; gap: 14px; align-items: center; text-align: left; padding: 18px 20px; border-radius: 10px; border: 2px solid #f5a623; background: #fff8eb; cursor: pointer; font-family: inherit; transition: transform .15s, box-shadow .15s; }
.doc-big-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.doc-big-btn.secondary { border-color: #d1d5db; background: white; }
.doc-big-btn strong { display: block; font-size: 16px; color: #111827; }
.doc-big-btn small { display: block; font-size: 12px; color: #6b7280; margin-top: 2px; }
.drop-zone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; border: 2px dashed #d1d5db; border-radius: 10px; cursor: pointer; text-align: center; font-size: 14px; color: #374151; background: #fafafa; transition: border-color .15s, background .15s; }
.drop-zone:hover, .drop-zone.drag { border-color: #f5a623; background: #fff8eb; }
.drop-zone.has-file { border-style: solid; border-color: #16a34a; background: #f0fdf4; }
.drop-zone input { display: none; }
.drop-zone small { color: #9ca3af; font-size: 12px; }
@media (max-width: 640px) { .doc-actions { grid-template-columns: 1fr; } }
/* Elections editor + results */
.el-pos { border: 1.5px solid #e5e7eb; border-radius: 8px; padding: 14px; margin-bottom: 12px; background: #fafafa; }
.el-pos-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.el-pos-head input[type=text] { flex: 1; min-width: 180px; font-weight: 600; }
.el-cand { display: grid; grid-template-columns: auto 1fr 1.6fr auto; gap: 8px; margin-bottom: 6px; align-items: center; }
.el-photo-cell { position: relative; width: 40px; height: 40px; }
.el-photo { width: 40px; height: 40px; border-radius: 50%; border: 1.5px dashed #9ca3af; background: white; cursor: pointer; font-size: 16px; padding: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.el-photo:hover { border-color: #0d1b2a; }
.el-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.el-photo:has(img) { border-style: solid; border-color: #d1d5db; }
.el-photo-x { position: absolute; top: -5px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: #dc2626; color: white; font-size: 9px; line-height: 18px; padding: 0; cursor: pointer; }
.el-cand input, .el-pos-head input[type=text] { padding: 7px 10px; border: 1.5px solid #d1d5db; border-radius: 6px; font-size: 13px; font-family: inherit; }
.el-x { border: 1.5px solid #fecaca; background: #fee2e2; color: #dc2626; border-radius: 6px; width: 32px; cursor: pointer; }
.el-res-pos { margin-bottom: 22px; }
.el-res-pos h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.el-res-row { display: grid; grid-template-columns: minmax(140px, 1fr) 2fr 70px; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; }
.el-bar { height: 14px; background: #f3f4f6; border-radius: 7px; overflow: hidden; }
.el-bar span { display: block; height: 100%; background: #0d1b2a; border-radius: 7px; }
.el-res-row.win .el-bar span { background: #f5a623; }
.el-res-row.win .el-name { font-weight: 700; }
.el-summary { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.el-summary div { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 14px; font-size: 12px; color: #6b7280; }
.el-summary strong { display: block; font-size: 20px; color: #111827; }
@media (max-width: 640px) {
  .el-cand { grid-template-columns: auto 1fr auto; }
  .el-photo-cell { grid-row: span 2; align-self: start; }
  .el-cand input[data-f=bio] { grid-column: 2 / 3; }
  .el-cand > :last-child { grid-row: 1; grid-column: 3; }
}

/* ─── Activities ─────────────────────────────────────────────────── */
.act-swatch {
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
}
.act-preview {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
  padding: 16px 20px; border-radius: 10px; color: white;
  font-size: 20px; font-weight: 700; letter-spacing: .02em;
}
.act-preview span:first-child { font-size: 28px; }
.act-emoji-picks { display: flex; flex-wrap: wrap; gap: 4px; }
.act-emoji-picks button {
  width: 34px; height: 34px; font-size: 18px; border-radius: 6px;
  border: 1px solid #e5e7eb; background: white; cursor: pointer;
}
.act-emoji-picks button:hover { border-color: #9ca3af; background: #f9fafb; }
.act-radio { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 400 !important; margin-top: 6px; }
.act-radio input { width: auto !important; margin: 0; }

/* ─── Sportscaster uploads ─────────────────────────────────────── */
.sc-done-box { background: #ecfdf5; border: 1.5px solid #a7f3d0; border-radius: 8px; padding: 16px; }
.sc-link { background: white; border: 1px solid #d1d5db; border-radius: 6px; padding: 9px 12px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; word-break: break-all; user-select: all; }

/* ─── Members → Active Members by Gender ───────────────────────── */
.gender-card { margin: -8px 0 24px; }
.gender-card[hidden] { display: none; }
.gender-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.gender-total { font-size: 13px; font-weight: 600; color: #374151; }
.gender-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #f3f4f6; margin: 6px 0 14px; }
.gender-bar span { display: block; min-width: 2px; }
.gender-list { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.gender-item { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #374151; }
.gender-item strong { font-size: 20px; color: #0d1b2a; }
.gender-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.gender-pct { font-size: 12px; color: #9ca3af; }

/* ─── Messages (contact form) ────────────────────────────────── */
.msg { padding: 16px 20px; border-top: 1px solid #f3f4f6; }
.msg:first-child { border-top: 0; }
.msg.handled { opacity: .6; }
.msg-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.msg-from { font-weight: 600; color: #111827; }
.msg-meta { font-size: 12px; color: #6b7280; }
.msg-body { margin: 10px 0 12px; font-size: 14px; line-height: 1.55; color: #374151; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.msg-actions .msg-meta { margin-left: 4px; }
.badge-warn { background: #fef3c7; color: #92400e; }

/* ─── Site Settings (assets/admin-site.js) ─────────────────────── */
.nav-item .nav-badge.nav-badge-alert { background: #dc2626; color: white; }
.ss-notice { background: #fef3c7; border: 1.5px solid #fcd34d; color: #92400e; border-radius: 8px; padding: 12px 16px; margin-bottom: 18px; font-size: 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ss-notice[hidden] { display: none; }
.ss-notice.ss-error { background: #fee2e2; border-color: #fca5a5; color: #991b1b; display: block; line-height: 1.5; }
.ss-card { margin-bottom: 20px; }
.ss-card .card-header .badge { white-space: nowrap; }
.ss-radios { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: #374151; }
.ss-radios label, .ss-switch { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: #374151; cursor: pointer; }
.ss-radios input, .ss-switch input { width: auto !important; margin: 0; }
.ss-switch { font-weight: 600; }
.ss-banner-preview { margin-top: 16px; background: #c9b99a; color: #1a2340; border-radius: 6px; padding: 10px 14px; font-weight: 700; font-size: 14px; text-align: center; }
.ss-banner-preview.alert { background: #bf1e2e; color: white; }
.ss-banner-preview[hidden] { display: none; }
.ssbp-label { float: left; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .6; margin-top: 3px; }
.ss-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding: 14px 0; background: linear-gradient(transparent, #f4f5f7 30%); }
.ss-savebar #ss-dirty { font-size: 13px; color: #b45309; font-weight: 600; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.brand-tile { border: 1px solid #e5e7eb; border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.brand-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.brand-head span { font-size: 12px; color: #9ca3af; }
.brand-previews { display: flex; gap: 8px; }
.brand-preview { flex: 1; min-height: 84px; border-radius: 6px; display: flex; align-items: center; justify-content: center; padding: 10px; background: #f3f4f6; border: 1px solid #e5e7eb; }
.brand-preview img { max-width: 100%; max-height: 64px; display: block; }
.brand-on-dark { background: #1a2340; border-color: #1a2340; }
.brand-on-dark.as-white img { filter: brightness(0) invert(1); opacity: .9; }
.brand-on-light { background: white; }
.brand-icon img { width: 64px; height: 64px; max-height: none; }
.brand-share { padding: 0; overflow: hidden; }
.brand-share img { width: 100%; max-height: none; aspect-ratio: 1200 / 630; object-fit: cover; }
.brand-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.brand-actions label.btn { cursor: pointer; }
.brand-actions label.btn.disabled { opacity: .5; pointer-events: none; }

/* ─── Page Text ────────────────────────────────────────────────── */
.pt-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
.pt-list { padding: 8px 0; }
.pt-group { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9ca3af; padding: 12px 16px 4px; }
.pt-item { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; background: none; border: 0; border-left: 3px solid transparent; padding: 8px 16px 8px 13px; cursor: pointer; font: inherit; font-size: 14px; color: #374151; }
.pt-item:hover { background: #f9fafb; }
.pt-item.active { background: #f3f4f6; border-left-color: #c9a84c; font-weight: 600; color: #111827; }
.pt-item small { font-size: 11px; font-weight: 400; color: #9ca3af; }
.pt-meta { font-size: 12px; color: #6b7280; margin-top: 2px; }
.pt-editor .ql-editor { min-height: 260px; font-size: 15px; line-height: 1.6; }
.pt-editor .ql-editor.pt-inline { min-height: 90px; }
.pt-actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.pt-actions[hidden] { display: none; }
.pt-dirty { font-size: 13px; color: #b45309; font-weight: 600; }
.faq-edit { border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.faq-edit-head { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.faq-edit-head input { flex: 1; min-width: 0; padding: 8px 10px; border: 1.5px solid #d1d5db; border-radius: 6px; font-size: 14px; font-weight: 600; }
.faq-num { width: 24px; height: 24px; border-radius: 50%; background: #f3f4f6; font-size: 12px; font-weight: 700; color: #6b7280; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.faq-answer-edit .ql-editor { min-height: 70px; }

/* ─── Database Updates / Site Health / Guide ──────────────────── */
.mig-desc { font-size: 13px; color: #6b7280; margin-top: 4px; white-space: pre-line; line-height: 1.5; max-width: 640px; }
.health-card { margin-bottom: 16px; }
.health-row { display: grid; grid-template-columns: 26px 220px minmax(0, 1fr); gap: 10px; padding: 10px 20px; border-top: 1px solid #f3f4f6; font-size: 14px; align-items: baseline; }
.health-row:first-child { border-top: 0; }
.health-label { font-weight: 600; color: #111827; }
.health-detail { color: #4b5563; overflow-wrap: anywhere; }
.health-fail { background: #fef2f2; }
.health-warn { background: #fffbeb; }
.health-log { margin: 0; padding: 14px 20px; max-height: 420px; overflow: auto; background: #0d1b2a; color: #d1d5db; font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.health-log[hidden] { display: none; }
.guide { font-size: 15px; line-height: 1.65; color: #374151; max-width: 820px; }
.guide h2 { font-size: 18px; color: #111827; margin: 26px 0 8px; }
.guide h2:first-child { margin-top: 0; }
.guide h3 { font-size: 15px; color: #111827; margin: 18px 0 6px; }
.guide p { margin: 0 0 10px; }
.guide ul, .guide ol { margin: 0 0 12px 22px; }
.guide li { margin-bottom: 5px; }
.guide code { background: #f3f4f6; border-radius: 4px; padding: 1px 5px; font-size: 13px; }
@media (max-width: 900px) {
  .pt-layout { grid-template-columns: 1fr; }
  .health-row { grid-template-columns: 26px minmax(0, 1fr); }
  .health-detail { grid-column: 2; }
}
