/* CÓPIA do visual da casa (branch applaude, painel/painel.css), para o app da plataforma.
   O original continua intocado; ajuste aqui sem mexer no painel local. */
:root {
  --font: "Cantarell", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Comfortaa", "Cantarell", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --zoom: 0.9375;

  --bg: #F4EDE0;
  --blob-1: rgba(255, 253, 248, 0.90);
  --blob-2: rgba(32, 145, 175, 0.10);
  --blob-3: rgba(200, 162, 74, 0.14);
  --blob-4: rgba(0, 139, 139, 0.08);

  --ink: #1C2230;
  --ink-2: #3a4152;
  --muted: rgba(28, 34, 48, 0.62);
  --faint: rgba(28, 34, 48, 0.40);
  --on-accent: #F4EDE0;

  --glass: #FFFDF8;
  --glass-strong: #FFFDF8;
  --glass-soft: rgba(255, 253, 248, 0.6);
  --glass-border: rgba(28, 34, 48, 0.14);
  --glass-border-strong: #1C2230;
  --glass-highlight: 0 0 0 0 transparent;
  --blur: 0px;
  --blur-strong: 0px;
  --saturate: 100%;

  --surface: #F7F1E6;
  --surface-2: #FBF7EF;
  --surface-3: rgba(28, 34, 48, 0.05);
  --hover-wash: rgba(28, 34, 48, 0.06);
  --line: rgba(28, 34, 48, 0.10);
  --line-strong: rgba(28, 34, 48, 0.18);

  --accent: #0F4C81;
  --accent-ink: #0b3a63;
  --accent-bg: rgba(15, 76, 129, 0.10);
  --accent-border: rgba(15, 76, 129, 0.32);
  --accent-ring: 0 0 0 3px rgba(15, 76, 129, 0.22);
  --success: #008B8B;
  --success-ink: #006b6b;
  --success-bg: rgba(0, 139, 139, 0.12);
  --success-border: rgba(0, 139, 139, 0.36);
  --warning: #C8A24A;
  --warning-ink: #8a6a1c;
  --warning-bg: rgba(200, 162, 74, 0.18);
  --warning-border: rgba(200, 162, 74, 0.46);
  --danger: #6B2E3E;
  --danger-ink: #6B2E3E;
  --danger-bg: rgba(107, 46, 62, 0.10);
  --danger-border: rgba(107, 46, 62, 0.34);

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  /* a sombra do cartão do login: curta, embaixo, sem halo */
  --shadow-sm: 0 10px 22px -18px rgba(28, 34, 48, 0.45);
  --shadow-md: 0 18px 36px -22px rgba(28, 34, 48, 0.55);
  --shadow-lg: 0 28px 60px -24px rgba(28, 34, 48, 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141925;
    --blob-1: rgba(255, 253, 248, 0.04);
    --blob-2: rgba(32, 145, 175, 0.12);
    --blob-3: rgba(200, 162, 74, 0.08);
    --blob-4: rgba(0, 139, 139, 0.08);
    --ink: #F4EDE0;
    --ink-2: #ddd5c6;
    --muted: rgba(244, 237, 224, 0.62);
    --faint: rgba(244, 237, 224, 0.38);
    --on-accent: #141925;
    --glass: #1C2230;
    --glass-strong: #1C2230;
    --glass-soft: rgba(244, 237, 224, 0.04);
    --glass-border: rgba(244, 237, 224, 0.12);
    --glass-border-strong: #F4EDE0;
    --glass-highlight: 0 0 0 0 transparent;
    --surface: #232a3a;
    --surface-2: #1f2534;
    --surface-3: rgba(244, 237, 224, 0.07);
    --hover-wash: rgba(244, 237, 224, 0.07);
    --line: rgba(244, 237, 224, 0.10);
    --line-strong: rgba(244, 237, 224, 0.18);
    --accent: #6fb3d9;
    --accent-ink: #9fcbe6;
    --accent-bg: rgba(111, 179, 217, 0.16);
    --accent-border: rgba(111, 179, 217, 0.40);
    --accent-ring: 0 0 0 3px rgba(111, 179, 217, 0.28);
    --success-ink: #5fd0c8;
    --success-bg: rgba(0, 139, 139, 0.22);
    --warning-ink: #e2c47c;
    --warning-bg: rgba(200, 162, 74, 0.20);
    --danger-ink: #e79aac;
    --danger-bg: rgba(107, 46, 62, 0.35);
    --shadow-sm: 0 10px 22px -16px rgba(0, 0, 0, 0.6);
    --shadow-md: 0 18px 36px -20px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 28px 60px -22px rgba(0, 0, 0, 0.75);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #141925;
  --blob-1: rgba(255, 253, 248, 0.04);
  --blob-2: rgba(32, 145, 175, 0.12);
  --blob-3: rgba(200, 162, 74, 0.08);
  --blob-4: rgba(0, 139, 139, 0.08);
  --ink: #F4EDE0;
  --ink-2: #ddd5c6;
  --muted: rgba(244, 237, 224, 0.62);
  --faint: rgba(244, 237, 224, 0.38);
  --on-accent: #141925;
  --glass: #1C2230;
  --glass-strong: #1C2230;
  --glass-soft: rgba(244, 237, 224, 0.04);
  --glass-border: rgba(244, 237, 224, 0.12);
  --glass-border-strong: #F4EDE0;
  --glass-highlight: 0 0 0 0 transparent;
  --surface: #232a3a;
  --surface-2: #1f2534;
  --surface-3: rgba(244, 237, 224, 0.07);
  --hover-wash: rgba(244, 237, 224, 0.07);
  --line: rgba(244, 237, 224, 0.10);
  --line-strong: rgba(244, 237, 224, 0.18);
  --accent: #6fb3d9;
  --accent-ink: #9fcbe6;
  --accent-bg: rgba(111, 179, 217, 0.16);
  --accent-border: rgba(111, 179, 217, 0.40);
  --accent-ring: 0 0 0 3px rgba(111, 179, 217, 0.28);
  --success-ink: #5fd0c8;
  --success-bg: rgba(0, 139, 139, 0.22);
  --warning-ink: #e2c47c;
  --warning-bg: rgba(200, 162, 74, 0.20);
  --danger-ink: #e79aac;
  --danger-bg: rgba(107, 46, 62, 0.35);
  --shadow-sm: 0 10px 22px -16px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 18px 36px -20px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 28px 60px -22px rgba(0, 0, 0, 0.75);
  color-scheme: dark;
}

/* ── base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
/* escala da página: no computador tudo sai a 93,75% (o que era 125% sobre a escala antiga de 75%).
   As unidades de tela (vh, vw) não acompanham o zoom, por isso aparecem divididas por --zoom. */
html { background: var(--bg); zoom: var(--zoom); }
@media (max-width: 700px) { :root { --zoom: 1; } }
body {
  margin: 0;
  height: calc(100vh / var(--zoom));
  overflow: hidden;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before {
  content: "";
  position: fixed;
  inset: -10vh -10vw;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42% 48% at 12% 10%, var(--blob-1), transparent 70%),
    radial-gradient(38% 42% at 88% 14%, var(--blob-2), transparent 70%),
    radial-gradient(44% 46% at 78% 90%, var(--blob-3), transparent 70%),
    radial-gradient(30% 34% at 18% 86%, var(--blob-4), transparent 70%),
    var(--bg);
}
p, h1, h2, h3, h4, ol, ul, dl, dd { margin: 0; padding: 0; }
button, input, select { font-family: inherit; }
code { font-family: var(--mono); font-size: 0.9em; }

/* Só CONTAINERS são de vidro; o que mora dentro é translúcido sem blur. */
.glass, .toast {
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight), var(--shadow-sm);
}

