/* POISONPRICE — общий стиль сайта и кабинета продюсера */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
  --bg: #000;
  --surface: #121212;
  --raised: #1d1d1d;
  --line: #2a2a2a;
  --text: #f4f4f4;
  --muted: #9a9a9a;
  --faint: #5f5f5f;
  --poison: #9eff2e;
  --poison-dim: rgba(158, 255, 46, 0.14);
  --danger: #ff5a5a;
  --warn: #ffb547;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* ── Кнопки и поля ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--raised); font-weight: 600; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background .15s ease, opacity .15s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { background: #262626; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn-primary { background: var(--poison); border-color: var(--poison); color: #000; }
.btn-primary:hover { background: #b2ff5c; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--raised); color: var(--text); }
.btn-danger { color: var(--danger); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); outline: none;
  transition: border-color .15s ease;
}
textarea.input { height: auto; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: var(--poison); }
.hint { font-size: 12px; color: var(--faint); }
.error-text { color: var(--danger); font-size: 14px; }

/* ── Лендинг ───────────────────────────────────────────────── */
.landing {
  min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; text-align: center;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(158, 255, 46, .16), transparent 70%), var(--bg);
}
.landing-inner { max-width: 640px; display: grid; gap: 28px; justify-items: center; }
.landing-logo { width: min(420px, 82vw); }
.landing h1 { margin: 0; font-size: clamp(18px, 3vw, 22px); font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.landing .producers { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip { padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.landing footer { margin-top: 24px; font-size: 13px; color: var(--faint); }

/* ── Страница бита ─────────────────────────────────────────── */
.beat-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(158, 255, 46, .12), transparent 70%), var(--bg); }
.beat-share { width: min(420px, 100%); display: grid; gap: 10px; justify-items: center; text-align: center; }
.beat-share .brand img { width: 160px; margin-bottom: 18px; }
.beat-share-cover { width: 100%; aspect-ratio: 1; border-radius: 22px; overflow: hidden; background: var(--surface); box-shadow: 0 30px 60px rgba(0,0,0,.6); }
.beat-share-cover img { width: 100%; height: 100%; object-fit: cover; }
.beat-share h1 { margin: 12px 0 0; font-size: 28px; font-weight: 800; }
.beat-share .facts { color: var(--poison); font-weight: 600; margin: 0; }
.beat-share audio { width: 100%; margin-top: 8px; }

/* ── Вход ──────────────────────────────────────────────────── */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(ellipse 70% 45% at 50% 0%, rgba(158, 255, 46, .13), transparent 70%), var(--bg); }
.auth-card { width: min(400px, 100%); display: grid; gap: 14px; }
.auth-card .logo { width: 200px; justify-self: center; margin-bottom: 4px; }
.auth-card h2 { margin: 0; text-align: center; font-size: 15px; font-weight: 500; color: var(--muted); }
.auth-links { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.link { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-decoration: none; }
.link:hover { color: var(--text); }
.link.accent { color: var(--poison); font-weight: 600; }
.code-input { text-align: center; font-size: 24px; letter-spacing: .3em; font-weight: 700; height: 56px; }

/* ── Кабинет ───────────────────────────────────────────────── */
.studio { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 22px 14px; border-right: 1px solid var(--line); background: #070707;
}
.sidebar .logo { width: 150px; margin: 0 8px 22px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-weight: 600;
}
.nav-link svg { width: 19px; height: 19px; flex: none; }
.nav-link:hover { background: var(--surface); color: var(--text); }
.nav-link.active { background: var(--poison-dim); color: var(--poison); }
.nav-upload { margin: 14px 0; }
.sidebar .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px 0; border-top: 1px solid var(--line); }
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, var(--poison), #1a7333); color: #000; font-weight: 900; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.me-text { min-width: 0; flex: 1; }
.me-text b, .me-text span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text span { font-size: 12px; color: var(--muted); }

.main { padding: 32px clamp(16px, 4vw, 48px) 64px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.01em; }

