/* === Tokens (from panel.nidoazulcrema.com/styles/tokens.css) === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --azul-claro: #2b6cb0;
  --azul-claro-glow: rgba(43, 108, 176, 0.4);
  --amarillo: #f0d04a;
  --amarillo-glow: rgba(240, 208, 74, 0.38);
  --amarillo-soft: rgba(240, 208, 74, 0.14);
  --rojo: #a8102e;
  --rojo-glow: rgba(214, 40, 70, 0.45);
  --ink: #111111;

  --surface-base: #0c1520;
  --surface-raised: #152233;
  --surface-hover: #1e2f44;
  --surface-glass: rgba(21, 34, 51, 0.65);
  --border: #253a55;
  --border-subtle: rgba(37, 58, 85, 0.5);

  --text-bright: #e8eef7;
  --text-secondary: #8a9bb5;
  --text-muted: #5a6d85;
  --danger-text: #e38686;
  --success: #7cb342;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 150ms;
  --dur-normal: 280ms;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-full: 9999px;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background-color: var(--surface-base);
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(43, 108, 176, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 15% 85%, rgba(240, 208, 74, 0.05) 0%, transparent 40%),
    radial-gradient(ellipse at 85% 60%, rgba(43, 108, 176, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-bright);
  min-height: 100dvh;
  line-height: 1.5;
}

[x-cloak] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* === Header === */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}
.header__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand__mark { color: var(--amarillo); font-size: 14px; filter: drop-shadow(0 0 8px var(--amarillo-glow)); }
.brand__name { font-weight: 800; font-size: 17px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-bright); }
.brand__name span { color: var(--amarillo); }
.brand__tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-left: 10px;
  border-left: 1px solid var(--border-subtle);
}

/* === Layout === */
.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 16px 64px;
}
.page--wide { max-width: 960px; }
.page--split { max-width: 960px; }

/* Two columns: recorder left, recommendations right */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: stretch; }
.layout__main { min-width: 0; }
.layout__aside { display: grid; gap: 16px; min-width: 0; }
.layout__aside .card + .card { margin-top: 0; }
@media (min-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
  .layout__aside { position: sticky; top: 84px; }
}

/* === Tips === */
.tips__list { list-style: none; display: grid; gap: 14px; }
.tips__list li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--text-secondary); }
.tips__list strong { color: var(--text-bright); font-weight: 600; }
.tips__num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 800;
  background: var(--amarillo-soft); color: var(--amarillo);
}
.tips__subtitle { font-size: 13px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-secondary); margin: 24px 0 10px; }
.quote {
  margin: 0 0 10px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--surface-base); border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--amarillo); font-size: 14.5px; color: var(--text-bright);
}
.quote:last-child { margin-bottom: 0; }

.steps {
  list-style: none; display: grid; gap: 10px;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-subtle);
  font-size: 14px; color: var(--text-secondary);
}
.steps li { display: flex; gap: 12px; align-items: center; }

.hero { text-align: center; margin-bottom: 28px; }
.hero__logo {
  width: 72px;
  height: 72px;
  border-radius: 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  margin-bottom: 16px;
}
.hero__title { font-size: clamp(28px, 7vw, 36px); font-weight: 800; letter-spacing: -0.5px; line-height: 1.1; }
.hero__title span { color: var(--amarillo); }
.hero__subtitle { color: var(--text-secondary); margin-top: 10px; font-size: 15px; }

.card {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: 24px 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  animation: screen-in var(--dur-normal) var(--ease-out);
}
.card + .card { margin-top: 16px; }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Buttons === */
button { font: inherit; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  padding: 13px 20px;
  background: transparent;
  color: var(--text-bright);
  transition:
    transform var(--dur-fast) var(--ease-spring),
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-normal) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out);
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--amarillo); outline-offset: 2px; }
.btn--block { width: 100%; }