/* ── casca ────────────────────────────────────────────────── */
.app-container { display: flex; height: calc(100vh / var(--zoom)); width: calc(100vw / var(--zoom)); overflow: hidden; }
.app { flex: 1; padding: 18px 22px 14px 20px; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.acoes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.board-search-input {
  padding: 8px 14px; border: 1px solid transparent; border-radius: 999px;
  background: var(--surface); font-size: 0.85rem; color: var(--ink); box-shadow: var(--glass-highlight);
  flex: 1 1 260px; min-width: 180px;
}

/* ── botões ───────────────────────────────────────────────── */
.btn {
  border: 1px solid transparent; border-radius: 999px; padding: 9px 16px;
  font-size: 0.88rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
/* o botão Entrar do login: tinta cheia, azul-pavão no hover */
.btn-primary { background: var(--ink); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.btn-primary:hover:not(:disabled) { background: var(--accent); color: #F4EDE0; }
.btn-secondary { background: var(--surface); border-color: var(--glass-border); color: var(--ink); box-shadow: var(--glass-highlight), var(--shadow-sm); }
.btn-secondary:hover:not(:disabled) { border-color: var(--line-strong); background: var(--glass-strong); }
.btn-mini {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-size: 0.9rem;
}
.btn-mini:hover { background: var(--hover-wash); color: var(--ink); }

/* ── formulário ───────────────────────────────────────────── */
input:not([type="checkbox"]):not([type="radio"]):focus-visible, select:focus-visible {
  outline: none; border-color: var(--accent); box-shadow: var(--accent-ring);
}
input::placeholder { color: var(--faint); }
select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px !important;
}

/* ── chips ────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
  font-size: 0.7rem; font-weight: 600; white-space: nowrap;
}

/* ── painéis e topo ───────────────────────────────────────── */
.painel { border-radius: var(--r-lg); display: flex; flex-direction: column; min-width: 0; }
.app-topo { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
/* "applaude / apresentações": a marca em Comfortaa e o nome da tela em Cantarell fino, depois de uma barra */
.marca-topo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
/* o ícone é máscara: a cor vem da tinta do tema, então nunca some no fundo (claro ou escuro) */
.marca-icone {
  width: 34px; height: 34px; flex: none; background: var(--ink);
  -webkit-mask: url(applaude-marca.svg) center / contain no-repeat;
  mask: url(applaude-marca.svg) center / contain no-repeat;
}
.marca-nome { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; letter-spacing: 0.01em; }
.marca-tela { font-family: var(--font); font-weight: 400; font-size: 1.3rem; color: var(--muted); }
.marca-tela:not(:empty)::before { content: "/"; margin: 0 8px 0 2px; color: var(--faint); }
.icone-btn {
  width: 34px; height: 34px; padding: 0; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink);
}
.icone-btn:hover { border-color: var(--line-strong); }
.icone-btn svg { width: 18px; height: 18px; }

/* ── barra inferior ───────────────────────────────────────
   Pílula que segue o tema (papel no claro, tinta no escuro) com contorno de 1,5 px. No contorno,
   um brilho (azul-pavão no claro, creme no escuro) dá a volta
   (topo → esquerda → base → direita), como o HoverBorderGradient; no hover o contorno inteiro
   acende num halo azul-pavão e turquesa. A luz de cima continua marcando a opção ativa. */
@property --brilho-x { syntax: "<percentage>"; inherits: false; initial-value: 50%; }
@property --brilho-y { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
@keyframes brilho-volta {
  0%, 100% { --brilho-x: 50%; --brilho-y: 0%; }
  25% { --brilho-x: 0%; --brilho-y: 50%; }
  50% { --brilho-x: 50%; --brilho-y: 100%; }
  75% { --brilho-x: 100%; --brilho-y: 50%; }
}
.barra {
  /* modo claro: pílula de papel (creme claro) com ícones em tinta e brilho azul-pavão no contorno */
  --barra-fundo: #FFFDF8; --barra-icone: #1C2230; --barra-borda: rgba(28, 34, 48, 0.14); --barra-luz: #2091AF;
  --barra-brilho: #2091AF; --barra-brilho-0: rgba(32, 145, 175, 0); --barra-cone: rgba(32, 145, 175, 0.18);
  --barra-sombra: 0 18px 36px -20px rgba(28, 34, 48, 0.35);
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 20;
  display: inline-flex; align-items: center; height: 60px; padding: 0 10px;
  border-radius: 999px; background: var(--barra-borda);
  box-shadow: var(--barra-sombra);
  transition: box-shadow 0.4s ease;
}
/* modo escuro: a pílula escura de antes, com brilho creme */
:root[data-theme="dark"] .barra {
  --barra-fundo: #0e121b; --barra-icone: #F4EDE0; --barra-borda: rgba(244, 237, 224, 0.16); --barra-luz: #6fb3d9;
  --barra-brilho: #F4EDE0; --barra-brilho-0: rgba(244, 237, 224, 0); --barra-cone: rgba(111, 179, 217, 0.32);
  --barra-sombra: 0 18px 36px -18px rgba(0, 0, 0, 0.6);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .barra {
  --barra-fundo: #0e121b; --barra-icone: #F4EDE0; --barra-borda: rgba(244, 237, 224, 0.16); --barra-luz: #6fb3d9;
  --barra-brilho: #F4EDE0; --barra-brilho-0: rgba(244, 237, 224, 0); --barra-cone: rgba(111, 179, 217, 0.32);
  --barra-sombra: 0 18px 36px -18px rgba(0, 0, 0, 0.6);
} }
.barra-contorno, .barra-realce, .barra-miolo { position: absolute; border-radius: inherit; pointer-events: none; }
.barra-contorno, .barra-realce { inset: 0; filter: blur(2px); }
.barra-contorno {
  background: radial-gradient(22% 60% at var(--brilho-x) var(--brilho-y), var(--barra-brilho) 0%, var(--barra-brilho-0) 100%);
  animation: brilho-volta 4s linear infinite;
}
.barra-realce {
  opacity: 0; transition: opacity 0.5s ease;
  background: radial-gradient(75% 180% at 50% 50%, #2091AF 0%, rgba(15, 76, 129, 0.6) 45%, rgba(200, 162, 74, 0) 100%);
}
.barra-miolo { inset: 1.5px; background: var(--barra-fundo); }
.barra:hover .barra-realce, .barra:focus-within .barra-realce { opacity: 1; }
.barra:hover { box-shadow: 0 18px 40px -16px rgba(32, 145, 175, 0.45); }

.barra a {
  position: relative; z-index: 3; display: flex; align-items: center; justify-content: center;
  height: 100%; padding: 0 20px; color: var(--barra-icone); opacity: 0.45; text-decoration: none;
  transition: opacity 0.15s ease-in-out;
}
.barra a:hover { opacity: 0.8; }
.barra a[aria-current] { opacity: 1; }
.barra a:focus-visible { outline: none; opacity: 1; }
.barra a:focus-visible svg { filter: drop-shadow(0 0 6px var(--barra-luz)); }
.barra a svg { width: 22px; height: 22px; display: block; }
.barra a::after {
  content: attr(data-label);
  position: absolute; left: 50%; bottom: calc(100% + 14px); transform: translateX(-50%);
  padding: 6px 10px; border-radius: 10px; background: var(--ink); color: var(--bg);
  font-size: 0.75rem; font-weight: 700; line-height: 1; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.15s ease;
}
.barra a:hover::after, .barra a:focus-visible::after { opacity: 1; }
.barra-luz {
  position: absolute; top: 1.5px; left: -999px; z-index: 2;
  width: 36px; height: 3px; border-radius: 0 0 999px 999px;
  background: var(--barra-luz); pointer-events: none;
}
.barra.pronta .barra-luz { transition: left 0.4s ease-in-out; }
.barra-cone {
  position: absolute; left: -40%; top: 3px; width: 180%; height: 46px; pointer-events: none;
  clip-path: polygon(8% 100%, 28% 0, 72% 0, 92% 100%);
  background: linear-gradient(to bottom, var(--barra-cone), transparent);
}
@media (prefers-reduced-motion: reduce) {
  .barra.pronta .barra-luz { transition: none; }
  .barra-contorno { animation: none; }
}

/* ── script: o compositor no meio da tela ─────────────────── */
/* CÓPIA: a aba Script da casa (painel.css da branch applaude) */
.script-palco {
  flex: 1; min-height: 0; width: min(760px, 100%); margin: 0 auto;
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
  padding-bottom: 120px;
}
.script-saudacao { text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 2rem; letter-spacing: -0.01em; color: var(--ink); }

.compositor {
  position: relative; display: grid; gap: 6px;
  padding: 16px 16px 12px 20px; border-radius: 26px;
  background: var(--glass-strong); border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.compositor textarea {
  width: 100%; resize: none; border: 0; outline: none; background: none; padding: 0;
  font: inherit; font-size: 1.05rem; line-height: 1.5; color: var(--ink);
  min-height: 52px; max-height: 240px; overflow-y: auto;
}
.compositor textarea::placeholder { color: var(--faint); }
.compositor:focus-within { border-color: var(--line-strong); }
.compositor-rodape { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.compositor-enviar {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 0; border-radius: 50%; background: var(--ink); color: var(--bg);
  transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}
.compositor-enviar:hover:not(:disabled) { background: var(--accent); color: #F4EDE0; }
.compositor-enviar:active:not(:disabled) { transform: scale(0.94); }
.compositor-enviar:disabled { opacity: 0.25; cursor: default; }
.compositor-enviar:focus-visible { outline: none; box-shadow: var(--accent-ring); }

/* o feixe: um arco de conic-gradient girando, recortado ao anel da borda (a mesma técnica do brilho do login),
   com um halo desfocado por baixo. Cores do pavão: azul-pavão, turquesa, verde-azulado e dourado. */
@property --feixe-angulo { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes feixe-gira { to { --feixe-angulo: 360deg; } }
.feixe, .feixe::after {
  position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--feixe-angulo),
    transparent 0deg, transparent 230deg,
    #0F4C81 262deg, #2091AF 292deg, #008B8B 318deg, #C8A24A 342deg, transparent 360deg);
  animation: feixe-gira 7s linear infinite;
}
.feixe {
  padding: 2px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.feixe::after { content: ""; inset: -2px; filter: blur(14px); opacity: 0.35; -webkit-mask: none; mask: none; }
@media (prefers-reduced-motion: reduce) { .feixe, .feixe::after { animation: none; --feixe-angulo: 120deg; } }
