:root {
  --bg: #0b0c10;
  --card: #16181d;
  --card-2: #1e2128;
  --accent: #ff2e63;
  --accent-2: #08d9d6;
  --text: #f2f2f2;
  --muted: #9aa0aa;
  --played: #2f3540;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(circle at top, #1a1d24, var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 90px;
}

.wrap.wide { max-width: 900px; }

header.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 20px;
}

header.app-header h1 {
  font-size: 20px;
  margin: 0;
  letter-spacing: 0.5px;
}

.session-date {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

header.app-header .badge {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid #2b2f38;
  padding: 4px 10px;
  border-radius: 999px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid #21242c;
}

.form-row { margin-bottom: 12px; }

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type=text], input[type=number] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #2b2f38;
  background: #0f1116;
  color: var(--text);
  font-size: 16px;
}

input:focus { outline: 2px solid var(--accent-2); }

button {
  cursor: pointer;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(90deg, var(--accent), #ff5f7e);
  color: white;
}

.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  background: var(--card-2);
  color: var(--text);
  padding: 10px 14px;
  border: 1px solid #2b2f38;
}

.request-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  background: var(--card-2);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 1px solid #262a33;
}

.request-item.played { opacity: 0.5; }
.request-item.mine { border-color: var(--accent-2); box-shadow: 0 0 0 1px var(--accent-2) inset; }

.dj-note {
  margin-top: 8px;
  background: #2a2210;
  border: 1px solid #4a3a12;
  color: #ffb020;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  line-height: 1.4;
}
.dj-note.reply {
  background: #0f2624;
  border-color: #164a45;
  color: var(--accent-2);
}
.dj-note-waiting {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}
.reply-btn { border-color: var(--accent-2); color: var(--accent-2); }

.request-info { flex: 1 1 200px; min-width: 0; }
.request-info .song { font-weight: 600; font-size: 15px; }
.request-info .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.request-info .meta span { margin-right: 10px; }

.queue-pos {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: #0f1116;
  border: 1px solid #2b2f38;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
}

.request-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 100%; justify-content: flex-start; }

.tip-btn {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  white-space: nowrap;
}
.tip-btn.priority {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.empty-state { text-align: center; color: var(--muted); padding: 40px 10px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #0f1116;
  border: 1px solid #2b2f38;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  z-index: 50;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 40;
}
.modal-backdrop.show { display: flex; }

.modal {
  background: var(--card);
  border: 1px solid #262a33;
  border-radius: 18px 18px 0 0;
  width: 100%;
  max-width: 560px;
  padding: 20px;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0;
}
.amount-grid button {
  padding: 12px 0;
  background: var(--card-2);
  color: var(--text);
  border: 1px solid #2b2f38;
}
.amount-grid button.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.demo-flag {
  font-size: 11px;
  color: #ffb020;
  border: 1px solid #4a3a12;
  background: #2a2210;
  padding: 6px 10px;
  border-radius: 8px;
  margin: 10px 0;
}

.summary-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.summary-row .stat {
  flex: 1;
  min-width: 110px;
  background: var(--card);
  border: 1px solid #21242c;
  border-radius: 12px;
  padding: 12px 14px;
}
.summary-row .stat .value { font-size: 22px; font-weight: 700; }
.summary-row .stat .label { font-size: 11px; color: var(--muted); text-transform: uppercase; }

.qr-box {
  text-align: center;
  padding: 18px;
}
.qr-box img { width: 220px; height: 220px; border-radius: 10px; background: white; padding: 10px; }
.qr-box .url { font-size: 13px; color: var(--muted); word-break: break-all; margin-top: 10px; }

.social-row { display: flex; gap: 8px; flex-wrap: wrap; }
.social-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--card-2); border: 1px solid #2b2f38; color: var(--text);
  text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 12px;
}
.social-pill svg { color: var(--accent-2); }
.merch-pill { border-color: var(--accent); color: var(--accent); font-weight: 700; }

.gate {
  max-width: 320px;
  margin: 80px auto;
  text-align: center;
}

.status-actions { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 100%; }
.status-actions .pinned { background: var(--accent-2); color: #06181a; border-color: var(--accent-2); }
.status-actions .has-note { background: #ffb020; color: #2a2210; border-color: #ffb020; }

.played-section { margin-top: 14px; border-top: 1px solid #21242c; padding-top: 12px; }
.played-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 4px 0;
}
.played-header .chevron {
  color: var(--muted);
  font-size: 13px;
  transition: transform 0.2s ease;
}
.played-section.collapsed .played-header .chevron { transform: rotate(-90deg); }
.played-body {
  max-height: 3000px;
  opacity: 1;
  overflow: hidden;
  margin-top: 10px;
  transition: max-height 0.25s ease, opacity 0.18s ease, margin-top 0.22s ease;
}
.played-section.collapsed .played-body {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.tips-panel {
  background: #0f1116;
  border: 1px solid #262a33;
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 10px 14px;
  margin: -10px 0 10px;
}
.tip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #1c1f26;
  font-size: 13px;
  flex-wrap: wrap;
}
.tip-row:last-child { border-bottom: none; }
.tip-row.refunded { opacity: 0.55; }
.tip-amt { font-weight: 700; min-width: 56px; }
.tip-method { color: var(--muted); }
.tip-name { color: var(--muted); flex: 1; min-width: 60px; }
.tip-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid #2b2f38;
}
.refunded-badge { color: #ffb020; border-color: #4a3a12; }
.refund-btn { padding: 6px 10px; font-size: 12px; border-color: #ff6b6b; color: #ff6b6b; }

@media (min-width: 640px) {
  .request-item { padding: 14px 16px; }
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkbox-row input[type=checkbox] { width: auto; }
.checkbox-row label {
  text-transform: none;
  font-size: 14px;
  color: var(--text);
  margin: 0;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.card-header h3 { margin: 0; }
.card-header .chevron {
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.card.collapsed .card-header .chevron { transform: rotate(-90deg); }

.card-body {
  max-height: 3000px;
  opacity: 1;
  overflow: hidden;
  margin-top: 14px;
  transition: max-height 0.25s ease, opacity 0.18s ease, margin-top 0.22s ease;
}
.card.collapsed .card-body {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}
