/* Painel do Bot — tema "Shinobi". CSS próprio (sem biblioteca), fontes auto-hospedadas (Inter + Sora, OFL).
   Tokens no :root (tema claro), tema escuro (sistema ou data-tema) e 3 cores de destaque (data-acento).
   CSP: style-src 'self' → nada de estilo inline nos modelos; o JS usa classes e variáveis CSS (CSSOM). */

/* ------------------------------------------------------------------ fontes (só latin + latin-ext, pesos usados) */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Sora"; font-style: normal; font-weight: 600 700; font-display: swap;
  src: url("../fonts/sora-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Sora"; font-style: normal; font-weight: 600 700; font-display: swap;
  src: url("../fonts/sora-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------------ tokens: claro (off-white quente) */
:root {
  color-scheme: light;
  /* cor de destaque — predefinição "Shinobi" (laranja chakra); valores que não dependem do tema */
  --ac-1: #ff8a2b; --ac-2: #ff5e0a; --ac-claro: #ff9a4d; --ac-escuro: #b34700; --ac-sobre: #1f0f00;

  --fundo: #faf6f0;
  --fundo-2: #f3ebe1;
  --superficie: #ffffff;
  --superficie-2: #fbf8f4;
  --superficie-3: #f3ede5;
  --superficie-elevada: #ffffff;
  --cartao-fundo: linear-gradient(180deg, #ffffff, #fffdfa);
  --campo: #fdfbf8;
  --vidro: rgba(255, 251, 246, 0.8);
  --borda: #ebe3d8;
  --borda-forte: #d9cdbf;
  --borda-campo: #cdbfaf;
  --texto: #1d1a17;
  --texto-2: #47403a;
  --texto-suave: #6e645b;

  --acento: var(--ac-1);
  --acento-forte: var(--ac-escuro);
  /* 2ª cor do destaque com contraste de texto sobre o fundo do tema (degradê do título do login) */
  --acento-2-forte: color-mix(in srgb, var(--ac-2) 75%, #000000);
  /* contorno da chave ligada: no claro o trilho laranja/verde precisa de borda para passar de 3:1 no cartão branco */
  --chave-contorno: var(--ac-escuro);
  --acento-suave: color-mix(in srgb, var(--ac-1) 13%, #ffffff);
  --acento-borda: color-mix(in srgb, var(--ac-1) 38%, transparent);
  --acento-brilho: color-mix(in srgb, var(--ac-1) 48%, transparent);
  --brilho-fundo: 12%;
  --brilho-fundo-2: 8%;
  --link: var(--acento-forte);
  --foco: var(--acento-forte);

  --perigo: #d92d20; --perigo-hover: #b42318; --perigo-texto-botao: #ffffff;
  --perigo-texto: #b42318; --perigo-borda: #f1b5ae; --perigo-suave: #fef1ef;
  --trilho: #8f8276;
  --textura: rgba(120, 78, 36, 0.075);
  --sombra-1: 0 1px 2px rgba(70, 45, 20, 0.05), 0 6px 16px -8px rgba(70, 45, 20, 0.12);
  --sombra-2: 0 18px 40px -16px rgba(70, 45, 20, 0.3), 0 2px 6px rgba(70, 45, 20, 0.05);
  --sombra-3: 0 30px 70px -24px rgba(50, 30, 12, 0.45);
  --veu: rgba(30, 20, 12, 0.45);

  --verde-fundo: #dcf7e6; --verde-texto: #0a6b38;
  --amarelo-fundo: #fff1d6; --amarelo-texto: #8a4b00;
  --vermelho-fundo: #ffe4e1; --vermelho-texto: #b4231a;
  --azul-fundo: #e3edff; --azul-texto: #1d4fb0;
  --cinza-fundo: #f1ece6; --cinza-texto: #4a433c;
  --roxo-fundo: #f1e8ff; --roxo-texto: #6230c2;
  --preto-fundo: #e9e2d9; --preto-texto: #1d1a17;
  --ponto-verde: #22c55e; --ponto-amarelo: #f59e0b; --ponto-vermelho: #ef4444; --ponto-cinza: #a39a90; --ponto-preto: #1d1a17;
  --whats: #25d366;

  --wa-fundo: #efeae2;
  --wa-balao: #ffffff;
  --wa-texto: #111b21;
  --wa-autor: #1565c0;
  --wa-hora: #667781;
  --wa-mencao: #0a6aa1;
  --wa-codigo: #f0f2f5;

  --serie-2a: #38bdf8; --serie-2b: #6366f1;
  --grade: #efe8df;
  --eixo: #d3c7b9;

  --raio: 18px;
  --raio-p: 12px;
  --raio-pp: 9px;
  --lateral: 268px;
  --nav-baixo: 64px;
  --topo: 62px;
  --fonte: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  --fonte-titulo: "Sora", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
  --mola: cubic-bezier(0.34, 1.56, 0.64, 1);
  --suave: cubic-bezier(0.22, 1, 0.36, 1);
}
:root[data-acento="whatsapp"] { --ac-1: #25d366; --ac-2: #16b15a; --ac-claro: #4ae08a; --ac-escuro: #0b7a43; --ac-sobre: #03230f; }
:root[data-acento="akatsuki"] { --ac-1: #e11d48; --ac-2: #7c3aed; --ac-claro: #fb7185; --ac-escuro: #be123c; --ac-sobre: #ffffff; }

/* ------------------------------------------------------------------ tokens: escuro (azul-noite) */
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    color-scheme: dark;
    --fundo: #0a0f1e;
    --fundo-2: #0d1430;
    --superficie: #111a2e;
    --superficie-2: #152039;
    --superficie-3: #1b2744;
    --superficie-elevada: #162138;
    --cartao-fundo: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 140px), #111a2e;
    --campo: #0d1528;
    --vidro: rgba(13, 20, 40, 0.74);
    --borda: rgba(148, 163, 214, 0.13);
    --borda-forte: rgba(148, 163, 214, 0.24);
    --borda-campo: rgba(148, 163, 214, 0.28);
    --texto: #eceff8;
    --texto-2: #c3cadc;
    --texto-suave: #8e9ab8;
    --acento-forte: var(--ac-claro);
    --acento-2-forte: color-mix(in srgb, var(--ac-2) 60%, #ffffff);
    --chave-contorno: transparent;
    --acento-suave: color-mix(in srgb, var(--ac-1) 16%, #111a2e);
    --acento-borda: color-mix(in srgb, var(--ac-1) 42%, transparent);
    --acento-brilho: color-mix(in srgb, var(--ac-1) 55%, transparent);
    --brilho-fundo: 16%;
    --brilho-fundo-2: 11%;
    --perigo: #f97066; --perigo-hover: #fda29b; --perigo-texto-botao: #1b0a09;
    --perigo-texto: #fda29b; --perigo-borda: rgba(249, 112, 102, 0.45); --perigo-suave: rgba(249, 112, 102, 0.1);
    --trilho: #64739b;
    --textura: rgba(190, 205, 255, 0.05);
    --sombra-1: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 26px -16px rgba(0, 0, 0, 0.8);
    --sombra-2: 0 20px 44px -18px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(148, 163, 214, 0.06);
    --sombra-3: 0 30px 80px -24px rgba(0, 0, 0, 0.9);
    --veu: rgba(3, 6, 14, 0.62);
    --verde-fundo: #0e3324; --verde-texto: #6ee7a8;
    --amarelo-fundo: #3a2a0c; --amarelo-texto: #fcd34d;
    --vermelho-fundo: #3f1519; --vermelho-texto: #fda4a0;
    --azul-fundo: #13264a; --azul-texto: #93c5fd;
    --cinza-fundo: #1f2a44; --cinza-texto: #c3cadc;
    --roxo-fundo: #2b1d52; --roxo-texto: #c4b5fd;
    --preto-fundo: #1f2a44; --preto-texto: #eceff8;
    --ponto-cinza: #8e9ab8; --ponto-preto: #eceff8;
    --wa-fundo: #0b141a;
    --wa-balao: #202c33;
    --wa-texto: #e9edef;
    --wa-autor: #53bdeb;
    --wa-hora: #8d9da6;
    --wa-mencao: #53bdeb;
    --wa-codigo: #111b21;
    --grade: rgba(148, 163, 214, 0.1);
    --eixo: rgba(148, 163, 214, 0.28);
  }
}
:root[data-tema="escuro"] {
  color-scheme: dark;
  --fundo: #0a0f1e;
  --fundo-2: #0d1430;
  --superficie: #111a2e;
  --superficie-2: #152039;
  --superficie-3: #1b2744;
  --superficie-elevada: #162138;
  --cartao-fundo: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 140px), #111a2e;
  --campo: #0d1528;
  --vidro: rgba(13, 20, 40, 0.74);
  --borda: rgba(148, 163, 214, 0.13);
  --borda-forte: rgba(148, 163, 214, 0.24);
  --borda-campo: rgba(148, 163, 214, 0.28);
  --texto: #eceff8;
  --texto-2: #c3cadc;
  --texto-suave: #8e9ab8;
  --acento-forte: var(--ac-claro);
  --acento-2-forte: color-mix(in srgb, var(--ac-2) 60%, #ffffff);
  --chave-contorno: transparent;
  --acento-suave: color-mix(in srgb, var(--ac-1) 16%, #111a2e);
  --acento-borda: color-mix(in srgb, var(--ac-1) 42%, transparent);
  --acento-brilho: color-mix(in srgb, var(--ac-1) 55%, transparent);
  --brilho-fundo: 16%;
  --brilho-fundo-2: 11%;
  --perigo: #f97066; --perigo-hover: #fda29b; --perigo-texto-botao: #1b0a09;
  --perigo-texto: #fda29b; --perigo-borda: rgba(249, 112, 102, 0.45); --perigo-suave: rgba(249, 112, 102, 0.1);
  --trilho: #64739b;
  --textura: rgba(190, 205, 255, 0.05);
  --sombra-1: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 26px -16px rgba(0, 0, 0, 0.8);
  --sombra-2: 0 20px 44px -18px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(148, 163, 214, 0.06);
  --sombra-3: 0 30px 80px -24px rgba(0, 0, 0, 0.9);
  --veu: rgba(3, 6, 14, 0.62);
  --verde-fundo: #0e3324; --verde-texto: #6ee7a8;
  --amarelo-fundo: #3a2a0c; --amarelo-texto: #fcd34d;
  --vermelho-fundo: #3f1519; --vermelho-texto: #fda4a0;
  --azul-fundo: #13264a; --azul-texto: #93c5fd;
  --cinza-fundo: #1f2a44; --cinza-texto: #c3cadc;
  --roxo-fundo: #2b1d52; --roxo-texto: #c4b5fd;
  --preto-fundo: #1f2a44; --preto-texto: #eceff8;
  --ponto-cinza: #8e9ab8; --ponto-preto: #eceff8;
  --wa-fundo: #0b141a;
  --wa-balao: #202c33;
  --wa-texto: #e9edef;
  --wa-autor: #53bdeb;
  --wa-hora: #8d9da6;
  --wa-mencao: #53bdeb;
  --wa-codigo: #111b21;
  --grade: rgba(148, 163, 214, 0.1);
  --eixo: rgba(148, 163, 214, 0.28);
}

/* ------------------------------------------------------------------ base, fundo com degradê e textura */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topo) + 16px);
  background-color: var(--fundo);
}
html.com-modal { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh; min-height: 100dvh;
  color: var(--texto);
  font-family: var(--fonte);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body::before, body::after { content: ""; position: fixed; inset: 0; pointer-events: none; }
body::before {
  z-index: -2;
  background:
    radial-gradient(900px 520px at 100% -10%, color-mix(in srgb, var(--ac-1) var(--brilho-fundo), transparent), transparent 64%),
    radial-gradient(760px 480px at -14% 110%, color-mix(in srgb, var(--ac-2) var(--brilho-fundo-2), transparent), transparent 62%),
    linear-gradient(180deg, var(--fundo), var(--fundo-2));
}
body::after {
  z-index: -1;
  background-color: var(--textura);
  -webkit-mask-image: url("../img/textura.svg"); mask-image: url("../img/textura.svg");
  -webkit-mask-size: 172px 172px; mask-size: 172px 172px;
  -webkit-mask-repeat: repeat; mask-repeat: repeat;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3, h4 { font-family: var(--fonte-titulo); font-weight: 600; letter-spacing: -0.015em; }
ul, ol { padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code, kbd, pre { font-family: var(--mono); font-size: 0.92em; }
strong { font-weight: 650; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--foco); outline-offset: 2px; border-radius: 8px;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--ac-1) 22%, transparent);
}
::selection { background: color-mix(in srgb, var(--ac-1) 32%, transparent); }

.so-leitor {
  position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important;
}
.fora-da-tela { position: fixed; left: -9999px; top: 0; opacity: 0; }
.texto-suave { color: var(--texto-suave); }
.texto-pequeno { font-size: 13px; }
.centro { text-align: center; display: flex; justify-content: center; }
.margem-topo { margin-top: 16px; }
.mono { font-family: var(--mono); }
.pilha { display: flex; flex-direction: column; gap: 16px; }
.pilha-p { display: flex; flex-direction: column; gap: 12px; }
.ico { width: 20px; height: 20px; flex: none; }

/* ------------------------------------------------------------------ logo (SVG montado no JS e nos modelos) */
.logo { width: 40px; height: 40px; flex: none; overflow: visible; }
.logo-c1 { stop-color: var(--ac-1); }
.logo-c2 { stop-color: var(--ac-2); }
.logo-b1 { stop-color: #ffffff; }
.logo-b2 { stop-color: color-mix(in srgb, var(--ac-1) 14%, #ffffff); }
.logo-brilho { fill: #ffffff; opacity: 0.14; }
.logo-estrela { fill: #151b36; transform-origin: 32px 30.2px; transition: transform 0.7s var(--mola); }
a:hover > .logo .logo-estrela, .login-logo:hover .logo-estrela { transform: rotate(90deg); }

/* ------------------------------------------------------------------ inicialização (casca PHP) */
.inicializando {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  color: var(--texto-suave); font-weight: 500;
}
.inicializando-logo { position: relative; width: 84px; height: 84px; display: grid; place-items: center; }
.inicializando-logo img, .inicializando-logo .logo { width: 60px; height: 60px; position: relative; filter: drop-shadow(0 10px 24px var(--acento-brilho)); }
.inicializando-logo::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 55%, var(--ac-1) 80%, var(--ac-2) 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: girar 1.1s linear infinite;
}
.noscript { padding: 24px 16px; text-align: center; background: var(--amarelo-fundo); color: var(--amarelo-texto); }

/* ------------------------------------------------------------------ casca */
.casca { min-height: 100vh; min-height: 100dvh; }
.pular {
  position: fixed; left: 12px; top: 12px; z-index: 100; padding: 10px 16px; border-radius: var(--raio-p);
  background: linear-gradient(135deg, var(--ac-1), var(--ac-2)); color: var(--ac-sobre); font-weight: 600; text-decoration: none;
}
.pular:not(:focus) { width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.lateral { display: none; }
.area { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }

.topo {
  position: sticky; top: 0; z-index: 30;
  height: calc(var(--topo) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 10px 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--vidro);
  -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid var(--borda);
}
.topo-marca { display: flex; align-items: center; gap: 10px; min-width: 44px; min-height: 44px; color: var(--texto); text-decoration: none; }
.topo-marca:hover { text-decoration: none; }
.topo-marca .logo { width: 34px; height: 34px; filter: drop-shadow(0 6px 12px var(--acento-brilho)); }
.topo-nome { font-family: var(--fonte-titulo); font-weight: 700; font-size: 16.5px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topo-direita { display: flex; align-items: center; gap: 6px; min-width: 0; }

.pilula {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-width: 0;
  height: 38px; padding: 0 14px 0 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--superficie) 72%, transparent); color: var(--texto-2);
  border: 1px solid var(--borda); box-shadow: var(--sombra-1);
  font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: border-color 0.2s, background-color 0.2s, transform 0.25s var(--mola);
}
.pilula:hover { text-decoration: none; border-color: var(--borda-forte); transform: translateY(-1px); }
.pilula-ponto { width: 9px; height: 9px; border-radius: 50%; background: var(--ponto-cinza); flex: none; position: relative; }
.pilula-foto { display: none; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; flex: none; background: var(--superficie-3); }
.pilula-foto img { width: 100%; height: 100%; object-fit: cover; }
.pilula.com-foto { padding-left: 4px; }
.pilula.com-foto .pilula-foto { display: block; }
.pilula.com-foto .pilula-ponto { position: absolute; left: 25px; top: 24px; width: 10px; height: 10px; box-shadow: 0 0 0 2px var(--superficie); }
.pilula-texto { overflow: hidden; text-overflow: ellipsis; }
.pilula-curto { display: none; }
.pilula.tom-verde { background: color-mix(in srgb, var(--verde-fundo) 80%, transparent); color: var(--verde-texto); border-color: color-mix(in srgb, var(--ponto-verde) 30%, transparent); }
.pilula.tom-verde .pilula-ponto { background: var(--ponto-verde); }
.pilula.tom-amarelo { background: color-mix(in srgb, var(--amarelo-fundo) 85%, transparent); color: var(--amarelo-texto); border-color: color-mix(in srgb, var(--ponto-amarelo) 35%, transparent); }
.pilula.tom-amarelo .pilula-ponto { background: var(--ponto-amarelo); }
.pilula.tom-vermelho { background: color-mix(in srgb, var(--vermelho-fundo) 85%, transparent); color: var(--vermelho-texto); border-color: color-mix(in srgb, var(--ponto-vermelho) 35%, transparent); }
.pilula.tom-vermelho .pilula-ponto { background: var(--ponto-vermelho); }
.pilula.tom-preto { background: var(--preto-fundo); color: var(--preto-texto); }
.pilula.tom-preto .pilula-ponto { background: var(--ponto-preto); }
/* ponto pulsando: conectado (calmo) e estados de espera (mais rápido) */
.pilula.tom-verde .pilula-ponto::after, .pilula.pulsar .pilula-ponto::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid currentColor; opacity: 0; animation: pulso 2.4s ease-out infinite;
}
.pilula.tom-verde .pilula-ponto::after { border-color: var(--ponto-verde); }
.pilula.pulsar .pilula-ponto::after { animation-duration: 1.4s; }

.btn-icone {
  width: 40px; height: 40px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--texto-2);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.3s var(--mola);
}
.btn-icone:hover { background: var(--superficie-3); color: var(--texto); border-color: var(--borda); }
.btn-icone:active { transform: scale(0.92); }
.topo-tema .ico { transition: transform 0.5s var(--mola); }
.topo-tema:hover .ico { transform: rotate(28deg); }

.faixas { width: 100%; max-width: 1180px; margin: 0 auto; padding: 12px 16px 0; display: flex; flex-direction: column; gap: 10px; }
.faixas:empty { display: none; }
.faixa {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 16px; border: 1px solid var(--borda);
  box-shadow: var(--sombra-1); animation: subir 0.45s var(--suave) both;
}
.faixa-offline {
  background: linear-gradient(120deg, #141c35, #0b1022); color: #eceff8; border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 36px -18px rgba(0, 0, 0, 0.7);
}
.faixa-offline .faixa-textos span { color: #b8c2da; }
.faixa-aviso { background: var(--amarelo-fundo); color: var(--amarelo-texto); border-color: color-mix(in srgb, var(--ponto-amarelo) 35%, transparent); }
.faixa-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.1); flex: none; }
.faixa-aviso .faixa-ico { background: color-mix(in srgb, var(--ponto-amarelo) 22%, transparent); }
.faixa-textos { flex: 1 1 200px; display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.faixa-textos strong { font-size: 14.5px; }
.faixa-textos span { font-size: 13px; }

.conteudo {
  flex: 1; width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 20px 16px calc(var(--nav-baixo) + 40px + env(safe-area-inset-bottom, 0px));
  container-type: inline-size;
}
.conteudo:focus { outline: none; }

/* menu de baixo (celular): barra flutuante de vidro */
.nav-baixo {
  position: fixed; z-index: 40; left: 10px; right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  height: var(--nav-baixo); padding: 0 4px;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border-radius: 22px; border: 1px solid var(--borda);
  background: var(--vidro);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: var(--sombra-2);
}
.nav-baixo-item {
  position: relative; isolation: isolate; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--texto-suave); text-decoration: none; font-size: 11px; font-weight: 600;
  -webkit-tap-highlight-color: transparent; border-radius: 16px;
}
.nav-baixo-item:hover { text-decoration: none; color: var(--texto); }
.nav-baixo-item .ico { width: 22px; height: 22px; transition: transform 0.35s var(--mola); }
.nav-baixo-item-texto { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 2px; }
.nav-baixo-item[aria-current="page"] { color: var(--acento-forte); }
.nav-baixo-item[aria-current="page"]::before {
  content: ""; position: absolute; top: 6px; left: 50%; width: 50px; height: 30px; margin-left: -25px; z-index: -1;
  border-radius: 999px; background: var(--acento-suave); box-shadow: inset 0 0 0 1px var(--acento-borda);
  animation: bolha 0.4s var(--mola);
}
.nav-baixo-item[aria-current="page"] .ico { transform: translateY(-1px); }
.nav-baixo-item:active .ico { transform: scale(0.88); }

@media (max-width: 479px) {
  .pilula-texto { display: none; }
  .pilula-curto { display: inline; }
  .topo-nome { font-size: 15.5px; }
}
/* 360 px com "Desconectado": o nome inteiro cabe com a fonte e os espaços um pouco menores */
@media (max-width: 374px) {
  .topo { padding-left: 12px; padding-right: 8px; gap: 8px; }
  .topo-marca { gap: 8px; }
  .topo-marca .logo { width: 32px; height: 32px; }
  .topo-nome { font-size: 15px; letter-spacing: -0.025em; }
  .topo-direita { gap: 2px; }
  .pilula { gap: 6px; padding: 0 11px 0 10px; }
}
@media (max-width: 349px) {
  .topo-nome { display: none; }
}
/* celular estreito com a pílula comprida ("Aguardando código", "Reconectando…"): fica só o logo, sem cortar o nome */
@media (max-width: 420px) {
  .topo:has(.pilula.pulsar) .topo-nome { display: none; }
}

/* ------------------------------------------------------------------ desktop: barra lateral de vidro */
@media (min-width: 1024px) {
  .casca { display: grid; grid-template-columns: var(--lateral) minmax(0, 1fr); }
  .lateral {
    position: sticky; top: 0; z-index: 35; isolation: isolate;
    display: flex; flex-direction: column; gap: 4px;
    height: 100vh; height: 100dvh; overflow-y: auto;
    padding: 22px 14px 16px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--superficie) 86%, transparent), color-mix(in srgb, var(--superficie) 66%, transparent));
    -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
    border-right: 1px solid var(--borda);
  }
  .lateral::before {
    content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: 260px; pointer-events: none;
    background: radial-gradient(240px 180px at 30% 0%, color-mix(in srgb, var(--ac-1) 18%, transparent), transparent 70%);
  }
  .marca { display: flex; align-items: center; gap: 12px; padding: 2px 8px 22px; color: var(--texto); text-decoration: none; }
  .marca:hover { text-decoration: none; }
  .marca .logo { width: 44px; height: 44px; filter: drop-shadow(0 8px 18px var(--acento-brilho)); }
  .marca-textos { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
  .marca-textos strong { font-family: var(--fonte-titulo); font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
  .marca-textos span { font-size: 12.5px; color: var(--texto-suave); }
  .lateral-secao { padding: 0 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--texto-suave); }
  .lateral-nav ul { list-style: none; display: flex; flex-direction: column; gap: 3px; }
  .nav-item {
    position: relative; display: flex; align-items: center; gap: 12px;
    height: 46px; padding: 0 14px; border-radius: 14px;
    color: var(--texto-2); text-decoration: none; font-weight: 600; font-size: 14.5px;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
  }
  .nav-item .ico { color: var(--texto-suave); transition: color 0.2s, transform 0.35s var(--mola); }
  .nav-item:hover { background: var(--superficie-3); text-decoration: none; color: var(--texto); }
  .nav-item:hover .ico { color: var(--texto); transform: translateX(2px); }
  .nav-item[aria-current="page"] {
    color: var(--texto);
    background: linear-gradient(90deg, var(--acento-suave), color-mix(in srgb, var(--acento-suave) 30%, transparent));
    box-shadow: inset 0 0 0 1px var(--acento-borda);
  }
  .nav-item[aria-current="page"] .ico { color: var(--acento-forte); }
  .nav-item[aria-current="page"]::before {
    content: ""; position: absolute; left: -14px; top: 11px; bottom: 11px; width: 4px; border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--ac-1), var(--ac-2)); box-shadow: 0 0 14px var(--acento-brilho);
  }
  .lateral-rodape {
    margin-top: auto; display: flex; align-items: center; gap: 10px;
    padding: 10px 10px 10px 12px; border-radius: 16px;
    background: color-mix(in srgb, var(--superficie-2) 80%, transparent); border: 1px solid var(--borda);
  }
  .lateral-usuario { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
  .lateral-avatar {
    width: 36px; height: 36px; border-radius: 12px; flex: none; display: grid; place-items: center;
    font-family: var(--fonte-titulo); font-weight: 700; color: var(--ac-sobre);
    background: linear-gradient(135deg, var(--ac-1), var(--ac-2));
  }
  .lateral-usuario-textos { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
  .lateral-usuario-textos strong, .lateral-usuario-textos span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lateral-usuario-textos strong { font-size: 14px; }
  .lateral-usuario-textos span { font-size: 12px; color: var(--texto-suave); }
  .lateral-sair { flex: none; padding: 0 8px; gap: 6px; }
  .topo { padding: 0 24px; justify-content: flex-end; }
  .topo-marca { display: none; }
  .nav-baixo { display: none; }
  .conteudo { padding: 30px 32px 64px; }
  .faixas { padding: 14px 32px 0; }
}

/* ------------------------------------------------------------------ cabeçalho de página */
.pagina-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 20px; }
.pagina-titulos { min-width: 0; }
.pagina-titulos::before {
  content: ""; display: block; width: 34px; height: 4px; border-radius: 4px; margin-bottom: 12px;
  background: linear-gradient(90deg, var(--ac-1), var(--ac-2)); box-shadow: 0 2px 10px var(--acento-brilho);
}
.pagina-titulo { font-family: var(--fonte-titulo); font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.pagina-titulo:focus-visible { outline: 2px dashed var(--acento-borda); outline-offset: 6px; box-shadow: none; }
.pagina-sub { color: var(--texto-suave); margin-top: 6px; }
.pagina-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 1024px) { .pagina-titulo { font-size: 31px; } }

/* ------------------------------------------------------------------ botões */
.btn {
  --altura: 42px;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--altura); padding: 0 16px;
  border-radius: var(--raio-p); border: 1px solid transparent;
  font-weight: 600; font-size: 14.5px; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: transform 0.2s var(--suave), box-shadow 0.25s, background-color 0.2s, border-color 0.2s, color 0.2s, filter 0.2s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:hover { text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.98); }
.btn .ico { width: 18px; height: 18px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn-p { --altura: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn-bloco { width: 100%; }
.btn-grande { --altura: 52px; font-size: 16px; border-radius: 14px; }
.btn-so-icone { padding: 0; width: var(--altura); }
.btn-primario {
  color: var(--ac-sobre);
  background: linear-gradient(135deg, var(--ac-1), var(--ac-2));
  box-shadow: 0 10px 24px -12px var(--acento-brilho), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-primario::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.38) 50%, transparent 68%);
  transform: translateX(-120%); transition: transform 0.7s var(--suave);
}
.btn-primario:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 28px -12px var(--acento-brilho), inset 0 1px 0 rgba(255, 255, 255, 0.32); filter: saturate(1.08) brightness(1.04); }
.btn-primario:hover:not(:disabled)::after { transform: translateX(120%); }
.btn-secundario { background: var(--superficie); color: var(--texto); border-color: var(--borda-forte); box-shadow: var(--sombra-1); }
.btn-secundario:hover:not(:disabled) { border-color: var(--acento-borda); background: var(--superficie-2); transform: translateY(-1px); }
.btn-fantasma { background: transparent; color: var(--texto-2); }
.btn-fantasma:hover:not(:disabled) { background: var(--superficie-3); color: var(--texto); }
.btn-perigo { background: var(--perigo); color: var(--perigo-texto-botao); box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--perigo) 70%, transparent); }
.btn-perigo:hover:not(:disabled) { background: var(--perigo-hover); transform: translateY(-1px); }
.btn-perigo-suave { background: transparent; color: var(--perigo-texto); border-color: var(--perigo-borda); }
.btn-perigo-suave:hover:not(:disabled) { background: var(--perigo-suave); }
.btn-ocupado { pointer-events: none; }
.btn-ocupado .ico { display: none; }
.btn-acoes .btn-texto { display: none; }

