:root {
  --background: #ffffff;
  --foreground: #1a1a1a;
  --primary: #00acf0;
  --primary-foreground: #ffffff;
  --secondary: #f2f6f8;
  --muted: #f3f6f7;
  --muted-foreground: #737373;
  --border: #ebebeb;
  --emvida-dark-blue: #2a2e92;
  --radius: 1rem;
  --glow: 0 0 40px hsl(197 100% 47% / 0.3);
  --glow-hover: 0 8px 25px -5px hsl(197 100% 47% / 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--background);
  color: var(--foreground);
  font-family: "Nunito Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
}

.nav {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  height: 28px;
  width: auto;
  display: block;
}

.nav-acoes {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
}

.nav-acoes a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.nav-acoes a:hover { text-decoration: underline; }

.nav-quem {
  color: var(--muted-foreground);
  font-weight: 300;
}

.link-sair {
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.link-sair:hover { color: var(--foreground); }

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 24px 72px;
}

.badge {
  display: inline-flex;
  align-items: center;
  margin: 0 0 24px;
  padding: 6px 16px;
  border: 1px solid hsl(197 100% 47% / 0.1);
  border-radius: 999px;
  background: hsl(197 100% 47% / 0.05);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--foreground);
}

h1 span { color: var(--primary); }

.lead {
  margin: 0 0 36px;
  color: var(--muted-foreground);
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.5;
  max-width: 36rem;
}

.campo {
  display: block;
  margin-bottom: 1.05rem;
}

.campo > span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--foreground);
}

input, select, textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--background);
  color: var(--foreground);
  font-family: inherit;
  font-size: 1rem;
}

textarea {
  height: auto;
  min-height: 220px;
  padding: 12px;
  line-height: 1.5;
  resize: vertical;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%231A1A1A' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.1rem;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px hsl(197 100% 47% / 0.25);
}

.campo small {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted-foreground);
  font-size: 0.78rem;
  font-weight: 300;
}

.linha {
  display: grid;
  grid-template-columns: 0.7fr 1.2fr 1.15fr;
  gap: 0.75rem;
}

.hora-br {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 0.35rem;
  background: var(--background);
}

.hora-br select {
  height: 38px;
  border: 0;
  box-shadow: none;
  background-color: transparent;
  padding-left: 0.35rem;
}

.dois-pontos {
  font-weight: 700;
  color: var(--foreground);
}

.pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.pill { margin: 0; }
.pill input { display: none; }

.pill span {
  display: block;
  text-align: center;
  padding: 0.65rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--foreground);
  font-weight: 600;
  cursor: pointer;
  background: var(--background);
}

.pill input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

.info {
  margin: 8px 0 0;
  padding: 24px;
  background: var(--muted);
  border-radius: 1rem;
}

.info-kicker {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
}

.info-texto {
  margin: 0;
  white-space: pre-wrap;
  font-size: 1.05rem;
  line-height: 1.65;
  font-weight: 300;
  color: var(--foreground);
  min-height: 9rem;
}

.status {
  margin: 0.7rem 0 0;
  color: #ef4343;
  font-size: 0.88rem;
}

button#gerar, button#entrar, button#salvar-cfg, button#enviar-vinheta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 28px 0 8px;
  padding: 14px 32px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

button#entrar { margin-top: 8px; }
button#enviar-vinheta { margin-top: 8px; }
button#gerar:hover, button#entrar:hover, button#salvar-cfg:hover, button#enviar-vinheta:hover { box-shadow: var(--glow-hover); }
button#gerar:disabled, button#entrar:disabled, button#salvar-cfg:disabled, button#enviar-vinheta:disabled { opacity: 0.65; cursor: wait; box-shadow: none; }

.pills.abas {
  max-width: 420px;
  margin: 0 0 32px;
}

.hint {
  margin: 0 0 16px;
  color: var(--muted-foreground);
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.45;
}

.hint code {
  font-size: 0.82rem;
  color: var(--primary);
}

