/* =========================================================
   VOZ DE MERCADO — Sistema de design (mockup) v2
   Linguagem inspirada em plataformas de rádio indoor:
   topbar central · botões-pílula com gradiente · cards de
   playlist com selo de energia · player flutuante.
   Identidade própria: gradiente laranja→coral (pôr do sol)
   + roxo para recursos de IA. Tipografia Poppins/Inter.
   ========================================================= */

:root {
  /* Marca — gradiente quente (pôr do sol) */
  --brand: #FF5A1F;            /* laranja base (ação sólida) */
  --brand-2: #FF3D5E;          /* coral (fim do gradiente) */
  --brand-ink: #C2410C;        /* texto de marca sobre claro */
  --brand-soft: #FFF1EA;       /* fundo translúcido de marca */
  --grad: linear-gradient(135deg, #FF7A33 0%, #FF3D5E 100%);
  --grad-hover: linear-gradient(135deg, #FF6A1F 0%, #F52C50 100%);

  /* IA */
  --ai: #7C3AED;
  --ai-2: #A855F7;
  --ai-soft: #F3EEFE;
  --grad-ai: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);

  /* Neutros */
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --surface-2: #F1F3F5;
  --border: #E9EBEF;
  --border-2: #E0E3E8;
  --ink: #1A1D23;
  --muted: #6B7280;
  --muted-2: #9CA3AF;

  /* Semânticos */
  --success: #16A34A;
  --success-soft: #E8F6EE;
  --warning: #D97706;
  --danger: #DC2626;

  /* Energia (selos de playlist, como no concorrente) */
  --e-calma: #22B8A6;
  --e-media: #F59E0B;
  --e-animada: #FF3D5E;

  /* Forma */
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Sombra (mais suave e difusa, estilo card flutuante) */
  --shadow-sm: 0 1px 2px rgba(17,24,39,.05), 0 2px 6px rgba(17,24,39,.05);
  --shadow-md: 0 6px 18px rgba(17,24,39,.08);
  --shadow-lg: 0 18px 44px rgba(17,24,39,.14);
  --shadow-brand: 0 10px 24px rgba(255,77,94,.32);

  /* Espaço (8pt) */
  --s1: 8px;  --s2: 16px;  --s3: 24px;  --s4: 32px;  --s5: 40px;  --s6: 56px;

  --nav-h: 68px;
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: "Poppins", var(--font);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4 { font-family: var(--display); font-weight: 600; margin: 0; line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: 30px; }
h2 { font-size: 23px; }
h3 { font-size: 19px; }
p  { margin: 0; }
a  { color: var(--brand-ink); text-decoration: none; }
small { font-size: 12px; }
img { max-width: 100%; display: block; }

:focus-visible { outline: 3px solid #FFB694; outline-offset: 2px; border-radius: 8px; }

/* =========================================================
   TOPBAR (navegação horizontal central)
   ========================================================= */
.app { display: flex; flex-direction: column; min-height: 100vh; }

.top-nav {
  position: sticky; top: 0; z-index: 40;
  height: var(--nav-h);
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: var(--s3);
  padding: 0 var(--s4);
}
.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand .logo {
  width: 40px; height: 40px; border-radius: 13px; flex: none;
  background: var(--grad);
  display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-brand);
}
.brand .logo svg { width: 22px; height: 22px; }
.brand b { font-family: var(--display); font-size: 16px; line-height: 1.05; display: block; }
.brand .tag { font-size: 11px; color: var(--muted); font-weight: 500; }

/* Menu central */
.nav {
  display: flex; align-items: center; gap: 4px;
  margin: 0 auto;
}
.nav a {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: var(--radius-pill);
  color: var(--muted); font-weight: 600; font-size: 14px;
  transition: color .15s, background .15s;
}
.nav a svg { width: 18px; height: 18px; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.active { color: var(--brand-ink); }
.nav a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -19px; height: 3px;
  background: var(--grad); border-radius: 3px 3px 0 0;
}

/* Cluster direito */
.nav-right { display: flex; align-items: center; gap: var(--s2); flex: none; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); display: grid; place-items: center;
  cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .badge-dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); border: 2px solid #fff; }
.nav-link { font-weight: 600; font-size: 14px; color: var(--muted); }
.nav-link:hover { color: var(--ink); }

.store-select {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 6px 6px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
}
.store-select:hover { background: var(--surface-2); }
.store-select .store-ava {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
}
.store-select .store-name { font-weight: 600; font-size: 13.5px; line-height: 1.1; }
.store-select .store-meta { font-size: 11px; color: var(--muted); }
.store-select .chev { width: 16px; height: 16px; color: var(--muted-2); }

/* =========================================================
   CONTEÚDO
   ========================================================= */
.main { flex: 1; display: flex; flex-direction: column; }
.content {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding: var(--s4) var(--s4) 120px;
  display: flex; flex-direction: column; gap: var(--s3);
}
.content.narrow { max-width: 860px; }
.content.center { align-items: center; text-align: center; }

.page-head h1 { margin-bottom: 6px; }
.page-head p { color: var(--muted); }
.page-head .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* Título de seção com filete (como "Em alta | ...") */
.section-title { display: flex; align-items: center; gap: 14px; margin: 4px 0 2px; }
.section-title b { font-family: var(--display); font-size: 20px; font-weight: 600; }
.section-title .rule { width: 1px; height: 22px; background: var(--border-2); }
.section-title .sub { color: var(--muted); font-size: 15px; }

/* =========================================================
   BOTÕES — pílula com gradiente
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: var(--radius-pill);
  font-family: var(--font); font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .05s, box-shadow .18s, background .18s, filter .18s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background-image: var(--grad); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { background-image: var(--grad-hover); box-shadow: 0 12px 28px rgba(255,77,94,.4); }
.btn-ai { background-image: var(--grad-ai); color: #fff; box-shadow: 0 10px 24px rgba(124,58,237,.3); }
.btn-ai:hover { filter: brightness(1.06); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border-2); }

/* =========================================================
   ABAS HORIZONTAIS — "orelhas", pra telas com muitas seções
   (ex.: taxonomia). Cada aba troca o painel visível abaixo,
   em vez de empilhar tudo numa página só.
   ========================================================= */
.tabs-abas {
  display: flex; flex-wrap: wrap; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s3);
}
.tabs-abas .aba {
  appearance: none; border: 1px solid transparent; border-bottom: none;
  background: transparent; color: var(--muted);
  font-family: var(--font); font-weight: 600; font-size: 14px;
  padding: 12px 20px; margin-bottom: -1px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer; white-space: nowrap;
  transition: color .15s, background .15s;
}
.tabs-abas .aba:hover { color: var(--ink); background: var(--surface-2); }
.tabs-abas .aba.ativa {
  color: var(--brand-ink); background: var(--surface);
  border-color: var(--border); border-bottom-color: var(--surface);
}
.tx-painel[hidden] { display: none; }