.giro {
  width: 16px; height: 16px; flex: none; display: inline-block;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: girar 0.7s linear infinite;
}
.giro-grande { width: 38px; height: 38px; border-width: 3px; color: var(--acento-forte); }

.acoes-linha { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.acoes-linha.centro { justify-content: center; }
.acoes-linha.fim { justify-content: flex-end; }
.cartao-acoes .acoes-linha, .agd-rodape .acoes-linha, .vazio .acoes-linha { margin-top: 0; }

/* ------------------------------------------------------------------ cartões */
.cartao {
  position: relative; min-width: 0;
  background: var(--cartao-fundo);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  box-shadow: var(--sombra-1);
  padding: 18px 16px;
}
/* espaçamento entre blocos: páginas e abas empilham com gap (a página do grupo cuida do próprio cabeçalho) */
.pagina:not(.pagina-grupo), .aba-conteudo { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pagina:not(.pagina-grupo) > *, .aba-conteudo > * { margin-top: 0; margin-bottom: 0; min-width: 0; }
.pagina:not(.pagina-grupo) > .pagina-cab { margin-bottom: 4px; }
.cartao-cab { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; margin-bottom: 16px; }
.cartao-titulos { display: contents; }
.cartao-cab .cartao-titulo { grid-column: 1; grid-row: 1; min-width: 0; }
.cartao-cab .cartao-acoes { grid-column: 2; grid-row: 1; }
.cartao-cab .cartao-sub { grid-column: 1 / -1; }
.cartao-titulo { display: flex; align-items: center; gap: 11px; font-family: var(--fonte-titulo); font-size: 16px; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; }
.cartao-titulo .ico {
  width: 34px; height: 34px; padding: 8px; border-radius: 11px; flex: none;
  color: var(--acento-forte); background: var(--acento-suave); box-shadow: inset 0 0 0 1px var(--acento-borda);
}
.cartao-sub { color: var(--texto-suave); font-size: 13.5px; margin-top: 4px; }
.cartao-cab:has(.cartao-titulo > .ico) .cartao-sub { padding-left: 45px; }
.cartao-acoes { flex: none; display: flex; align-items: center; gap: 8px; }
.cartao > p + p { margin-top: 8px; }
@media (min-width: 600px) { .cartao { padding: 20px 22px; } }
@media (max-width: 479px) { .cartao-titulo { font-size: 15.5px; } .cartao-acoes .btn-p { padding: 0 10px; } }

.grade-2, .grade-3 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.grade-2 > .cartao + .cartao, .grade-3 > .cartao + .cartao, .grade-2 > * + * { margin-top: 0; }
@container (min-width: 760px) {
  .grade-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grade-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (min-width: 1000px) {
  .grade-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ selos, avatar, avisos */
.selo {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1;
  background: var(--cinza-fundo); color: var(--cinza-texto);
  border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
}
.selo .ico { width: 13px; height: 13px; stroke-width: 2.4; }
.tom-verde { background: var(--verde-fundo); color: var(--verde-texto); }
.tom-amarelo { background: var(--amarelo-fundo); color: var(--amarelo-texto); }
.tom-vermelho { background: var(--vermelho-fundo); color: var(--vermelho-texto); }
.tom-azul { background: var(--azul-fundo); color: var(--azul-texto); }
.tom-cinza { background: var(--cinza-fundo); color: var(--cinza-texto); }
.tom-roxo { background: var(--roxo-fundo); color: var(--roxo-texto); }

.avatar {
  position: relative; overflow: hidden;
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-family: var(--fonte-titulo); font-weight: 700; font-size: 15px; letter-spacing: 0.01em; color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  background: linear-gradient(135deg, #64748b, #334155);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  user-select: none;
}
.avatar .ico { width: 55%; height: 55%; }
.avatar-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.45s var(--suave); }
.avatar.tem-foto .avatar-foto { opacity: 1; }
/* primeira cor um tom mais escura: as iniciais brancas passam de 4,5:1 em todo o degradê */
.cor-0 { background: linear-gradient(135deg, #c2410c, #9a3412); }
.cor-1 { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.cor-2 { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.cor-3 { background: linear-gradient(135deg, #e11d48, #be123c); }
.cor-4 { background: linear-gradient(135deg, #b45309, #92400e); }
.cor-5 { background: linear-gradient(135deg, #047857, #065f46); }
.cor-6 { background: linear-gradient(135deg, #db2777, #9d174d); }
.cor-7 { background: linear-gradient(135deg, #64748b, #334155); }

.aviso {
  display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 14px;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  margin-bottom: 14px;
}
.aviso:last-child { margin-bottom: 0; }
.aviso-ico { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: color-mix(in srgb, currentColor 14%, transparent); }
.aviso-ico .ico { width: 18px; height: 18px; }
.aviso-textos { flex: 1 1 220px; min-width: 0; font-size: 14px; padding-top: 3px; }
.aviso-titulo { display: block; font-size: 14.5px; margin-bottom: 2px; }
.aviso .btn { align-self: center; }
.grupo-avisos { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.grupo-avisos:empty { display: none; }
.grupo-avisos .aviso { margin: 0; }
.pilha > .aviso, .pilha-p > .aviso { margin: 0; }

.detalhes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.detalhe { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--borda-forte); }
.detalhe:last-child { border-bottom: 0; }
.detalhe dt { color: var(--texto-suave); font-size: 14px; flex: none; }
.detalhe dd { font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-variant-numeric: tabular-nums; }
.jid { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.jid code { font-size: 12px; font-weight: 500; color: var(--texto-2); }

/* ------------------------------------------------------------------ campos */
.campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.campo:last-child { margin-bottom: 0; }
.campo-rotulo { font-weight: 600; font-size: 14px; color: var(--texto); }
.campo-dica { font-size: 13px; color: var(--texto-suave); margin-top: -2px; }
.campo-erro { font-size: 13.5px; color: var(--perigo-texto); font-weight: 600; margin-top: 6px; }
input[type="text"], input[type="search"], input[type="tel"], input[type="number"], input[type="password"],
input[type="time"], input[type="date"], input[type="email"], input[type="url"], select, textarea {
  width: 100%; min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--borda-campo); border-radius: var(--raio-p);
  background: var(--campo); color: var(--texto);
  font-size: 16px; line-height: 1.4;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
textarea { resize: vertical; min-height: 100px; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: var(--texto-suave); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--texto-suave) 70%, transparent); }
input:focus-visible, select:focus-visible, textarea:focus-visible, input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--acento-forte); background: var(--superficie);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ac-1) 22%, transparent);
}
input[aria-invalid="true"] { border-color: var(--perigo); box-shadow: 0 0 0 4px color-mix(in srgb, var(--perigo) 20%, transparent); }
input:disabled, select:disabled, textarea:disabled { opacity: 0.6; cursor: not-allowed; }
/* os inputs nativos escondidos das chaves, segmentados e cores continuam invisíveis quando desativados
   (senão a caixinha/bolinha nativa aparece por cima do desenho próprio) */
.chave-input:disabled, .seg-input:disabled, .acento-input:disabled { opacity: 0; }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
.campo-select { position: relative; }
.campo-select select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.campo-select .ico { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--texto-suave); width: 18px; height: 18px; }
.campo-numero { display: flex; align-items: center; gap: 10px; }
.campo-numero input { max-width: 140px; font-variant-numeric: tabular-nums; }
.campo-sufixo { color: var(--texto-suave); font-size: 14px; }
.campo-com-prefixo { display: flex; align-items: stretch; }
.campo-prefixo {
  display: grid; place-items: center; padding: 0 12px; min-width: 42px;
  border: 1px solid var(--borda-campo); border-right: 0; border-radius: var(--raio-p) 0 0 var(--raio-p);
  background: var(--superficie-3); color: var(--texto-suave); font-weight: 600;
}
.campo-com-prefixo input { border-radius: 0 var(--raio-p) var(--raio-p) 0; }
.campo-contador { align-self: flex-end; font-size: 12px; color: var(--texto-suave); margin-top: -2px; font-variant-numeric: tabular-nums; }
.campo-contador.perto { color: var(--amarelo-texto); font-weight: 650; }
.grade-campos { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; }
@container (min-width: 560px) { .grade-campos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grade-campos .campo { margin-bottom: 16px; }

.campo-busca { position: relative; margin: 0; flex: 1 1 220px; }
.campo-busca input { padding-left: 42px; border-radius: 14px; }
.busca-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--texto-suave); width: 18px; height: 18px; pointer-events: none; transition: color 0.2s; }
.campo-busca:focus-within .busca-ico { color: var(--acento-forte); }
.barra-ferramentas { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 14px; }
.barra-ferramentas .campo { margin-bottom: 0; }
.campo-ordem { flex: 0 1 260px; }
.campo-ordem .campo-rotulo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
.barra-filtros { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 16px; }
@container (min-width: 600px) { .barra-filtros { grid-template-columns: repeat(2, minmax(0, 260px)); } }
.barra-filtros .campo, .campo-filtro { margin-bottom: 0; }
.contagem { color: var(--texto-suave); font-size: 13.5px; margin-bottom: 10px; }

/* chave liga/desliga (com "mola") */
.chave {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 0; cursor: pointer; position: relative; min-height: 50px;
  -webkit-tap-highlight-color: transparent;
}
.chave + .chave { border-top: 1px solid var(--borda); }
.chave-textos { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.chave-rotulo { font-weight: 600; font-size: 14.5px; }
.chave-desc { font-size: 13px; color: var(--texto-suave); }
.chave-input { position: absolute; opacity: 0; width: 50px; height: 30px; right: 0; margin: 0; cursor: pointer; }
.chave-trilho {
  flex: none; position: relative; width: 50px; height: 30px; border-radius: 999px;
  background: var(--trilho); transition: background-color 0.25s, box-shadow 0.3s;
}
.chave-bola {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 999px;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
  transition: transform 0.42s var(--mola), width 0.22s var(--suave);
}
.chave-bola::after {
  content: ""; position: absolute; left: 9px; top: 5.5px; width: 5px; height: 10px;
  border: solid var(--ac-escuro); border-width: 0 2.2px 2.2px 0; border-radius: 1px;
  transform: rotate(45deg) scale(0); transition: transform 0.35s var(--mola) 0.05s;
}
.chave-input:checked + .chave-trilho {
  background: linear-gradient(135deg, var(--ac-1), var(--ac-2));
  box-shadow: inset 0 0 0 1.5px var(--chave-contorno), 0 6px 16px -6px var(--acento-brilho);
}
.chave-input:checked + .chave-trilho .chave-bola { transform: translateX(20px); }
.chave-input:checked + .chave-trilho .chave-bola::after { transform: rotate(45deg) scale(1); }
.chave:active .chave-input:not(:disabled) + .chave-trilho .chave-bola { width: 29px; }
.chave:active .chave-input:checked:not(:disabled) + .chave-trilho .chave-bola { transform: translateX(15px); }
.chave-input:focus-visible + .chave-trilho { outline: 2px solid var(--foco); outline-offset: 3px; }
.chave-input:disabled + .chave-trilho { opacity: 0.45; }
.chave-input:disabled, .chave:has(.chave-input:disabled) { cursor: not-allowed; }
.chave-compacta { padding: 4px 0; min-height: 38px; gap: 10px; justify-content: flex-start; }
.chave-compacta .chave-rotulo { font-size: 13.5px; font-weight: 600; color: var(--texto-2); }
/* texto que acompanha o estado ("Ligada"/"Desligada"): os dois ocupam a mesma célula, então a largura não pula */
.chave-rotulo-estado { display: inline-grid; justify-items: end; }
.chave:not(.chave-compacta) .chave-rotulo-estado { justify-items: start; }
.chave-rotulo-estado > span { grid-area: 1 / 1; }
.chave-estado .rot-des, .chave-estado:not(.chave-ligada) .rot-lig { visibility: hidden; }
.chave-estado:not(.chave-ligada) .rot-des { visibility: visible; }
.chave-estado:not(.chave-ligada) .chave-rotulo { color: var(--texto-suave); }
.chave-compacta + .chave-compacta { border-top: 0; }
.cartao-acoes .chave-compacta { flex-direction: row; }
.chave-grande .chave-rotulo { font-family: var(--fonte-titulo); font-size: 17px; }
.lista-chaves { margin-bottom: 8px; }

/* segmentado (rádios) */
.segmentado { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.segmentado:last-child { margin-bottom: 0; }
.segmentado legend { padding: 0; margin-bottom: 8px; }
.seg-opcoes {
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px;
  background: var(--superficie-3); border: 1px solid var(--borda); border-radius: 14px; max-width: 100%;
}
.seg-opcao { position: relative; display: flex; min-width: 0; }
.seg-input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-texto {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 6px 10px; border-radius: 10px; overflow-wrap: break-word; -webkit-hyphens: manual; hyphens: manual;
  font-size: 14px; font-weight: 600; color: var(--texto-2); cursor: pointer; text-align: center; line-height: 1.25;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.25s;
}
.seg-texto .ico { width: 16px; height: 16px; }
@media (max-width: 479px) { .seg-texto .ico { display: none; } }
@container (max-width: 599px) { .cartao .segmentado:not(.seg-filtro) .seg-opcoes, .modal .segmentado .seg-opcoes { display: grid; width: 100%; } }
/* 3 opções com palavra comprida ("Personalizada", "Aprovar por DDI"): em tela estreita uma embaixo da outra */
@container (max-width: 459px) { .seg-empilhar .seg-opcoes { grid-auto-flow: row; } }
.seg-opcao:hover .seg-input:not(:checked) + .seg-texto { color: var(--texto); background: color-mix(in srgb, var(--superficie) 50%, transparent); }
.seg-input:checked + .seg-texto {
  background: var(--superficie); color: var(--texto);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--acento-borda), 0 8px 18px -12px var(--acento-brilho);
}
.seg-input:checked + .seg-texto .ico { color: var(--acento-forte); }
.seg-input:focus-visible + .seg-texto { outline: 2px solid var(--foco); outline-offset: 1px; }
.seg-input:disabled + .seg-texto { opacity: 0.5; cursor: not-allowed; }
.seg-filtro { margin: 0; }
.seg-filtro .seg-opcoes { grid-auto-columns: auto; }
.seg-filtro .seg-texto { min-height: 36px; padding: 4px 12px; font-size: 13.5px; }

/* alternadores (vários) */
.alternadores { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.alternadores legend { padding: 0; margin-bottom: 8px; }
.alternadores .campo-dica { margin: -4px 0 8px; }
.alt-opcoes { display: flex; flex-wrap: wrap; gap: 8px; }
.alt-btn {
  min-height: 40px; min-width: 44px; padding: 6px 14px;
  border-radius: 999px; border: 1px solid var(--borda-forte);
  background: var(--superficie); color: var(--texto-2); font-weight: 600; font-size: 14px;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.25s var(--mola), box-shadow 0.25s;
}
.alt-btn:hover:not(:disabled) { border-color: var(--acento-borda); color: var(--texto); }
.alt-btn:active:not(:disabled) { transform: scale(0.94); }
.alt-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--ac-1), var(--ac-2)); border-color: transparent; color: var(--ac-sobre);
  box-shadow: 0 8px 18px -10px var(--acento-brilho);
}
.alt-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.prefixos-alt .alt-btn { font-family: var(--mono); font-size: 16px; min-width: 48px; }
.dias-semana .alt-opcoes { gap: 6px; }
.dias-semana .alt-btn { min-width: 0; flex: 1 1 0; padding: 6px 4px; font-size: 13.5px; }
.atalhos-dias { display: flex; flex-wrap: wrap; gap: 4px; margin: -8px 0 16px; }

/* chips */
.editor-chips .chips-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.chips-contagem { font-size: 12.5px; color: var(--texto-suave); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 2px; max-width: 100%;
  height: 32px; padding: 0 4px 0 12px; border-radius: 999px;
  background: var(--acento-suave); border: 1px solid var(--acento-borda); font-size: 14px; font-weight: 550;
  animation: surgir 0.3s var(--mola);
}
.chip-texto { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-x {
  width: 26px; height: 26px; flex: none; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: transparent; color: var(--texto-2);
}
.chip-x:hover { background: color-mix(in srgb, var(--texto) 10%, transparent); color: var(--texto); }
.chip-x .ico { width: 14px; height: 14px; }
.chips-vazio { font-size: 13.5px; color: var(--texto-suave); }
.chips-entrada { display: flex; gap: 8px; }
.chips-entrada input { flex: 1; min-width: 0; }

/* ------------------------------------------------------------------ estados: vazio ilustrado, carregando */
.vazio {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 22px 12px 26px;
}
.vazio-arte { position: relative; width: 168px; height: 120px; margin-bottom: 2px; }
.vazio-enfeite { position: absolute; inset: 0; width: 100%; height: 100%; }
.vazio-ico {
  position: absolute; left: 50%; top: 52%; width: 62px; height: 62px; margin: -31px 0 0 -31px;
  border-radius: 20px; display: grid; place-items: center;
  color: var(--ac-sobre); background: linear-gradient(135deg, var(--ac-1), var(--ac-2));
  box-shadow: 0 14px 30px -12px var(--acento-brilho), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: rotate(-6deg);
}
.vazio-ico .ico { width: 28px; height: 28px; }
.vazio-erro .vazio-ico { background: linear-gradient(135deg, #f97066, #d92d20); color: #fff; box-shadow: 0 14px 30px -12px rgba(217, 45, 32, 0.55); }
.vazio-titulo { font-family: var(--fonte-titulo); font-weight: 600; font-size: 16.5px; letter-spacing: -0.015em; }
.vazio-texto { color: var(--texto-suave); max-width: 460px; font-size: 14px; }
.vazio-texto p + ol { margin-top: 8px; }
.vazio .btn, .vazio-acoes { margin-top: 10px; }
.vazio-acoes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.lista-passos-vazio { text-align: left; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }

/* peças das ilustrações (cores pelo tema e pela cor de destaque) */
.il-fundo { fill: var(--acento-suave); }
.il-orbita { fill: none; stroke: var(--acento-borda); stroke-width: 1.4; stroke-dasharray: 3 6; }
.il-brilho { fill: var(--ac-1); opacity: 0.8; }
.il-brilho-2 { fill: var(--serie-2a); }
.il-folha { fill: color-mix(in srgb, var(--ponto-verde) 70%, transparent); }
.il-estrela-cor { fill: var(--texto-2); opacity: 0.55; }
.il-c1 { stop-color: var(--ac-1); }
.il-c2 { stop-color: var(--ac-2); }
.il-corpo { fill: #1c2547; }
.il-tela { fill: #ffffff; }
.il-detalhe { fill: #39436b; }
.il-qr { fill: #151b36; }
.il-linha-tela { fill: #e6e9f2; }
.il-varredura { fill: var(--ac-1); opacity: 0.75; animation: varrerIl 2.6s ease-in-out infinite alternate; transform-box: view-box; }
.il-elo { fill: none; stroke: var(--acento-forte); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 2 7; animation: tracejar 1.2s linear infinite; }
.il-anel { fill: none; stroke: var(--acento-borda); stroke-width: 1.4; stroke-dasharray: 4 6; }
.il-sombra { fill: color-mix(in srgb, var(--texto) 12%, transparent); }
.il-estrela { fill: #151b36; }
.il-trilha { fill: none; stroke: var(--acento-forte); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 3 7; }
.il-ponto { fill: var(--ac-1); stroke: var(--superficie); stroke-width: 2.5; }
.il-ponto-vazio { fill: var(--superficie); stroke: var(--acento-forte); }
.il-mastro { stroke: var(--texto-2); stroke-width: 2.4; stroke-linecap: round; }
/* no escuro: fundo das ilustrações frio (laranja sobre azul-noite fica marrom) e celular um tom acima do cartão */
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) .il-fundo { fill: rgba(148, 163, 214, 0.09); }
  :root:not([data-tema="claro"]) .il-corpo { fill: #2a3561; }
  :root:not([data-tema="claro"]) .il-detalhe { fill: #4a5585; }
}
:root[data-tema="escuro"] .il-fundo { fill: rgba(148, 163, 214, 0.09); }
:root[data-tema="escuro"] .il-corpo { fill: #2a3561; }
:root[data-tema="escuro"] .il-detalhe { fill: #4a5585; }

.carregando { display: flex; flex-direction: column; gap: 10px; padding: 6px 0; }
.esqueleto {
  height: 16px; border-radius: 10px;
  background: linear-gradient(100deg, var(--superficie-3) 30%, color-mix(in srgb, var(--superficie-3) 40%, var(--superficie)) 50%, var(--superficie-3) 70%);
  background-size: 300% 100%; animation: brilho 1.4s ease-in-out infinite;
}
.esq-1 { width: 92%; height: 20px; } .esq-2 { width: 74%; } .esq-3 { width: 56%; }

/* ------------------------------------------------------------------ toasts (deslizam) */
.toasts {
  position: fixed; z-index: 160; left: 12px; right: 12px;
  bottom: calc(var(--nav-baixo) + 22px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.toast {
  pointer-events: auto; position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 10px;
  width: 100%; max-width: 460px; padding: 10px 8px 10px 12px;
  background: rgba(16, 23, 43, 0.94); color: #f1f3fa; border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 20px 44px -16px rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font-size: 14px; line-height: 1.4;
  animation: entrarToast 0.5s var(--mola) both;
}
.toast::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: #84caff; }
.toast-sucesso::before { background: #4ade80; }
.toast-erro::before { background: #ff8a80; }
.toast-aviso::before { background: #fdd34d; }
.toast.saindo { animation: sairToast 0.2s ease-in forwards; }
.toast-ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: rgba(132, 202, 255, 0.14); color: #84caff; }
.toast-ico .ico { width: 18px; height: 18px; }
.toast-sucesso .toast-ico { color: #4ade80; background: rgba(74, 222, 128, 0.14); }
.toast-erro .toast-ico { color: #ff8a80; background: rgba(255, 138, 128, 0.14); }
.toast-aviso .toast-ico { color: #fdd34d; background: rgba(253, 211, 77, 0.14); }
.toast-texto { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast-acao {
  flex: none; border: 0; background: rgba(255, 255, 255, 0.08); color: #ffd7b5; font-weight: 700; font-size: 13.5px;
  padding: 8px 10px; border-radius: 10px;
}
.toast-acao:hover { background: rgba(255, 255, 255, 0.14); }
.toast-x { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: #b8c2da; display: grid; place-items: center; }
.toast-x:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.toast-x .ico { width: 16px; height: 16px; }
.toast :focus-visible { outline-color: #84caff; box-shadow: none; }
@media (min-width: 1024px) {
  .toasts { left: auto; right: 24px; bottom: 24px; align-items: flex-end; width: 420px; }
  .toast { animation-name: entrarToastLado; }
}
/* com a barra "Salvar" na tela, os avisos sobem para não cobrir os botões dela */
body:has(.barra-salvar:not([hidden])) .toasts { bottom: calc(var(--nav-baixo) + 92px + env(safe-area-inset-bottom, 0px)); }
body:has(.barra-lote:not([hidden])) .toasts { bottom: calc(var(--nav-baixo) + 136px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 1024px) {
  body:has(.barra-salvar:not([hidden])) .toasts, body:has(.barra-lote:not([hidden])) .toasts { bottom: 100px; }
}

/* ------------------------------------------------------------------ modais (entram com escala) */
dialog.modal {
  border: 1px solid var(--borda); padding: 0; margin: auto;
  width: min(540px, calc(100vw - 24px));
  max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
  border-radius: 22px; background: var(--superficie-elevada); color: var(--texto);
  box-shadow: var(--sombra-3);
  overflow: hidden;
}
dialog.modal[open] { display: flex; animation: entrarModal 0.42s var(--mola); }
dialog.modal::backdrop { background: var(--veu); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); animation: aparecer 0.25s; }
.modal-sem-dialog { position: fixed; inset: 0; z-index: 95; }
.modal-caixa {
  position: relative; display: flex; flex-direction: column; width: 100%; max-height: inherit; min-height: 0;
  background: radial-gradient(420px 160px at 0% 0%, color-mix(in srgb, var(--ac-1) 9%, transparent), transparent 70%);
}
.modal-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 12px 8px 22px; }
.modal-titulo { font-family: var(--fonte-titulo); font-size: 18px; font-weight: 600; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; letter-spacing: -0.02em; }
.modal-corpo { padding: 4px 22px 18px; overflow-y: auto; min-height: 0; flex: 1; }
.modal-corpo > * + * { margin-top: 12px; }
.modal-corpo .campo, .modal-corpo .segmentado, .modal-corpo .alternadores { margin-bottom: 0; }
.modal-desc { color: var(--texto-2); }
.modal-ico { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; animation: surgir 0.5s var(--mola) 0.1s both; }
.modal-ico .ico { width: 26px; height: 26px; }
.modal-erro { color: var(--perigo-texto); font-weight: 600; font-size: 14px; background: var(--perigo-suave); padding: 10px 12px; border-radius: var(--raio-pp); }
.modal-rodape {
  display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap-reverse;
  padding: 14px 22px 18px; border-top: 1px solid var(--borda);
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--superficie-2) 60%, transparent);
}
.modal-largo { width: min(640px, calc(100vw - 24px)); }
@media (max-width: 599px) {
  dialog.modal.folha, dialog.modal.modal-largo {
    width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 24px 24px 0 0; border-bottom: 0;
    max-height: calc(100dvh - 40px);
  }
  dialog.modal.folha[open], dialog.modal.modal-largo[open] { animation: subirFolha 0.42s var(--suave); }
  dialog.modal.folha .modal-caixa::before, dialog.modal.modal-largo .modal-caixa::before {
    content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; margin: 10px auto -4px; background: var(--borda-forte);
  }
  .modal-rodape .btn { flex: 1 1 140px; min-width: fit-content; }
}
/* o subtítulo (telefone) fica inteiro: nada de margem negativa dentro de um corpo com rolagem */
.modal-menu .modal-corpo { padding: 4px 8px 12px; }
.menu-sub { color: var(--texto-suave); font-size: 13.5px; line-height: 1.45; padding: 0 14px 8px; margin-top: 0 !important; font-variant-numeric: tabular-nums; }
.menu-lista { list-style: none; display: flex; flex-direction: column; margin-top: 0 !important; }
.menu-item {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  min-height: 54px; padding: 8px 12px; border: 0; border-radius: 14px; background: transparent; color: var(--texto);
  transition: background-color 0.18s, transform 0.25s var(--mola);
}
.menu-item:hover:not(:disabled) { background: var(--superficie-3); }
.menu-item:active:not(:disabled) { transform: scale(0.985); }
.menu-item .ico { width: 36px; height: 36px; padding: 8px; border-radius: 11px; color: var(--texto-2); background: var(--superficie-3); }
.menu-item:disabled { opacity: 0.5; cursor: not-allowed; }
.menu-textos { display: flex; flex-direction: column; min-width: 0; }
.menu-texto { font-weight: 600; font-size: 15px; }
.menu-desc { font-size: 13px; color: var(--texto-suave); }
.menu-perigo .menu-texto, .menu-perigo .ico { color: var(--perigo-texto); }
.menu-perigo .ico { background: var(--perigo-suave); }
.menu-sep { height: 1px; background: var(--borda); margin: 6px 12px; }

/* ------------------------------------------------------------------ barra salvar */
/* a barra mora numa "vaga" (div trocada a cada montagem): sem caixa própria, ela gruda na página/aba inteira */
.vaga-barra, .aba-conteudo > div:has(> .barra-salvar), .pagina > div:has(> .barra-salvar) { display: contents; }
.barra-salvar {
  position: sticky; z-index: 25;
  bottom: calc(var(--nav-baixo) + 20px + env(safe-area-inset-bottom, 0px));
  margin-top: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap;
  padding: 10px 10px 10px 16px; border-radius: 18px;
  background: var(--vidro); border: 1px solid var(--acento-borda);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--sombra-2), 0 0 0 4px color-mix(in srgb, var(--ac-1) 10%, transparent);
  animation: entrarToast 0.4s var(--mola);
}
.pagina > .vaga-barra > .barra-salvar, .aba-conteudo > .vaga-barra > .barra-salvar,
.pagina > div:has(> .barra-salvar) > .barra-salvar, .aba-conteudo > div:has(> .barra-salvar) > .barra-salvar { margin-top: 0; }
.barra-salvar-texto { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.barra-salvar-texto .ico { color: var(--acento-forte); width: 18px; height: 18px; }
.barra-salvar-acoes { display: flex; gap: 8px; margin-left: auto; }
@media (min-width: 1024px) { .barra-salvar { bottom: 18px; } }

/* ------------------------------------------------------------------ números (hoje) */
.numeros { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
/* 6 números: 2 → 3 colunas; 4 números ("últimos 7 dias"): 2×2 → 4 colunas (nunca um sozinho na linha) */
@container (min-width: 520px) { .numeros:not(.numeros-4) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 640px) { .numeros-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.numero-bloco {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  padding: 12px 11px; border-radius: 16px; min-width: 0;
  background: var(--superficie-2); border: 1px solid var(--borda);
  transition: transform 0.3s var(--mola), box-shadow 0.3s, border-color 0.3s;
}
.numero-bloco::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(closest-side, currentColor, transparent); opacity: 0.12; pointer-events: none;
}
.numero-verde { color: var(--verde-texto); } .numero-azul { color: var(--azul-texto); } .numero-cinza { color: var(--cinza-texto); }
.numero-amarelo { color: var(--amarelo-texto); } .numero-vermelho { color: var(--vermelho-texto); } .numero-roxo { color: var(--roxo-texto); }
.numero-ico { grid-row: span 2; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; }
.numero-ico .ico { width: 19px; height: 19px; }
.numero-valor { font-family: var(--fonte-titulo); color: var(--texto); font-size: 23px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.numero-rotulo { font-size: 12px; color: var(--texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* celular estreito: ícone menor para "Advertências" caber; abaixo de 350 px o ícone vai para cima do número */
@media (max-width: 379px) {
  .numero-bloco { column-gap: 8px; padding: 11px 9px; }
  .numero-ico { width: 30px; height: 30px; border-radius: 10px; }
  .numero-ico .ico { width: 16px; height: 16px; }
}
@media (max-width: 349px) {
  .numero-bloco { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .numero-ico { grid-row: auto; margin-bottom: 4px; }
}

/* ------------------------------------------------------------------ início */
.grade-inicio { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.grade-inicio .col-a, .grade-inicio .col-b { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.grade-inicio .cartao + .cartao { margin-top: 0; }
/* duas colunas já no tablet; cada coluna vira um contêiner para os números se ajustarem à largura dela */
@container (min-width: 700px) {
  .grade-inicio { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .grade-inicio .col-a, .grade-inicio .col-b { container-type: inline-size; }
}
.area-passos:empty, .area-estado:empty { display: none; }

.cartao-estado { --estado-cor: var(--ponto-cinza); overflow: hidden; padding: 20px 18px; }
.cartao-estado::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(460px 220px at 0% 0%, color-mix(in srgb, var(--estado-cor) 20%, transparent), transparent 70%),
    radial-gradient(300px 160px at 100% 100%, color-mix(in srgb, var(--ac-1) 8%, transparent), transparent 70%);
}
.cartao-estado::after {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, var(--estado-cor), transparent);
}
.cartao-estado > * { position: relative; }
.estado-verde { --estado-cor: var(--ponto-verde); }
.estado-amarelo { --estado-cor: var(--ponto-amarelo); }
.estado-vermelho { --estado-cor: var(--ponto-vermelho); }
.estado-topo { display: flex; align-items: flex-start; gap: 16px; }
.estado-ico { position: relative; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; flex: none; }
.estado-ico .ico { width: 26px; height: 26px; stroke-width: 2.2; }
.estado-amarelo .estado-ico::after, .estado-vermelho .estado-ico::after {
  content: ""; position: absolute; inset: -5px; border-radius: 22px; border: 2px solid var(--estado-cor);
  opacity: 0; animation: pulsoQuadrado 2.2s ease-out infinite;
}
.estado-foto { position: relative; flex: none; }
.estado-foto .avatar { width: 58px; height: 58px; font-size: 20px; box-shadow: 0 0 0 3px var(--superficie), 0 0 0 5px color-mix(in srgb, var(--ponto-verde) 60%, transparent); }
.estado-foto-ok {
  position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ponto-verde); color: #04220f; border: 3px solid var(--superficie);
}
.estado-foto-ok .ico { width: 12px; height: 12px; stroke-width: 3.4; }
.estado-textos { display: flex; flex-direction: column; gap: 4px; min-width: 0; align-items: flex-start; }
.estado-titulo { font-family: var(--fonte-titulo); font-size: 21px; font-weight: 700; line-height: 1.2; letter-spacing: -0.025em; }
.estado-texto { color: var(--texto-2); overflow-wrap: anywhere; }
.detalhes-estado { margin-top: 14px; }
.estado-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.cartao-passos { overflow: hidden; }
.cartao-passos .ilustra-trilha { position: absolute; right: 12px; top: 10px; width: 112px; height: auto; opacity: 0.95; pointer-events: none; }
.cartao-passos .cartao-cab { padding-right: 104px; }
.progresso { height: 8px; border-radius: 8px; background: var(--superficie-3); overflow: hidden; margin: -4px 0 8px; }
/* a barra só é redesenhada quando um passo muda (pg-inicio.js) e cresce do valor anterior (--p0) até o novo (--p) */
.progresso-barra {
  display: block; height: 100%; width: var(--p, 0%); border-radius: 8px;
  background: linear-gradient(90deg, var(--ac-1), var(--ac-2)); box-shadow: 0 0 12px var(--acento-brilho);
  animation: crescerBarra 1s var(--suave) 0.2s both;
}
.progresso-barra.sem-animacao { animation: none; }
.passos { list-style: none; display: flex; flex-direction: column; }
.passo { position: relative; display: flex; gap: 14px; padding: 12px 0; }
.passo:not(:last-child)::after {
  content: ""; position: absolute; left: 16px; top: 50px; bottom: -10px; width: 2px; border-radius: 2px; background: var(--borda-forte);
}
.passo-feito:not(:last-child)::after { background: linear-gradient(180deg, var(--ac-1), var(--ac-2)); }
.passo-marca {
  position: relative; z-index: 1;
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-family: var(--fonte-titulo); font-weight: 700; font-size: 14px;
  background: var(--superficie); color: var(--texto-2); border: 2px solid var(--borda-forte);
}
.passo-feito .passo-marca { background: linear-gradient(135deg, var(--ac-1), var(--ac-2)); color: var(--ac-sobre); border-color: transparent; box-shadow: 0 6px 16px -8px var(--acento-brilho); }
.passo-feito .passo-marca .ico { width: 16px; height: 16px; stroke-width: 3; }
.passo-atual .passo-marca { border-color: var(--acento-forte); color: var(--acento-forte); background: var(--acento-suave); }
.passo-atual .passo-marca::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--ac-1); opacity: 0;
  animation: pulso 2s ease-out infinite;
}
.passo-corpo { min-width: 0; padding-top: 5px; }
.passo-titulo { font-weight: 600; }
.passo-feito .passo-titulo { color: var(--texto-suave); text-decoration: line-through; text-decoration-color: var(--borda-forte); }
.passo-texto { color: var(--texto-suave); font-size: 13.5px; margin-top: 2px; }
.passo-acao { margin-top: 10px; }

.lista-grupos-mini { list-style: none; display: flex; flex-direction: column; gap: 2px; margin: 0 -8px; }
.grupo-mini {
  display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 14px;
  color: var(--texto); text-decoration: none;
  transition: background-color 0.2s, transform 0.3s var(--mola);
}
.grupo-mini:hover { background: var(--superficie-2); text-decoration: none; }
.grupo-mini:hover .ico-seta { transform: translateX(3px); color: var(--acento-forte); }
.grupo-mini .avatar { width: 44px; height: 44px; font-size: 14px; }
.grupo-mini-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.grupo-mini-nome { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grupo-mini-sub { font-size: 13px; color: var(--texto-suave); }
.grupo-mini-selos { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.ico-seta { color: var(--texto-suave); width: 18px; height: 18px; transition: transform 0.3s var(--mola), color 0.2s; }
@media (max-width: 479px) { .grupo-mini-selos .selo { padding: 0 7px; font-size: 11.5px; } }

/* eventos: linha do tempo */
.eventos { list-style: none; display: flex; flex-direction: column; }
.evento { position: relative; display: flex; gap: 12px; padding: 10px 0; }
.evento:not(:last-child)::before {
  content: ""; position: absolute; left: 17px; top: 48px; bottom: -6px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--borda-forte), transparent);
}
.evento-ico {
  position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none;
  box-shadow: 0 0 0 3px var(--superficie);
}
.evento-ico .ico { width: 17px; height: 17px; }
.evento-corpo { min-width: 0; flex: 1; padding-top: 1px; }
.evento-texto { overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.45; }
.evento-meta { font-size: 12.5px; color: var(--texto-suave); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.evento-grupo { color: var(--texto-2); font-weight: 600; text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.evento-grupo:hover { text-decoration: underline; color: var(--acento-forte); }
.eventos-rodape { display: flex; justify-content: center; padding-top: 12px; }
.eventos-rodape:empty { display: none; }
.eventos-rodape .carregando { width: 100%; }
.eventos-fim { color: var(--texto-suave); font-size: 13px; padding: 6px 0; }
.cartao-eventos .eventos-rodape .vazio { padding: 14px 8px; }

/* ------------------------------------------------------------------ conexão */
.cartao-wa { min-height: 120px; overflow: hidden; }
.conectado { display: flex; align-items: center; gap: 18px; }
.conectado-avatar { position: relative; flex: none; }
.conectado-avatar .avatar {
  width: 76px; height: 76px; font-size: 26px;
  box-shadow: 0 0 0 3px var(--superficie), 0 0 0 6px color-mix(in srgb, var(--ponto-verde) 55%, transparent), 0 14px 30px -12px rgba(37, 211, 102, 0.55);
}
.conectado-ok {
  position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ponto-verde); color: #04220f; border: 3px solid var(--superficie);
  animation: surgir 0.5s var(--mola) 0.2s both;
}
.conectado-ok .ico { width: 13px; height: 13px; stroke-width: 3.4; }
.conectado-info { min-width: 0; }
.conectado-titulo { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--verde-texto); text-transform: uppercase; letter-spacing: 0.08em; }
.conectado-titulo::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ponto-verde); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ponto-verde) 25%, transparent); }
.conectado-nome { font-family: var(--fonte-titulo); font-size: 21px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; letter-spacing: -0.02em; }
.conectado-numero { color: var(--texto-2); font-variant-numeric: tabular-nums; }
.conectado-desde { color: var(--texto-suave); font-size: 13px; margin-top: 2px; }

.qr-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: center; }
@container (min-width: 700px) { .qr-layout { grid-template-columns: auto minmax(0, 1fr); gap: 36px; } }
.qr-caixa { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr-moldura {
  position: relative; padding: 14px; border-radius: 26px;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--ac-1) 16%, transparent), transparent 70%);
}
/* cantos animados em volta do QR */
.qr-moldura::before {
  --c: var(--ac-1);
  content: ""; position: absolute; inset: 0; border-radius: 26px; pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) left top / 30px 4px no-repeat, linear-gradient(var(--c), var(--c)) left top / 4px 30px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 30px 4px no-repeat, linear-gradient(var(--c), var(--c)) right top / 4px 30px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 30px 4px no-repeat, linear-gradient(var(--c), var(--c)) left bottom / 4px 30px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 30px 4px no-repeat, linear-gradient(var(--c), var(--c)) right bottom / 4px 30px no-repeat;
  filter: drop-shadow(0 0 6px var(--acento-brilho));
  animation: respirarMoldura 2.4s ease-in-out infinite;
}
.qr-img {
  position: relative; display: block;
  width: min(268px, 70vw); height: auto; aspect-ratio: 1; padding: 12px; border-radius: 16px;
  background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), var(--sombra-2); image-rendering: pixelated;
}
.qr-varredura {
  position: absolute; left: 30px; right: 30px; top: 26px; height: 2px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--ac-1), transparent);
  box-shadow: 0 0 12px 1px var(--acento-brilho); opacity: 0.45;
  animation: varrer 2.8s ease-in-out infinite alternate;
}
.qr-barra { width: min(268px, 70vw); height: 6px; border-radius: 6px; background: var(--superficie-3); overflow: hidden; }
.qr-barra-cheia { display: block; height: 100%; width: var(--p, 100%); background: linear-gradient(90deg, var(--ac-1), var(--ac-2)); border-radius: 6px; transition: width 1s linear; }
.qr-legenda { font-size: 13.5px; color: var(--texto-suave); font-variant-numeric: tabular-nums; text-align: center; }
.qr-instrucoes { min-width: 0; }
.sub-titulo { font-family: var(--fonte-titulo); font-size: 15px; font-weight: 600; margin-bottom: 12px; letter-spacing: -0.01em; }
.passo-a-passo { list-style: none; counter-reset: passo; display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.passo-a-passo li { counter-increment: passo; display: flex; gap: 12px; align-items: flex-start; }
.passo-a-passo li::before {
  content: counter(passo); flex: none; width: 28px; height: 28px; border-radius: 10px;
  display: grid; place-items: center; font-family: var(--fonte-titulo); font-size: 13px; font-weight: 700;
  background: var(--acento-suave); color: var(--acento-forte); box-shadow: inset 0 0 0 1px var(--acento-borda);
}
.codigo-caixa {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 18px; border-radius: 20px;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--ac-1) 14%, transparent), transparent 75%), var(--superficie-2);
  border: 1px dashed var(--acento-borda);
}
.codigo-rotulo { font-size: 13.5px; color: var(--texto-suave); text-align: center; }
.codigo-grande {
  font-family: var(--mono); font-size: clamp(28px, 8.5vw, 44px); font-weight: 700; letter-spacing: 0.14em; color: var(--texto);
  text-shadow: 0 0 22px var(--acento-brilho);
}
.codigo-tempo { font-size: 13px; color: var(--texto-suave); }
.codigo-pedir > p { color: var(--texto-2); margin-bottom: 14px; }
.form-codigo .campo { max-width: 420px; }
.desligado { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 4px 0 6px; }
.desligado-ilustra { width: min(300px, 82vw); margin-bottom: 4px; }
.ilustra { display: block; width: 100%; height: auto; overflow: visible; }
.desligado-titulo { font-family: var(--fonte-titulo); font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.desligado-acoes { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 360px; margin-top: 12px; }
.conectando { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.conectando-titulo { font-family: var(--fonte-titulo); font-size: 17px; font-weight: 600; }
.processo-topo { margin-bottom: 8px; }
.processo-topo .selo.tom-verde .ico { display: none; }
.processo-topo .selo.tom-verde::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ponto-verde); animation: piscar 1.8s ease-in-out infinite; }
.log-barra { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.log-barra .segmentado { margin: 0; }
.log-janela { border-radius: 16px; overflow: hidden; background: #080c18; border: 1px solid rgba(148, 163, 214, 0.16); box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.7); }
.log-titulo {
  display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 14px;
  background: rgba(255, 255, 255, 0.045); border-bottom: 1px solid rgba(148, 163, 214, 0.12);
  color: #8d9db6; font-family: var(--mono); font-size: 12px;
}
.log-bolinhas { width: 44px; height: 10px; flex: none; background: radial-gradient(circle at 5px 5px, #ff5f57 4.5px, transparent 5px), radial-gradient(circle at 22px 5px, #febc2e 4.5px, transparent 5px), radial-gradient(circle at 39px 5px, #28c840 4.5px, transparent 5px); }
.log {
  position: relative; max-height: 380px; overflow: auto; padding: 10px 14px 12px;
  background: #080c18; color: #d6dde2; font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
}
.log:focus-visible { outline: none; box-shadow: none; }
.log-janela:has(.log:focus-visible) { outline: 2px solid var(--foco); outline-offset: 2px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--ac-1) 22%, transparent); }
.log-linha { display: flex; gap: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.log-hora { color: #8d9db6; flex: none; }
.log-nivel { flex: none; min-width: 40px; text-transform: uppercase; font-weight: 700; color: #84caff; font-size: 11.5px; padding-top: 1px; }
.log-aviso .log-nivel { color: #fdd34d; }
.log-erro .log-nivel, .log-fatal .log-nivel { color: #ff8a80; }
.log-erro .log-msg, .log-fatal .log-msg { color: #ffc9c4; }
.log-debug .log-nivel, .log-trace .log-nivel { color: #8d9db6; }
.log-msg { min-width: 0; }
.log-vazio { color: #8d9db6; font-family: var(--fonte); font-size: 14px; padding: 12px 0; }
.lista-opcoes { padding-left: 20px; display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.lista-opcoes li::marker { font-weight: 700; color: var(--acento-forte); }
.detalhes-opcional { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--borda); }
.detalhes-opcional > summary {
  display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 14px; color: var(--texto-2); border-radius: var(--raio-pp);
}
.detalhes-opcional > summary::-webkit-details-marker { display: none; }
.detalhes-opcional > summary::before {
  content: ""; flex: none; width: 7px; height: 7px; margin: 0 3px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.25s var(--mola);
}
.detalhes-opcional[open] > summary::before { transform: rotate(45deg); }
.detalhes-opcional > summary:hover { color: var(--texto); }
.detalhes-opcional > p { margin-top: 8px; }
.copiavel { margin-top: 8px; }
.copiavel .campo-rotulo { font-size: 12.5px; color: var(--texto-suave); font-weight: 600; margin-bottom: 4px; }
.copiavel-linha { display: flex; align-items: stretch; flex-wrap: wrap; gap: 8px; }
.copiavel-valor {
  flex: 1 1 260px; min-width: 0; display: block; padding: 10px 12px; border-radius: var(--raio-pp);
  background: var(--superficie-2); border: 1px solid var(--borda); font-size: 12.5px; line-height: 1.45;
  overflow-wrap: anywhere; word-break: break-all; user-select: all; color: var(--texto);
}
.copiavel-linha .btn { align-self: center; }
.link-area .copiavel-linha + .acoes-linha { margin-top: 12px; }
.link-area > p { margin-bottom: 12px; }

/* ------------------------------------------------------------------ grupos */
.lista-grupos { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@container (min-width: 700px) { .lista-grupos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grupo-item {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 16px; border-radius: 20px;
  background: var(--cartao-fundo); border: 1px solid var(--borda); box-shadow: var(--sombra-1);
  transition: transform 0.35s var(--mola), box-shadow 0.3s, border-color 0.3s;
}
.grupo-gerenciado { border-color: var(--acento-borda); }
.grupo-gerenciado::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(260px 120px at 0% 0%, color-mix(in srgb, var(--ac-1) 10%, transparent), transparent 70%);
}
/* inativo sem opacidade (o texto continua com contraste AA): borda tracejada, fundo apagado e avatar cinza */
.grupo-saiu { border-style: dashed; background: var(--superficie-2); box-shadow: none; }
.grupo-saiu .avatar { filter: grayscale(1); }
.grupo-link { position: relative; display: flex; align-items: center; gap: 14px; color: var(--texto); text-decoration: none; min-width: 0; }
.grupo-link:hover { text-decoration: none; }
.grupo-link:hover .grupo-nome { color: var(--acento-forte); }
.grupo-link .avatar { width: 54px; height: 54px; font-size: 18px; border-radius: 18px; }
.grupo-gerenciado .grupo-link .avatar { box-shadow: 0 0 0 2px var(--superficie), 0 0 0 4px var(--acento-borda); }
.grupo-info { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.grupo-nome { font-family: var(--fonte-titulo); font-weight: 600; font-size: 15.5px; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.2s; }
.grupo-sub { font-size: 13px; color: var(--texto-suave); }
.grupo-selos { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.grupo-acoes { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--borda-forte); }
.grupo-acoes .chave { padding: 0; min-height: 40px; }

/* grupo: cabeçalho com capa (foto borrada) e abas */
.voltar { display: inline-flex; align-items: center; gap: 4px; color: var(--texto-suave); font-weight: 600; font-size: 14px; text-decoration: none; margin-bottom: 12px; padding: 4px 8px 4px 2px; border-radius: 10px; transition: color 0.2s, transform 0.3s var(--mola); }
.voltar:hover { color: var(--texto); text-decoration: none; transform: translateX(-2px); }
.voltar .ico { width: 18px; height: 18px; }
.grupo-cab-area { margin-bottom: 14px; }
.grupo-cab {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap;
  padding: 20px 18px; border-radius: 24px;
  border: 1px solid var(--borda); box-shadow: var(--sombra-1);
  background: var(--superficie);
}
.grupo-capa {
  position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(520px 260px at 0% 0%, color-mix(in srgb, var(--ac-1) 26%, transparent), transparent 70%),
    radial-gradient(420px 240px at 100% 100%, color-mix(in srgb, var(--ac-2) 18%, transparent), transparent 70%);
}
.grupo-capa-foto {
  position: absolute; left: -10%; top: -40%; width: 120%; height: 180%; max-width: none; object-fit: cover;
  filter: blur(38px) saturate(1.4); opacity: 0.55; transform: scale(1.05);
  animation: aparecer 0.8s var(--suave);
}
.grupo-capa::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--superficie) 78%, transparent), color-mix(in srgb, var(--superficie) 52%, transparent));
}
.grupo-cab-id { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1 1 280px; }
.grupo-cab-id .avatar { width: 72px; height: 72px; font-size: 24px; border-radius: 22px; box-shadow: 0 0 0 3px var(--superficie), 0 16px 34px -14px rgba(0, 0, 0, 0.5); }
.grupo-cab-gerenciado .grupo-cab-id .avatar { box-shadow: 0 0 0 3px var(--superficie), 0 0 0 5px var(--acento-borda), 0 16px 34px -14px var(--acento-brilho); }
.grupo-cab-textos { min-width: 0; }
.grupo-cab-textos .pagina-titulo { font-size: 23px; }
.grupo-cab-sub { color: var(--texto-2); font-size: 13.5px; margin-top: 4px; }
.chave-cab {
  flex: 0 1 320px; padding: 10px 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--superficie) 70%, transparent); border: 1px solid var(--borda);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
@media (min-width: 1024px) {
  .grupo-cab { padding: 24px 26px; }
  .grupo-cab-textos .pagina-titulo { font-size: 28px; }
}

.abas-moldura {
  position: sticky; top: var(--topo); z-index: 20;
  margin: 0 -16px 20px; padding: 0 16px;
  background: color-mix(in srgb, var(--fundo) 84%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--borda);
}
@media (min-width: 1024px) { .abas-moldura { margin: 0 -32px 24px; padding: 0 32px; } }
.abas { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
/* dica de que há mais abas para os lados: o esmaecido só aparece do lado em que ainda há abas escondidas
   (o pg-grupo.js marca .mais-direita / .mais-esquerda; sem JS, fica o da direita) */
.abas-moldura::before, .abas-moldura::after {
  content: ""; position: absolute; top: 0; bottom: 1px; width: 40px; pointer-events: none; z-index: 1;
  opacity: 0; transition: opacity 0.25s;
}
.abas-moldura::after { right: 0; background: linear-gradient(to right, transparent, color-mix(in srgb, var(--fundo) 92%, transparent)); }
.abas-moldura::before { left: 0; background: linear-gradient(to left, transparent, color-mix(in srgb, var(--fundo) 92%, transparent)); }
.abas-moldura:not(.medida)::after, .abas-moldura.mais-direita::after, .abas-moldura.mais-esquerda::before { opacity: 1; }
.abas::-webkit-scrollbar { display: none; }
.abas-lista { list-style: none; display: flex; gap: 2px; min-width: max-content; }
.aba {
  position: relative; display: inline-flex; align-items: center; gap: 7px; height: 50px; padding: 0 13px;
  color: var(--texto-suave); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
  scroll-snap-align: center; top: 1px; transition: color 0.2s;
}
.aba .ico { width: 17px; height: 17px; transition: transform 0.35s var(--mola), color 0.2s; }
.aba:hover { color: var(--texto); text-decoration: none; }
.aba:hover .ico { transform: translateY(-1px); }
.aba[aria-current="page"] { color: var(--texto); }
.aba[aria-current="page"] .ico { color: var(--acento-forte); }
.aba[aria-current="page"]::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--ac-1), var(--ac-2)); box-shadow: 0 -2px 12px var(--acento-brilho);
  animation: crescerX 0.35s var(--suave);
}
.aba:focus-visible { outline-offset: -4px; box-shadow: none; }
/* computador: as 10 abas cabem sem esconder a última (sem ícones até 1439 px, com ícones e menos folga depois) */
@media (min-width: 1024px) {
  .aba { padding: 0 10px; gap: 6px; }
  .aba[aria-current="page"]::after { left: 8px; right: 8px; }
}
@media (min-width: 1024px) and (max-width: 1439px) {
  .aba .ico { display: none; }
}
.aba-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.aba-topo-textos { min-width: 0; flex: 1 1 260px; }
.aba-topo .acoes-linha { margin-top: 0; }
.aba-titulo { font-family: var(--fonte-titulo); font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.aba-topo .contagem { margin: 2px 0 0; }

/* membros */
.filtros { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-bottom: 14px; }
.filtros::-webkit-scrollbar { display: none; }
.filtro {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 14px;
  border-radius: 999px; border: 1px solid var(--borda-forte); background: var(--superficie); color: var(--texto-2);
  font-weight: 600; font-size: 13.5px; transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.25s var(--mola);
}
.filtro:hover { border-color: var(--acento-borda); color: var(--texto); }
.filtro:active { transform: scale(0.96); }
.filtro[aria-pressed="true"] { background: linear-gradient(135deg, var(--ac-1), var(--ac-2)); border-color: transparent; color: var(--ac-sobre); box-shadow: 0 8px 18px -10px var(--acento-brilho); }
.filtro-n { min-width: 26px; height: 24px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; background: var(--superficie-3); color: var(--texto-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.filtro[aria-pressed="true"] .filtro-n { background: rgba(255, 255, 255, 0.28); color: inherit; }
/* Akatsuki tem texto branco no destaque: o número fica numa pílula escura (branco sobre branco translúcido não passa) */
:root[data-acento="akatsuki"] .filtro[aria-pressed="true"] .filtro-n { background: rgba(0, 0, 0, 0.25); }
/* no computador os filtros quebram linha em vez de sumirem pela direita */
@container (min-width: 700px) { .filtros { flex-wrap: wrap; overflow: visible; } }

.tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--texto-suave); padding: 10px 12px; border-bottom: 1px solid var(--borda); white-space: nowrap; }
.tabela td { padding: 11px 12px; border-bottom: 1px solid var(--borda); vertical-align: middle; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela .num { text-align: right; font-variant-numeric: tabular-nums; }
.tabela-compacta td, .tabela-compacta th { padding: 6px 10px; }
.rolagem-x { overflow-x: auto; }

.tabela-membros { background: var(--cartao-fundo); border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra-1); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.tabela-membros tbody tr { transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s; }
.tabela-membros tbody tr:hover { background: color-mix(in srgb, var(--superficie-3) 60%, transparent); }
.membro-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.membro-textos { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.membro-nome { font-weight: 600; overflow-wrap: anywhere; }
.membro-numero { font-size: 13px; color: var(--texto-suave); font-variant-numeric: tabular-nums; }
.membro-selos { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.membro-selos:empty { display: none; }
.membro-ultima, .membro-entrou, .membro-saiu { color: var(--texto-2); white-space: nowrap; }
.entrou-antes { color: var(--texto-suave); cursor: help; }
.tem-adv { color: var(--amarelo-texto); font-weight: 700; }
.membro-acoes, .saida-acoes { text-align: right; width: 1%; white-space: nowrap; }
.membro-botoes { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; vertical-align: middle; }
/* quem saiu: botões alinhados à esquerda na coluna (sem o "Copiar" de quem tem número oculto, nada pula) */
.saida-acoes .membro-botoes { display: flex; justify-content: flex-start; }
.membro-bot { background: color-mix(in srgb, var(--ac-1) 5%, transparent); }
.tabela-membros tbody tr.selecionado { background: color-mix(in srgb, var(--ac-1) 8%, transparent); }
.tabela-membros tbody tr.selecionado:hover { background: color-mix(in srgb, var(--ac-1) 12%, transparent); }
.dica-entrou { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--texto-suave); }
.dica-entrou .ico { width: 16px; height: 16px; margin-top: 2px; }

/* caixa de seleção (desenho próprio; o alvo de toque é o rótulo de 40 px em volta) */
.tabela-membros .col-sel { width: 1%; padding: 4px 0 4px 8px; }
.sel-alvo { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.caixa-sel {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; cursor: pointer;
  width: 22px; height: 22px; border-radius: 7px; display: inline-grid; place-items: center;
  border: 2px solid var(--trilho); background: var(--campo);
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.2s, transform 0.25s var(--mola);
}
.caixa-sel::after {
  content: ""; width: 6px; height: 11px; margin-top: -2px;
  border: solid var(--ac-sobre); border-width: 0 2.4px 2.4px 0; border-radius: 1px;
  transform: rotate(45deg) scale(0); transition: transform 0.28s var(--mola);
}
.sel-alvo:hover .caixa-sel:not(:disabled) { border-color: var(--acento-forte); }
.caixa-sel:checked, .caixa-sel:indeterminate {
  background: linear-gradient(135deg, var(--ac-1), var(--ac-2)); border-color: transparent;
  box-shadow: inset 0 0 0 1.5px var(--chave-contorno), 0 4px 12px -5px var(--acento-brilho);
}
.caixa-sel:checked::after { transform: rotate(45deg) scale(1); }
.caixa-sel:indeterminate::after { width: 10px; height: 0; margin: 0; border-width: 0 0 2.4px; transform: none; }
.sel-alvo:active .caixa-sel:not(:disabled) { transform: scale(0.9); }
.caixa-sel:disabled { opacity: 0.45; cursor: not-allowed; }
.sel-todos-texto { display: none; }

/* botões da linha: "Remover" é perigo discreto (texto vermelho, sem borda); vira só ícone em tela estreita */
.btn-remover { background: transparent; color: var(--perigo-texto); }
.btn-remover:hover:not([aria-disabled="true"]) { background: var(--perigo-suave); border-color: var(--perigo-borda); }
.btn-remover[aria-disabled="true"] { color: var(--texto-suave); }
.btn[aria-disabled="true"]:active, .btn[aria-disabled="true"]:hover { transform: none; }
.btn-secundario[aria-disabled="true"]:hover { border-color: var(--borda-forte); background: var(--superficie); }
.btn-remover .btn-texto, .btn-copiar-num .btn-texto, .btn-privado .btn-texto { display: none; }
.membro-botoes .btn-remover, .membro-botoes .btn-acoes, .membro-botoes .btn-copiar-num, .membro-botoes .btn-privado { min-width: var(--altura); padding: 0 9px; }
/* tabela (900 px ou mais): células um pouco mais justas para o nome ter espaço; "Remover" com texto */
@container (min-width: 900px) {
  .tabela-membros th, .tabela-membros td { padding-left: 10px; padding-right: 10px; }
  .tabela-membros .th-quebra { white-space: normal; min-width: 92px; }
  .btn-remover .btn-texto { display: inline; }
  .membro-botoes .btn-remover { padding: 0 12px; }
}
@container (min-width: 1100px) {
  .btn-acoes .btn-texto { display: inline; }
  .membro-botoes .btn-acoes { padding: 0 12px; }
}

/* barra de ferramentas da aba: busca, ordem e Exportar */
.barra-membros .campo-ordem { flex: 1 1 180px; max-width: 260px; }
.barra-membros .btn-exportar { flex: none; min-height: 46px; border-radius: 14px; }

/* celular e tela média: cada membro vira um cartão (2 colunas entre 600 e 899 px) */
@container (max-width: 899px) {
  .tabela-membros { border: 0; background: transparent; box-shadow: none; overflow: visible; }
  .tabela-membros thead { display: none; }
  .tabela-membros, .tabela-membros tbody { display: block; }
  .tabela-membros tr {
    position: relative; display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; column-gap: 14px; row-gap: 2px;
    padding: 12px 8px 12px 96px; margin-bottom: 10px;
    background: var(--cartao-fundo); border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra-1);
  }
  .tabela-membros tbody tr:hover { background: var(--cartao-fundo); }
  .tabela-membros tr.membro-bot { background: color-mix(in srgb, var(--ac-1) 6%, var(--superficie)); border-color: var(--acento-borda); }
  .tabela-membros tbody tr.selecionado, .tabela-membros tbody tr.selecionado:hover {
    background: color-mix(in srgb, var(--ac-1) 9%, var(--superficie)); border-color: var(--acento-borda);
    box-shadow: var(--sombra-1), 0 0 0 1px var(--acento-borda);
  }
  .tabela-membros td { border: 0; padding: 0; }
  .tabela-membros td.col-sel { position: absolute; left: 2px; top: 13px; width: auto; padding: 0; }
  .tabela-membros .membro-id { flex: 1 1 100%; margin-left: -54px; padding-right: 86px; align-items: flex-start; }
  .tabela-membros .membro-acoes { position: absolute; top: 10px; right: 6px; width: auto; }
  .tabela-membros .membro-botoes { gap: 2px; }
  .tabela-membros .membro-botoes .btn { padding: 0; width: var(--altura); }
  .tabela-membros .btn-remover .btn-texto, .tabela-membros .btn-acoes .btn-texto { display: none; }
  .tabela-membros td[data-rotulo] { font-size: 12.5px; color: var(--texto-suave); text-align: left; white-space: nowrap; }
  .tabela-membros td.membro-entrou::before { content: "Entrou: "; }
  .tabela-membros td.membro-saiu::before { content: "Saiu: "; }
  .tabela-membros td.membro-msgs::before { content: "Mensagens: "; }
  .tabela-membros td.membro-ultima::before { content: "Última: "; }
  .tabela-membros td.membro-adv::before { content: "Advertências: "; }
  .tabela-membros td.tem-adv { color: var(--amarelo-texto); }
  .tabela-membros td[data-rotulo] time, .tabela-membros td[data-rotulo] .entrou-antes { color: var(--texto-2); }
  /* "Selecionar todos": o cabeçalho vira uma linha só com a caixa e o texto */
  .tabela-membros thead:has(.sel-todos) { display: block; }
  .tabela-membros thead tr { display: flex; padding: 0 0 6px; margin: 0; background: none; border: 0; box-shadow: none; }
  .tabela-membros thead th { display: none; }
  .tabela-membros thead th.col-sel { display: block; position: static; padding: 0; border: 0; width: auto; }
  .tabela-membros .sel-todos {
    width: auto; display: inline-flex; gap: 10px; padding: 0 14px 0 9px; margin-left: -7px;
    font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--texto-2);
  }
  .tabela-membros .sel-todos:hover { background: color-mix(in srgb, var(--superficie-3) 70%, transparent); }
  .sel-todos-texto { display: inline; }
  /* quem saiu: sem caixa de seleção, botões numa linha embaixo */
  .tabela-saidas tr { padding-left: 68px; padding-right: 12px; }
  .tabela-saidas .membro-id { margin-left: -56px; padding-right: 0; }
  .tabela-saidas .saida-acoes { flex: 1 1 100%; width: auto; text-align: left; margin-top: 10px; }
  .tabela-saidas .membro-botoes { display: flex; justify-content: flex-start; gap: 6px; }
  .tabela-saidas .membro-botoes .btn { width: auto; padding: 0 12px; }
  .tabela-saidas .membro-botoes .btn-copiar-num, .tabela-saidas .membro-botoes .btn-privado { width: var(--altura); padding: 0; }
}
@container (min-width: 600px) and (max-width: 899px) {
  .tabela-membros tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tabela-membros tbody tr { margin-bottom: 0; }
}
.saida-voltou .btn-readicionar { color: var(--texto-suave); }

/* barra da seleção em lote: gruda no fim da tela como a "alterações não salvas" */
.barra-lote {
  position: sticky; z-index: 25;
  bottom: calc(var(--nav-baixo) + 20px + env(safe-area-inset-bottom, 0px));
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 10px;
  padding: 10px 10px 10px 14px; border-radius: 18px;
  background: var(--vidro); border: 1px solid var(--acento-borda);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--sombra-2), 0 0 0 4px color-mix(in srgb, var(--ac-1) 10%, transparent);
  animation: entrarToast 0.4s var(--mola);
}
.barra-lote-texto { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; font-size: 14px; }
.barra-lote-ico {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px;
  color: var(--acento-forte); background: var(--acento-suave); box-shadow: inset 0 0 0 1px var(--acento-borda);
}
.barra-lote-ico .ico { width: 16px; height: 16px; stroke-width: 2.6; }
.barra-lote-ico .giro { width: 14px; height: 14px; }
.barra-lote-textos { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; min-width: 0; font-variant-numeric: tabular-nums; }
.barra-lote-extra { font-weight: 500; font-size: 13px; color: var(--texto-suave); }
.barra-lote-acoes { grid-column: 1 / -1; display: flex; gap: 6px; }
.barra-lote-acoes .btn { flex: 1 1 0; min-width: 0; padding: 0 8px; gap: 6px; }
.barra-lote .btn-limpar { grid-column: 2; grid-row: 1; padding: 0; width: var(--altura); }
.barra-lote .btn-limpar .btn-texto { display: none; }
@container (min-width: 700px) {
  .barra-lote { display: flex; flex-wrap: wrap; padding-left: 16px; }
  .barra-lote-acoes { margin-left: auto; }
  .barra-lote-acoes .btn { flex: none; padding: 0 12px; gap: 8px; }
  .barra-lote .btn-limpar { width: auto; padding: 0 12px; }
  .barra-lote .btn-limpar .btn-texto { display: inline; }
}
@media (min-width: 1024px) { .barra-lote { bottom: 18px; } }

/* avisos enviados pelo painel (aba Enviar) */
.avisos-lista { list-style: none; display: flex; flex-direction: column; }
.av-item { display: flex; align-items: center; gap: 10px 16px; padding: 12px 0; flex-wrap: wrap; }
.av-item:first-child { padding-top: 2px; }
.av-item:last-child { padding-bottom: 0; }
.av-item + .av-item { border-top: 1px dashed var(--borda-forte); }
.av-corpo { flex: 1 1 280px; min-width: 0; }
.av-texto { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
/* texto inteiro recolhido em 4 linhas; "Ver mais" abre (só aparece quando passa disso) */
.av-recolhido { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.av-ver-mais { margin: 2px 0 0 -12px; gap: 4px; color: var(--acento-forte); }
.av-ver-mais .ico { width: 16px; height: 16px; }
.av-sem-texto { color: var(--texto-suave); font-style: italic; }
.av-apagado .av-texto { color: var(--texto-suave); }
.av-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; font-size: 13px; color: var(--texto-suave); }
/* dois botões ("Para quem entra" + "Apagar para todos"): em tela estreita a caixa encolhe e eles quebram a linha */
.av-acao { flex: 0 1 auto; max-width: 100%; margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.av-motivo { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--texto-suave); cursor: help; }
.av-motivo .ico { width: 15px; height: 15px; }
.av-nota { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--texto-suave); }
.av-nota .ico { width: 14px; height: 14px; }
/* "Para quem entra": alternância (aria-pressed); marcada, o alfinete fica cheio */
.btn-alfinete { background: var(--superficie); color: var(--texto-2); border-color: var(--borda-forte); }
.btn-alfinete:hover:not(:disabled) { border-color: var(--acento-borda); color: var(--texto); background: var(--superficie-2); }
.btn-alfinete[aria-pressed="true"] { background: var(--acento-suave); color: var(--acento-forte); border-color: var(--acento-borda); }
.btn-alfinete[aria-pressed="true"]:hover:not(:disabled) { background: var(--acento-suave); color: var(--acento-forte); border-color: var(--acento-forte); }
.btn-alfinete[aria-pressed="true"] .ico { fill: currentColor; }
/* faixa "como estão os avisos para quem entra" no topo da lista */
.av-estado {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 12px; padding: 8px 8px 8px 12px;
  border-radius: 14px; background: var(--superficie-2); border: 1px solid var(--borda); font-size: 13.5px; color: var(--texto-2);
}
.av-estado > .ico { width: 18px; height: 18px; color: var(--acento-forte); }
.av-estado-texto { flex: 1 1 200px; min-width: 0; }
.av-estado .btn { margin-left: auto; }
.av-estado-desligado > .ico { color: var(--texto-suave); }
.cartao-titulo[tabindex="-1"]:focus-visible { outline: 2px dashed var(--acento-borda); outline-offset: 4px; box-shadow: none; }
/* "Escolher avisos" rola até a lista: além do topo (scroll-padding do html), desconta a barra de abas grudada */
.cartao-avisos { scroll-margin-top: 52px; }

/* listas de cartões (respostas, agenda) */
.lista-cartoes { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@container (min-width: 700px) { .lista-cartoes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lista-cartoes > .cartao + .cartao { margin-top: 0; }
.lista-cartoes > .cartao { transition: transform 0.35s var(--mola), box-shadow 0.3s, border-color 0.3s; }
.resp-topo, .agd-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.resp-gatilho { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.resp-gatilho q { font-family: var(--fonte-titulo); font-weight: 600; font-size: 16px; overflow-wrap: anywhere; quotes: "“" "”"; }
.resp-texto, .agd-texto {
  margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--superficie-2); border: 1px solid var(--borda);
  font-size: 14px; overflow-wrap: anywhere; max-height: 9.5em; overflow: hidden; position: relative;
}
.resp-inativa, .agd-inativo { border-style: dashed; background: var(--superficie-2); box-shadow: none; }
.resp-inativa .resp-texto, .agd-inativo .agd-texto { background: transparent; border-style: dashed; }
.agd-inativo .agd-ico { filter: grayscale(1); opacity: 0.65; }
.resp .acoes-linha, .agd .acoes-linha { margin-top: 12px; }
.agd-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.agd-info { flex: 1; min-width: 0; }
.agd-hora { font-family: var(--fonte-titulo); font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.agd-titulo { font-size: 13.5px; color: var(--texto-2); font-weight: 600; }
.agd-dias { color: var(--texto-suave); font-weight: 500; }
.agd-rodape { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.agd-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.agd-rodape .acoes-linha { margin-top: 0; }
.linha-data { display: flex; gap: 8px; align-items: center; }
.linha-data input { flex: 1; min-width: 0; }
.lista-simples { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }

/* antispam */
.cartao-destaque {
  border-color: var(--acento-borda);
  background: radial-gradient(520px 200px at 0% 0%, color-mix(in srgb, var(--ac-1) 12%, transparent), transparent 70%), var(--cartao-fundo);
}
.cartao-destaque .chave { padding: 4px 0; }
.grade-regras { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
@container (min-width: 820px) { .grade-regras { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grade-regras > .cartao + .cartao { margin-top: 0; }
.cartao-regra { transition: opacity 0.25s, border-color 0.25s; }
.cartao-regra .cartao-cab { margin-bottom: 12px; }
.cartao-regra .cartao-titulo { font-size: 15.5px; }
.regra-corpo { transition: opacity 0.25s; }
/* regra desligada: cartão tracejado e ícone apagado, mas os campos seguem legíveis (contraste AA) */
.regra-desligada { border-style: dashed; background: var(--superficie-2); box-shadow: none; }
.regra-desligada .cartao-titulo .ico { color: var(--texto-suave); background: var(--superficie-3); box-shadow: none; }
.desligado-geral .cartao-regra { border-style: dashed; }
.desligado-geral .cartao-regra .cartao-titulo .ico { color: var(--texto-suave); background: var(--superficie-3); box-shadow: none; }
.regra-acao {
  display: flex; align-items: flex-end; gap: 8px 16px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--borda-forte);
}
.regra-acao .chave { flex: 1 1 160px; }
.regra-acao .campo { flex: 1 1 180px; margin: 0; }

/* entrada */
.lista-pedidos, .lista-negra { list-style: none; display: flex; flex-direction: column; }
.pedido, .ln-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; flex-wrap: wrap; }
.pedido + .pedido, .ln-item + .ln-item { border-top: 1px dashed var(--borda-forte); }
.pedido-info, .ln-info { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pedido-nome, .ln-nome { font-weight: 600; overflow-wrap: anywhere; }
.ln-nome .selo { margin-left: 4px; vertical-align: 1px; }
.pedido-sub, .ln-meta { font-size: 13px; color: var(--texto-suave); }
.ln-motivo { font-size: 13.5px; color: var(--texto-2); overflow-wrap: anywhere; }
.pedido-acoes { display: flex; gap: 6px; margin-left: auto; }
.ln-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--vermelho-fundo); color: var(--vermelho-texto); }
.ln-ico .ico { width: 18px; height: 18px; }
@media (max-width: 479px) {
  .pedido-acoes { width: 100%; padding-left: 54px; }
  .pedido-acoes .btn { flex: 1 1 0; min-width: 0; padding: 0 10px; }
}
/* 320–379 px: os botões "Aprovar" e "Recusar" usam a linha toda (o texto não vaza) */
@media (max-width: 379px) { .pedido-acoes { padding-left: 0; } }

/* comandos */
.prefixos { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
.prefixo { min-width: 36px; height: 34px; display: inline-grid; place-items: center; border-radius: 10px; background: var(--acento-suave); color: var(--acento-forte); border: 1px solid var(--acento-borda); font-size: 17px; font-weight: 700; }
.cmd-lista { display: flex; flex-direction: column; gap: 16px; }
.cmd-lista > .cartao + .cartao { margin-top: 0; }
.cmds { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); }
@container (min-width: 820px) { .cmds { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; } }
/* lista compacta (a aba tem ~50 comandos): menos espaço entre as linhas de cada comando */
.cmd { padding: 10px 0 8px; border-top: 1px dashed var(--borda-forte); min-width: 0; }
.cmd:first-child { border-top: 0; padding-top: 2px; }
@container (min-width: 820px) { .cmd:nth-child(2) { border-top: 0; padding-top: 2px; } }
.cmd-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px 12px; }
.cmd-cab > .chave { flex: none; padding: 0; min-height: 36px; }
.cmd-topo { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; min-width: 0; padding-top: 4px; }
.cmd-nome { font-size: 15px; font-weight: 700; color: var(--texto); background: var(--superficie-3); border: 1px solid var(--borda); padding: 1px 9px; border-radius: 8px; }
.cmd-aliases { font-size: 12.5px; line-height: 1.45; color: var(--texto-suave); margin-top: 3px; }
.cmd-aliases code { font-size: 12px; }
.cmd-desc { font-size: 14px; line-height: 1.45; color: var(--texto-2); margin-top: 3px; }
.cmd-uso { margin-top: 2px; line-height: 1.4; }
.cmd-uso code { font-size: 12.5px; color: var(--texto-suave); }
.cmd-uso-frase { font-size: 13px; color: var(--texto-suave); }
.cmd-uso-frase code { font-size: 12px; color: var(--texto-2); background: var(--superficie-3); padding: 0 4px; border-radius: 5px; }
.cmd-chaves { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 2px; }
.cmd-chaves .chave-compacta { padding: 2px 0; }
.cmd-desativado .cmd-nome { color: var(--texto-suave); text-decoration: line-through; background: transparent; border-style: dashed; }
.cmd-desativado .cmd-desc { color: var(--texto-suave); }

/* ------------------------------------------------------------------ boas-vindas: editor + prévia */
.editor-previa { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
@container (min-width: 820px) { .editor-previa { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 24px; } }
.editor { min-width: 0; }
.editor .campo { margin-bottom: 8px; }
.previa { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.previa-nota { font-size: 12.5px; color: var(--texto-suave); }
.barra-fmt { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; align-items: center; }
.fmt-btn, .var-btn {
  min-height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--borda-forte);
  background: var(--superficie); color: var(--texto-2); font-size: 13.5px; font-weight: 600;
  transition: background-color 0.18s, color 0.18s, border-color 0.18s, transform 0.25s var(--mola);
}
.fmt-btn { min-width: 36px; font-size: 14px; }
.fmt-btn:hover, .var-btn:hover { background: var(--superficie-3); color: var(--texto); border-color: var(--acento-borda); }
.fmt-btn:active, .var-btn:active { transform: scale(0.94); }
.fmt-n { font-weight: 800; } .fmt-i { font-style: italic; font-family: Georgia, serif; } .fmt-s { text-decoration: line-through; } .fmt-m { font-family: var(--mono); font-size: 12.5px; }
.var-btn { font-family: var(--mono); font-size: 12.5px; color: var(--acento-forte); border-style: dashed; border-color: var(--acento-borda); }
.fmt-sep { width: 1px; height: 24px; background: var(--borda-forte); margin: 0 4px; }

.wa-fundo {
  border-radius: 18px; padding: 18px 14px; min-height: 120px;
  background-color: var(--wa-fundo);
  background-image: radial-gradient(color-mix(in srgb, var(--wa-texto) 7%, transparent) 1px, transparent 1.2px);
  background-size: 18px 18px;
  border: 1px solid var(--borda); box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.06);
}
.wa-balao {
  position: relative; max-width: min(100%, 420px);
  padding: 6px 9px 8px; border-radius: 0 10px 10px 10px;
  background: var(--wa-balao); color: var(--wa-texto);
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
  font-size: 14.2px; line-height: 1.42;
  transition: opacity 0.2s;
  animation: surgir 0.4s var(--mola);
}
.wa-balao::before {
  content: ""; position: absolute; left: -8px; top: 0; width: 8px; height: 13px;
  background: var(--wa-balao); clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.wa-carregando { opacity: 0.6; }
.wa-autor { display: block; font-size: 12.8px; font-weight: 650; color: var(--wa-autor); margin-bottom: 2px; }
.wa-midia { margin: 2px -5px 6px; border-radius: 8px; overflow: hidden; }
.wa-midia img { width: 100%; max-height: 260px; object-fit: cover; }
.wa-midia-falsa { height: 130px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--superficie-3); color: var(--texto-suave); font-size: 13px; }
.wa-midia-falsa .ico { width: 32px; height: 32px; }
.wa-texto { white-space: pre-wrap; overflow-wrap: anywhere; }
.wa-texto strong { font-weight: 700; }
.wa-mencao { color: var(--wa-mencao); }
.wa-link { color: var(--wa-mencao); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.wa-codigo { font-family: var(--mono); font-size: 0.9em; background: var(--wa-codigo); padding: 1px 4px; border-radius: 4px; }
.wa-mono { display: block; font-family: var(--mono); font-size: 0.88em; white-space: pre-wrap; margin: 2px 0; }
.wa-citacao { display: inline-block; border-left: 3px solid var(--borda-forte); padding-left: 8px; color: var(--texto-2); }
.wa-vazio { color: var(--wa-hora); }
.wa-hora { display: block; text-align: right; font-size: 11px; color: var(--wa-hora); margin-top: 2px; margin-bottom: -3px; font-variant-numeric: tabular-nums; }

.imagem-area { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: -4px 0 16px; padding: 12px; border-radius: 16px; background: var(--superficie-2); border: 1px dashed var(--borda-forte); }
.imagem-mini { width: 88px; height: 88px; border-radius: 12px; overflow: hidden; flex: none; background: var(--superficie-3); display: grid; place-items: center; }
.imagem-mini img { width: 100%; height: 100%; object-fit: cover; }
.imagem-vazia { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: var(--texto-suave); }
.imagem-textos { flex: 1 1 200px; min-width: 0; }
.imagem-textos .acoes-linha { margin-top: 8px; }
.form-enviar .imagem-area { margin: 12px 0 0; }
.form-enviar .chave { margin-top: 4px; }

/* boas-vindas: últimos avisos para quem entra (campos à esquerda, "Vai agora" à direita no desktop) */
.cartao-avisos-novatos > .chave { padding-top: 0; margin-bottom: 12px; border-bottom: 1px dashed var(--borda-forte); padding-bottom: 14px; }
.av-novatos { margin-bottom: 0; }
.av-campos { border: 0; padding: 0; margin: 0; min-width: 0; }
.av-campos .campo-numero input { max-width: 110px; }
.av-campos .segmentado { margin-bottom: 12px; }
/* opções compridas: uma por linha em qualquer largura (sem quebrar "boas-vindas" no hífen) */
.segmentado.seg-linhas .seg-opcoes { display: grid; width: 100%; grid-auto-flow: row; }
.av-nota-privado:empty, .av-nota-bv:empty { display: none; }
.av-nota-privado .aviso { margin: 0 0 4px; }
.av-nota-bv .aviso { margin: 0 0 14px; }
.av-escolher { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 2px; }
.av-conta-marcados { font-size: 13px; color: var(--texto-suave); }
.novatos { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.novatos-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; }
.novatos-conta { font-size: 13px; color: var(--texto-suave); font-variant-numeric: tabular-nums; }
.novatos-notas:empty { display: none; }
.novatos-nota { font-size: 12.5px; color: var(--texto-suave); }
.novatos-nota + .novatos-nota { margin-top: 2px; }
.novatos-lista { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.novato {
  display: flex; align-items: flex-start; gap: 10px; min-width: 0;
  padding: 10px 12px; border-radius: 14px; background: var(--superficie-2); border: 1px solid var(--borda);
}
.novato-data {
  flex: none; margin-top: 1px; padding: 1px 7px; border-radius: 8px;
  font-size: 12.5px; font-weight: 700; line-height: 1.5; font-variant-numeric: tabular-nums;
  color: var(--acento-forte); background: var(--acento-suave); box-shadow: inset 0 0 0 1px var(--acento-borda);
}
.novato-corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.novato-texto {
  font-size: 14px; line-height: 1.45; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.novato-extra { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--texto-suave); }
.novato-extra .ico { width: 14px; height: 14px; }
/* desligado: a lista continua legível, mas tracejada (é o que "iria") */
.novatos-desligado .novato { border-style: dashed; background: transparent; }
.novatos-vazio {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px;
  border: 1px dashed var(--borda-forte); background: var(--superficie-2); font-size: 13.5px; color: var(--texto-2);
}
.novatos-vazio > .ico { width: 18px; height: 18px; margin-top: 2px; color: var(--texto-suave); }
.novatos-vazio-textos { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.novatos-vazio-titulo { font-weight: 650; color: var(--texto); }
.novatos-erro > .ico { color: var(--amarelo-texto); }
.novatos-erro .btn { margin-top: 6px; }
.novatos .carregando { margin: 0; }

/* ------------------------------------------------------------------ gráficos (barras em degradê) */
.graficos { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 18px; }
@container (min-width: 900px) { .graficos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; } }
.grafico { min-width: 0; }
.graf-cab { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.graf-titulo { font-family: var(--fonte-titulo); font-weight: 600; font-size: 14.5px; }
.graf-desc { font-size: 12.5px; color: var(--texto-suave); }
.graf-legenda { list-style: none; display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; font-size: 12.5px; color: var(--texto-2); }
.graf-legenda li { display: inline-flex; align-items: center; gap: 6px; }
.graf-chave { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.graf-chave.serie-1, .graf-dica-chave.serie-1 { background: linear-gradient(180deg, var(--ac-1), var(--ac-2)); }
.graf-chave.serie-2, .graf-dica-chave.serie-2 { background: linear-gradient(180deg, var(--serie-2a), var(--serie-2b)); }
.graf-moldura { position: relative; }
.graf-area { width: 100%; min-height: 182px; border-radius: 10px; touch-action: pan-y; cursor: crosshair; }
.graf-area:focus-visible { outline-offset: 4px; }
.graf-svg { display: block; overflow: visible; }
.graf-grade { stroke: var(--grade); stroke-width: 1; shape-rendering: crispEdges; }
.graf-base { stroke: var(--eixo); stroke-width: 1; shape-rendering: crispEdges; }
.graf-eixo { fill: var(--texto-suave); font-size: 11px; font-family: var(--fonte); font-variant-numeric: tabular-nums; }
.graf-stop-a.serie-1 { stop-color: var(--ac-1); }
.graf-stop-b.serie-1 { stop-color: var(--ac-2); stop-opacity: 0.75; }
.graf-stop-a.serie-2 { stop-color: var(--serie-2a); }
.graf-stop-b.serie-2 { stop-color: var(--serie-2b); }
.graf-dia { transition: opacity 0.2s, filter 0.2s; }
.graf-area.com-destaque .graf-dia { opacity: 0.45; }
.graf-area.com-destaque .graf-dia.ativo { opacity: 1; filter: drop-shadow(0 0 6px var(--acento-brilho)); }
.graf-destaque { fill: color-mix(in srgb, var(--texto) 6%, transparent); }
.graf-dica {
  position: absolute; top: -6px; left: 0; transform: translate(var(--x, 0), -100%);
  display: flex; flex-direction: column; gap: 2px; min-width: 136px;
  padding: 9px 11px; border-radius: 12px; pointer-events: none; z-index: 5;
  background: var(--vidro); border: 1px solid var(--borda); box-shadow: var(--sombra-2);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: 12.5px;
}
.graf-dica-dia { font-size: 12px; color: var(--texto-suave); margin-bottom: 2px; }
.graf-dica-linha { display: flex; align-items: center; gap: 6px; }
.graf-dica-linha strong { font-family: var(--fonte-titulo); font-size: 14px; font-variant-numeric: tabular-nums; }
.graf-dica-linha span:last-child { color: var(--texto-2); }
.graf-dica-chave { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.graf-alternar { margin-top: 4px; }
.graf-tabela { margin-top: 8px; max-height: 320px; overflow: auto; border: 1px solid var(--borda); border-radius: 12px; }

.ranking { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.ranking-item { display: flex; align-items: center; gap: 12px; }
.ranking-pos {
  width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--fonte-titulo); font-weight: 700; color: var(--texto-suave); font-variant-numeric: tabular-nums; font-size: 13px;
  background: var(--superficie-3);
}
.ranking-item:nth-child(1) .ranking-pos { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #3d2600; }
.ranking-item:nth-child(2) .ranking-pos { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #1f2937; }
.ranking-item:nth-child(3) .ranking-pos { background: linear-gradient(135deg, #fdba74, #c2410c); color: #2b1100; }
.ranking-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ranking-nome { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranking-sub { font-size: 12px; color: var(--texto-suave); }
.ranking-trilho { height: 7px; border-radius: 7px; background: var(--superficie-3); overflow: hidden; }
.ranking-barra {
  display: block; height: 100%; width: var(--p, 0%); border-radius: 7px;
  background: linear-gradient(90deg, var(--ac-1), var(--ac-2)); box-shadow: 0 0 10px var(--acento-brilho);
  transform-origin: left; animation: crescerX 0.9s var(--suave) both;
}
.ranking-item:nth-child(2) .ranking-barra { animation-delay: 0.05s; }
.ranking-item:nth-child(3) .ranking-barra { animation-delay: 0.1s; }
.ranking-item:nth-child(n+4) .ranking-barra { animation-delay: 0.15s; }
.ranking-valor { font-family: var(--fonte-titulo); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }

.cartao-perigo { border-color: var(--perigo-borda); background: radial-gradient(360px 160px at 100% 0%, var(--perigo-suave), transparent 70%), var(--cartao-fundo); }
.cartao-perigo .cartao-titulo .ico { color: var(--perigo-texto) !important; background: var(--perigo-suave); box-shadow: inset 0 0 0 1px var(--perigo-borda); }

/* ------------------------------------------------------------------ configurações: aparência */
.acentos { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
.acentos legend { padding: 0; margin-bottom: 8px; }
.cartao-aparencia .segmentado .seg-opcoes { display: grid; width: 100%; }
.cartao-aparencia .seg-texto { -webkit-hyphens: manual; hyphens: manual; }
.acentos-opcoes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.acento-opcao { position: relative; display: flex; min-width: 0; cursor: pointer; }
.acento-input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.acento-cartao {
  flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 10px 12px; border-radius: 14px; border: 1px solid var(--borda-forte); background: var(--superficie);
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.3s var(--mola);
}
.acento-opcao:hover .acento-cartao { transform: translateY(-1px); border-color: var(--acento-borda); }
.acento-amostra { width: 34px; height: 34px; flex: none; border-radius: 11px; display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.amostra-shinobi { background: linear-gradient(135deg, #ff8a2b, #ff5e0a); }
.amostra-whatsapp { background: linear-gradient(135deg, #25d366, #16b15a); }
.amostra-akatsuki { background: linear-gradient(135deg, #e11d48, #7c3aed); }
.acento-shuriken { width: 20px; height: 20px; fill: #151b36; transition: transform 0.6s var(--mola); }
.amostra-akatsuki .acento-shuriken { fill: #fff; }
.acento-opcao:hover .acento-shuriken, .acento-input:checked + .acento-cartao .acento-shuriken { transform: rotate(90deg); }
.acento-textos { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; flex: 1; }
.acento-nome { font-weight: 650; font-size: 14px; }
.acento-desc { font-size: 12px; color: var(--texto-suave); }
.acento-marca {
  width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 2px solid var(--borda-forte); color: transparent; transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.acento-marca .ico { width: 12px; height: 12px; stroke-width: 3.2; }
.acento-input:checked + .acento-cartao { border-color: var(--acento-forte); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac-1) 20%, transparent), 0 10px 22px -14px var(--acento-brilho); }
.acento-input:checked + .acento-cartao .acento-marca { background: linear-gradient(135deg, var(--ac-1), var(--ac-2)); border-color: transparent; color: var(--ac-sobre); }
.acento-input:focus-visible + .acento-cartao { outline: 2px solid var(--foco); outline-offset: 2px; }

/* ------------------------------------------------------------------ tela de login */
.pagina-login { min-height: 100vh; min-height: 100dvh; overflow-x: hidden; }
.login-cena { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.login-cena svg { width: 100%; height: 100%; max-width: none; }
/* claro: céu, sol e montanhas tingidos pela cor de destaque (laranja no Shinobi, verde no WhatsApp, rosa no Akatsuki) */
.cena-ceu-1 { stop-color: color-mix(in srgb, var(--ac-1) 8%, #fff8f0); }
.cena-ceu-2 { stop-color: color-mix(in srgb, var(--ac-1) 28%, #fff4ea); }
.cena-ceu-3 { stop-color: color-mix(in srgb, var(--ac-1) 46%, #fff0e4); }
.cena-halo-1 { stop-color: var(--ac-1); stop-opacity: 0.45; } .cena-halo-2 { stop-color: var(--ac-1); stop-opacity: 0; }
.cena-astro { fill: var(--ac-claro); }
.cena-estrelas { fill: #ffffff; opacity: 0; }
.cena-nuvem { fill: #ffffff; opacity: 0.7; }
.cena-monte-3 { fill: color-mix(in srgb, var(--ac-escuro) 22%, #fbe3cf); }
.cena-monte-2 { fill: color-mix(in srgb, var(--ac-escuro) 40%, #f6d2b6); }
.cena-monte-1 { fill: color-mix(in srgb, var(--ac-escuro) 58%, #efc3a0); }
.cena-shuriken { fill: var(--ac-1); opacity: 0.16; }
.cena-folha { fill: color-mix(in srgb, var(--ac-1) 55%, #6b3e1d); opacity: 0.55; }
.cena-nevoa-1 { stop-color: var(--fundo); stop-opacity: 0; } .cena-nevoa-2 { stop-color: var(--fundo); stop-opacity: 0.94; }
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) .cena-ceu-1 { stop-color: #070b17; }
  :root:not([data-tema="claro"]) .cena-ceu-2 { stop-color: #111a3a; }
  :root:not([data-tema="claro"]) .cena-ceu-3 { stop-color: #2a2347; }
  :root:not([data-tema="claro"]) .cena-astro { fill: #ffe9c7; }
  :root:not([data-tema="claro"]) .cena-estrelas { opacity: 0.85; }
  :root:not([data-tema="claro"]) .cena-nuvem { fill: #c9d4ff; opacity: 0.07; }
  :root:not([data-tema="claro"]) .cena-monte-3 { fill: #1a2247; }
  :root:not([data-tema="claro"]) .cena-monte-2 { fill: #131a39; }
  :root:not([data-tema="claro"]) .cena-monte-1 { fill: #0c1229; }
  :root:not([data-tema="claro"]) .cena-shuriken { fill: #dfe6ff; opacity: 0.09; }
  :root:not([data-tema="claro"]) .cena-folha { fill: var(--ac-1); opacity: 0.5; }
}
:root[data-tema="escuro"] .cena-ceu-1 { stop-color: #070b17; }
:root[data-tema="escuro"] .cena-ceu-2 { stop-color: #111a3a; }
:root[data-tema="escuro"] .cena-ceu-3 { stop-color: #2a2347; }
:root[data-tema="escuro"] .cena-astro { fill: #ffe9c7; }
:root[data-tema="escuro"] .cena-estrelas { opacity: 0.85; }
:root[data-tema="escuro"] .cena-nuvem { fill: #c9d4ff; opacity: 0.07; }
:root[data-tema="escuro"] .cena-monte-3 { fill: #1a2247; }
:root[data-tema="escuro"] .cena-monte-2 { fill: #131a39; }
:root[data-tema="escuro"] .cena-monte-1 { fill: #0c1229; }
:root[data-tema="escuro"] .cena-shuriken { fill: #dfe6ff; opacity: 0.09; }
:root[data-tema="escuro"] .cena-folha { fill: var(--ac-1); opacity: 0.5; }
.cena-girar { transform-box: fill-box; transform-origin: center; animation: girar 60s linear infinite; }
.cena-flutuar { animation: flutuar 16s ease-in-out infinite alternate; }
.cena-flutuar-2 { animation: flutuar 22s ease-in-out infinite alternate-reverse; }
.cena-brilhar { animation: piscar 3.2s ease-in-out infinite; }
.cena-brilhar-2 { animation: piscar 4.4s ease-in-out 1.2s infinite; }
.cena-cair { transform-box: fill-box; transform-origin: center; animation: cair 14s linear infinite; }
.cena-cair-2 { animation-duration: 18s; animation-delay: -6s; }
.cena-cair-3 { animation-duration: 21s; animation-delay: -11s; }
.cena-cair-4 { animation-duration: 16s; animation-delay: -3s; }

.login {
  position: relative; width: 100%; max-width: 1080px; min-height: 100vh; min-height: 100dvh; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: max(24px, env(safe-area-inset-top, 0px)) 16px max(24px, env(safe-area-inset-bottom, 0px));
}
.login-apresenta { display: none; }
@media (max-width: 959px) and (min-height: 700px) {
  .login { justify-content: flex-end; padding-bottom: max(28px, env(safe-area-inset-bottom, 0px)); }
}
.login-cartao {
  position: relative; width: 100%; max-width: 410px; padding: 30px 24px 26px;
  background: color-mix(in srgb, var(--superficie) 76%, transparent);
  border: 1px solid color-mix(in srgb, var(--borda-forte) 70%, transparent); border-radius: 26px;
  box-shadow: var(--sombra-3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
  animation: subir 0.6s var(--suave) both;
}
.login-cartao::before {
  content: ""; position: absolute; inset: 0 24px auto; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--ac-1), var(--ac-2), transparent);
}
.login-logo { display: block; width: 68px; height: 68px; margin: 0 auto 16px; filter: drop-shadow(0 12px 26px var(--acento-brilho)); }
.login-logo .logo { width: 100%; height: 100%; }
.login-titulo { text-align: center; font-family: var(--fonte-titulo); font-size: 25px; font-weight: 700; letter-spacing: -0.03em; }
.login-sub { text-align: center; color: var(--texto-2); margin: 6px 0 22px; }
.login-cartao .aviso { margin-bottom: 18px; }
.login-cartao .btn { margin-top: 8px; }
.campo-icone { position: relative; }
.campo-icone .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--texto-suave); pointer-events: none; transition: color 0.2s; }
.campo-icone input { padding-left: 44px; }
.campo-icone:focus-within .ico { color: var(--acento-forte); }
.login-rodape { color: var(--texto-2); font-size: 13px; display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--superficie) 60%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.login-rodape .ico { width: 15px; height: 15px; }
@media (min-width: 960px) {
  .login { flex-direction: row; justify-content: space-between; gap: 48px; padding: 32px 40px; }
  .login-apresenta { display: flex; flex-direction: column; gap: 20px; max-width: 470px; animation: subir 0.7s var(--suave) 0.1s both; }
  .login-marca { display: flex; align-items: center; gap: 12px; font-family: var(--fonte-titulo); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
  .login-marca .logo { width: 44px; height: 44px; filter: drop-shadow(0 8px 18px var(--acento-brilho)); }
  .login-chamada { font-family: var(--fonte-titulo); font-size: 44px; line-height: 1.08; font-weight: 700; letter-spacing: -0.04em; }
  /* degradê com contraste de texto grande (≥ 3:1) sobre o céu: tons escuros no claro, claros no escuro */
  .login-chamada span { background: linear-gradient(90deg, var(--acento-forte), var(--acento-2-forte)); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .login-texto { color: var(--texto-2); font-size: 16px; max-width: 420px; }
  .login-lista { list-style: none; display: flex; flex-direction: column; gap: 10px; }
  .login-lista li { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--texto); }
  .login-lista .ico { width: 30px; height: 30px; padding: 6px; border-radius: 10px; color: var(--acento-forte); background: color-mix(in srgb, var(--acento-suave) 85%, transparent); box-shadow: inset 0 0 0 1px var(--acento-borda); }
  .login-cartao { flex: none; }
  .login-rodape { position: absolute; left: 40px; bottom: 24px; }
}

/* ------------------------------------------------------------------ toque: alvos de pelo menos 40 px no celular */
@media (pointer: coarse), (max-width: 599px) {
  .btn-p { --altura: 40px; }
  .pilula { height: 40px; }
  .filtro { height: 40px; }
  .chave-compacta { min-height: 44px; }
  .seg-texto, .seg-filtro .seg-texto { min-height: 40px; }
  .fmt-btn, .var-btn { min-height: 40px; }
  .fmt-btn { min-width: 40px; }
  .voltar { min-height: 40px; }
  .toast-x { width: 40px; height: 40px; }
  .toast-acao { min-height: 40px; }
  .chip { height: 36px; }
  .chip-x { position: relative; width: 30px; height: 30px; }
  .chip-x::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
  /* link do grupo no meio do texto do evento: área de toque maior sem mexer no desenho */
  .evento-meta a.evento-grupo { padding-block: 11px; margin-block: -11px; }
  .cmd-chaves .chave-compacta, .cmd-cab > .chave { min-height: 40px; }
  .dias-semana .alt-opcoes { gap: 4px; }
}

/* ------------------------------------------------------------------ confete (celebração ao conectar) */
.confete { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 150; }

/* ------------------------------------------------------------------ animações */
.pagina { animation: entrarPagina 0.45s var(--suave) both; }
.aba-conteudo { animation: entrarPagina 0.35s var(--suave) both; }
/* entrada escalonada: só logo depois de montar a tela (a classe sai sozinha). --i = posição entre os irmãos
   (não herda, graças ao @property), e cada item atrasa 50 ms a mais que o anterior. */
@property --i { syntax: "<integer>"; inherits: false; initial-value: 0; }
.entrando :nth-child(2) { --i: 1; } .entrando :nth-child(3) { --i: 2; } .entrando :nth-child(4) { --i: 3; }
.entrando :nth-child(5) { --i: 4; } .entrando :nth-child(6) { --i: 5; } .entrando :nth-child(7) { --i: 6; }
.entrando :nth-child(8) { --i: 7; } .entrando :nth-child(n+9) { --i: 8; }
.entrando :is(.pagina-cab, .cartao, .grupo-item, .numero-bloco, .evento, .passo, .grupo-mini, .barra-ferramentas, .barra-filtros, .grupo-cab, .abas-moldura, .filtros, .tabela-membros tr, .cmd, .ranking-item, .vazio) {
  animation: subir 0.55s var(--suave) both; animation-delay: calc(var(--i) * 50ms);
}

/* elevação com brilho suave (só com mouse) */
@media (hover: hover) and (pointer: fine) {
  .grupo-item:hover, .lista-cartoes > .cartao:hover {
    transform: translateY(-3px); border-color: var(--acento-borda);
    box-shadow: var(--sombra-2), 0 0 0 1px var(--acento-borda), 0 16px 40px -22px var(--acento-brilho);
  }
  .numero-bloco:hover { transform: translateY(-2px); border-color: color-mix(in srgb, currentColor 30%, transparent); box-shadow: var(--sombra-1); }
}

@keyframes entrarPagina { from { opacity: 0; transform: translateY(10px); } }
@keyframes subir { from { opacity: 0; transform: translateY(14px) scale(0.985); } }
@keyframes surgir { from { opacity: 0; transform: scale(0.6); } }
@keyframes aparecer { from { opacity: 0; } }
@keyframes girar { to { transform: rotate(360deg); } }
@keyframes brilho { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@keyframes pulso { 0% { transform: scale(0.55); opacity: 0.75; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes pulsoQuadrado { 0% { transform: scale(0.92); opacity: 0.7; } 100% { transform: scale(1.18); opacity: 0; } }
@keyframes piscar { 50% { opacity: 0.35; } }
@keyframes bolha { from { transform: scale(0.4); opacity: 0; } }
@keyframes crescerX { from { transform: scaleX(0); } }
@keyframes crescerBarra { from { width: var(--p0, 0%); } }
@keyframes entrarToast { from { opacity: 0; transform: translateY(18px) scale(0.96); } }
@keyframes entrarToastLado { from { opacity: 0; transform: translateX(36px) scale(0.96); } }
@keyframes sairToast { to { opacity: 0; transform: translateY(10px) scale(0.97); } }
@keyframes entrarModal { from { opacity: 0; transform: translateY(14px) scale(0.92); } }
@keyframes subirFolha { from { transform: translateY(100%); } }
@keyframes respirarMoldura { 50% { transform: scale(1.025); opacity: 0.8; } }
@keyframes varrer { from { top: 26px; } to { top: calc(100% - 28px); } }
@keyframes varrerIl { from { transform: translateY(0); } to { transform: translateY(56px); } }
@keyframes tracejar { to { stroke-dashoffset: -18; } }
@keyframes flutuar { from { transform: translateX(-30px); } to { transform: translateX(40px); } }
@keyframes cair {
  0% { transform: translate(0, -160px) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translate(-220px, 1100px) rotate(620deg); opacity: 0; }
}

/* ------------------------------------------------------------------ movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
    transition-duration: 0.01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
  }
  .qr-varredura, .il-varredura, .cena-folha { display: none; }
}
@media (forced-colors: active) {
  .chave-trilho { border: 1px solid CanvasText; }
  .chave-input:checked + .chave-trilho { background: Highlight; }
  .selo, .pilula { border: 1px solid CanvasText; }
  body::before, body::after { display: none; }
}