.btn--primary { background: var(--amarillo); color: var(--ink); border-color: var(--amarillo); box-shadow: 0 4px 18px var(--amarillo-glow); }
.btn--primary:hover:not(:disabled) { box-shadow: 0 8px 26px var(--amarillo-glow); filter: brightness(1.05); }
.btn--ghost { border-color: var(--border-subtle); background: var(--surface-glass); color: var(--text-secondary); }
.btn--ghost:hover:not(:disabled) { color: var(--text-bright); border-color: var(--border); background: var(--surface-hover); }
.btn--danger { border-color: rgba(214, 90, 90, 0.4); color: var(--danger-text); }
.btn--danger:hover:not(:disabled) { background: rgba(214, 90, 90, 0.1); border-color: rgba(214, 90, 90, 0.7); color: #ffafaf; }
.btn--small { padding: 9px 14px; font-size: 11.5px; }

/* === Recorder === */
.recorder { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 8px 0 4px; }

.rec {
  --size: 196px;
  --level: 0;
  position: relative;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: none;
  -webkit-tap-highlight-color: transparent;
}
.rec:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 6px; }

/* Breathing halo; grows with mic level while recording */
.rec__halo {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: var(--amarillo);
  opacity: 0.18;
  filter: blur(18px);
  transform: scale(calc(1 + var(--level) * 0.35));
  transition: transform 90ms linear, background-color var(--dur-normal) var(--ease-out);
  animation: breathe 2.8s ease-in-out infinite;
}
.rec__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.rec__track { fill: none; stroke: var(--border); stroke-width: 6; }
.rec__progress {
  fill: none;
  stroke: var(--amarillo);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke var(--dur-normal) var(--ease-out);
}
.rec__core {
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #ffe680 0%, var(--amarillo) 45%, #d9b52e 100%);
  color: var(--ink);
  box-shadow:
    0 10px 40px var(--amarillo-glow),
    inset 0 -6px 16px rgba(0, 0, 0, 0.18),
    inset 0 4px 10px rgba(255, 255, 255, 0.4);
  transition: transform var(--dur-normal) var(--ease-spring), background var(--dur-normal) var(--ease-out), box-shadow var(--dur-normal) var(--ease-out);
}
.rec:hover .rec__core { transform: scale(1.03); }
.rec:active .rec__core { transform: scale(0.96); }
.rec__core svg { width: 64px; height: 64px; }

.rec.is-recording .rec__halo { background: var(--rojo-glow); opacity: 0.55; animation: none; }
.rec.is-recording .rec__progress { stroke: #e23b5a; }
.rec.is-recording .rec__core {
  background: radial-gradient(circle at 35% 30%, #e0405f 0%, var(--rojo) 55%, #7c0b22 100%);
  color: #fff;
  box-shadow: 0 10px 40px var(--rojo-glow), inset 0 -6px 16px rgba(0, 0, 0, 0.25), inset 0 4px 10px rgba(255, 255, 255, 0.2);
}
.rec.is-recording .rec__core svg { width: 44px; height: 44px; }
.rec.is-busy { cursor: progress; opacity: 0.7; }

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.16; }
  50% { transform: scale(1.12); opacity: 0.28; }
}