/* Nível de aba dos HUBS do painel admin (ex.: Catálogo musical > Músicas/
   Taxonomia/Perfis/Vozes) — classe/atributo PRÓPRIOS (hub-painel/
   data-hub-painel) pra nunca colidir com a navegação interna de uma página
   que vira aba de um hub e já usa tx-painel/tx-subpainel/tx-subsubpainel
   pra si mesma (ex.: Taxonomia, Programação). */
.hub-painel[hidden] { display: none; }

/* Sub-abas (aba dentro de aba, ex.: Comunicados > Feriados e fechamento) —
   mesmo visual de .tabs-abas/.aba, só com classe/atributo PRÓPRIOS
   (tx-subpainel/data-subpainel) pra não colidir com mudarAba() das telas
   que usam isso (essa faz querySelectorAll(".tx-painel") sem escopo — se
   os sub-painéis usassem a mesma classe, trocar a aba-mãe escondia eles
   também por engano). */
.tx-subpainel[hidden] { display: none; }

/* 3º nível de abas (ex.: Feriados e fechamento > Horário/Feriados/Avisos) —
   mesmas classes/mecanismo de .tx-subpainel um nível abaixo (tx-subsubpainel/
   data-subsubpainel, própria função de troca, nunca tocada por mudarAba() ou
   mudarSubAba()). Um pouco menor que os outros 2 níveis só pra deixar visível
   que é um nível mais fundo. */
