/* ════════════════════════════════════════════════════════════════════════════
   The Cool Rulers Band Management Portal — Stylesheet
   ════════════════════════════════════════════════════════════════════════════
   1. Reset & variables
   2. Navigation
   3. App shell (toolbar, search, content area, tables, cards, empty states)
   4. Group headers
   5. Modals & forms
   6. Toast notifications
   7. Song Library page (index.html)
   8. Edit page (edit.html)
   9. Upload page (upload.html)
   10. Band Members page (band_members.html)
   11. Public pages (portal, coming soon, login, db error)
   ════════════════════════════════════════════════════════════════════════════ */


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

:root {
  --bg:         #141414;
  --surface:    #1e1e1e;
  --surface2:   #272727;
  --border:     #333;
  --text:       #f0ece4;
  --muted:      #7a7570;
  --gold:       #c9a84c;
  --gold-dim:   #7a6530;
  --green:      #3d6b3a;
  --green-text: #7ec47a;
  --red:        #e07070;
  --singer-bg:  #1b2433;
  --radius:     4px;
  --font-head:  'Space Grotesk', sans-serif;
  --font-body:  'Inter', sans-serif;
  --nav-h:      52px;
  /* Safe area insets for notched phones */
  --safe-left:  env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bot:   env(safe-area-inset-bottom, 0px);
  --safe-top:   env(safe-area-inset-top, 0px);
}

html {
  /* Prevent font scaling in landscape on iOS */
  -webkit-text-size-adjust: 100%;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  overscroll-behavior: none;
}

/* Eliminate tap flash on all interactive elements */
a, button, label, [role="button"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}


/* ── 2. Navigation ─────────────────────────────────────────────────────────── */
nav {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--nav-h);
  height: calc(var(--nav-h) + var(--safe-top));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  padding-top: var(--safe-top);
  padding-left: max(16px, var(--safe-left));
  padding-right: max(12px, var(--safe-right));
}

.nav-brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--gold);
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 2px;
  flex: 1;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 10px;
  border-radius: var(--radius);
  transition: color .15s, background .15s;
  white-space: nowrap;
  min-height: 36px;
  display: flex;
  align-items: center;
}
.nav-links a:hover  { color: var(--text); background: var(--surface2); }
.nav-links a.active { color: var(--text); background: var(--surface2); }

.nav-count {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-head);
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-logout-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 10px;
  border-radius: var(--radius);
  transition: color .15s, background .15s;
  white-space: nowrap;
  min-height: 36px;
  margin-left: 8px;
  border-left: 1px solid var(--border);
  padding-left: 14px;
}
.nav-logout-link:hover { color: var(--text); background: var(--surface2); }

/* Hamburger button — hidden on desktop */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: color .15s, background .15s;
  flex-shrink: 0;
  order: 99; /* sits just before logout */
}
.nav-hamburger:hover { color: var(--text); background: var(--surface2); }

/* Mobile nav — hamburger visible, links collapse into a dropdown */
@media (max-width: 768px) {
  nav { gap: 8px; }
  .nav-brand { font-size: 13px; }
  .nav-count { display: none; }

  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 4px;
    position: absolute;
    top: calc(var(--nav-h) + var(--safe-top));
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 10px max(16px, var(--safe-left)) calc(12px + var(--safe-bot));
    z-index: 199;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    font-size: 15px;
    padding: 10px 12px;
    min-height: 44px;
    border-radius: 6px;
  }
  .nav-logout-link {
    margin-left: 0;
    margin-top: 6px;
    padding-top: 14px;
    padding-left: 12px;
    border-left: none;
    border-top: 1px solid var(--border);
  }
}


/* ── 3. App shell ──────────────────────────────────────────────────────────── */
.page-shell {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--nav-h));
  overflow: hidden;
}

/* Toolbar */
.toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px max(14px, var(--safe-left));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.search-wrap {
  position: relative;
  flex: 1;
}
.search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
input[type="search"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 9px 10px 9px 32px;
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
  min-height: 42px;
}
input[type="search"]:focus { border-color: var(--gold-dim); }
input[type="search"]::placeholder { color: var(--muted); }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

.result-count {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  font-family: var(--font-head);
  flex-shrink: 0;
}

/* Scrollable content area — table and card views stack on top of each other.
   Visibility is toggled (not display) to avoid the display:flex collapse bug. */
