:root {
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

body {
  margin: 0;
  background: #0d1118;
  color: #eef2ff;
}

/* ── Layout ────────────────────────────────────────────────────────────────── */
.container {
  max-width: 760px;
  margin: 1.5rem auto;
  padding: 1rem;
}

.narrow {
  max-width: 480px;
}

.center-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  box-sizing: border-box;
}

/* ── Topbar ────────────────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: #161c29;
  border-bottom: 1px solid #2a3550;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: #eef2ff;
  text-decoration: none;
}

.topbar-user {
  flex: 1;
  color: #93c5fd;
  font-size: 0.9rem;
}

.topbar-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.hero-icon {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 2.2rem;
  font-weight: 900;
  margin: 0.25rem 0;
}

.hero-sub {
  color: #93c5fd;
  font-size: 1rem;
  margin-top: 0.25rem;
}

/* ── Entry grid (home) ─────────────────────────────────────────────────────── */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 540px;
  margin-bottom: 1.5rem;
}

.entry-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.75rem 1rem;
  background: #161c29;
  border: 1px solid #303b52;
  border-radius: 1rem;
  text-decoration: none;
  color: #eef2ff;
  transition: border-color 0.15s, background 0.15s;
}

.entry-card:hover {
  background: #1e2a3a;
  border-color: #5b8cff;
}

.entry-card--director {
  border-color: #4a3a8a;
  background: #16122e;
}

.entry-card--director:hover {
  border-color: #6840ff;
  background: #1e183a;
}

.entry-icon {
  font-size: 2.5rem;
}

.entry-desc {
  color: #93c5fd;
  font-size: 0.85rem;
  text-align: center;
}

.footer-note {
  color: #6b7280;
  font-size: 0.85rem;
  text-align: center;
}

.footer-note a {
  color: #5b8cff;
}

/* ── Back link ─────────────────────────────────────────────────────────────── */
.back-link {
  display: inline-block;
  color: #93c5fd;
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ── Card ──────────────────────────────────────────────────────────────────── */
.card {
  background: #161c29;
  border: 1px solid #303b52;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
}

/* ── Section ───────────────────────────────────────────────────────────────── */
.section {
  margin-bottom: 2.5rem;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.button {
  display: inline-block;
  border: 0;
  background: #5b8cff;
  color: white;
  padding: 0.75rem 1.2rem;
  border-radius: 0.6rem;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  white-space: nowrap;
}

.button.secondary { background: #6840ff; }
.button.danger    { background: #c9335c; }

.button.small {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.button.full-width {
  display: block;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
  margin-top: 0.75rem;
}

/* ── Forms ─────────────────────────────────────────────────────────────────── */
label {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'] {
  padding: 0.6rem 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid #374151;
  background: #1b2230;
  color: white;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.pin-input {
  font-size: 1.6rem;
  text-align: center;
  letter-spacing: 0.5em;
  font-weight: 700;
}

canvas {
  width: 100%;
  border-radius: 0.7rem;
  border: 1px solid #2b3242;
  background: #121925;
}

.row-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.row-actions input[type='text'],
.row-actions input[type='email'],
.row-actions input[type='password'] {
  flex: 1;
  min-width: 120px;
}

/* ── Selects ───────────────────────────────────────────────────────────────── */
.cb-select {
  padding: 0.6rem 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid #374151;
  background: #1b2230;
  color: white;
  font-size: 0.95rem;
}

.cb-select--sm {
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
}

/* ── Plan banner ───────────────────────────────────────────────────────────── */
.plan-banner {
  background: #161c29;
  border: 1px solid #303b52;
  border-radius: 0.6rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: #93c5fd;
  margin-bottom: 1.5rem;
}

.upgrade-link {
  color: #5b8cff;
  text-decoration: none;
  margin-left: 0.5rem;
}

/* ── PIN banner ────────────────────────────────────────────────────────────── */
.pin-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #1b2a1b;
  border: 1px solid #2a5a2a;
  border-radius: 0.7rem;
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.2rem;
  font-size: 1rem;
}

.pin-code {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.25em;
  color: #4ade80;
  font-variant-numeric: tabular-nums;
}

.pin-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.session-sub {
  font-size: 0.9rem;
  color: #93c5fd;
}

/* ── Badges ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  background: #374151;
  color: #eef2ff;
  border-radius: 1rem;
  padding: 0.1rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge--green {
  background: #1a3a1a;
  color: #4ade80;
  border: 1px solid #2a5a2a;
}

.badge--grey {
  background: #1f2937;
  color: #9ca3af;
  border: 1px solid #374151;
}

/* ── Table ─────────────────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
}

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

.cb-table th,
.cb-table td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #2a3550;
}

.cb-table th {
  color: #93c5fd;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Stats grid (superadmin) ───────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #161c29;
  border: 1px solid #303b52;
  border-radius: 0.75rem;
  padding: 1.1rem;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: #5b8cff;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.78rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Mixer channel cards ───────────────────────────────────────────────────── */
.users {
  display: grid;
  gap: 0.75rem;
}

.mixer-wrap {
  margin-top: 1rem;
}

.mixer {
  display: flex;
  align-items: flex-end;
  gap: 0.8rem;
  overflow-x: auto;
  padding: 1rem 0;
}

.channel {
  min-width: 118px;
  border: 1px solid #303b52;
  border-radius: 0.7rem;
  padding: 0.65rem;
  background: #161c29;
  display: grid;
  justify-items: center;
  gap: 0.55rem;
}

.vu-wrap {
  width: 20px;
  height: 120px;
  border-radius: 0.45rem;
  border: 1px solid #2f3c58;
  background: #0f141f;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.vu-bar {
  width: 100%;
  height: 5%;
  background: linear-gradient(180deg, #45df7f, #ffdc49 66%, #ff5a5a 100%);
  transition: height 80ms linear;
}

.fader-vertical {
  width: 120px;
  height: 28px;
  transform: rotate(-90deg);
}

.ms-row {
  display: flex;
  gap: 0.4rem;
}

.chip {
  border: 1px solid #3e4f71;
  background: #1f2a3f;
  color: #dde6ff;
  border-radius: 0.45rem;
  width: 34px;
  height: 30px;
  cursor: pointer;
  font-weight: 700;
}

.chip.active {
  background: #6d4dff;
}

/* ── Chorister join flow ───────────────────────────────────────────────────── */
.step-label {
  font-size: 0.78rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.chorister-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.chorister-btn {
  background: #1e2a3a;
  border: 1px solid #2a4a6a;
  border-radius: 0.6rem;
  padding: 0.75rem 0.5rem;
  color: #eef2ff;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s, border-color 0.15s;
}

.chorister-btn:hover {
  background: #1e3a5a;
  border-color: #5b8cff;
}

.session-badge {
  background: #1e2a3a;
  border: 1px solid #2a4a6a;
  border-radius: 0.5rem;
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  color: #93c5fd;
  margin-bottom: 1rem;
}

/* ── Misc ──────────────────────────────────────────────────────────────────── */
.hidden {
  display: none !important;
}

.error-msg {
  color: #f87171;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.muted {
  color: #6b7280;
  font-size: 0.9rem;
}

.note {
  color: #b4bfd9;
  font-size: 0.9rem;
}


a {
  color: #8cb6ff;
}