.tabs-abas.tabs-abas-mini { margin-bottom: var(--s2); }
.tabs-abas.tabs-abas-mini .aba { padding: 8px 14px; font-size: 13px; }
.tx-subsubpainel[hidden] { display: none; }

/* Linha de horário por dia da semana (Feriados e fechamento) — 3 colunas
   FIXAS (dia | abre | fecha) em vez de .grid.cols-3 genérico, que colapsa
   pra 1 coluna em telas estreitas e empilha 21 campos (7 dias × 3 campos)
   um embaixo do outro. As 3 colunas cabem tranquilo até telas bem estreitas
   (~360px), então só quebra em telas realmente minúsculas. */
.dia-horario-row {
  display: grid; grid-template-columns: minmax(140px, 1.4fr) 96px 96px;
  gap: 10px; align-items: end; margin-bottom: 10px;
}
@media (max-width: 420px) {
  .dia-horario-row { grid-template-columns: 1fr; }
}

/* =========================================================
   PLAYLIST CARD — um cartão só (em vez de <select> técnico +
   botão separado) pra escolher a playlist de um período do dia.
   Clicar já abre o seletor visual (seletorPlaylist.js).
   ========================================================= */
.playlist-card {
  display: block; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--radius); padding: 14px 16px; cursor: pointer;
  font-family: var(--font); transition: border-color .15s, background .15s;
}
.playlist-card:hover { background: var(--surface-2); border-color: var(--brand); }
.playlist-card .pc-rotulo {
  display: block; font-size: 11px; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); font-weight: 600; margin-bottom: 4px;
}
.playlist-card .pc-nome { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.playlist-card .pc-trocar { display: block; font-size: 12px; color: var(--brand-ink); margin-top: 4px; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-lg { min-height: 56px; font-size: 16px; padding: 0 32px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* =========================================================
   PÍLULAS DE STATUS / SELOS
   ========================================================= */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; }
.pill.live { background: var(--success-soft); color: #0F7A3D; }
.pill.live .dot { background: var(--success); animation: pulse 1.6s infinite; }
.pill.paused { background: var(--surface-2); color: var(--muted); }
.pill.paused .dot { background: var(--muted-2); }
.pill.ai { background: var(--ai-soft); color: var(--ai); }
.pill.ai .dot { background: var(--ai); }
.pill.offline { background: #FEF3F2; color: var(--danger); }
.pill.credits { background: var(--brand-soft); color: var(--brand-ink); }

@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(22,163,74,.5)} 70%{box-shadow:0 0 0 7px rgba(22,163,74,0)} 100%{box-shadow:0 0 0 0 rgba(22,163,74,0)} }

/* =========================================================
   CARDS
   ========================================================= */
.grid { display: grid; gap: var(--s2); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--s3); box-shadow: var(--shadow-sm);
}
.card.pad-lg { padding: var(--s4); }
.card.soft { border: none; box-shadow: var(--shadow-md); }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--s2); }
.card-title h3 { font-size: 16px; }

