/* ============ tokens ============ */
:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --fill: #f2f2f5;            /* fundo de input dentro do card */
  --fill-hover: #ebebf0;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #8e8e93;
  --sep: rgba(0, 0, 0, 0.08);
  --lemon: #e6f53f;           /* preenchimento de marca (texto escuro por cima) */
  --on-lemon: #1d1d1f;
  --ink: #4f5e00;             /* acento para texto/links com contraste */
  --ring: rgba(120, 140, 0, 0.35);
  --bad: #d70015;
  --bad-bg: rgba(215, 0, 21, 0.07);
  --ok: #248a3d;
  --warn-bg: #fff6d6; --warn: #7a5a00;
  --chrome: rgba(245, 245, 247, 0.72);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.04);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.08), 0 18px 40px rgba(0, 0, 0, 0.14);
  --r-card: 20px; --r-ctl: 12px;
  --pad: clamp(18px, 3vw, 28px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --card: #1c1c1e; --fill: #2c2c2e; --fill-hover: #3a3a3c;
    --text: #f5f5f7; --text-2: #a1a1a6; --text-3: #7c7c80; --sep: rgba(255, 255, 255, 0.1);
    --lemon: #e2f24a; --on-lemon: #111; --ink: #d9ef4d; --ring: rgba(217, 239, 77, 0.35);
    --bad: #ff453a; --bad-bg: rgba(255, 69, 58, 0.12); --ok: #30d158;
    --warn-bg: #2d2610; --warn: #ffd964;
    --chrome: rgba(0, 0, 0, 0.62);
    --shadow-card: none;
    --shadow-lift: 0 18px 40px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

/* ============ base e tipografia ============ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 100%/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; font-optical-sizing: auto;
}
h1 { font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1.07; letter-spacing: -0.028em; font-weight: 700; margin: 0 0 0.5rem; }
h2 { font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.018em; font-weight: 700; margin: 0 0 0.4rem; }
.sub { color: var(--text-2); font-size: 1.0625rem; line-height: 1.45; letter-spacing: -0.005em; margin: 0 0 2rem; max-width: 34em; }
a { color: var(--ink); }
[hidden] { display: none !important; }

/* ============ cabeçalho translúcido ============ */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px max(16px, calc((100vw - 760px) / 2));
  background: var(--chrome);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  transition: box-shadow 200ms ease;
}
.top.scrolled { box-shadow: 0 1px 0 var(--sep); }
.wide-top { padding-inline: max(16px, calc((100vw - 1700px) / 2)); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 0.9375rem; letter-spacing: -0.01em; }
.brand::before { content: ""; width: 18px; height: 18px; border-radius: 50% 50% 50% 8%; background: var(--lemon); box-shadow: inset -3px -3px 0 rgba(0,0,0,0.08); transform: rotate(-45deg); }
.top-right { display: flex; gap: 14px; align-items: center; }
.adminlink { color: var(--text-2); font-size: 0.875rem; text-decoration: none; }
.adminlink:hover { color: var(--text); }
.progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: transparent; overflow: hidden; }
.progress i { display: block; height: 100%; width: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }

