/* Okhanov Music — кабинет артиста. Светлая тема в духе Koala Music. */

:root {
  --bg: #ffffff;
  --surface: #f4f5f7;
  --surface-2: #e9ebee;
  --text: #151515;
  --muted: #7b8087;
  --line: #e6e8eb;
  --green: #7cb92e;
  --green-dark: #6aa524;
  --green-soft: #eef7e2;
  --green-text: #3f7d10;
  --dark: #232323;
  --amber: #b9760a;
  --amber-soft: #fdf3e1;
  --red: #e0453f;
  --red-soft: #fdeceb;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-size: 15px;
  line-height: 1.45;
  min-height: 100vh;
}

#app {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 56px;
}

/* ---------- шапка и вкладки ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 6px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  position: relative;
  flex: none;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
}

.who {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin: 6px 0 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs button {
  background: none;
  border: 0;
  padding: 12px 0;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  cursor: pointer;
}

.tabs button.active {
  color: var(--text);
  border-bottom-color: var(--green);
}

.tab {
  display: none;
}

.tab.active {
  display: block;
}

/* ---------- заголовки ---------- */

.page-head h1 {
  margin: 6px 0 6px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.block {
  padding: 22px 0 6px;
  border-top: 1px solid var(--line);
}

.koala-form .block:first-of-type {
  border-top: 0;
  padding-top: 8px;
}

.block-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

section.tab > .block-title {
  margin-top: 24px;
}

.hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.muted {
  color: var(--muted);
}

/* Мелким: формула, из которой собрана сумма выше. */
.fine {
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

/* ---------- кнопки ---------- */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.btn:active {
  transform: scale(0.99);
}

.btn-primary {
  background: var(--green);
  color: #fff;
}

.btn-primary:active {
  background: var(--green-dark);
}

.btn-grey {
  background: var(--surface-2);
  color: var(--text);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.btn-sm {
  min-height: 36px;
  width: auto;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 10px;
}

.btn-danger-soft {
  background: var(--red-soft);
  color: var(--red);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: default;
}

.btn-link-danger {
  background: none;
  border: 0;
  color: var(--red);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px;
  cursor: pointer;
}

.back {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  padding: 8px 0 4px;
  cursor: pointer;
}

/* ---------- список релизов ---------- */

.release-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.release-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.release-list li:last-child {
  border-bottom: 0;
}

.thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--surface-2);
  flex: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b8bdc4;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.row-main {
  flex: 1;
  min-width: 0;
}

.row-title {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.status {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.3;
}

.status-draft {
  background: var(--dark);
  color: #fff;
}

.status-review {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-ok {
  background: var(--green-soft);
  color: var(--green-text);
}

.status-bad {
  background: var(--red-soft);
  color: var(--red);
}

.empty {
  color: var(--muted);
  padding: 26px 0;
  text-align: center;
  font-size: 14px;
}

/* ---------- страница релиза ---------- */

.release-head {
  padding: 4px 0 10px;
}

.release-head-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.release-title {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  word-break: break-word;
  line-height: 1.15;
}

.release-artist {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.notice {
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 14px;
  margin: 6px 0 10px;
  line-height: 1.45;
}

.notice-review {
  background: var(--amber-soft);
  color: var(--amber);
}

.notice-ok {
  background: var(--green-soft);
  color: var(--green-text);
}

.notice-bad {
  background: var(--red-soft);
  color: var(--red);
}

.notice b {
  font-weight: 700;
}

/* ---------- поля ---------- */

.field {
  margin-bottom: 14px;
}

.label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.koala-form input[type="text"],
.koala-form input[type="date"],
.koala-form textarea,
.koala-form select {
  display: block;
  width: 100%;
  min-height: 48px;
  border: 1px solid transparent;
  background: var(--surface);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.koala-form input:focus,
.koala-form textarea:focus,
.koala-form select:focus {
  border-color: var(--green);
  background: #fff;
}

.koala-form input::placeholder,
.koala-form textarea::placeholder {
  color: #a3a8af;
}

.koala-form textarea {
  resize: vertical;
  min-height: 92px;
  line-height: 1.5;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 17px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.koala-form input.short {
  width: 112px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.inline {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #b8bdc4;
  color: #8a9098;
  font-size: 10px;
  font-weight: 700;
  font-style: normal;
  margin-left: 4px;
  vertical-align: 1px;
}

/* ---------- загрузка файлов ---------- */

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 22px 16px;
  border: 1.5px dashed #cfd4da;
  border-radius: var(--radius);
  background: #fafbfc;
  cursor: pointer;
  text-align: center;
}

.drop input,
.cover-drop input {
  display: none;
}

.drop-icon {
  color: var(--green);
  line-height: 0;
  margin-bottom: 6px;
}

.drop-text {
  font-weight: 700;
}

.drop-sub {
  color: var(--muted);
  font-size: 13px;
}

.track-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px 14px 10px;
}

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

.play {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: var(--green);
  position: relative;
  flex: none;
  cursor: pointer;
}

.play::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 13px;
  border-left: 13px solid #fff;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.play.playing::before {
  border: 0;
  left: 14px;
  top: 13px;
  width: 5px;
  height: 16px;
  background: #fff;
  box-shadow: 9px 0 0 #fff;
}

.track-meta {
  flex: 1;
  min-width: 0;
}

.track-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-sub {
  font-size: 12px;
  color: var(--muted);
}

.icon-x {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  flex: none;
}

.wave {
  display: block;
  width: 100%;
  height: 56px;
  margin: 10px 0 4px;
  cursor: pointer;
}

.track-time {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.cover-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.cover-drop {
  width: 168px;
  height: 168px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fafbfc;
  border: 1.5px dashed #cfd4da;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
  position: relative;
}

.cover-drop.filled {
  border-style: solid;
  border-color: transparent;
  background: var(--surface-2);
}

.cover-drop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  padding: 12px;
  font-size: 14px;
}

.cover-side {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  word-break: break-word;
}

/* ---------- чипы и переключатели ---------- */

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-soft);
  color: var(--green-text);
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 14px;
}

.segment {
  display: inline-flex;
  background: var(--surface);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
  margin-bottom: 8px;
}

.segment button {
  border: 0;
  background: transparent;
  padding: 9px 16px;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

.segment button.active {
  background: var(--green);
  color: #fff;
}

/* ---------- действия и прогресс ---------- */

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 0 8px;
}

.progress {
  position: relative;
  height: 36px;
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 6px;
}

.progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--green-soft);
  transition: width 0.15s;
}

.progress span {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 13px;
  color: var(--green-text);
  font-weight: 600;
}

/* ---------- режим «только смотреть» ---------- */

.readonly .drop,
.readonly .icon-x,
.readonly .btn-sm,
.readonly .info,
.readonly .hint,
.readonly #cover-dims {
  display: none !important;
}