.content-area {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.table-container,
.card-list {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  visibility: visible;
}

/* Desktop table */
.table-container {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  font-size: 13px;
}
thead th {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  border-right: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 10px 12px;
  position: sticky;
  text-align: left;
  text-transform: uppercase;
  top: 0;
  white-space: nowrap;
  z-index: 10;
  cursor: pointer;
  user-select: none;
  transition: color .15s;
}
thead th:hover { color: var(--text); }
thead th.sort-asc::after  { content: ' ↑'; color: var(--gold); }
thead th.sort-desc::after { content: ' ↓'; color: var(--gold); }

tbody tr { border-bottom: 1px solid #222; }
tbody tr:hover td { background: #202020 !important; }
td {
  background: var(--bg);
  border-right: 1px solid #1e1e1e;
  padding: 8px 12px;
  vertical-align: middle;
  white-space: nowrap;
}

/* Mobile card list */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px max(12px, var(--safe-left)) calc(10px + var(--safe-bot));
  visibility: hidden;
  pointer-events: none;
}

/* Empty state */
.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  color: var(--muted);
  text-align: center;
}
.empty-state.visible { display: flex; }
.empty-state svg { margin-bottom: 14px; opacity: .4; }
.empty-state p { font-size: 14px; margin-bottom: 6px; }
.empty-state span { font-size: 12px; }

/* Mobile: swap table for cards */
@media (max-width: 1024px) and (hover: none) and (pointer: coarse) {
  .table-container { visibility: hidden; pointer-events: none; }
  .card-list { visibility: visible; pointer-events: auto; }
  .result-count { display: none; }
}
@media (max-width: 600px) {
  .table-container { visibility: hidden; pointer-events: none; }
  .card-list { visibility: visible; pointer-events: auto; }
  .result-count { display: none; }
}


/* ── 4. Group headers (Band Members "Group by") ──────────────────────────────── */
tr.group-header-row td {
  background: var(--surface2);
  color: var(--gold);
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-right: none;
  cursor: default;
  position: static;
  min-width: 0;
  max-width: none;
  width: auto;
}
tr.group-header-row:hover td { background: var(--surface2) !important; }

.group-header-card {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 10px 4px 4px;
  flex-shrink: 0;
}
.group-header-card:first-child { padding-top: 2px; }


/* ── 5. Modals & forms ─────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 16px max(16px, var(--safe-left));
  backdrop-filter: blur(3px);
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 100%;
  max-width: 560px;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 10;
}
.modal-header h2 {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  padding-right: 10px;
}
.modal-close {
  background: none; border: none;
  color: var(--muted); cursor: pointer;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  font-size: 20px; line-height: 1;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.modal-close:hover { color: var(--text); background: var(--surface2); }

.modal-body { padding: 20px; }

/* Form fields */
.field-group { margin-bottom: 20px; }
.field-row { display: flex; gap: 12px; }
.field-row .field-group { flex: 1; }
.field-label {
  display: block;
  font-family: var(--font-head);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.field-input, .field-select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
  min-height: 44px;
}
.field-select {
  font-family: var(--font-head);
  font-size: 13px;
  cursor: pointer;
}
.field-input:focus, .field-select:focus { border-color: var(--gold-dim); }
.field-hint { font-size: 11px; color: var(--muted); margin-top: 5px; }

/* Modal footer + action buttons */
.modal-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.btn-save {
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold);
  cursor: pointer;
  font-family: var(--font-head); font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0 20px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; flex: 1;
}
.btn-save:hover { background: #9a7a28; color: #fff; }
.btn-save:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-delete {
  background: none;
  border: 1px solid #4a2a2a;
  border-radius: var(--radius);
  color: #c07070;
  cursor: pointer;
  font-family: var(--font-head); font-size: 12px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0 16px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.btn-delete:hover { background: #2a1a1a; border-color: #7a3a3a; color: #e07070; }

/* Delete confirmation */
.delete-confirm {
  display: none;
  background: #2a1a1a;
  border: 1px solid #6b3030;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #e07070;
  line-height: 1.5;
}
.delete-confirm.visible { display: block; }
.delete-confirm strong { font-family: var(--font-head); }


/* ── 6. Toast notifications ───────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(20px + var(--safe-bot));
  left: 50%; transform: translateX(-50%);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: var(--font-head);
  padding: 10px 18px;
  white-space: nowrap;
  z-index: 1000;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  transform: translateX(-50%) translateY(8px);
  pointer-events: none;
}
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--green); color: var(--green-text); background: #1a2e1a; }
.toast.error   { border-color: #6b3030; color: #e07070; background: #2a1a1a; }


/* ── 7. Song Library page (index.html) ───────────────────────────────────────── */

/* Singer filter strip */
.filter-strip-wrap {
  flex-shrink: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px max(14px, var(--safe-left));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.filter-strip-wrap::-webkit-scrollbar { display: none; }
.filter-strip {
  display: flex;
  gap: 6px;
  width: max-content;
}
.filter-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 6px 13px;
  text-transform: uppercase;
  transition: all .15s;
  white-space: nowrap;
  min-height: 32px;
}
.filter-btn.active {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
}

/* Sticky first two columns (Song Title, Artist) */
#song-table th:nth-child(1), #song-table td:nth-child(1) {
  position: sticky; left: 0; z-index: 5;
  min-width: 220px; max-width: 280px;
}
#song-table th:nth-child(2), #song-table td:nth-child(2) {
  position: sticky; left: 220px; z-index: 4;
  min-width: 150px; max-width: 190px;
  border-right: 2px solid var(--border) !important;
}
#song-table th:nth-child(1) { z-index: 15; }
#song-table th:nth-child(2) { z-index: 14; }

thead th.singer-col { background: var(--singer-bg); color: #8aa8d8; text-align: center; min-width: 66px; }
thead th.alt-key-col { background: #1c2218; color: #6a8f63; min-width: 90px; }
thead th.bpm-col     { background: #1a1810; color: var(--gold); min-width: 56px; text-align: center; }

#song-table td:nth-child(2) { color: var(--muted); font-size: 12px; }
.song-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; max-width: 260px; display: block; }
td.singer-cell { text-align: center; font-family: var(--font-head); font-size: 11px; font-weight: 600; letter-spacing: 0.03em; padding: 8px 4px; }
td.singer-cell.yes { background: #1a2e1a; color: var(--green-text); }
td.singer-cell.no  { color: #2e2e2e; }
td.alt-key-cell { color: #5a8a54; font-size: 11px; font-family: var(--font-head); background: #161c15; }
td.alt-key-cell:empty { background: var(--bg); }
td.bpm-cell { color: var(--gold); font-size: 12px; font-family: var(--font-head); font-weight: 600; text-align: center; background: #1a1510; letter-spacing: 0.03em; }
td.bpm-cell:empty { background: var(--bg); color: #2a2a2a; }

/* Mobile song cards */
.song-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.song-card.expanded { border-color: #444; }
.song-card-header {
  padding: 13px 14px 11px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
}
.song-card-info { flex: 1; min-width: 0; }
.song-card-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-card-artist { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-card-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
.song-card-keys { font-size: 10px; color: #5a8a54; font-family: var(--font-head); letter-spacing: 0.04em; background: #161c15; border-radius: 3px; padding: 2px 6px; }
.song-card-bpm  { font-size: 10px; color: var(--gold); font-family: var(--font-head); letter-spacing: 0.04em; background: #1a1510; border-radius: 3px; padding: 2px 6px; }
.song-singer-count { font-size: 10px; color: var(--muted); font-family: var(--font-head); }
.card-chevron { color: var(--muted); flex-shrink: 0; transition: transform .2s; margin-top: 1px; }
.song-card.expanded .card-chevron { transform: rotate(180deg); }
.song-card-singers { display: none; border-top: 1px solid var(--border); padding: 10px 14px 12px; flex-wrap: wrap; gap: 6px; background: #191919; }
.song-card.expanded .song-card-singers { display: flex; }
.singer-pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 4px; font-family: var(--font-head); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; padding: 5px 10px; text-transform: uppercase; }
.singer-pill.yes { background: #1a2e1a; color: var(--green-text); border: 1px solid #2a4a2a; }
.singer-pill .pill-key { color: #9acd9a; font-size: 10px; font-weight: 500; }


/* ── 8. Edit page (edit.html) ─────────────────────────────────────────────────── */
.edit-page {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--nav-h));
  overflow: hidden;
}

.edit-toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px max(14px, var(--safe-left));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.edit-count { font-size: 11px; color: var(--muted); font-family: var(--font-head); white-space: nowrap; flex-shrink: 0; }

.song-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px max(14px, var(--safe-left)) calc(10px + var(--safe-bot));
}
.song-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  min-height: 52px;
}
.song-row:hover { border-color: #444; background: #222; }
.song-row-info { flex: 1; min-width: 0; }
.song-row-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-row-artist { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-row-meta { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.song-row-key-badge {
  font-family: var(--font-head); font-size: 10px; letter-spacing: 0.04em;
  background: #161c15; color: #5a8a54; border-radius: 3px; padding: 2px 6px;
}
.song-row-singer-badge {
  font-family: var(--font-head); font-size: 10px; letter-spacing: 0.04em;
  background: #1a2433; color: #8aa8d8; border-radius: 3px; padding: 2px 6px;
}
.edit-arrow { color: var(--muted); flex-shrink: 0; }

/* Singer toggle pills (in edit modal) */
.singer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.singer-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface2);
  transition: border-color .15s;
}
.singer-toggle.active { border-color: #2a4a2a; }

.singer-toggle-btn {
  background: none; border: none;
  font-family: var(--font-head); font-size: 11px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 7px 12px;
  cursor: pointer;
  transition: background .15s, color .15s;
  color: var(--muted);
  min-height: 36px;
}
.singer-toggle.active .singer-toggle-btn { background: #1a2e1a; color: var(--green-text); }

.singer-key-input {
  background: var(--bg);
  border: none;
  border-left: 1px solid var(--border);
  color: #9acd9a;
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: 0.04em;
  outline: none;
  padding: 7px 10px;
  width: 80px;
  display: none;
  min-height: 36px;
}
.singer-toggle.active .singer-key-input { display: block; }
.singer-key-input::placeholder { color: #3a5a3a; }


/* ── 9. Upload page (upload.html) ─────────────────────────────────────────────── */
.upload-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 16px calc(40px + var(--safe-bot));
  min-height: calc(100dvh - var(--nav-h));
}
.upload-card {
  width: 100%;
  max-width: 520px;
}
.upload-card h1 {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.upload-card .sub {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 28px;
  line-height: 1.6;
}

/* File picker / drop zone */
.file-picker {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: 8px;
  transition: border-color .2s, background .2s;
  position: relative;
  text-align: center;
}
.file-picker-inner {
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.file-picker input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  font-size: 16px; /* Prevent iOS zoom */
}
.file-picker:hover, .file-picker.drag-over {
  border-color: var(--gold-dim);
  background: #1f1c16;
}
.drop-icon { color: var(--muted); }
.drop-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.drop-sub { font-size: 12px; color: var(--muted); }
.file-types { display: flex; gap: 6px; }
.file-type-tag {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  text-transform: uppercase;
}

/* Mobile: compact tap-to-browse */
@media (max-width: 700px) {
  .file-picker-inner { padding: 28px 20px; }
  .drop-sub { display: none; }
  .drop-title { font-size: 14px; }
  .upload-page { padding: 24px 14px calc(24px + var(--safe-bot)); }
  .upload-card h1 { font-size: 18px; }
}

/* Selected file */
.selected-file {
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 10px;
  padding: 11px 14px;
  font-size: 13px;
}
.selected-file.visible { display: flex; }
.selected-file svg { color: var(--gold); flex-shrink: 0; }
.selected-file .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file .remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s;
}
.selected-file .remove:hover { color: var(--text); }

/* Upload button */
.upload-btn {
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold);
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-top: 14px;
  padding: 0 24px;
  text-transform: uppercase;
  transition: all .15s;
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.upload-btn:hover:not(:disabled) { background: #9a7a28; color: #fff; }
.upload-btn:active:not(:disabled) { transform: scale(0.98); }
.upload-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Progress bar */
.progress-bar-wrap {
  display: none;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin: 14px 0 6px;
}
.progress-bar-wrap.visible { display: block; }
.progress-bar {
  height: 100%;
  background: var(--gold);
  width: 0;
  transition: width .3s ease;
  border-radius: 2px;
}
.status-msg { font-size: 13px; color: var(--muted); text-align: center; min-height: 20px; }

/* Result card */
.result-card {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 18px;
  overflow: hidden;
}
.result-card.visible { display: block; }
.result-card.success { border-color: var(--green); }
.result-card.error   { border-color: #6b2a2a; }

.result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.result-header.success { background: #1a2e1a; }
.result-header.error   { background: #2a1a1a; }
.result-header h3 { font-family: var(--font-head); font-size: 14px; font-weight: 700; }
.result-header.success h3 { color: var(--green-text); }
.result-header.error   h3 { color: #e07070; }

.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}
.stat { background: var(--surface); padding: 14px 16px; }
.stat-val {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-head);
}

.new-assignments { padding: 12px 16px; border-top: 1px solid var(--border); }
.new-assignments h4 {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.assignment-item { font-size: 12px; color: var(--green-text); margin-bottom: 3px; }

.view-library-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  color: var(--gold);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background .15s;
  width: 100%;
}
.view-library-btn:hover { background: var(--surface2); }


/* ── 9b. Weddings page (weddings.html, wedding_detail.html) ─────────────────── */
.wedding-year-header {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.wedding-year-header:first-child { margin-top: 0; }

.wedding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.wedding-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, background .15s, transform .15s;
}
.wedding-card:hover {
  border-color: var(--gold-dim);
  background: #222;
  transform: translateY(-1px);
}
.wedding-card-date {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 8px;
}
.wedding-card-venue {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wedding-card-location {
  font-size: 12px;
  color: var(--muted);
}

/* Wedding detail / form page */
.wedding-detail-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px max(16px, var(--safe-left)) calc(40px + var(--safe-bot));
}
.wedding-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.wedding-detail-header h1 {
  font-family: var(--font-head);
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.wedding-section {
  margin-bottom: 32px;
}
.wedding-section-title {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.lineup-count {
  color: var(--muted);
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  font-size: 11px;
  margin-left: 6px;
}
.gig-sep {
  color: var(--muted);
  margin: 0 2px;
}

.phone-link {
  color: var(--text);
  text-decoration: none;
  transition: color .15s;
}
.phone-link:hover {
  color: var(--gold);
}

.special-song-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  .special-song-row { grid-template-columns: 1fr; }
}

.additional-song-item {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
@media (max-width: 600px) {
  .additional-song-item { grid-template-columns: 1fr; }
}
.btn-remove-row {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  width: 36px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, border-color .15s;
  flex-shrink: 0;
}
.btn-remove-row:hover { color: #e07070; border-color: #6b3030; }

.lineup-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}
.lineup-entry {
  display: flex;
  flex-direction: column;
}
.lineup-instrument-select {
  font-size: 11px;
  padding: 6px 8px;
  min-height: 32px;
  max-width: 160px;
}
.lineup-toggle {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  color: var(--muted);
  min-height: 36px;
}
.lineup-toggle.active {
  background: #1b2433;
  border-color: #2a4a6a;
  color: #8aa8d8;
}

.time-range-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}
.time-range-sep {
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-head);
}
@media (max-width: 600px) {
  .time-range-row { grid-template-columns: 1fr; }
  .time-range-sep { text-align: center; }
}

.wedding-readonly-value {
  font-size: 14px;
  color: var(--text);
  padding: 10px 0;
}
.wedding-readonly-value.empty { color: var(--muted); font-style: italic; }

.view-field {
  margin-bottom: 16px;
}
.view-field-label {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.view-field-value {
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
}
.view-field-sub {
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
}
.view-lineup-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.view-lineup-list li {
  font-size: 15px;
  color: var(--text);
  padding: 4px 0;
}

/* Gig-sheet style Top Line Info block */
.gig-sheet {
  font-size: 15px;
  line-height: 1.7;
}
.gig-line {
  color: var(--text);
  margin-bottom: 4px;
}
.gig-singer {
  color: #8aa8d8;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.gig-singer-bold {
  color: #8aa8d8;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.gig-tag {
  color: var(--gold);
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.gig-key {
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.gig-subheading {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 16px 0 6px;
}
.gig-schedule-line {
  color: var(--text);
  font-size: 15px;
  margin-bottom: 4px;
}
.gig-schedule-line span[data-time],
.gig-schedule-line span[data-time-range] {
  color: var(--gold);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  margin-right: 6px;
}
.lineup-instrument {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.lineup-name-line {
  color: var(--text);
}
.lineup-dietary-spacer {
  display: inline-block;
  width: 10px;
}



.btn-add {
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold);
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0 14px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all .15s;
  flex-shrink: 0;
  text-decoration: none;
}
.btn-add:hover { background: #9a7a28; color: #fff; }

.group-select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  height: 42px;
  padding: 0 10px;
  cursor: pointer;
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
  flex-shrink: 0;
  max-width: 140px;
}
.group-select:focus { border-color: var(--gold-dim); }

.btn-secondary {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  height: 42px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all .15s;
  flex-shrink: 0;
  text-decoration: none;
}
.btn-secondary:hover { border-color: #555; color: var(--text); background: #2e2e2e; }

/* Sticky first column (Last Name) */
#member-table th:nth-child(1), #member-table td:nth-child(1) {
  position: sticky; left: 0; z-index: 5;
  min-width: 130px; max-width: 160px;
  background: var(--bg);
}
#member-table th:nth-child(1) { z-index: 15; background: var(--surface); }

#planner-table th:nth-child(1), #planner-table td:nth-child(1) {
  position: sticky; left: 0; z-index: 5;
  min-width: 130px; max-width: 160px;
  background: var(--bg);
}
#planner-table th:nth-child(1) { z-index: 15; background: var(--surface); }

#venue-table th:nth-child(1), #venue-table td:nth-child(1) {
  position: sticky; left: 0; z-index: 5;
  min-width: 160px; max-width: 220px;
  background: var(--bg);
}
#venue-table th:nth-child(1) { z-index: 15; background: var(--surface); }

td.member-name { font-weight: 500; }
td.member-email,
td.member-cell { color: var(--text); font-size: 12px; }
td.member-instruments {
  font-size: 11px;
  font-family: var(--font-head);
  letter-spacing: 0.02em;
  color: #8aa8d8;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}
td.member-car { text-align: center; font-family: var(--font-head); font-size: 11px; font-weight: 600; letter-spacing: 0.03em; }
td.member-car.yes { background: #1a2e1a; color: var(--text); }
td.member-car.no  { color: var(--text); }
td.member-zone {
  font-size: 11px;
  font-family: var(--font-head);
  letter-spacing: 0.03em;
  color: var(--gold);
  background: #1a1510;
}
td.member-zone:empty { background: var(--bg); color: #2a2a2a; }

/* Mobile member cards */
.member-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  flex-shrink: 0;
  min-height: 52px;
}
.member-card:hover { border-color: #444; background: #222; }
.member-card-info { flex: 1; min-width: 0; }
.member-card-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-card-sub { font-size: 12px; color: var(--text); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-card-meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.zone-pill {
  font-size: 10px; font-family: var(--font-head); letter-spacing: 0.04em;
  color: var(--gold); background: #1a1510; border-radius: 3px; padding: 2px 6px;
}
.car-pill {
  font-size: 10px; font-family: var(--font-head); letter-spacing: 0.04em;
  color: var(--green-text); background: #1a2e1a; border-radius: 3px; padding: 2px 6px;
}
.instrument-pill-sm {
  font-size: 10px; font-family: var(--font-head); letter-spacing: 0.04em;
  color: #8aa8d8; background: #1b2433; border-radius: 3px; padding: 2px 6px;
}
.card-arrow { color: var(--muted); flex-shrink: 0; margin-top: 1px; }

/* Instrument toggle pills (in modal) */
.instrument-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.instrument-toggle {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  color: var(--muted);
  min-height: 36px;
}
.instrument-toggle.active {
  background: #1b2433;
  border-color: #2a4a6a;
  color: #8aa8d8;
}


/* ── 11. Public pages: portal, coming soon, login, db error ──────────────────── */

/* Shared "document" page shell used by login / db-error / coming-soon
   when they're standalone (no app nav). */
.doc-page {
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px max(16px, env(safe-area-inset-left))
           calc(24px + var(--safe-bot))
           max(16px, env(safe-area-inset-right));
}

/* ── Portal landing page ── */
.portal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 max(24px, var(--safe-left));
  max-width: 1100px;
  margin: 0 auto;
}

.portal-page header {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.portal-signout {
  position: absolute;
  top: 24px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: color .15s, border-color .15s, background .15s;
  z-index: 1;
}
.portal-signout:hover {
  color: var(--text);
  border-color: #555;
  background: var(--surface2);
}

@media (max-width: 600px) {
  .portal-signout {
    position: static;
    display: inline-flex;
    margin-bottom: 20px;
  }
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
}
.eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

.portal-page h1 {
  font-family: var(--font-head);
  font-size: clamp(28px, 5vw, 54px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 680px;
  position: relative;
}

.portal-page .subtitle {
  margin-top: 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.01em;
  position: relative;
}

/* Nav grid */
.nav-grid {
  padding: 48px 0 64px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.nav-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, background .2s, transform .15s;
  position: relative;
  overflow: hidden;
}
.nav-card:hover {
  border-left-color: var(--gold);
  background: #1c1c1c;
  transform: translateY(-1px);
}

.card-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 10px;
}

.card-desc {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.nav-card .card-arrow-icon {
  position: absolute;
  top: 28px;
  right: 24px;
  color: var(--border);
  transition: color .2s, transform .2s;
}
.nav-card:hover .card-arrow-icon {
  color: var(--gold);
  transform: translate(2px, -2px);
}

.portal-page footer {
  margin-top: auto;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .portal-page header { padding: 40px 0 36px; }
  .nav-grid { grid-template-columns: 1fr; padding: 36px 0 48px; }
  .card-title { font-size: 19px; }
}


/* ── Coming soon (Weddings / Venues / Planners) ── */
.coming-soon-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 80px max(24px, var(--safe-left));
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.coming-soon-page h1 {
  font-family: var(--font-head);
  font-size: clamp(36px, 7vw, 72px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1; color: var(--text); margin-bottom: 24px;
}
.status-line {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted); font-family: var(--font-body);
  margin-bottom: 40px;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); flex-shrink: 0;
}


/* ── Login page ── */
.login-wrap {
  width: 100%;
  max-width: 360px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}
.brand-mark {
  font-size: 28px;
  color: var(--gold);
  line-height: 1;
}
.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.brand-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  font-family: var(--font-head);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 24px;
}
.login-card h1 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}
.login-card .hint {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.5;
}
.error-msg {
  background: #2a1a1a;
  border: 1px solid #6b3030;
  border-radius: var(--radius);
  color: var(--red);
  font-size: 13px;
  margin-bottom: 16px;
  padding: 10px 12px;
  line-height: 1.4;
}
.login-card label {
  display: block;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.input-wrap {
  position: relative;
  margin-bottom: 20px;
}
.login-card input[type="password"],
.login-card input[type="email"],
.login-card input[type="text"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  letter-spacing: 0.06em;
  outline: none;
  padding: 13px 44px 13px 14px;
  transition: border-color .15s;
  -webkit-appearance: none;
  min-height: 50px;
}
.login-card input:focus { border-color: var(--gold-dim); }
.toggle-pw {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 46px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
}
.toggle-pw:hover { color: var(--text); }
.submit-btn {
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold);
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0 24px;
  text-transform: uppercase;
  transition: all .15s;
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.submit-btn:hover { background: #9a7a28; color: #fff; }
.submit-btn:active { transform: scale(0.98); }


/* ── DB error page ── */
.db-error-card {
  max-width: 520px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
}
.db-error-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--red);
  background: #2a1a1a; border: 1px solid #4a2a2a;
  border-radius: 4px; padding: 5px 10px; margin-bottom: 20px;
}
.db-error-card h1 {
  font-family: var(--font-head); font-size: 22px; font-weight: 700;
  margin-bottom: 12px; letter-spacing: -0.01em;
}
.db-error-card p { font-size: 14px; line-height: 1.6; color: var(--muted); margin-bottom: 16px; }
.db-error-card code {
  background: var(--bg); border: 1px solid var(--border); border-radius: 3px;
  padding: 2px 7px; font-size: 13px; color: var(--gold);
}
.db-error-card a { color: var(--gold); text-decoration: none; }
.db-error-steps { margin: 20px 0; padding-left: 0; list-style: none; counter-reset: step; }
.db-error-steps li {
  font-size: 13px; color: var(--text); padding: 8px 0 8px 28px;
  position: relative; border-top: 1px solid var(--border);
}
.db-error-steps li:first-child { border-top: none; }
.db-error-steps li::before {
  content: counter(step); counter-increment: step;
  position: absolute; left: 0; top: 8px;
  width: 18px; height: 18px; border-radius: 3px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--gold); font-family: var(--font-head); font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ════════════════════════════════════════════════════════════════════════
   Overlay picker (venues, planners, songs)
   ════════════════════════════════════════════════════════════════════════ */
.picker-trigger {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 13px;
  text-align: left;
  padding: 10px 12px;
  min-height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: border-color .15s, color .15s;
}
.picker-trigger:hover:not(:disabled) { border-color: var(--gold-dim); }
.picker-trigger:disabled { cursor: not-allowed; opacity: 0.6; }
.picker-trigger.has-value { color: var(--text); }
.picker-trigger-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.picker-trigger-icon {
  color: var(--muted);
  flex-shrink: 0;
}

/* Picker modal */
.picker-overlay { z-index: 600; }
.picker-modal {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 40px);
}
.picker-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  position: relative;
  flex-wrap: wrap;
}
.picker-search-icon {
  color: var(--muted);
  flex-shrink: 0;
}
.picker-search-input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 9px 12px;
  outline: none;
  min-height: 40px;
  -webkit-appearance: none;
}
.picker-search-input:focus { border-color: var(--gold-dim); }
.picker-clear-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 10px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.picker-clear-btn:hover { color: var(--text); border-color: var(--muted); }

.picker-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 0;
  flex: 1;
}
.picker-item {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  text-align: left;
  padding: 12px 20px;
  cursor: pointer;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background .12s;
}
.picker-item:last-child { border-bottom: none; }
.picker-item:hover { background: var(--surface2); }
.picker-item-selected { background: var(--gold-dim); }
.picker-item-selected:hover { background: var(--gold-dim); }
.picker-item-label {
  font-size: 15px;
  color: var(--text);
}
.picker-item-sub {
  font-size: 12px;
  color: var(--muted);
}
.picker-empty {
  padding: 24px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* Lineup groups on edit page */
.lineup-group {
  margin-bottom: 14px;
}
.lineup-group:last-child { margin-bottom: 0; }
.lineup-group-label {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

/* Picker — Add new / create form view */
.picker-view { display: flex; flex-direction: column; min-height: 0; }
.picker-view-list { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.picker-view-list .picker-list { flex: 1; }

.picker-add-wrap {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.picker-add-btn {
  width: 100%;
  justify-content: center;
}

.picker-view-create {
  padding: 18px 20px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.picker-create-fields .field-group { margin-bottom: 14px; }
.picker-create-fields .field-group:last-child { margin-bottom: 0; }
.picker-create-error {
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 13px;
  margin: 8px 0 12px;
}
.picker-create-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.picker-create-actions .btn-secondary,
.picker-create-actions .btn-save { flex: 1; }

/* ════════════════════════════════════════════════════════════════════════
   Time picker
   ════════════════════════════════════════════════════════════════════════ */
.time-picker-trigger {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 13px;
  text-align: left;
  padding: 10px 12px;
  min-height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: border-color .15s, color .15s;
}
.time-picker-trigger:hover:not(:disabled) { border-color: var(--gold-dim); }
.time-picker-trigger:disabled { cursor: not-allowed; opacity: 0.6; }
.time-picker-trigger.has-value { color: var(--text); }
.time-picker-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Time picker modal */
.time-picker-overlay { z-index: 700; }
.time-picker-modal {
  display: flex;
  flex-direction: column;
  max-width: 460px;
}
.time-picker-body {
  padding: 16px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.time-picker-display {
  text-align: center;
  padding: 12px 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.time-picker-display-value {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
}
.time-picker-section { margin-bottom: 18px; }
.time-picker-section:last-child { margin-bottom: 0; }
.time-picker-section-label {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.time-picker-grid {
  display: grid;
  gap: 6px;
}
.hours-grid { grid-template-columns: repeat(6, 1fr); }
.minutes-grid { grid-template-columns: repeat(6, 1fr); }
.time-cell {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 0;
  min-height: 40px;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.time-cell:hover { border-color: var(--gold-dim); }
.time-cell.selected {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
}
.time-cell-custom { font-style: italic; }

.time-picker-ampm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.ampm-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 12px 0;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.ampm-btn:hover { border-color: var(--gold-dim); }
.ampm-btn.selected {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
}

.time-picker-actions {
  display: flex;
  gap: 10px;
  padding: 14px 20px 16px;
  border-top: 1px solid var(--border);
}
.time-picker-actions .btn-secondary,
.time-picker-actions .btn-save { flex: 1; }

@media (max-width: 460px) {
  .hours-grid { grid-template-columns: repeat(4, 1fr); }
  .minutes-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ────────────────────────────────────────────────────────────────────────
   PWA install button (floating pill, bottom-right)
   ──────────────────────────────────────────────────────────────────────── */
.pwa-install-btn {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  right: 20px;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: #141414;
  border: none;
  border-radius: 999px;
  padding: 11px 18px 11px 14px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.45), 0 0 0 1px rgba(0,0,0,0.15);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  animation: pwa-install-in .35s ease-out;
}
.pwa-install-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,0,0,0.15);
}
.pwa-install-btn:active { transform: translateY(0); }
.pwa-install-btn[hidden] { display: none; }

@keyframes pwa-install-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ──────────────────────────────────────────────────────────────────────────
   Mobile bottom navigation (≤768px)
   ────────────────────────────────────────────────────────────────────────── */
.bottom-nav { display: none; }

@media (max-width: 768px) {
  /* Hide the top nav and hamburger entirely on mobile */
  nav:not(.bottom-nav) { display: none !important; }

  /* Push content above the bottom nav and below the iOS status bar.
     In a normal browser env(safe-area-inset-top) is 0, so the max() gives 15px.
     In a standalone PWA the inset (~47px on notched iPhones) is larger and wins. */
  body {
    padding-top: max(15px, var(--safe-top));
    padding-bottom: calc(64px + var(--safe-bot));
  }

  .bottom-nav {
    display: flex;
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    min-height: 0;
    padding-top: 0;
    z-index: 400;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: none;
    padding-bottom: var(--safe-bot);
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
  }
  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px 6px;
    color: var(--muted);
    text-decoration: none;
    font-family: var(--font-head);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    min-height: 56px;
    transition: color .15s;
  }
  .bottom-nav-item svg {
    width: 22px;
    height: 22px;
  }
  .bottom-nav-item.active {
    color: var(--gold);
  }
  .bottom-nav-item:active {
    background: var(--surface2);
  }

  /* Lift the install pill above the bottom nav */
  .pwa-install-btn {
    bottom: calc(76px + var(--safe-bot));
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Picker modal — mobile improvements
   ────────────────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .picker-overlay { padding: 0; }
  .picker-modal {
    max-width: 100%;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    padding-top: var(--safe-top);
  }
  .picker-search-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 16px;
    position: relative;
  }
  .picker-search-wrap .picker-search-input {
    width: 100%;
    padding-left: 38px;
  }
  .picker-search-icon {
    position: absolute;
    left: 28px;
    top: 23px;
    pointer-events: none;
  }
  .picker-clear-btn {
    align-self: flex-end;
    padding: 6px 10px;
    font-size: 10px;
  }
  .picker-item { padding: 14px 16px; }
  .picker-add-wrap { padding: 12px 16px calc(12px + var(--safe-bot)); }

  /* Time picker — keep usable but don't go full-bleed (it's already compact) */
  .time-picker-modal {
    max-width: 100%;
    padding-top: var(--safe-top);
  }
  .time-picker-actions {
    padding-bottom: calc(16px + var(--safe-bot));
  }

  /* Picker create form view — full-bleed too */
  .picker-view-create {
    padding-bottom: calc(20px + var(--safe-bot));
  }
}

/* Sign Out button on the My Account page */
.account-signout-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.account-signout-btn:hover {
  color: var(--text);
  border-color: var(--muted);
  background: var(--surface);
}

/* ──────────────────────────────────────────────────────────────────────────
   Sticky toolbar on mobile (weddings / planners / venues / band-members)
   ──────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Let body be the scroll container so the toolbar can be sticky to viewport */
  .page-shell {
    height: auto;
    overflow: visible;
  }
  .page-shell .content-area {
    overflow: visible !important;
    height: auto !important;
    position: static !important;
  }
  /* On mobile we use the card-list, never the table — fully remove it from
     layout (visibility:hidden alone leaves an empty box once position:static). */
  .page-shell .table-container {
    display: none !important;
  }
  /* The card-list is positioned absolute on desktop so it fills the fixed-
     height scroll viewport. On mobile we want it to flow naturally instead.
     Also force visibility on, since the default has it hidden until the
     existing 600px touch breakpoint would normally reveal it. */
  .page-shell .card-list {
    position: static !important;
    height: auto !important;
    overflow: visible !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  .toolbar {
    position: sticky;
    /* Stick directly below the body's padding-top (status bar / 15px buffer) */
    top: max(15px, var(--safe-top));
    z-index: 50;
    /* Lift onto its own compositor layer so iOS keeps it crisp while scrolling */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
}

/* HOLD banner on wedding view */
.wedding-hold-banner {
  background: #b71c1c;
  color: #fff;
  font-family: var(--font-head);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-align: center;
  padding: 14px 12px;
  margin: 0 0 16px;
  border-radius: var(--radius);
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(183, 28, 28, 0.4);
}
@media (max-width: 600px) {
  .wedding-hold-banner { font-size: 28px; padding: 12px 10px; }
}

/* HOLD toggle on the wedding edit page */
.hold-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 18px;
  user-select: none;
  transition: background .15s, border-color .15s, color .15s;
}
.hold-toggle input { width: 18px; height: 18px; accent-color: #b71c1c; cursor: pointer; }
.hold-toggle .hold-toggle-label { letter-spacing: 0.18em; }
.hold-toggle.active {
  background: rgba(183, 28, 28, 0.15);
  border-color: #b71c1c;
  color: #ff6b6b;
}

/* Inline role + name pair in the bride/groom row */
.role-select {
  width: auto;
  min-width: 100px;
  margin-bottom: 6px;
}

/* Special song row: label | song | singer | key | × */
.special-song-item {
  display: grid;
  grid-template-columns: 1.1fr 1.6fr 1fr 90px auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
@media (max-width: 800px) {
  .special-song-item { grid-template-columns: 1fr 1fr; }
  .special-song-item .btn-remove-row { grid-column: 2; justify-self: end; }
}
@media (max-width: 480px) {
  .special-song-item { grid-template-columns: 1fr auto; }
  .special-song-item .picker-trigger,
  .special-song-item .special-song-key { grid-column: 1; }
  .special-song-item .btn-remove-row { grid-column: 2; grid-row: 1; align-self: start; }
}
.special-song-key {
  min-width: 0;
}

/* ── Transport (cars) editor ─────────────────────────────────────────── */
.car-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
}
@media (max-width: 600px) {
  .car-row { grid-template-columns: 1fr auto; }
  .car-row .car-passengers { grid-column: 1 / span 2; }
}
.car-passengers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 32px;
}
.passenger-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px 4px 12px;
  font-size: 12px;
  font-family: var(--font-head);
  color: var(--text);
  letter-spacing: 0.03em;
}
.passenger-chip-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  padding: 0 0 0 2px;
  cursor: pointer;
  transition: color .12s;
}
.passenger-chip-remove:hover { color: var(--gold); }
.btn-add-passenger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px dashed var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color .12s, border-color .12s;
}
.btn-add-passenger:hover { color: var(--text); border-color: var(--muted); }
.btn-remove-car {
  align-self: center;
}

/* In Town toggle */
.in-town-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text);
  user-select: none;
}
.in-town-toggle input { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; }

/* Forgot-password link on auth pages */
.forgot-link {
  color: var(--gold);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: color .15s;
}
.forgot-link:hover { color: var(--text); }

/* Click-to-edit cursor on song rows and cards */
#song-table tbody tr.clickable { cursor: pointer; }
#song-table tbody tr.clickable:hover { background: var(--surface2); }
.song-card.clickable { cursor: pointer; }
.song-card.clickable:hover { border-color: var(--muted); }

/* ── Songs tabs: Library / Requests switcher ─────────────────────────────── */
.songs-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin: 0 0 10px;
  padding: 0;
}
.songs-tab {
  background: none;
  border: none;
  padding: 10px 16px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .15s, border-color .15s;
}
.songs-tab:hover { color: var(--text); }
.songs-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.songs-tab-count {
  background: var(--surface2);
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.songs-tab.active .songs-tab-count { background: var(--gold); color: var(--bg); }

/* ── Status dropdown in Requests view ─────────────────────────────────────── */
.status-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 8px;
  border-radius: 6px;
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: 0.02em;
  cursor: pointer;
  width: 100%;
  max-width: 220px;
}

/* ── Request card (mobile) ────────────────────────────────────────────────── */
.request-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.request-card.clickable { cursor: pointer; }
.request-card.clickable:hover { border-color: var(--muted); }
.request-card-head { margin-bottom: 8px; }
.request-card-title { font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--text); }
.request-card-artist { font-size: 13px; color: var(--muted); margin-top: 2px; }
.request-card-sub { font-size: 12px; color: var(--muted); margin-top: 4px; letter-spacing: 0.03em; }
.request-card-controls { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }

/* ── Checkbox row in modal (Needs Arrangement / Lyric Sheet toggles) ─────── */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; }
