:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --bg-elev: #121922;
  --bg-soft: #182130;
  --border: #273246;
  --text: #e9eef5;
  --muted: #9fb0c8;
  --accent: #6ea8fe;
  --accent-dim: #3d6dad;
  --ok: #3dd68c;
  --warn: #ffc14d;
  --danger: #ff6b6b;
  --radius: 14px;
  --tap: 48px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 10% -10%, #142036 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.45;
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 16px;
}

.shell.narrow {
  max-width: 440px;
}

.auth-body .brand {
  font-size: 1.75rem;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}

.brand-small {
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(11, 15, 20, 0.85);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  width: min(1100px, 100%);
  margin: 0 auto;
}

.nav-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}

.userbox {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: flex-end;
}

@media (min-width: 720px) {
  .userbox {
    width: auto;
    justify-content: flex-start;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 0.95rem;
}

.chip.ghost {
  background: transparent;
}

.chip.active {
  border-color: var(--accent);
  color: var(--accent);
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.pad {
  padding: 16px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.lbl {
  font-size: 0.85rem;
  color: var(--muted);
}

.inp,
.select,
textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 1rem;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  background: var(--bg-soft);
  color: var(--text);
}

.btn-primary {
  background: linear-gradient(180deg, #7eb6ff, #4f87ff);
  color: #071018;
  border-color: #8ec1ff;
}

.btn-danger {
  background: #402428;
  border-color: #7a2f36;
  color: #ffd7da;
}

.btn-lg {
  min-height: 54px;
  font-size: 1.05rem;
}

.btn-icon {
  min-width: var(--tap);
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.85rem;
}

.hint {
  margin-top: 14px;
  color: var(--muted);
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #7a2f36;
  background: #301a1f;
  color: #ffd7da;
}

.grid-list {
  display: grid;
  gap: 12px;
}

.item-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elev);
}

.item-row.active-song {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.item-title {
  font-weight: 700;
  font-size: 1.08rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.pill.ok {
  border-color: #246b49;
  color: #baf5d5;
  background: #14271f;
}

.pill.warn {
  border-color: #8a621f;
  color: #ffe7b8;
  background: #2a2010;
}

.mono-block {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 1.05rem;
  line-height: 1.55;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: var(--bg-soft);
}

.sync-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  display: inline-block;
}

.sync-dot.live {
  background: var(--ok);
  box-shadow: 0 0 12px rgba(61, 214, 140, 0.55);
}

.live-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid #246b49;
  background: #14271f;
  margin-bottom: 12px;
}

table.simple {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.simple th,
table.simple td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

table.simple th {
  color: var(--muted);
  font-weight: 600;
}

.stack-actions .btn {
  width: 100%;
}

@media (min-width: 640px) {
  .stack-actions .btn {
    width: auto;
  }
}

.lyrics-focus-panel {
  position: sticky;
  top: 56px;
  z-index: 15;
  border-color: var(--accent-dim);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.performed-row {
  opacity: 0.92;
}

/* Müzisyen sırası: liste satırı + açılınca önce rol notu, sonra sözler */
.perf-queue-hint {
  margin: 0 0 12px;
}

.perf-stage-empty {
  margin: 0;
}

.perf-set-card.card {
  padding: 0;
  overflow: hidden;
}

.perf-set-card__summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: var(--bg-elev);
}

.perf-set-card__summary::-webkit-details-marker {
  display: none;
}

.perf-set-card__summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.perf-set-card__main {
  min-width: 0;
}

.perf-set-card__badges {
  margin-top: 8px;
}

.perf-set-card__chev {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease;
}

.perf-set-card__chev::before {
  content: "▼";
  font-size: 0.55rem;
  color: var(--muted);
}

.perf-set-card[open] > .perf-set-card__summary .perf-set-card__chev {
  transform: rotate(-180deg);
}

.perf-set-card__body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.14);
}

.perf-set-card--current {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.perf-lyrics-lbl {
  margin-top: 14px;
}

.perf-done-card.item-row {
  grid-template-columns: 1fr;
  align-items: start;
}

/* Gitar / solo: solist tonu + ilk akor satırı */
.perf-tone-focus-badge {
  font-size: 1.12rem;
  font-weight: 800;
  padding: 10px 18px;
  border-color: rgba(110, 168, 254, 0.85);
  color: #eaf2ff;
  background: linear-gradient(180deg, rgba(110, 168, 254, 0.32), rgba(110, 168, 254, 0.08));
  letter-spacing: 0.06em;
}

.perf-session-ton {
  font-weight: 700;
  border-color: rgba(110, 168, 254, 0.65);
  color: #dbeaff;
  background: rgba(110, 168, 254, 0.16);
}

.perf-session-ton-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  margin: 0 0 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(110, 168, 254, 0.5);
  background: linear-gradient(165deg, rgba(110, 168, 254, 0.14), rgba(10, 14, 22, 0.95));
}

.perf-session-ton-bar__cap {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.perf-session-ton-bar__v {
  font-size: 1.48rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #f5f9ff;
  line-height: 1.15;
}

.perf-chord-hero {
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.03em;
  padding: 16px 18px;
  margin: 0 0 12px;
  border-radius: var(--radius);
  border: 2px solid rgba(110, 168, 254, 0.65);
  background: linear-gradient(180deg, rgba(24, 33, 52, 0.98), rgba(14, 20, 30, 0.92));
  color: #f7fbff;
  white-space: pre-wrap;
  word-break: break-word;
}

.perf-solo-hero {
  border-color: rgba(255, 193, 77, 0.45);
  background: linear-gradient(180deg, rgba(42, 32, 16, 0.95), rgba(14, 18, 26, 0.92));
}

.perf-notes-rest {
  font-size: 0.96rem;
}

.perf-notes-empty {
  margin: 0 0 10px;
  font-size: 0.92rem;
}