.readonly input,
.readonly textarea,
.readonly select {
  background: #fff !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
  opacity: 1;
  -webkit-text-fill-color: var(--text);
}

.readonly .select-wrap::after {
  display: none;
}

.readonly .segment {
  background: transparent;
  padding: 0;
}

.readonly .segment button:not(.active) {
  display: none;
}

.readonly .cover-drop {
  cursor: default;
  border-color: transparent;
}

/* ---------- роялти и аналитика ---------- */

.balance-card {
  background: var(--green-soft);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 8px;
}

.balance-card .label {
  color: var(--green-text);
  margin-bottom: 2px;
}

.balance {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--green-text);
  line-height: 1.1;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rows li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.rows li:last-child {
  border-bottom: 0;
}

.rows .row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.rows .row-title {
  font-weight: 700;
}

.rows .row-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.rows input.bind-tg {
  flex: 1;
  min-width: 180px;
  min-height: 36px;
  border: 1px solid transparent;
  background: var(--surface);
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.rows input.bind-tg:focus {
  border-color: var(--green);
  background: #fff;
}

.amount {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

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

.tile {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
}

.tile .num {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.tile .cap {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.artist-catalog {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.artist-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
}

.artist-card .card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}

.artist-card h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.artist-card .card-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.artist-card .tiles {
  margin: 10px 0 4px;
}

.artist-card .rows {
  margin-top: 4px;
}

.artist-card .rows li.empty {
  border-bottom: 0;
  padding-top: 8px;
}

.sub-title {
  margin: 18px 0 4px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* ---------- треки лейбла: группы по артистам ---------- */

.track-group {
  margin-top: 14px;
}

.group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.group-main {
  flex: 1;
  min-width: 0;
}

.group-name {
  display: block;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.group-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.group-amount {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Шеврон: вниз — раскрыто, вправо — свёрнуто. */
.group-chev {
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  margin-left: 2px;
}

.track-group.collapsed .group-chev {
  transform: rotate(-45deg);
}

.track-group.collapsed .release-list {
  display: none;
}

.track-group .release-list {
  margin-top: 0;
}

/* ---------- страница трека: как это выглядит на площадках ---------- */

.dsp {
  padding-bottom: 24px;
}

.dsp-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 340px;
  margin: 0 auto 16px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dsp-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dsp-cover-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.dsp-title {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.dsp-artist {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.dsp-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 4px;
}

.dsp-player {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 12px 0 4px;
}

.dsp-player-main {
  flex: 1;
  min-width: 0;
}

.dsp-player .wave {
  width: 100%;
  height: 44px;
  display: block;
  cursor: pointer;
}

.dsp-lyrics {
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  overflow-wrap: anywhere;
}

.dsp-lyrics.muted {
  color: var(--muted);
}

/* «Загрузить обложку» — это <label> с input[type=file] внутри. */
.file-btn {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.file-btn input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Подпункт сверки («смежные», «авторские») — со сдвигом под итог. */
.facts li.sub-row {
  padding-top: 7px;
  padding-bottom: 7px;
  border-bottom-color: transparent;
}

.facts li.sub-row .fact-label {
  padding-left: 14px;
  font-size: 13px;
}

.facts li.sub-row .fact-value {
  font-size: 13px;
}

.facts li.strong-row {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.facts li.strong-row .fact-label {
  color: var(--text);
  font-weight: 700;
}

.facts li.strong-row .fact-value {
  font-size: 17px;
  color: var(--green-text);
}

/* ---------- деньги: факты, аванс, выплаты ---------- */

.balance-sub {
  color: var(--green-text);
  font-size: 13px;
  margin-top: 4px;
  opacity: 0.85;
}

.facts {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

/* Одна строка — один факт. Раньше это был один длинный абзац. */
.facts li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.facts li:last-child {
  border-bottom: 0;
}

/* Подпись под фактом: откуда сумма и что с ней делать. */
.fact-hint {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}

.facts.compact li {
  padding: 7px 0;
  font-size: 13px;
}

.facts li.muted-row .fact-value {
  color: var(--muted);
  font-weight: 600;
}

.fact-label {
  color: var(--muted);
}

.fact-value {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* Длинные значения (список площадок) переносим, а не выпихиваем за край. */
.fact-value.fact-wrap {
  white-space: normal;
  overflow-wrap: anywhere;
  font-weight: 700;
  font-size: 13px;
  max-width: 65%;
}

.fact-money {
  color: var(--text);
}

/* Кнопки «выплата / аванс / доля» живут и в списках, и в карточках артистов. */
.row-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.row-actions.wrap {
  flex-wrap: wrap;
}

.artist-card .row-actions {
  margin-top: 12px;
}

/* На сером фоне карточки серая кнопка не видна — делаем её белой с рамкой. */
.artist-card .row-actions .btn-ghost {
  background: #fff;
  border: 1px solid var(--line);
}

/* Удаление артиста — редкое действие, поэтому тихая ссылка, а не алый акцент. */
.btn-link-danger.btn-sm {
  min-height: 36px;
  width: auto;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  margin-left: auto;
}

.btn-link-danger.btn-sm:active {
  color: var(--red);
}

.amount-col {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.amount-cap {
  font-size: 11px;
  color: var(--muted);
}

/* Мелкая небрежная строка: имя файла, сколько узнали. */
.row-fine {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.35;
}

.rows li.row-readonly {
  cursor: default;
}

.notice-soft {
  background: var(--surface);
  color: var(--text);
  border: 0;
}

.meter {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin: 8px 0 6px;
}

.meter-fill {
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* ---------- аналитика ---------- */

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

.insight {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.insight-cap {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.insight-val {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-top: 4px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.insight-val.up {
  color: var(--green-text);
}

.insight-val.down {
  color: var(--red);
}

.insight-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.bars {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.bar-row {
  padding: 8px 0 10px;
}

.bar-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
}

.bar-label {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.bar-value {
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin: 6px 0 4px;
}

.bar-fill {
  height: 100%;
  background: var(--green);
  border-radius: 999px;
}

.bar-sub {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 140px;
  padding: 8px 0 0;
  margin-bottom: 14px;
  overflow-x: auto;
}

.chart .col {
  flex: 1 0 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  gap: 6px;
}

.chart .col-bar {
  width: 100%;
  background: var(--green);
  border-radius: 6px 6px 0 0;
  min-height: 3px;
}

.chart .col-cap {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 380px) {
  .insights {
    grid-template-columns: 1fr;
  }
}

/* ---------- общее ---------- */

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--dark);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  z-index: 50;
  max-width: 92%;
  font-size: 14px;
  text-align: center;
  line-height: 1.4;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 16, 18, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 16px;
  padding: 18px 16px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.modal-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.modal-card textarea {
  width: 100%;
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  resize: vertical;
  min-height: 96px;
}

/* Поля формы в модалке (сумма, дата, за что). */
#form-modal .field {
  margin-bottom: 12px;
}

#form-modal .field textarea {
  margin: 0;
}

#form-modal input[type="text"],
#form-modal input[type="date"] {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  outline: none;
}

#form-modal input:focus,
#form-modal textarea:focus,
#form-modal select:focus {
  border-color: var(--green);
}

#form-modal select {
  width: 100%;
  min-height: 46px;
  padding: 10px 34px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  outline: none;
  appearance: none;
}

#form-modal .field .hint {
  margin: 6px 0 0;
}

#form-modal .modal-card {
  max-height: 86vh;
  overflow-y: auto;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ================= новый релиз: переход в чат ================= */

.new-release-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #8fcb3f 0%, var(--green) 55%, #5f9a1f 100%);
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(124, 185, 46, 0.28);
  transition: transform 0.08s;
}

.new-release-card:active {
  transform: scale(0.985);
}

.nr-icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nr-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.nr-title {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.nr-sub {
  font-size: 13px;
  line-height: 1.35;
  opacity: 0.92;
}

#releases-bot-hint {
  margin: 10px 2px 0;
}

.btn-block {
  width: 100%;
}

@keyframes bf-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* ================= превью релиза «как на площадках» ================= */

.pv-banner {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 14px;
}

.pv-ok {
  background: var(--green-soft);
  color: var(--green-text);
}

.pv-warn {
  background: var(--amber-soft);
  color: #7a4d05;
}

.pv-bad {
  background: var(--red-soft);
  color: #a3261f;
}

.pv-info {
  background: #eef1fb;
  color: #34459a;
}

.dsp {
  position: relative;
  isolation: isolate;
}

.dsp-hero-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 330px;
  background-size: cover;
  background-position: center;
  filter: blur(40px) saturate(1.4);
  opacity: 0.35;
  z-index: -1;
  -webkit-mask-image: linear-gradient(#000 40%, transparent);
  mask-image: linear-gradient(#000 40%, transparent);
  pointer-events: none;
}

.dsp-cover {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.dsp-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 6px;
}

.chip-btn {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  background: var(--green-soft);
  color: var(--green-text);
  cursor: pointer;
}

.chip-btn-ghost {
  background: var(--surface);
  color: var(--text);
}

.chip-btn:active {
  transform: scale(0.97);
}

.dsp-pline {
  margin: 10px 2px 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

.check {
  display: flex;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.check:last-child {
  border-bottom: 0;
}

.check-mark {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
}

.check-ok .check-mark {
  background: var(--green);
}

.check-warn .check-mark {
  background: #e3a23b;
}

.check-bad .check-mark {
  background: var(--red);
}

.check-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.check-label {
  font-weight: 600;
  font-size: 14px;
  overflow-wrap: anywhere;
}

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

.intake-details {
  margin-top: 10px;
}

.intake-details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-text);
  padding: 6px 2px;
  list-style: none;
}

.intake-details summary::-webkit-details-marker {
  display: none;
}

.intake-details summary::after {
  content: " ↓";
}

.intake-details[open] summary::after {
  content: " ↑";
}

.intake-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.intake-list li {
  display: flex;
  gap: 8px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.intake-list li > span:first-child {
  flex: none;
  width: 14px;
  color: var(--green-text);
  font-weight: 800;
}

.intake-list .in-rejected > span:first-child,
.intake-list .in-extra > span:first-child {
  color: var(--red);
}

.intake-list .in-warn > span:first-child {
  color: var(--amber);
}

.pv-actions {
  position: sticky;
  bottom: 0;
  margin: 18px -16px 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 5;
}

.pv-row {
  display: flex;
  gap: 8px;
}

.pv-row .btn {
  font-size: 12px;
  min-height: 44px;
  padding: 0 10px;
}

.pv-send-hint {
  margin: 0;
  font-size: 12px;
  color: #7a4d05;
  text-align: center;
}

#pv-delete {
  align-self: center;
  font-size: 12px;
  padding: 4px 12px;
}

.pv-done {
  margin-top: 18px;
  padding: 22px 18px 18px;
  border-radius: 18px;
  background: var(--green-soft);
  text-align: center;
  animation: bf-in 0.3s ease-out;
}

.pv-done h2 {
  margin: 10px 0 4px;
  font-size: 20px;
}

.pv-done .btn {
  margin-top: 12px;
}

.pv-done-mark {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pop 0.4s cubic-bezier(0.2, 1.6, 0.4, 1);
}

@keyframes pop {
  from {
    transform: scale(0.3);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pv-done,
  .pv-done-mark {
    animation: none;
  }
}

#dsp-lyrics-box {
  margin-bottom: 22px;
}
