/* Tokens do design system Rádio UAI */
:root {
  --navy-900: #001150;
  --navy-hero: #011151;
  --navy-art: #000742;
  --live: #E30613;
  --live-deep: #C60A1B;
  --orange: #FFA04D;
  --ink: #192730;
  --ink-muted: #69727D;
  --surface-light: #F6F6F8;
  --surface-line: #ECEDEF;
  --white: #FFFFFF;

  --glass: rgba(255, 255, 255, .06);
  --glass-2: rgba(255, 255, 255, .11);
  --line: rgba(255, 255, 255, .12);
  --soft: rgba(246, 246, 248, .72);

  --r-pill: 60px;
  --r-card: 20px;
  --f-main: 'Murecho', system-ui, sans-serif;
  --f-menu: 'Poppins', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--navy-900); }
body {
  min-height: 100vh;
  color: var(--white);
  font: 400 15px/24px var(--f-main);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
[hidden] { display: none !important; }

/* Marca */
.marca { display: inline-flex; align-items: center; gap: 12px; }
.marca img { height: 40px; width: auto; }
.marca-sinal {
  position: relative; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff3b3b, var(--live) 50%, var(--live-deep));
}
.marca-sinal::after {
  content: ''; position: absolute; top: -2px; right: -4px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--orange);
}
.marca-txt { display: flex; flex-direction: column; font: 700 21px/1.05 var(--f-main); letter-spacing: -.01em; }
.marca-txt small { font: 500 11px/1.4 var(--f-menu); letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 28px; border: 0; border-radius: var(--r-pill);
  font: 500 16px/1 var(--f-main);
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-live { background: var(--live); color: var(--white); box-shadow: 0 10px 24px rgba(227, 6, 19, .3); }
.btn-ghost {
  height: 40px; padding: 0 18px; background: transparent; color: var(--surface-light);
  border: 1px solid var(--line); font: 500 14px/1 var(--f-menu);
}
.btn-ghost:hover { background: var(--glass-2); }
.btn svg { width: 18px; height: 18px; }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; }
.login-hero {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 44px clamp(24px, 5vw, 64px);
}
.login-hero h1 { font: 700 clamp(30px, 3.4vw, 46px)/1.12 var(--f-main); max-width: 15ch; letter-spacing: -.01em; }
.login-hero h1 span { color: var(--soft); }
.login-hero p { color: var(--soft); max-width: 46ch; margin-top: 16px; font-size: 17px; line-height: 27px; }

.mascote {
  /* o fundo da arte (#011151) já é o navy da página, então ela se funde sem recorte */
  width: min(400px, 78%); height: auto; align-self: center;
}
.arte { position: relative; width: min(380px, 62%); aspect-ratio: 1; margin-left: 4%; }
.arte .disco {
  position: absolute; inset: 16%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff2a2a, var(--live) 48%, var(--live-deep));
  box-shadow: 0 30px 90px rgba(227, 6, 19, .35);
}
.arte .lua { position: absolute; top: 11%; left: 22%; width: 9%; aspect-ratio: 1; border-radius: 50%; background: var(--orange); }
.arte i {
  position: absolute; top: 50%; left: 50%; border-radius: 50%;
  border: 4px solid transparent; border-right-color: var(--surface-line);
  transform: translate(-50%, -50%) rotate(0deg);
  animation: onda 2.4s ease-in-out infinite;
}
.arte i:nth-of-type(1) { width: 86%; height: 86%; }
.arte i:nth-of-type(2) { width: 112%; height: 112%; animation-delay: .25s; }
.arte i:nth-of-type(3) { width: 138%; height: 138%; animation-delay: .5s; }
@keyframes onda { 0%, 100% { opacity: .25; } 50% { opacity: .95; } }