/* segmented control (PT/EN e sample) */
.seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--fill); border-radius: 10px; padding: 2px; }
.seg .thumb { position: absolute; top: 2px; bottom: 2px; left: 2px; border-radius: 8px; background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 0 0 0.5px rgba(0,0,0,0.04); will-change: transform; }
@media (prefers-color-scheme: dark) { .seg .thumb { background: #636366; } }
.seg button, .seg label { position: relative; z-index: 1; border: 0; background: none; color: var(--text); font: inherit; font-size: 0.8125rem; font-weight: 600; padding: 5px 12px; cursor: pointer; text-align: center; border-radius: 8px; white-space: nowrap; }
.seg label { font-size: 0.9375rem; font-weight: 500; padding: 8px 16px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg :focus-visible, .seg label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: -2px; }

/* ============ layout ============ */
.wrap { max-width: 760px; margin: 0 auto; padding: clamp(28px, 6vw, 56px) 16px 96px; }
.wrap.wide { max-width: 1700px; padding-top: 24px; }
.banner { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 10px 14px; margin-bottom: 20px; font-size: 0.875rem; }

fieldset {
  background: var(--card); border: 0; border-radius: var(--r-card); box-shadow: var(--shadow-card);
  padding: var(--pad); margin: 0 0 20px; min-width: 0;
}
legend { float: left; width: 100%; padding: 0; margin: 0 0 20px; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
legend + * { clear: both; }
.field { display: block; margin-bottom: 20px; }
fieldset > .field:last-child, fieldset > .grid2:last-child .field, fieldset > .grid3:last-child .field { margin-bottom: 0; }
.lbl { display: block; font-size: 0.875rem; font-weight: 600; letter-spacing: -0.005em; margin-bottom: 6px; }
.hint { display: block; color: var(--text-2); font-size: 0.8125rem; line-height: 1.4; letter-spacing: 0.003em; margin: -2px 0 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 16px; }
@media (max-width: 620px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* ============ controles ============ */
input, select, textarea {
  width: 100%; background: var(--fill); color: var(--text);
  border: 1px solid transparent; border-radius: var(--r-ctl);
  padding: 12px 14px; font: inherit; font-size: 1rem; line-height: 1.35;
  transition: background-color 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
  appearance: none; -webkit-appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:hover, select:hover, textarea:hover { background: var(--fill-hover); }
input:focus, select:focus, textarea:focus { outline: none; background: var(--card); border-color: var(--ink); box-shadow: 0 0 0 4px var(--ring); }
input:disabled { opacity: 0.45; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238e8e93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
textarea { resize: vertical; min-height: 3.2em; line-height: 1.5; }
input[type="date"] { min-height: 47px; }

/* telefone: seletor de bandeira/DDI colado ao número */
.telgroup { display: flex; gap: 8px; }
.telgroup input { flex: 1; min-width: 0; }
.telcode-picker { position: relative; flex: 0 0 auto; }
.telcode-btn {
  display: flex; align-items: center; gap: 7px; height: 100%; min-height: 47px;
  background: var(--fill); border: 1px solid transparent; border-radius: var(--r-ctl);
  padding: 0 12px; font: inherit; font-size: 0.9375rem; color: var(--text); cursor: pointer;
  font-variant-numeric: tabular-nums; transition: background-color 150ms ease, border-color 150ms ease;
}
.telcode-btn:hover { background: var(--fill-hover); }
.telcode-btn[aria-expanded="true"] { background: var(--card); border-color: var(--ink); box-shadow: 0 0 0 4px var(--ring); }
.telcode-btn .flagimg { border-radius: 3px; display: block; box-shadow: 0 0 0 1px var(--sep); background: var(--fill-hover); flex: none; }
.telcode-btn .chev { color: var(--text-3); flex: none; }
.telcode-list {
  position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; margin: 0; padding: 6px;
  list-style: none; width: max(220px, 100%); max-height: 280px; overflow-y: auto;
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow-lift);
}
@media (prefers-color-scheme: dark) { .telcode-list { box-shadow: 0 18px 40px rgba(0,0,0,0.6), 0 0 0 1px var(--sep); } }
.telcode-list li { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 0.9375rem; }
.telcode-list li:hover { background: var(--fill); }
.telcode-list li[aria-selected="true"] { background: var(--fill); font-weight: 600; }
.telcode-list li img { border-radius: 3px; flex: none; box-shadow: 0 0 0 1px var(--sep); background: var(--fill-hover); }
.telcode-list .tc-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.telcode-list .tc-dial { color: var(--text-2); font-variant-numeric: tabular-nums; flex: none; }

.err { display: block; color: var(--bad); font-size: 0.8125rem; line-height: 1.35; margin-top: 6px; }
.err:empty { display: none; }
.has-err input, .has-err select, .has-err textarea { background: var(--bad-bg); border-color: var(--bad); }
.has-err input:focus, .has-err textarea:focus { box-shadow: 0 0 0 4px var(--bad-bg); }
.count, .sug { display: block; color: var(--text-2); font-size: 0.8125rem; margin-top: 6px; font-variant-numeric: tabular-nums; }
.count.ok { color: var(--ok); }

/* switch iOS */
.check { display: flex; gap: 10px; align-items: center; margin-top: 10px; color: var(--text-2); font-size: 0.875rem; cursor: pointer; user-select: none; width: fit-content; }
.check input { position: relative; width: 42px; height: 26px; flex: none; padding: 0; border: 0; border-radius: 99px; background: var(--fill-hover); cursor: pointer; transition: background-color 200ms ease; }
.check input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: transform 280ms cubic-bezier(0.3, 1.3, 0.5, 1); }
.check input:checked { background: var(--ok); }
.check input:checked::after { transform: translateX(16px); }
.check input:focus { box-shadow: 0 0 0 4px var(--ring); border: 0; }

/* botões: feedback no toque (pointer-down), não no clique */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; background: var(--fill); color: var(--text); border-radius: 99px;
  padding: 10px 18px; font: inherit; font-size: 0.9375rem; font-weight: 600; cursor: pointer;
  transition: transform 120ms ease-out, background-color 150ms ease, opacity 150ms ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn:hover { background: var(--fill-hover); }
.btn:active { transform: scale(0.96); transition-duration: 60ms; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.btn.primary { background: var(--text); color: var(--bg); }
.btn.primary:hover { opacity: 0.88; }
.btn.lemon { background: var(--lemon); color: var(--on-lemon); }
.btn.big { width: 100%; padding: 16px; font-size: 1.0625rem; border-radius: 16px; }
.btn.small { padding: 7px 14px; font-size: 0.8125rem; }
.btn.danger { color: var(--bad); }
.btn.icon { width: 36px; height: 36px; padding: 0; border-radius: 50%; background: transparent; color: var(--text-3); font-size: 1rem; }
.btn.icon:hover { background: var(--fill); color: var(--text); }
.link { background: none; border: 0; color: var(--ink); cursor: pointer; font: inherit; font-weight: 600; padding: 0; }

/* ============ artistas (arrastar para reordenar) ============ */
#artist-rows { position: relative; margin-bottom: 10px; }
.arow {
  position: relative; display: grid; grid-template-columns: 32px 22px 1fr 36px; gap: 6px; align-items: center;
  margin-bottom: 8px; border-radius: 14px; background: var(--card); will-change: transform;
}
.arow { transition: scale 180ms ease, box-shadow 180ms ease; }
.arow.lifted { z-index: 5; box-shadow: var(--shadow-lift); scale: 1.02; }
.arow.lifted input { background: var(--card); }
.handle {
  width: 32px; height: 44px; border: 0; background: none; padding: 0; cursor: grab; touch-action: none;
  color: var(--text-3); border-radius: 10px; display: grid; place-items: center;
}
.handle:hover { color: var(--text); background: var(--fill); }
.handle:active, .arow.lifted .handle { cursor: grabbing; color: var(--text); }
.handle:focus-visible { outline: 2px solid var(--ink); }
.handle svg { width: 12px; height: 18px; }
.num { color: var(--text-3); font-size: 0.8125rem; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }

/* nome final da faixa */
.preview { background: var(--fill); border-radius: 14px; padding: 14px 16px; margin: 0 0 20px; }
.preview span { display: block; color: var(--text-2); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.preview strong { font-size: 1.125rem; letter-spacing: -0.01em; word-break: break-word; }

/* snippet (track preview) */
.snippet-intro { margin-top: -2px; }
.snippet-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 16px; }
.snippet-card { background: var(--fill); border-radius: 14px; padding: 14px 16px; }
.snippet-card strong { display: block; font-size: 0.9375rem; margin-bottom: 6px; }
.snippet-card p { margin: 0; color: var(--text-2); font-size: 0.8125rem; line-height: 1.45; }
@media (max-width: 620px) { .snippet-cards { grid-template-columns: 1fr; } }
.snippet-examples { margin: 20px 0 24px; }
.snippet-players { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0; }
@media (max-width: 620px) { .snippet-players { grid-template-columns: 1fr; } }
.snippet-player { background: var(--fill); border-radius: 14px; padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 4px 12px; align-items: center; }
.snippet-player .lbl { grid-column: 1 / -1; margin-bottom: 2px; }
.snippet-wave { position: relative; height: 64px; border-radius: 8px; overflow: hidden; background: var(--fill-hover); }
.snippet-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text); pointer-events: none; }
.snippet-controls { display: flex; gap: 8px; align-items: center; }
.snippet-play, .snippet-replay { width: 40px; height: 40px; border-radius: 50%; padding: 0; display: grid; place-items: center; flex: none; }
.snippet-play-icon { font-size: 0.75rem; }
.snippet-replay { font-size: 1.0625rem; line-height: 1; }
.snippet-soon { margin: 4px 0 0; }

/* splits */
.splits { display: grid; gap: 6px; }
.srow { display: grid; grid-template-columns: 1fr 96px 20px; gap: 10px; align-items: center; }
.srow input { text-align: right; font-variant-numeric: tabular-nums; padding: 9px 12px; }
.sname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9375rem; }
.srow > span:last-child { color: var(--text-2); }
.srow input:disabled { opacity: 1; color: var(--text-2); background: var(--fill); cursor: not-allowed; -webkit-text-fill-color: var(--text-2); }
.arow input[readonly], input[name="featuring"][readonly] { color: var(--text-2); background: var(--fill); cursor: not-allowed; }
/* participantes extras (co-produtor, manager, compositor, editora…) */
.extra-card { border: 1px solid var(--sep); border-radius: 14px; padding: 2px 16px 16px; margin: 0 0 12px; }
.extra-card .field { margin-bottom: 16px; }
.extra-card .extra-parts { margin-bottom: 0; }
.extra-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.extra-head .sec { margin: 14px 0 8px; }
.extra-head .btn.icon { width: 32px; height: 32px; font-size: 0.875rem; margin-right: -8px; }
.extra-card .check { margin: -6px 0 16px; }
.extra-part { margin-bottom: 12px; min-width: 0; }
.extra-role { display: grid; grid-template-columns: 1fr; gap: 8px; align-items: center; }
.extra-role.on { grid-template-columns: minmax(0, 1fr) 92px 16px; }
.extra-role input { text-align: right; font-variant-numeric: tabular-nums; padding: 12px 10px; }
.extra-role .pctsign { color: var(--text-2); }
.extra-other { margin-top: 8px; }
#add-extra { margin-top: 2px; }
.srole { display: block; font-size: 0.75rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; }
.srow.extra .sname { line-height: 1.25; }
.splitbar { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.total { font-weight: 700; font-size: 0.9375rem; color: var(--ok); font-variant-numeric: tabular-nums; }
.total.bad { color: var(--bad); }

.formerr { color: var(--bad); font-weight: 600; text-align: center; margin: 0 0 12px; }
.submitbar { position: sticky; bottom: 0; padding: 16px 0 max(16px, env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 60%, transparent); z-index: 4; }

/* sucesso */
.done { text-align: center; padding: clamp(40px, 10vh, 96px) 0; will-change: transform, opacity; }
.done p { color: var(--text-2); margin: 0 auto 24px; max-width: 28em; }
.done .preview { width: fit-content; max-width: 100%; margin: 0 auto 28px; }
.check-anim { width: 76px; height: 76px; margin: 0 auto 20px; }
.check-anim circle { fill: var(--lemon); }
.check-anim path { fill: none; stroke: var(--on-lemon); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; }
.done.show .check-anim path { animation: draw 420ms 160ms cubic-bezier(0.3, 0, 0.2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ============ admin ============ */
.bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
.bar input, .bar select { width: auto; min-width: 150px; padding: 9px 12px; font-size: 0.9375rem; }
.bar select { padding-right: 34px; }
.bar .grow { flex: 1; min-width: 220px; }
.bar .perpage { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 0.875rem; white-space: nowrap; }
.bar .perpage select { min-width: 0; }
.bar.pager { justify-content: center; margin: 16px 0 0; }
.ignored .bar.pager { margin: 8px 0 0; }
.admin-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.admin-title h1 { font-size: 2rem; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--card); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-card); }
.stat b { display: block; font-size: 1.75rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--text-2); font-size: 0.8125rem; }
.tablewrap { overflow: auto; border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow-card); }
table { border-collapse: collapse; width: 100%; font-size: 0.875rem; }
th, td { padding: 10px 10px; text-align: left; white-space: nowrap; max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
/* Textos longos (faixa, nome artístico, nome completo) cortam com "…": o botão de copiar ao lado sempre copia o valor inteiro. */
th:nth-child(n+4):nth-child(-n+6), td:nth-child(n+4):nth-child(-n+6) { max-width: 190px; }
td { border-top: 1px solid var(--sep); }
th { position: sticky; top: 0; background: var(--card); cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; user-select: none; }
th:hover { color: var(--text); }
th .sortind { display: inline-block; width: 1em; margin-left: 4px; text-align: center; opacity: 0.35; font-weight: 600; }
th:hover .sortind { opacity: 0.6; }
th .sortind.on { opacity: 1; color: var(--text); }
th.chevcol { cursor: default; }
tr.click { cursor: pointer; transition: background-color 120ms ease; }
tr.click:hover { background: var(--fill); }
tr.click:active { background: var(--fill-hover); }
/* ---------- copiar com um clique (tabela e gaveta do admin) ---------- */
.copycell { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.copycell .cv { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copybtn {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border: 0; border-radius: 7px; background: transparent; color: var(--text-2); cursor: pointer; padding: 0;
}
.copybtn:hover { background: var(--fill); color: var(--text); }
.copybtn .icon-check { display: none; }
.copybtn.copied { color: var(--ok); }
.copybtn.copied .icon-copy { display: none; }
.copybtn.copied .icon-check { display: inline; }
.linkicon { color: var(--text-2); text-decoration: none; }
.linkicon:hover { color: var(--text); }
th.chevcol { width: 28px; padding: 10px 4px; }
.chev-toggle {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  border: 0; border-radius: 7px; background: transparent; color: var(--text-2); cursor: pointer; padding: 0;
}
.chev-toggle:hover { background: var(--fill); color: var(--text); }
.chevicon { transition: transform 160ms ease; }
.chevicon.open { transform: rotate(-180deg); }
tr.subrow { background: var(--fill); }
tr.subrow td { padding: 10px 14px; white-space: normal; }
.namepill { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border-radius: 10px; padding: 5px 6px 5px 10px; margin: 2px 8px 2px 0; font-size: 0.8125rem; }
.namepill b { font-weight: 600; color: var(--text-2); }
.contactbtn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; line-height: 1.2; text-decoration: none; background: var(--fill); color: var(--text); transition: filter 0.15s; }
.namepill .contactbtn:first-of-type { margin-left: 4px; }
.contactbtn:hover { filter: brightness(1.12); text-decoration: none; }
.contactbtn.wa { background: rgba(52, 199, 89, 0.16); color: var(--ok); }
/* aba Artistas: só o ícone (WhatsApp / envelope), com o mesmo visual do .contactbtn */
.contactbtn.iconbtn { width: 24px; height: 24px; padding: 0; border: 0; cursor: pointer; flex: none; }
.contactbtn.iconbtn svg { width: 13px; height: 13px; }
.contactbtn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.ccontact { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
/* nome clicável (artista / pessoa) -> menu de contato */
.namebtn { border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 4px; text-decoration: underline dotted transparent; text-underline-offset: 3px; transition: text-decoration-color 120ms ease; }
.namebtn:hover, .namebtn[aria-expanded="true"] { text-decoration-color: var(--text-3); }
.namebtn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.contactmenu { position: fixed; z-index: 40; min-width: 200px; max-width: min(360px, calc(100vw - 16px)); background: var(--card); border-radius: 14px; padding: 6px; box-shadow: var(--shadow-lift); border: 1px solid var(--sep); font-size: 0.875rem; }
.contactmenu .cm-group + .cm-group { border-top: 1px solid var(--sep); margin-top: 4px; padding-top: 4px; }
.cm-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-item svg { flex: none; }
a.cm-item:hover, a.cm-item:focus-visible { background: var(--fill); text-decoration: none; outline: none; }
.cm-item.wa svg { color: var(--ok); }
.cm-item.off { color: var(--text-3); cursor: default; }
.cm-who { color: var(--text-2); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 0.75rem; font-weight: 600; background: var(--fill); color: var(--text-2); }
.pill.new { background: var(--lemon); color: var(--on-lemon); }
.pill.reviewing { background: rgba(255, 159, 10, 0.16); color: #c93400; }
.pill.approved { background: rgba(52, 199, 89, 0.16); color: var(--ok); }
.pill.rejected { background: var(--bad-bg); color: var(--bad); }
.pill.done { background: rgba(52, 199, 89, 0.16); color: var(--ok); }
.pill.complete { background: rgba(52, 199, 89, 0.16); color: var(--ok); }
.pill.incomplete { background: rgba(255, 159, 10, 0.16); color: #c93400; }
@media (prefers-color-scheme: dark) { .pill.reviewing, .pill.incomplete { color: #ffb340; } }
.muted { color: var(--text-2); }

.login { max-width: 380px; margin: 14vh auto; background: var(--card); border-radius: 24px; padding: 32px 28px; box-shadow: var(--shadow-card); }
.login h1 { font-size: 1.75rem; }

/* gaveta: camada separada; o fundo escurece para dar foco */
.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, 0.32); opacity: 0; pointer-events: none; }
.scrim.on, .scrim:not([hidden]) { pointer-events: auto; opacity: 1; }

/* pop-up de confirmação (ex.: "é esse o seu nome?") */
.modal {
  position: fixed; z-index: 32; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(0.94);
  width: min(420px, calc(100vw - 32px)); background: var(--card); border-radius: var(--r-card);
  padding: 24px; box-shadow: var(--shadow-lift); opacity: 0; pointer-events: none;
  transition: opacity 200ms ease, transform 240ms cubic-bezier(0.3, 1.3, 0.5, 1);
}
.modal.show { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; }
.modal h2 { margin: 0 0 10px; font-size: 1.25rem; }
.modal-name { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; background: var(--fill); border-radius: 12px; padding: 12px 14px; margin: 0 0 10px; word-break: break-word; }
.modal .hint { margin: 0 0 20px; }
.modal-addr { font-size: 1.05rem; line-height: 1.4; }
.modal-addr .miss { color: var(--warn); font-weight: 600; }
.modal-warn { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 10px 14px; margin: 0 0 10px; font-size: 0.92rem; font-weight: 600; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 31; width: min(640px, 100%);
  background: var(--card); overflow: auto; overscroll-behavior: contain;
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.18); transform: translateX(100%); will-change: transform;
}
.drawer-head {
  position: sticky; top: 0; z-index: 2; padding: 18px 22px 14px; cursor: grab; touch-action: pan-y; user-select: none;
  background: color-mix(in srgb, var(--card) 80%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
}
.drawer-head:active { cursor: grabbing; }
.drawer-head .grab { width: 5px; height: 40px; border-radius: 99px; background: var(--sep); position: absolute; left: 7px; top: 50%; translate: 0 -50%; }
.drawer-head .row { display: flex; gap: 12px; align-items: flex-start; }
.drawer-head h2 { flex: 1; font-size: 1.25rem; margin: 0; }
.drawer-head .d-preview { flex: 1; min-width: 0; margin: 0; padding: 10px 12px 10px 14px; }
.d-preview .pv-line { display: flex; align-items: center; gap: 8px; }
.d-preview .pv-line strong { flex: 1; min-width: 0; font-size: 1.0625rem; line-height: 1.3; word-break: break-word; }
.d-preview .copybtn:hover { background: var(--fill-hover); }
.drawer-body { padding: 4px 22px 40px; }
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 0; margin: 0; background: var(--fill); border-radius: 14px; overflow: hidden; }
.dl dt, .dl dd { padding: 10px 14px; border-top: 1px solid var(--sep); margin: 0; font-size: 0.875rem; }
.dl dt:first-of-type, .dl dt:first-of-type + dd { border-top: 0; }
.dl dt { color: var(--text-2); }
.dl dd { word-break: break-word; white-space: pre-wrap; }
.sec { margin: 24px 0 8px; font-size: 0.75rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; }

/* ============ admin: abas Formulários / Releases / Artistas (js/catalog.js) ============ */
.tabs { display: inline-flex; gap: 2px; background: var(--fill); border-radius: 12px; padding: 3px; margin: 0 0 22px; max-width: 100%; overflow-x: auto; }
.tab { border: 0; background: none; color: var(--text-2); font: inherit; font-size: 0.9375rem; font-weight: 600; padding: 7px 18px; border-radius: 9px; cursor: pointer; white-space: nowrap; transition: background-color 150ms ease, color 150ms ease; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 0 0 0.5px rgba(0,0,0,0.04); }
@media (prefers-color-scheme: dark) { .tab[aria-selected="true"] { background: #636366; } }
.tab:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.stat.cstat { display: block; text-align: left; border-radius: 16px; }
.stat.cstat[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.stat small { font-size: 0.75rem; }
/* catálogo: colunas com mais espaço que a tabela de envios; subtabela de versões/releases dentro da linha aberta */
.ctable th:nth-child(n), .ctable td:nth-child(n) { max-width: 280px; }
.ctable tr.subrow > td:nth-child(n) { max-width: none; padding: 8px 10px 12px 38px; }
.ctable-sub { width: 100%; background: var(--card); border-radius: 12px; overflow: hidden; font-size: 0.8125rem; }
.ctable-sub th { position: static; cursor: default; background: transparent; font-size: 0.6875rem; padding: 8px 10px; }
.ctable-sub td { padding: 7px 10px; max-width: 240px; }
.pill.st-released { background: rgba(52, 199, 89, 0.16); color: var(--ok); }
.pill.st-upcoming { background: var(--lemon); color: var(--on-lemon); }
.pill.st-doubt { background: rgba(255, 159, 10, 0.16); color: #c93400; }
.pill.st-takedown { background: var(--bad-bg); color: var(--bad); }
.pill.m-confirmed { background: rgba(52, 199, 89, 0.16); color: var(--ok); }
.pill.m-rejected { background: var(--bad-bg); color: var(--bad); }
.pill.st-pending { background: rgba(255, 159, 10, 0.2); color: #b25000; box-shadow: inset 0 0 0 1px rgba(255, 159, 10, 0.55); margin-left: 4px; white-space: nowrap; }
.pill.st-approved { background: rgba(52, 199, 89, 0.12); color: var(--ok); box-shadow: inset 0 0 0 1px rgba(52, 199, 89, 0.45); margin-left: 4px; white-space: nowrap; }
.approval-note { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 159, 10, 0.14); color: #b25000; font-size: 0.8125rem; line-height: 1.4; }
@media (prefers-color-scheme: dark) { .pill.st-doubt, .pill.st-pending, .approval-note { color: #ffb340; } }
.cat-grid { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 0 24px; align-items: start; }
.cat-grid > div { min-width: 0; }
.cat-grid .sec:first-child, .cat-grid > div > .sec:first-child { margin-top: 4px; }
.cat-hint { font-size: 0.8125rem; margin: 0 0 8px; }
#a-detail .tablewrap { margin-bottom: 4px; }
/* aba Artistas: grupos "Com releases" / "Só formulário" e a lista recolhida de ignorados */
#a-stats .cstat[aria-pressed="true"] b { color: var(--text); }
#a-other { margin: -4px 0 10px; }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--link, var(--ink)); text-decoration: underline; cursor: pointer; }
.ignored { margin: 24px 0 0; border-radius: 14px; background: var(--card); padding: 10px 14px; }
.ignored > summary { cursor: pointer; font-size: 0.8125rem; font-weight: 600; color: var(--text-2); padding: 4px 0; }
.ignored[open] > summary { margin-bottom: 8px; }
.ignored .ctable td { font-size: 0.8125rem; }
#a-detail .admin-title { flex-wrap: wrap; align-items: center; }
@media (max-width: 900px) { .cat-grid { grid-template-columns: 1fr; } }
/* créditos (track_credits) dentro da linha aberta da aba Releases e no artista */
.credits { margin: 10px 0 0; display: grid; gap: 6px; font-size: 0.8125rem; }
.credits .cr-track { background: var(--card); border-radius: 12px; padding: 8px 12px; }
.credits .cr-title { font-weight: 600; margin-bottom: 2px; }
.credits .cr-role { color: var(--text-2); }
/* importador do catálogo (aba Releases, só admin) */
/* Detalhes da música (catálogo): capa por URL (hotlink), links por serviço, nomes copiáveis */
.d-cover { width: 96px; height: 96px; flex: none; border-radius: 12px; overflow: hidden; background: var(--fill); }
.d-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-cover.empty::after { content: "sem capa"; display: flex; height: 100%; align-items: center; justify-content: center; font-size: 0.75rem; color: var(--text-2); }
.svcbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.svcbar .btn { text-decoration: none; }
.names { display: flex; flex-wrap: wrap; gap: 6px; }
.namechip { display: inline-flex; align-items: center; gap: 2px; background: var(--fill); border-radius: 99px; padding: 2px 4px 2px 10px; font-size: 0.8125rem; }
/* Artista: "Produtores e créditos" (nomes reais por papel, copiáveis) */
.credlist { grid-template-columns: 120px 1fr; }
.credlist dd.names { white-space: normal; }
.credlist .namechip, .dl .namechip { background: var(--card); }
.namechip .muted { font-size: 0.75rem; margin-left: 2px; }
.d-version { margin: 0 0 18px; }
.d-sub { font-size: 0.75rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; margin: 12px 0 4px; }
.d-rel { background: var(--card); border-radius: 12px; padding: 8px 12px; margin: 6px 0; font-size: 0.875rem; }
.cimport { background: var(--fill); border-radius: 14px; padding: 12px 14px; margin: 0 0 20px; font-size: 0.875rem; }
.cimport ul { margin: 6px 0 10px; padding-left: 18px; }
.cimport .bar { margin: 8px 0 0; }
.cimport progress { width: 100%; height: 6px; margin: 6px 0; }
.cimport pre { white-space: pre-wrap; font-size: 0.75rem; margin: 6px 0 0; }

/* ============ acessibilidade ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
  .btn:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .top, .drawer-head { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .drawer-head { background: var(--card); }
}
@media (prefers-contrast: more) {
  input, select, textarea { border-color: var(--text-2); }
  fieldset, .tablewrap, .stat { border: 1px solid var(--text-2); }
  .top { background: var(--bg); box-shadow: 0 1px 0 var(--text-2); }
}

/* ============ login do artista ============ */
.auth { max-width: 420px; margin: 0 auto; padding: clamp(28px, 7vh, 64px) 16px 64px; }
.auth h1 { font-size: 2rem; }
.auth .sub { margin-bottom: 24px; font-size: 1rem; }
.oauth { display: grid; gap: 10px; }
.oauth-btn { width: 100%; justify-content: center; gap: 10px; padding: 13px 16px; border-radius: 14px; background: var(--card); box-shadow: 0 0 0 1px var(--sep); }
.oauth-btn:hover { background: var(--fill); }
.oauth-btn svg { flex: none; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--text-3); font-size: 0.8125rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--sep); }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 16px; font-size: 0.875rem; color: var(--text-2); }
.guest { display: block; text-align: center; margin-top: 28px; color: var(--text-2); font-size: 0.875rem; }
.guest:hover { color: var(--text); }
.okmsg { color: var(--ok); font-weight: 600; margin: 0 0 12px; }

/* conta no cabeçalho do formulário */
.account { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; }
.account .who { color: var(--text-2); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) { .account .who { display: none; } }
.banner.ok { background: rgba(52, 199, 89, 0.12); color: var(--ok); }

/* ============ admin: tela "Gerar contrato" (js/contract.js) ============ */
.ct-modal { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: var(--bg); }
.ct-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: var(--card); box-shadow: 0 1px 0 var(--sep); }
.ct-head h2 { margin: 0; font-size: 1.25rem; }
.ct-sub { font-size: 0.8125rem; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ct-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(340px, 440px) 1fr; }
.ct-form { overflow: auto; overscroll-behavior: contain; padding: 16px 16px 48px; background: var(--card); border-right: 1px solid var(--sep); }
.ct-form .field { margin-bottom: 12px; }
.ct-form input, .ct-form select { padding: 9px 12px; font-size: 0.9375rem; }
.ct-form select { padding-right: 34px; }
.ct-form .sec:first-child { margin-top: 0; }
.ct-form .banner { font-size: 0.8125rem; margin-bottom: 12px; }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0 10px; }
.ct-g-name { grid-template-columns: 1fr 96px; }
.ct-g-doc { grid-template-columns: 1fr 96px; }
.ct-g-money { grid-template-columns: 1fr 140px; }
.ct-person { background: var(--fill); border-radius: 14px; padding: 10px 12px 2px; margin-bottom: 10px; }
.ct-person input { background: var(--card); }
.ct-person-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 0.8125rem; }
.ct-person-head .muted { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-person-head .btn.icon { width: 28px; height: 28px; font-size: 0.8125rem; }
.ct-form input.missing { background: var(--warn-bg); border-color: var(--warn); }
.ct-sumbar { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; }
.ct-sumbar .total { margin-left: auto; }
.ct-form .check { margin: 12px 0 10px; color: var(--text); }
.ct-warn { margin: 12px 0; font-size: 0.8125rem; color: var(--warn); background: var(--warn-bg); border-radius: 12px; padding: 8px 12px; }
.ct-warn ul { margin: 0; padding-left: 18px; }
.ct-warn .ok { color: var(--ok); font-weight: 600; }
.ct-preview { min-width: 0; min-height: 0; display: flex; }
.ct-preview iframe { flex: 1; width: 100%; height: 100%; border: 0; background: #e9e9ec; }
@media (max-width: 860px) {
  .ct-body { grid-template-columns: 1fr; grid-template-rows: auto 70vh; overflow: auto; }
  .ct-form { overflow: visible; border-right: 0; border-bottom: 1px solid var(--sep); }
  .ct-sub { max-width: 90vw; }
}
/* coluna Forms da aba Releases (js/catalog.js): número clicável + marcador "provável" */
.formsbtn { font-weight: 600; min-width: 1.5em; text-align: left; }
.pill.pill-mini { padding: 1px 7px; font-size: 0.6875rem; vertical-align: 1px; }
.d-forms { margin: 0 0 18px; scroll-margin-top: 12px; }
.d-forms .ctable-sub td { max-width: 200px; }
.c-modal-body .hint { margin: 0 0 20px; }