/* Card de ação (linha), como no onboarding do concorrente */
.action-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.action-row .a-ico {
  width: 46px; height: 46px; border-radius: 14px; flex: none;
  display: grid; place-items: center; background: var(--brand-soft); color: var(--brand);
}
.action-row .a-ico.ai { background: var(--ai-soft); color: var(--ai); }
.action-row .a-ico svg { width: 22px; height: 22px; }
.action-row .a-txt { flex: 1; min-width: 0; }
.action-row .a-txt b { font-size: 15px; font-family: var(--display); }
.action-row .a-txt p { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* Stats */
.stat .ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); float: right; }
.stat .ico svg { width: 20px; height: 20px; }
.stat .label { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat .value { font-family: var(--display); font-size: 30px; font-weight: 600; margin-top: 6px; }
.stat .trend { font-size: 12px; color: var(--success); font-weight: 600; margin-top: 4px; }

/* =========================================================
   FILTROS EM PÍLULA (com ícone) — estilo "Em alta / Sofisticadas"
   ========================================================= */
.filters { display: flex; flex-wrap: wrap; gap: 12px; }
.filter-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 20px; min-height: 48px; border-radius: var(--radius-pill);
  background: var(--surface); box-shadow: var(--shadow-sm);
  font-weight: 600; font-size: 14px; color: var(--ink); cursor: pointer;
  border: 1px solid transparent; user-select: none;
}
.filter-pill svg { width: 18px; height: 18px; color: var(--brand); }
.filter-pill:hover { box-shadow: var(--shadow-md); }
.filter-pill.sel { background: var(--grad); color: #fff; box-shadow: var(--shadow-brand); }
.filter-pill.sel svg { color: #fff; }

/* Busca grande arredondada */
.searchbar {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: var(--radius-pill);
  padding: 8px 8px 8px 22px; box-shadow: var(--shadow-md);
}
.searchbar svg.mag { width: 22px; height: 22px; color: var(--brand); flex: none; }
.searchbar input { border: none; outline: none; flex: 1; min-height: 40px; font-size: 16px; background: transparent; padding: 0; }
.searchbar input::placeholder { color: var(--muted); }
.searchbar .btn { min-height: 46px; }

/* =========================================================
   CARDS DE PLAYLIST (foto + selo de energia + overlay)
   ========================================================= */
.pl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); }
.pl-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 1 / 1; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s;
}
.pl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pl-card .cover {
  position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.9);
}
.pl-card .cover svg { width: 64px; height: 64px; opacity: .9; }
.pl-card .cover.g1 { background: linear-gradient(150deg, #FF7A33, #FF3D5E); }
.pl-card .cover.g2 { background: linear-gradient(150deg, #8B5CF6, #6D28D9); }
.pl-card .cover.g3 { background: linear-gradient(150deg, #22B8A6, #0E7490); }
.pl-card .cover.g4 { background: linear-gradient(150deg, #F59E0B, #EF4444); }
.pl-card .cover.g5 { background: linear-gradient(150deg, #3B82F6, #1E3A8A); }
.pl-card .cover.g6 { background: linear-gradient(150deg, #EC4899, #BE185D); }
.pl-card .veil { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,0) 55%); }
.pl-card .energy {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: var(--radius-pill);
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
  color: #fff; font-size: 12px; font-weight: 600;
}
.pl-card .energy .dot { width: 8px; height: 8px; border-radius: 50%; }
.energy.calma  .dot { background: var(--e-calma); }
.energy.media  .dot { background: var(--e-media); }
.energy.animada .dot { background: var(--e-animada); }
.pl-card .pl-info { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; color: #fff; }
.pl-card .pl-info b { font-family: var(--display); font-size: 17px; font-weight: 600; display: block; }
.pl-card .pl-info span { font-size: 12.5px; color: rgba(255,255,255,.82); }
.pl-card .play-fab {
  position: absolute; right: 12px; bottom: 12px; z-index: 3;
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  opacity: 0; transform: translateY(6px); transition: opacity .18s, transform .18s;
  box-shadow: var(--shadow-brand);
}
.pl-card:hover .play-fab { opacity: 1; transform: none; }
.pl-card .play-fab svg { width: 20px; height: 20px; margin-left: 2px; }
.pl-card .cover.foto { background-size: cover; background-position: center; }

/* Carrossel de estilos musicais (tela Início) — rolagem automática em CSS
   puro, pausa no hover. A trilha é a lista de perfis duplicada 2x; a
   animação anda exatamente 50% da largura, então a segunda cópia emenda
   sem corte visível (loop "infinito"). */
.carrossel-generos {
  overflow: hidden; margin-top: 4px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}
.carrossel-generos-trilha { display: flex; gap: var(--s3); width: max-content; animation: carrossel-rolagem 30s linear infinite; }
.carrossel-generos:hover .carrossel-generos-trilha { animation-play-state: paused; }
.carrossel-generos .pl-card { width: 190px; flex: none; }
@keyframes carrossel-rolagem {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* =========================================================
   HERO "TOCANDO AGORA"
   ========================================================= */
.hero {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--s3); align-items: center;
  background: var(--surface); border-radius: var(--radius-lg); padding: var(--s3);
  box-shadow: var(--shadow-md); border: 1px solid var(--border);
}
.hero .cover {
  width: 128px; height: 128px; border-radius: var(--radius); flex: none;
  background: var(--grad); display: grid; place-items: center; color: #fff;
  box-shadow: var(--shadow-brand);
}
.hero .cover svg { width: 54px; height: 54px; }
.hero .h-type { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-ink); }
.hero .h-title { font-family: var(--display); font-size: 26px; font-weight: 600; margin: 4px 0 6px; }
.hero .h-sub { color: var(--muted); font-size: 14px; }
.hero .h-meta { display: flex; gap: 20px; margin-top: 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.hero .h-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero .h-meta svg { width: 16px; height: 16px; color: var(--muted-2); }

.bar { height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 38%; background: var(--grad); border-radius: 4px; }

/* ---------- Rádio no ar (painel do lojista) ---------- */
.radio-toggle {
  display: flex; align-items: center; gap: 16px; cursor: pointer; width: 100%;
  background: var(--surface); border: 2px solid var(--border-2);
  border-radius: var(--radius-lg); padding: 16px 22px; min-height: 76px; text-align: left;
  font-family: var(--font);
}
.radio-toggle-ring {
  width: 50px; height: 50px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff; background: var(--muted-2);
}
.radio-toggle-ring svg { width: 24px; height: 24px; }
.radio-toggle-txt b { font-family: var(--display); font-size: 18px; display: block; }
.radio-toggle[data-on="true"] { border-color: #BCE7CB; background: var(--success-soft); }
.radio-toggle[data-on="true"] .radio-toggle-ring { background: var(--success); }

.radio-now { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.radio-now-meta { display: flex; flex-direction: column; gap: 2px; }
.radio-now-type { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-ink); }
.radio-controls { display: flex; align-items: center; gap: 10px; }
.mini-ctrl {
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); display: grid; place-items: center;
}
.mini-ctrl:hover { background: var(--surface-2); }
.mini-ctrl svg { width: 18px; height: 18px; }
.mini-ctrl-main { background: var(--grad); color: #fff; border: none; }
.mini-ctrl-main svg { width: 20px; height: 20px; }

.empty-soft { font-size: 13px; color: var(--muted); }

/* Now compacto (reuso) */
.now { display: flex; align-items: center; gap: var(--s2); }
.now .cover { width: 60px; height: 60px; border-radius: 14px; flex: none; background: var(--grad); display: grid; place-items: center; color: #fff; }
.now .cover svg { width: 26px; height: 26px; }
.now .meta b { font-size: 16px; font-family: var(--display); }
.now .meta .type { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--brand-ink); }
.now .meta .sub { font-size: 13px; color: var(--muted); }

/* =========================================================
   GRADE (fila de reprodução)
   ========================================================= */
.queue { display: flex; flex-direction: column; }
.queue .row { display: flex; align-items: center; gap: 14px; padding: 12px 8px; border-radius: 12px; }
.queue .row:hover { background: var(--surface-2); }
.queue .idx { width: 22px; text-align: center; color: var(--muted-2); font-size: 13px; font-variant-numeric: tabular-nums; flex: none; }
.queue .tag {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: 4px 9px; border-radius: 7px; flex: none; width: 82px; text-align: center;
}
.tag.musica  { background: var(--surface-2); color: var(--muted); }
.tag.locucao { background: var(--brand-soft); color: var(--brand-ink); }
.tag.jingle  { background: var(--ai-soft); color: var(--ai); }
.queue .row .name { flex: 1; font-weight: 500; font-size: 14px; }
.queue .row .dur { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

/* =========================================================
   TABELA / OFERTAS
   ========================================================= */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 0 12px 12px; }
.table td { padding: 15px 12px; border-top: 1px solid var(--border); font-size: 14px; }
.table tr:hover td { background: var(--surface-2); }
.price { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-pill); }
.badge.ok { background: var(--success-soft); color: #0F7A3D; }
.badge.wait { background: var(--ai-soft); color: var(--ai); }
.badge.none { background: var(--surface-2); color: var(--muted); }

/* =========================================================
   FORM / CHIPS / SLIDERS
   ========================================================= */
.field { margin-bottom: var(--s3); }
.field > label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.section-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin: 0 0 var(--s2); padding-top: var(--s3); border-top: 1px solid var(--border);
}
.section-label:first-child { padding-top: 0; border-top: none; }
input[type=text], input[type=email], input[type=password], input[type=time], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 48px; padding: 12px 15px; font: inherit;
  border: 1px solid var(--border-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px var(--brand-soft); }
textarea { min-height: 96px; resize: vertical; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 10px 18px; min-height: 46px; display: inline-flex; align-items: center;
  border: 1.5px solid var(--border-2); border-radius: var(--radius-pill);
  font-weight: 500; font-size: 14px; cursor: pointer; background: var(--surface); user-select: none;
  transition: border-color .15s, background .15s, color .15s;
}
.chip:hover { border-color: var(--muted-2); }
.chip.sel { border-color: transparent; background: var(--grad); color: #fff; font-weight: 600; box-shadow: var(--shadow-brand); }

input[type=range] { width: 100%; accent-color: var(--brand); height: 44px; }
.range-val { font-weight: 700; color: var(--brand-ink); font-family: var(--display); }

/* =========================================================
   WIZARD — círculos numerados (1 · 2 · 3)
   ========================================================= */
.wizard { max-width: 640px; margin: 0 auto; width: 100%; }
.steps { display: flex; align-items: flex-start; justify-content: center; gap: 0; margin-bottom: var(--s4); }
.steps .step { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }
.steps .step .num {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--border-2); color: var(--muted);
  font-family: var(--display); font-weight: 600; font-size: 15px; z-index: 2;
  transition: background .2s, border-color .2s, color .2s;
}
.steps .step .lbl { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.steps .connector { flex: 1; height: 2px; background: var(--border-2); margin: 20px 4px 0; min-width: 26px; }
.steps .step.done .num, .steps .step.cur .num { background-image: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--shadow-brand); }
.steps .step.done .lbl, .steps .step.cur .lbl { color: var(--brand-ink); }
.steps .connector.done { background: var(--brand-2); }

.wz-panel { display: none; }
.wz-panel.active { display: block; animation: fade .25s ease; }
.wz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s4); }
.wz-count { font-size: 13px; color: var(--muted); }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* =========================================================
   BANNER DE AVISO
   ========================================================= */
.notice {
  display: flex; gap: 14px; padding: 16px 20px; border-radius: var(--radius);
  background: #FFFBEB; border: 1px solid #FDE68A;
}
.notice svg { width: 22px; height: 22px; color: var(--warning); flex: none; margin-top: 1px; }
.notice b { font-size: 14px; }
.notice p { font-size: 13px; color: #92722B; margin-top: 2px; }

/* Faixa de teste (rodapé fixo, como o concorrente) */
.trial-strip {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--grad); color: #fff; text-align: center;
  padding: 9px 16px; font-size: 13px; font-weight: 500;
}
.trial-strip a { color: #fff; text-decoration: underline; font-weight: 700; }

/* =========================================================
   PLAYER FLUTUANTE (barra inferior)
   ========================================================= */
.player-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 54px; z-index: 35;
  width: min(1120px, calc(100% - 48px));
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 18px; padding: 12px 18px;
}
/* Faixa (capa + nome) */
.player-bar .pb-track { display: flex; align-items: center; gap: 12px; flex: none; width: 210px; min-width: 0; }
.player-bar .pb-cover { width: 46px; height: 46px; border-radius: 12px; flex: none; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-brand); }
.player-bar .pb-cover svg { width: 22px; height: 22px; }
.player-bar .pb-meta { min-width: 0; }
.player-bar .pb-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-bar .pb-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Botões redondos (coração, prev/next) */
.player-bar .pb-btn { width: 38px; height: 38px; border-radius: 50%; border: none; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; flex: none; transition: background .15s, color .15s; }
.player-bar .pb-btn:hover { background: var(--surface-2); color: var(--ink); }
.player-bar .pb-btn svg { width: 19px; height: 19px; }
.player-bar .pb-heart.on { color: var(--brand-2); }
.player-bar .pb-heart.on svg { fill: var(--brand-2); }

/* Controles centrais */
.player-bar .pb-controls { display: flex; align-items: center; gap: 6px; flex: none; }
.player-bar .pb-btn.main { width: 46px; height: 46px; background: var(--grad); color: #fff; box-shadow: var(--shadow-brand); }
.player-bar .pb-btn.main:hover { background-image: var(--grad-hover); color: #fff; }
.player-bar .pb-btn.main svg { width: 20px; height: 20px; }

/* Barra de progresso longa */
.player-bar .pb-progress { flex: 1; display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 80px; }
.player-bar .pb-progress .bar { flex: 1; cursor: pointer; }

/* Volume */
.player-bar .pb-volume { display: flex; align-items: center; gap: 8px; flex: none; color: var(--muted); }
.player-bar .pb-volume svg { width: 19px; height: 19px; flex: none; }
.player-bar .pb-volume input[type=range] { width: 84px; height: 24px; }

.player-bar .pb-sep { width: 1px; height: 30px; background: var(--border-2); flex: none; }

/* Ação + fechar */
.player-bar .pb-action { min-height: 42px; padding: 0 18px; flex: none; }
.player-bar .pb-close { width: 34px; height: 34px; border-radius: 50%; border: none; background: transparent; color: var(--muted-2); cursor: pointer; display: grid; place-items: center; flex: none; }
.player-bar .pb-close:hover { background: var(--surface-2); color: var(--ink); }
.player-bar .pb-close svg { width: 18px; height: 18px; }

/* =========================================================
   MODAL (referência de estilo)
   ========================================================= */
.modal-backdrop { position: fixed; inset: 0; background: rgba(17,24,39,.5); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-width: 560px; width: 100%; padding: var(--s4); max-height: calc(100vh - 40px); overflow-y: auto; }
.modal .m-close { float: right; width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--surface-2); cursor: pointer; }

/* Popup de permissão (confirmGate.js) — mesma base .modal-backdrop/.modal,
   ícone e botão Confirmar com o gradiente de marca. */
.modal-permissao { max-width: 380px; text-align: center; }
.permissao-icone {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  box-shadow: var(--shadow-brand);
}
.permissao-icone svg { width: 28px; height: 28px; }
.permissao-texto { color: var(--muted); margin: 8px 0 20px; }
.permissao-acoes { display: flex; gap: 10px; }
.permissao-acoes .btn { flex: 1; }

/* =========================================================
   PLAYER (kiosk) — tema escuro, gradiente quente
   ========================================================= */
.kiosk {
  min-height: 100vh; margin: 0;
  background: radial-gradient(1200px 600px at 72% -10%, #3A1206 0%, transparent 58%),
              radial-gradient(900px 520px at 8% 112%, #2A1030 0%, transparent 55%),
              #0A0C14;
  color: #F8FAFC; display: flex; flex-direction: column; font-family: var(--font);
}
.kiosk .k-top { display: flex; align-items: center; justify-content: space-between; padding: 22px 30px; }
.kiosk .k-brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 600; }
.kiosk .k-brand .logo { width: 36px; height: 36px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; }
.kiosk .k-brand .logo svg { width: 19px; height: 19px; color: #fff; }
.k-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; background: rgba(255,255,255,.08); }
.k-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #34D399; }
.k-pill.off .dot { background: #F87171; }

.kiosk .k-main { flex: 1; display: grid; place-items: center; padding: 24px; text-align: center; }
.k-start { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.k-start .play-big {
  width: 136px; height: 136px; border-radius: 50%; cursor: pointer; border: none;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  box-shadow: 0 20px 54px rgba(255,77,94,.5);
}
.k-start .play-big svg { width: 56px; height: 56px; margin-left: 6px; }
.k-start h2 { font-size: 30px; }
.k-start p { color: #94A3B8; max-width: 380px; }

.k-now { display: none; flex-direction: column; align-items: center; gap: 18px; width: 100%; max-width: 560px; }
.k-now.show { display: flex; animation: fade .3s; }
.k-cover { width: 210px; height: 210px; border-radius: 30px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 22px 64px rgba(0,0,0,.55); }
.k-cover svg { width: 86px; height: 86px; color: rgba(255,255,255,.92); }
.k-type { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #FF8A4C; }
.k-title { font-family: var(--display); font-size: 30px; font-weight: 600; }
.k-sub { color: #94A3B8; }
.k-bar { width: 100%; height: 8px; background: rgba(255,255,255,.12); border-radius: 6px; overflow: hidden; }
.k-bar > i { display: block; height: 100%; width: 0%; background: var(--grad); transition: width .9s linear; }
.k-times { display: flex; justify-content: space-between; width: 100%; font-size: 12px; color: #94A3B8; font-variant-numeric: tabular-nums; }
.k-next { font-size: 13px; color: #CBD5E1; margin-top: 6px; }
.k-next b { color: #fff; }
.kiosk .k-foot { text-align: center; padding: 16px; font-size: 12px; color: #64748B; }

.k-controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 8px; }
.k-ctrl {
  width: 52px; height: 52px; border-radius: 50%; cursor: pointer; border: none;
  background: rgba(255,255,255,.08); color: #F8FAFC;
  display: grid; place-items: center; transition: background .15s, transform .04s;
}
.k-ctrl:hover { background: rgba(255,255,255,.16); }
.k-ctrl:active { transform: translateY(1px); }
.k-ctrl:disabled { opacity: .35; cursor: not-allowed; pointer-events: none; }
.k-ctrl svg { width: 22px; height: 22px; }
.k-ctrl-main { width: 64px; height: 64px; background: var(--grad); color: #fff; box-shadow: 0 10px 28px rgba(255,77,94,.4); }
.k-ctrl-main:hover { filter: brightness(1.05); }
.k-ctrl-main svg { width: 26px; height: 26px; }
.k-ctrl.on { background: var(--grad); color: #fff; }
.k-update { font-size: 12px; color: #34D399; min-height: 16px; margin-top: 8px; text-align: center; }

/* Telas baixas (tablet em paisagem, monitor pequeno, janela não-maximizada)
   — sem isso o card "tocando agora" ultrapassava a altura da viewport e os
   controles (inclusive volume/mute) ficavam fora da área visível, exigindo
   rolar a página — um kiosk touch normalmente nem tem como rolar. */
@media (max-height: 700px) {
  .kiosk .k-top { padding: 12px 24px; }
  .kiosk .k-main { padding: 12px; }
  .k-now { gap: 10px; }
  .k-cover { width: 110px; height: 110px; border-radius: 20px; }
  .k-cover svg { width: 48px; height: 48px; }
  .k-title { font-size: 22px; }
  .k-next { margin-top: 0; }
  .kiosk .k-foot { padding: 6px; }
}

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 1040px) {
  .pl-grid, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .top-nav { flex-wrap: wrap; height: auto; gap: 12px; padding: 12px var(--s3); }
  .nav { order: 3; width: 100%; margin: 0; overflow-x: auto; justify-content: flex-start; }
  .nav a.active::after { display: none; }
  .nav a.active { background: var(--brand-soft); }
  .content { padding: var(--s3) var(--s2) 160px; }
  .hero { grid-template-columns: 1fr; text-align: left; }
  .grid.cols-3, .grid.cols-2, .grid.cols-4, .pl-grid { grid-template-columns: 1fr; }
  .pl-grid { grid-template-columns: 1fr 1fr; }
  .player-bar { gap: 10px; padding: 10px 12px; }
  .player-bar .pb-track { width: auto; flex: 1; }
  .player-bar .pb-volume, .player-bar .pb-sep, .player-bar .pb-progress .t { display: none; }
  .player-bar .pb-action span.lbl { display: none; }
  .store-select .store-name, .store-select .store-meta { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