.ok-msg {
  margin: 0.4rem 0 0;
  color: #12805c;
  font-size: 0.88rem;
}

.mix-timeline {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 8px;
  margin: 0 0 22px;
}

.mix-fase {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 10px 12px;
  min-height: 58px;
}

.mix-fase span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.mix-fase b {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: var(--primary);
  max-width: 100%;
  opacity: 0.85;
}

.mix-fase.fala {
  background: hsl(197 100% 47% / 0.05);
  border-color: hsl(197 100% 47% / 0.2);
}

.slider {
  display: block;
  margin-bottom: 1.15rem;
}

.slider > span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.slider em { font-style: normal; color: var(--primary); }

.slider input[type="range"] {
  width: 100%;
  height: 28px;
  padding: 0;
  border: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.slider small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted-foreground);
  font-size: 0.78rem;
  font-weight: 300;
}

.avancado {
  margin: 8px 0 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.avancado summary {
  cursor: pointer;
  color: var(--muted-foreground);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.lista-audios, .audio-card { display: grid; gap: 12px; }

.audio-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.audio-card p {
  margin: 4px 0 0;
  color: var(--muted-foreground);
  font-size: 0.85rem;
}

.audio-card audio { width: 100%; }

.audio-card a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.audio-card a:hover { text-decoration: underline; }

.vinhetas { display: grid; gap: 12px; margin-bottom: 20px; }

.vinheta-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--background);
}

.vinheta-card.ativa { border-color: var(--primary); }

.vinheta-card p {
  margin: 4px 0 0;
  color: var(--muted-foreground);
  font-size: 0.85rem;
}

.vinheta-card audio { width: 100%; }

.vinheta-acoes {
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn-sec {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.upload-vinheta {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 28px;
}

.kpis article {
  padding: 20px 18px;
  background: var(--muted);
  border-radius: 1rem;
}

.kpis p {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
}

.kpis strong {
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}

.tabela-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  color: var(--muted-foreground);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .kpis { grid-template-columns: 1fr; }
  .nav-quem { display: none; }
  .mix-grid { grid-template-columns: 1fr 1fr; }
  .mix-timeline { grid-template-columns: 1fr; }
}

.resultado { margin-top: 36px; }
.duracao { margin: 0 0 10px; color: var(--muted-foreground); font-size: 0.9rem; }
audio { width: 100%; margin-bottom: 12px; }
.baixar { display: flex; gap: 1.4rem; }
.baixar a { color: var(--primary); font-weight: 600; text-decoration: none; }
.baixar a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .linha { grid-template-columns: 1fr 1fr; }
  .campo.mes { grid-column: 1 / -1; }
}

body.pagina-login {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.login-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 48px 24px;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, hsl(197 100% 47% / 0.12), transparent 55%);
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 36px 36px 28px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 24px 50px -28px hsl(221 54% 28% / 0.2);
  text-align: left;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 4px;
  border-radius: 0 0 999px 999px;
  background: #ffef14;
}

.login-logo {
  height: 28px;
  margin: 0 0 28px;
}

body.pagina-login .badge { margin: 0 0 16px; }

body.pagina-login h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.35rem);
  margin-bottom: 12px;
  letter-spacing: -0.04em;
}

body.pagina-login .lead {
  margin: 0 0 28px;
  font-size: 1.05rem;
  max-width: none;
}

.login-alerta {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 14px;
  background: hsl(0 86% 97%);
  border: 1px solid hsl(0 86% 90%);
  color: #ef4343;
  font-size: 0.88rem;
  line-height: 1.45;
}

.login-alerta[hidden] { display: none !important; }

.btn-sso {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 14px 32px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.btn-sso svg { width: 18px; height: 18px; }
.btn-sso:hover { box-shadow: var(--glow-hover); }
.btn-sso:active { transform: translateY(1px); }
.btn-sso[hidden] { display: none !important; }

.login-ajuda {
  margin: 22px 0 0;
  color: var(--muted-foreground);
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .login-card { padding: 28px 22px 22px; }
  .login-shell { padding: 24px 16px; }
}