.login-lado { display: grid; place-items: center; padding: 32px clamp(16px, 4vw, 48px); background: var(--navy-art); }
.login-card {
  width: 100%; max-width: 420px;
  background: var(--white); color: var(--ink);
  border-radius: 28px; padding: 36px 32px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  display: flex; flex-direction: column; gap: 16px;
}
.selo {
  align-self: flex-start;
  font: 600 12px/1 var(--f-main); letter-spacing: .12em; text-transform: uppercase;
  color: var(--live-deep); background: rgba(227, 6, 19, .08);
  padding: 8px 12px; border-radius: var(--r-pill);
}
.login-card h2 { font: 700 23px/30px var(--f-main); }
.login-card > p { color: var(--ink-muted); margin-top: -8px; }
.campo { display: flex; flex-direction: column; gap: 6px; font: 600 14px/1 var(--f-main); }
.campo input, .campo select, .campo textarea {
  height: 48px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--surface-line); background: var(--surface-light); color: var(--ink);
  font: 400 16px/1 var(--f-main);
}
.campo textarea { height: auto; padding: 12px 16px; line-height: 24px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: 2px solid var(--navy-900); outline-offset: 0; background: var(--white); }
.erro { min-height: 20px; color: var(--live-deep); font-size: 14px; font-weight: 500; }
.login-card .btn { width: 100%; }
.demo { border-top: 1px solid var(--surface-line); padding-top: 14px; font-size: 14px; color: var(--ink-muted); }
.demo summary { cursor: pointer; font-weight: 500; }
.demo ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.demo button {
  border: 1px solid var(--surface-line); background: var(--surface-light); color: var(--ink);
  border-radius: var(--r-pill); padding: 6px 12px; font-size: 13px;
}
.demo button:hover { border-color: var(--ink-muted); }

/* Topo */
.topo {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px clamp(16px, 4vw, 48px); border-bottom: 1px solid var(--line);
}
.topo-dir { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 14px/1 var(--f-menu); color: var(--surface-light);
  background: var(--glass-2); border-radius: var(--r-pill); padding: 12px 16px;
}
.pill svg { width: 16px; height: 16px; }

.conteudo { max-width: 1180px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 48px) 72px; display: grid; gap: 44px; }
.conexao {
  border: 1px solid var(--live); background: rgba(227, 6, 19, .12);
  border-radius: 14px; padding: 12px 16px; font-weight: 500;
}

/* Player ao vivo */
.player {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: center;
  padding: 28px; border-radius: 28px;
  background: linear-gradient(135deg, var(--live) 0%, var(--live-deep) 100%);
  box-shadow: 0 24px 60px rgba(198, 10, 27, .3);
}
.player::after {
  content: ''; position: absolute; right: -120px; top: 50%;
  width: 380px; height: 380px; border-radius: 50%;
  border: 40px solid rgba(255, 255, 255, .06); transform: translateY(-50%);
  pointer-events: none;
}
.player-capa { aspect-ratio: 1; border-radius: var(--r-card); overflow: hidden; background: rgba(0, 0, 0, .18); box-shadow: 0 16px 40px rgba(0, 0, 0, .3); }
.player-capa img { width: 100%; height: 100%; object-fit: cover; }
.player-info { position: relative; z-index: 1; min-width: 0; }
.ao-vivo {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 13px/1 var(--f-main); letter-spacing: .14em; text-transform: uppercase;
  background: rgba(255, 255, 255, .18); padding: 8px 12px; border-radius: var(--r-pill);
}
.pulso { width: 8px; height: 8px; border-radius: 50%; background: var(--white); }
body.tocando .pulso { animation: pulso 1.4s ease-in-out infinite; }
@keyframes pulso { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.p-canal { margin-top: 16px; font: 500 15px/22px var(--f-main); opacity: .88; }
.player h1 { font: 700 clamp(24px, 3vw, 34px)/1.15 var(--f-main); margin-top: 4px; overflow-wrap: anywhere; }
.p-artista { font: 500 19px/26px var(--f-main); opacity: .92; margin-top: 4px; }
.barra { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .28); margin-top: 24px; overflow: hidden; }
.barra span { display: block; height: 100%; width: 0; background: var(--white); border-radius: 6px; transition: width 1s linear; }
.tempos { display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; opacity: .88; font-variant-numeric: tabular-nums; }
.controles { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 18px; }
.btn-play {
  width: 64px; height: 64px; flex: none; border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--white); color: var(--live-deep);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .25); transition: transform .15s ease;
}
.btn-play:hover { transform: scale(1.06); }
.btn-play svg { width: 26px; height: 26px; }
.volume { display: flex; align-items: center; gap: 10px; }
.volume svg { width: 20px; height: 20px; }
.volume input { width: 140px; accent-color: var(--white); }
.aviso { font-size: 14px; font-weight: 500; opacity: .95; }

/* Blocos */
.bloco-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.bloco-cab h2 { font: 700 23px/30px var(--f-main); }
.bloco-cab p { color: var(--soft); }