.segmented { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); }
.segmented button { border: 0; background: none; height: 32px; padding: 0 14px; border-radius: 8px; color: var(--muted); font-weight: 600; cursor: pointer; }
.segmented button.active { background: var(--raised); color: var(--text); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel h2 { margin: 0 0 16px; font-size: 16px; font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .label { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stat .value { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12px; color: var(--faint); }

.chart { position: relative; height: 240px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .bar { fill: var(--poison); }
.chart .bar-hit { fill: transparent; cursor: default; }
.chart .bar-hit:hover + .bar, .chart .bar.hover { fill: #c4ff80; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--faint); font-size: 11px; }
.tooltip { position: absolute; pointer-events: none; transform: translate(-50%, -100%); background: var(--raised); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px; font-size: 12px; white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.tooltip b { font-size: 15px; display: block; }

.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }

/* ── Таблица битов ─────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.beats { width: 100%; border-collapse: collapse; font-size: 14px; }
table.beats th { text-align: left; font-size: 12px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; padding: 0 12px 10px; white-space: nowrap; }
table.beats td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
table.beats td.num, table.beats th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.beats tr.row { cursor: pointer; }
table.beats tr.row:hover td { background: #171717; }
.beat-cell { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.thumb { width: 44px; height: 44px; border-radius: 8px; background: var(--raised); overflow: hidden; flex: none; position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: rgba(0,0,0,.45); opacity: 0; cursor: pointer; color: #fff; transition: opacity .15s; }
.thumb:hover .play, .play.playing { opacity: 1; }
.play svg { width: 18px; height: 18px; }
.beat-title { font-weight: 600; }
.beat-meta { font-size: 12px; color: var(--muted); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.published { background: var(--poison-dim); color: var(--poison); }
.badge.draft { background: #2a2a2a; color: var(--muted); }
.badge.hidden { background: rgba(255, 181, 71, .14); color: var(--warn); }
.badge.sold_exclusive { background: rgba(255, 90, 90, .14); color: var(--danger); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input { max-width: 280px; height: 38px; }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); display: grid; gap: 14px; justify-items: center; }

/* ── Загрузка ──────────────────────────────────────────────── */
.upload-grid { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.drop {
  position: relative; display: grid; place-items: center; gap: 6px; text-align: center; padding: 22px;
  border: 1.5px dashed #3a3a3a; border-radius: var(--radius); background: var(--surface); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--poison); background: #141a0c; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop svg { width: 28px; height: 28px; color: var(--poison); }
.drop b { font-size: 15px; }
.cover-drop { aspect-ratio: 1; padding: 0; overflow: hidden; }
.cover-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-drop .cover-empty { display: grid; gap: 6px; justify-items: center; padding: 20px; }
.file-picked { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; }
.file-picked .info { flex: 1; min-width: 0; }
.file-picked .info b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.credits { display: grid; gap: 8px; }
.credit-row { display: grid; grid-template-columns: 1fr 110px 34px; gap: 8px; align-items: center; }
.share-input { position: relative; }
.share-input .input { padding-right: 30px; text-align: right; }
.share-input::after { content: "%"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.status-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.status-choice label { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); }
.status-choice input { display: none; }
.status-choice label:has(input:checked) { border-color: var(--poison); background: #121a08; }
.status-choice b { font-size: 14px; }
.status-choice span { font-size: 12px; color: var(--muted); }

.progress { display: grid; gap: 8px; }
.progress-bar { height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.progress-bar div { height: 100%; width: 0; background: var(--poison); transition: width .2s ease; }
.steps { display: grid; gap: 6px; font-size: 14px; }
.step { display: flex; gap: 10px; align-items: center; color: var(--faint); }
.step.active { color: var(--text); }
.step.done { color: var(--poison); }
.step .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.step.active .dot { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--raised); border: 1px solid var(--line);
  padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 12px 32px rgba(0,0,0,.6); z-index: 50; animation: toast-in .2s ease; }
.toast.error { border-color: rgba(255, 90, 90, .5); color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

.producer-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.producer-row:first-of-type { border-top: 0; }
.producer-row form { display: flex; gap: 8px; }

/* ── Телефон ───────────────────────────────────────────────── */
.mobile-bar { display: none; }
@media (max-width: 900px) {
  .studio { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  table.beats .opt { display: none; }
  .sidebar { display: none; }
  .mobile-bar { display: flex; position: sticky; top: 0; z-index: 10; align-items: center; justify-content: space-between; gap: 8px;
    padding: 10px 16px; background: rgba(0,0,0,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .mobile-bar .logo { width: 110px; }
  .mobile-nav { display: flex; gap: 2px; overflow-x: auto; }
  .mobile-nav .nav-link { height: 36px; padding: 0 10px; font-size: 13px; }
  .mobile-nav .nav-link span { display: none; }
  .main { padding-top: 20px; }
  .grid-2, .upload-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .producer-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .form-grid { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 24px; }
}

/* ── Админка ───────────────────────────────────────────────── */
.nav-group { margin: 18px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.mobile-nav .nav-group { display: none; }
.star { border: 0; background: none; padding: 6px; cursor: pointer; color: #3a3a3a; display: grid; place-items: center; border-radius: 8px; }
.star svg { width: 18px; height: 18px; }
.star:hover { color: var(--muted); background: var(--raised); }
.star.on { color: var(--poison); }
a.stat { color: inherit; transition: border-color .15s; }
a.stat:hover { border-color: #3a3a3a; }
.report.resolved { opacity: .55; }

/* ── Вход через Google ─────────────────────────────────────── */
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-google { background: #fff; color: #1f1f1f; border-color: #fff; }
.btn-google:hover { background: #ececec; }
