:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: #10141d;
  --panel-2: #151b27;
  --line: #283042;
  --text: #f7f8fb;
  --muted: #aeb6c8;
  --soft: #6f7a92;
  --brand: #ef1111;
  --brand-2: #ffcf33;
  --ok: #37d399;
  --warn: #f7b955;
  --bad: #ff6b6b;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel-2: #f0f2f7;
  --line: #dce1ea;
  --text: #141824;
  --muted: #5f687a;
  --soft: #7b8495;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(239, 17, 17, 0.16), transparent 28rem),
    linear-gradient(180deg, #0b0d13 0%, #08090d 100%);
  color: var(--text);
  min-height: 100vh;
}

.approval-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(247, 185, 85, 0.38);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(247, 185, 85, 0.14), rgba(239, 17, 17, 0.08));
  padding: 16px;
  margin-bottom: 18px;
}

.approval-banner strong {
  display: block;
  margin-bottom: 4px;
}

.approval-banner p {
  margin-bottom: 0;
  color: var(--muted);
}

:root[data-theme="light"] body {
  background:
    radial-gradient(circle at top left, rgba(239, 17, 17, 0.1), transparent 28rem),
    linear-gradient(180deg, #f9fafc 0%, #edf0f5 100%);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  padding: clamp(22px, 5vw, 72px);
}

.auth-brand {
  display: grid;
  gap: 22px;
  max-width: 760px;
}

.auth-brand img {
  width: 118px;
  height: 118px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
}

.auth-card {
  padding: clamp(20px, 3vw, 30px);
}

.demo-logins {
  display: grid;
  gap: 8px;
  width: fit-content;
  border: 1px solid rgba(255, 207, 51, 0.24);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: rgba(255, 207, 51, 0.08);
  color: var(--muted);
}

.demo-logins strong {
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: rgba(9, 11, 16, 0.86);
  backdrop-filter: blur(16px);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

:root[data-theme="light"] .sidebar {
  background: rgba(255, 255, 255, 0.9);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand span {
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button,
.ghost-button,
.primary-button,
.danger-button {
  border: 1px solid transparent;
  border-radius: var(--radius);
  min-height: 42px;
  padding: 10px 12px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.nav button.active,
.nav button:hover {
  color: var(--text);
  border-color: rgba(239, 17, 17, 0.35);
  background: rgba(239, 17, 17, 0.12);
}

.sidebar-card {
  margin-top: auto;
  border: 1px solid rgba(255, 207, 51, 0.24);
  background: linear-gradient(135deg, rgba(255, 207, 51, 0.12), rgba(239, 17, 17, 0.1));
  border-radius: var(--radius);
  padding: 16px;
}

.sidebar-card small,
.eyebrow,
.muted {
  color: var(--muted);
}

.main {
  padding: 26px clamp(18px, 3vw, 42px) 46px;
  overflow: hidden;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1;
  max-width: 900px;
  margin-bottom: 12px;
}

h2 {
  font-size: 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 22px;
}

.hero-panel,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 20, 29, 0.88);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.hero-panel {
  padding: clamp(22px, 4vw, 42px);
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -12% -22% auto;
  width: 340px;
  height: 340px;
  border: 26px solid rgba(239, 17, 17, 0.16);
  border-radius: 50%;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.primary-button {
  background: var(--brand);
  border-color: var(--brand);
  font-weight: 800;
  text-align: center;
}

.ghost-button {
  border-color: var(--line);
  background: var(--panel-2);
  text-align: center;
}

.danger-button {
  background: rgba(255, 107, 107, 0.14);
  border-color: rgba(255, 107, 107, 0.38);
  color: #ffd1d1;
  text-align: center;
}

.profile-card {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.profile-card img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(21, 27, 39, 0.78);
}

.metric strong {
  display: block;
  font-size: 26px;
  margin-top: 8px;
}

.royalty-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(55, 211, 153, 0.22);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, rgba(55, 211, 153, 0.12), rgba(255, 207, 51, 0.08));
}

.royalty-band h2 {
  margin-bottom: 8px;
}

.royalty-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 10px;
  min-width: min(420px, 100%);
}

.royalty-stats span {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(0, 0, 0, 0.12);
  color: var(--muted);
}

.royalty-stats strong {
  color: var(--text);
  font-size: 22px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel {
  padding: 20px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.table {
  display: grid;
  gap: 10px;
}

.release-list {
  display: grid;
  gap: 16px;
}

.release-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 150px;
  gap: 16px;
  align-items: start;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
}

.release-artwork {
  width: 150px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0b0f17;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.release-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.empty-art {
  color: var(--soft);
  font-weight: 800;
  text-align: center;
}

.release-detail {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.release-title-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.release-title-line h3 {
  margin-bottom: 4px;
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.metadata-grid span,
.file-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(0, 0, 0, 0.14);
}

.metadata-grid strong,
.file-grid strong {
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.store-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid rgba(239, 17, 17, 0.28);
  color: #ffd1d1;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(239, 17, 17, 0.1);
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.file-link {
  color: #ffcf33;
  overflow-wrap: anywhere;
  text-decoration: none;
  font-weight: 800;
}

.file-link:hover {
  text-decoration: underline;
}

audio {
  width: 100%;
  margin-top: 6px;
}

.release-actions {
  display: grid;
  gap: 8px;
}

.row {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(100px, 0.6fr) minmax(95px, 0.5fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
}

.row.admin {
  grid-template-columns: minmax(170px, 1.2fr) minmax(100px, 0.7fr) minmax(110px, 0.6fr) 120px;
}

.ticket-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.ticket-row p {
  margin-bottom: 6px;
}

.status {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(247, 185, 85, 0.15);
  color: #ffd18b;
}

.status.delivered,
.status.active,
.status.verified,
.status.approved {
  background: rgba(55, 211, 153, 0.15);
  color: #86efc6;
}

.status.rejected,
.status.suspended {
  background: rgba(255, 107, 107, 0.18);
  color: #ffb4b4;
}

.status.pending {
  background: rgba(247, 185, 85, 0.15);
  color: #ffd18b;
}

.membership-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.membership {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: linear-gradient(180deg, rgba(21, 27, 39, 0.9), rgba(16, 20, 29, 0.8));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.membership.highlight {
  border-color: rgba(239, 17, 17, 0.58);
  box-shadow: inset 0 0 0 1px rgba(239, 17, 17, 0.24);
}

.price {
  font-size: 32px;
  font-weight: 900;
}

.features {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.features li::before {
  content: "✓";
  color: var(--ok);
  margin-right: 8px;
  font-weight: 900;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #0b0f17;
  padding: 10px 12px;
  outline: none;
}

:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea {
  background: #ffffff;
}

input[readonly] {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.settings-grid {
  align-items: start;
}

.deploy-panel {
  margin-top: 18px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(239, 17, 17, 0.8);
  box-shadow: 0 0 0 3px rgba(239, 17, 17, 0.16);
}

textarea {
  resize: vertical;
  min-height: 96px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 14px 16px;
  border: 1px solid rgba(55, 211, 153, 0.4);
  border-radius: var(--radius);
  background: #102219;
  color: #d9ffef;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
  display: none;
  z-index: 20;
}

.toast.show {
  display: block;
}

.hidden {
  display: none;
}

@media (max-width: 1100px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero,
  .royalty-band,
  .grid,
  .membership-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .nav,
  .metric-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .row,
  .row.admin,
  .ticket-row,
  .release-card,
  .metadata-grid,
  .file-grid {
    grid-template-columns: 1fr;
  }

  .release-artwork {
    width: 100%;
    max-width: 260px;
  }

  .topbar {
    flex-direction: column;
  }
}