/* Canais */
.canais { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.canal {
  position: relative; display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 14px; border-radius: var(--r-card);
  background: var(--glass); border: 1px solid var(--line);
  transition: background .15s ease, transform .15s ease, border-color .15s ease;
}
.canal:hover { background: var(--glass-2); transform: translateY(-2px); }
.canal.ativo { border: 2px solid var(--live); padding: 13px; background: rgba(227, 6, 19, .12); }
.canal-capa { width: 64px; height: 64px; flex: none; border-radius: 14px; object-fit: cover; background: var(--glass-2); }
.canal-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.canal strong { font: 600 17px/22px var(--f-main); }
.canal small, .canal-agora { color: var(--soft); font-size: 13px; line-height: 18px; }
.canal-agora { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.canal-selo {
  position: absolute; top: -11px; right: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--live); padding: 6px 10px; border-radius: var(--r-pill);
  font: 600 11px/1 var(--f-main); letter-spacing: .08em; text-transform: uppercase;
}
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.eq i { width: 2px; height: 40%; background: var(--white); border-radius: 1px; }
body.tocando .eq i { animation: eq .9s ease-in-out infinite; }
body.tocando .eq i:nth-child(2) { animation-delay: .2s; }
body.tocando .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }

/* Histórico */
.historico { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.historico li { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: var(--glass); min-width: 0; }
.historico img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; background: var(--glass-2); }
.historico div { min-width: 0; display: flex; flex-direction: column; }
.historico strong, .historico span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.historico strong { font: 600 15px/20px var(--f-main); }
.historico span { color: var(--soft); font-size: 13px; line-height: 18px; }

/* Painel da rede */
.titulo-pagina h1 { font: 700 clamp(26px, 3vw, 34px)/1.15 var(--f-main); }
.titulo-pagina p { color: var(--soft); margin-top: 6px; max-width: 70ch; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; }
.kpi strong { display: block; font: 700 36px/1.1 var(--f-main); font-variant-numeric: tabular-nums; }
.kpi span { color: var(--soft); font-size: 14px; }
.kpi.destaque { background: linear-gradient(135deg, var(--live), var(--live-deep)); border-color: transparent; }
.kpi.destaque span { color: rgba(255, 255, 255, .9); }

.acoes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.acao {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 20px; border-radius: var(--r-card);
  background: var(--glass); border: 1px solid var(--line);
}
.acao-icone {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 4px;
  border-radius: 14px; background: var(--glass-2);
}
.acao-icone svg { width: 22px; height: 22px; }
.acao strong { font: 600 17px/22px var(--f-main); }
.acao p { color: var(--soft); font-size: 14px; line-height: 21px; flex: 1; }
.btn-sm { height: 40px; padding: 0 20px; font-size: 15px; margin-top: 8px; box-shadow: none; }

.tabela-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th { text-align: left; font: 600 12px/1 var(--f-main); letter-spacing: .1em; text-transform: uppercase; color: var(--soft); padding: 16px; background: var(--glass); }
td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
td strong { display: block; font-weight: 600; }
td small { color: var(--soft); font-size: 13px; }
td .agora { color: var(--soft); font-size: 14px; }
td select {
  background: var(--navy-art); color: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 8px 14px; min-width: 190px;
}
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--soft); white-space: nowrap; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .3); }
.status.on { color: var(--white); font-weight: 600; }
.status.on::before { background: var(--live); box-shadow: 0 0 0 4px rgba(227, 6, 19, .25); animation: pulso 1.4s ease-in-out infinite; }