.timer { font-variant-numeric: tabular-nums; font-size: 34px; font-weight: 800; letter-spacing: 1px; }
.timer small { font-size: 16px; color: var(--text-muted); font-weight: 600; }
.timer.is-ending { color: #ff7a8f; }
.hint { color: var(--text-secondary); font-size: 14px; text-align: center; }
.rec-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e23b5a;
  margin-right: 6px;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

/* === Preview player === */
.preview {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 12px 16px 12px 12px;
}
.play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  background: var(--amarillo);
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 16px var(--amarillo-glow);
  transition: transform var(--dur-fast) var(--ease-spring);
}
.play-btn:active { transform: scale(0.94); }
.play-btn:focus-visible { outline: 2px solid var(--amarillo); outline-offset: 3px; }
.play-btn svg { width: 22px; height: 22px; }
.preview__body { flex: 1; min-width: 0; }
.preview__label { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.bar { position: relative; height: 6px; border-radius: var(--r-full); background: var(--border); overflow: hidden; }
.bar__fill { position: absolute; inset: 0 auto 0 0; background: var(--amarillo); border-radius: inherit; }
.preview__time { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-top: 6px; font-variant-numeric: tabular-nums; }

.actions { display: flex; justify-content: flex-end; margin-top: 12px; }

/* === Form === */
.section-title { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.section-sub { font-size: 13.5px; color: var(--text-secondary); margin-bottom: 18px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 7px; }
.input,
.select {
  width: 100%;
  font: inherit;
  font-size: 16px; /* prevents iOS zoom */
  color: var(--text-bright);
  background: var(--surface-base);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.input::placeholder { color: var(--text-muted); }
.input:focus,
.select:focus { outline: none; border-color: var(--amarillo); box-shadow: 0 0 0 3px var(--amarillo-soft); }
.select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%238a9bb5'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.17l3.71-3.94a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 38px;
}
.social-row { display: grid; grid-template-columns: 130px 1fr; gap: 8px; }

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  background: var(--surface-base);
  cursor: pointer;
  margin: 6px 0 18px;
  font-size: 14px;
  color: var(--text-secondary);
}
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--amarillo); flex-shrink: 0; cursor: pointer; }
.check strong { color: var(--text-bright); font-weight: 600; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.error {
  background: rgba(214, 90, 90, 0.1);
  border: 1px solid rgba(214, 90, 90, 0.35);
  color: #ffb3b3;
  font-size: 14px;
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 14px;
}

.upload-bar { margin-top: 12px; }

/* === Success === */
.success { text-align: center; padding: 16px 0 6px; }
.success__icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--amarillo);
  color: var(--ink);
  box-shadow: 0 10px 40px var(--amarillo-glow);
  animation: pop 500ms var(--ease-spring);
}
.success__icon svg { width: 42px; height: 42px; }
.success h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.success p { color: var(--text-secondary); margin-bottom: 22px; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.footer-note { text-align: center; font-size: 12.5px; color: var(--text-muted); margin-top: 22px; }
.footer-note a { color: var(--text-secondary); }

/* === Staff === */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar h1 { font-size: 24px; font-weight: 800; }
.toolbar h1 small { font-size: 14px; color: var(--text-muted); font-weight: 600; margin-left: 6px; }
.toolbar__actions { display: flex; gap: 8px; align-items: center; }
.whoami { font-size: 13px; color: var(--text-secondary); }
.whoami strong { color: var(--amarillo); text-transform: capitalize; }

.audio-list { display: grid; gap: 12px; }
.audio-card {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 16px;
  animation: screen-in var(--dur-normal) var(--ease-out);
}
.audio-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.audio-card__name { font-weight: 700; font-size: 16px; }
.audio-card__social { font-size: 13.5px; color: var(--azul-claro); text-decoration: none; filter: brightness(1.4); }
.audio-card__social:hover { text-decoration: underline; }
.audio-card__meta { font-size: 12.5px; color: var(--text-muted); text-align: right; white-space: nowrap; }
.audio-card__player { display: flex; gap: 10px; align-items: center; }
.audio-card__player audio { flex: 1; min-width: 0; height: 40px; }
.transcript { margin-top: 12px; font-size: 14px; color: var(--text-secondary); }
.transcript summary { cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-muted); }
.transcript p { margin-top: 8px; padding: 12px; border-radius: var(--r-md); background: var(--surface-base); line-height: 1.6; }

.empty { text-align: center; color: var(--text-secondary); padding: 48px 16px; }
.login { max-width: 380px; margin: 40px auto 0; }

@media (max-width: 420px) {
  .rec { --size: 176px; }
  .social-row { grid-template-columns: 1fr; }
  .audio-card__head { flex-direction: column; }
  .audio-card__meta { text-align: left; }
}