.canais-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.canal-admin { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: var(--r-card); background: var(--glass); border: 1px solid var(--line); min-width: 0; }
.canal-admin img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; background: var(--glass-2); }
.canal-admin div { min-width: 0; }
.canal-admin strong { display: block; font: 600 16px/22px var(--f-main); }
.canal-admin span { display: block; color: var(--soft); font-size: 13px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Campanhas da loja */
.spot-no-ar {
  display: inline-flex; align-items: center; margin-left: 8px;
  font: 600 13px/1 var(--f-main); letter-spacing: .04em;
  background: var(--white); color: var(--live-deep);
  padding: 8px 12px; border-radius: var(--r-pill);
  animation: pulso-suave 1.6s ease-in-out infinite;
}
@keyframes pulso-suave { 0%, 100% { opacity: 1; } 50% { opacity: .75; } }
.camp-ctrl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.camp-ctrl .btn-sm { margin-top: 0; }
.cada { display: inline-flex; align-items: center; gap: 8px; color: var(--soft); font-size: 14px; }
.cada select {
  background: var(--navy-art); color: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px 12px;
}
.campanhas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.camp {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  padding: 18px; border-radius: var(--r-card);
  background: var(--glass); border: 1px solid var(--line);
}
.camp.pausada { opacity: .6; }
.camp-tipo {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  font: 600 12px/1 var(--f-main); letter-spacing: .08em; text-transform: uppercase;
  color: var(--soft); background: var(--glass-2); padding: 7px 10px; border-radius: var(--r-pill);
}
.camp-tipo svg { width: 14px; height: 14px; }
.camp strong { font: 600 17px/22px var(--f-main); margin-top: 4px; }
.camp p {
  color: var(--soft); font-size: 14px; line-height: 21px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.camp-acoes { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.btn-mini {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: var(--r-pill);
  background: var(--glass-2); border: 1px solid var(--line); color: var(--white);
  font: 500 14px/1 var(--f-main);
}
.btn-mini:hover { background: rgba(255, 255, 255, .18); }
.btn-mini svg { width: 14px; height: 14px; }
.btn-mini.perigo { margin-left: auto; background: transparent; color: var(--soft); }
.chave { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.chave input { position: absolute; opacity: 0; pointer-events: none; }
.chave span { position: relative; width: 38px; height: 22px; border-radius: 22px; background: rgba(255, 255, 255, .25); transition: background .15s; }
.chave span::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--white); transition: transform .15s;
}
.chave input:checked + span { background: var(--live); }
.chave input:checked + span::after { transform: translateX(16px); }
.chave input:focus-visible + span { outline: 2px solid var(--white); outline-offset: 2px; }

/* Janela de nova campanha */
.modal {
  margin: auto; border: 0; padding: 0; background: transparent;
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
}
.modal::backdrop { background: rgba(0, 7, 66, .72); backdrop-filter: blur(4px); }
.modal-corpo {
  background: var(--white); color: var(--ink); border-radius: 28px;
  padding: 28px; display: flex; flex-direction: column; gap: 16px;
}
.modal-cab { display: flex; align-items: center; justify-content: space-between; }
.modal-cab h2 { font: 700 23px/30px var(--f-main); }
.fechar {
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--surface-light); color: var(--ink); font-size: 24px; line-height: 1;
}
.fechar:hover { background: var(--surface-line); }
.abas { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; background: var(--surface-light); border-radius: var(--r-pill); }
.aba {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; border: 0; border-radius: var(--r-pill); background: transparent;
  color: var(--ink-muted); font: 500 15px/1 var(--f-main);
}
.aba svg { width: 18px; height: 18px; }
.aba.ativa { background: var(--navy-900); color: var(--white); }
.painel { display: flex; flex-direction: column; gap: 14px; }
.gravador { display: flex; align-items: center; gap: 18px; padding: 18px; border-radius: var(--r-card); background: var(--surface-light); }
.gravador strong { display: block; font: 600 16px/22px var(--f-main); }
.gravador span { color: var(--ink-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.btn-rec {
  position: relative; flex: none; width: 72px; height: 72px; border-radius: 50%;
  border: 4px solid var(--white); background: var(--live);
  box-shadow: 0 0 0 2px var(--live), 0 10px 24px rgba(227, 6, 19, .3);
  display: grid; place-items: center;
}
.btn-rec span { width: 22px; height: 22px; border-radius: 50%; background: var(--white); transition: border-radius .15s; }
.btn-rec.gravando { animation: gravando 1.2s ease-in-out infinite; }
.btn-rec.gravando span { border-radius: 4px; }
@keyframes gravando { 0%, 100% { box-shadow: 0 0 0 2px var(--live), 0 0 0 0 rgba(227, 6, 19, .45); } 50% { box-shadow: 0 0 0 2px var(--live), 0 0 0 14px rgba(227, 6, 19, 0); } }
.painel audio { width: 100%; }
.linha { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.btn-claro { background: var(--surface-light); color: var(--ink); border: 1px solid var(--surface-line); }
.btn-claro:hover { background: var(--surface-line); }
.voz-acao { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.voz-info { color: var(--ink-muted); font-size: 14px; line-height: 20px; }
.modal-rodape { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.modal .erro { min-height: 0; }
.modal .erro:empty { display: none; }

/* Aviso flutuante */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 10;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--white); color: var(--ink); font-weight: 500;
  padding: 12px 20px; border-radius: var(--r-pill); box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
  transition: opacity .2s ease, transform .2s ease; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Responsivo */
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { padding-bottom: 24px; }
  .arte { width: min(220px, 55%); margin: 0 auto; }
  .mascote { width: min(280px, 70%); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
  .acoes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .acoes { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .player { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
  .player-capa { width: 160px; }
  .volume input { width: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
