:root {
  --ink: #0b1324;
  --muted: #475467;
  --line: #e4e8f0;
  --accent: #3d66e6;
  --accent-2: #2f56d6;
  --accent-soft: #eef3ff;
  --fundo: #ece2d6;
  --vidro: rgb(255 255 255 / 0.86);
  --sombra: 0 0 0 1px rgb(11 19 36 / 0.07), 0 12px 32px -14px rgb(61 102 230 / 0.35);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Unbounded", "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { background: var(--fundo); color: var(--ink); font: 500 15px/1.4 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
#cena { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ilhas de vidro (mesmo desenho da navegação do guia) */
.ilha { position: fixed; z-index: 5; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px; background: var(--vidro); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); box-shadow: var(--sombra); }
.topo { top: max(12px, env(safe-area-inset-top)); width: min(720px, calc(100% - 24px)); border-radius: 999px; padding-left: 16px; }
.base { bottom: max(12px, env(safe-area-inset-bottom)); width: min(720px, calc(100% - 24px)); border-radius: 26px; flex-wrap: wrap; justify-content: center; }
.marca { display: grid; place-items: center; width: 36px; height: 36px; margin-left: -8px; border-radius: 50%; color: var(--ink); text-decoration: none; }
.marca:hover { background: rgb(11 19 36 / 0.06); }
.marca-txt { font-family: var(--display); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.campo { display: block; min-width: 0; }
.escolha { flex: 1; }
select { appearance: none; -webkit-appearance: none; width: 100%; min-height: 44px; padding: 0 40px 0 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1324' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 14px; color: var(--ink); font: 650 0.92rem var(--font); text-overflow: ellipsis; cursor: pointer; }
.btn, .chip { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 999px; font: 700 0.92rem var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform 0.3s var(--ease), background 0.2s, color 0.2s, border-color 0.2s; }
.btn { border: 0; padding: 0 20px; background: var(--ink); color: #fff; box-shadow: 0 10px 26px -12px rgb(61 102 230 / 0.55); }
.btn:hover { background: #1c2740; }
.btn:active, .chip:active { transform: scale(0.97); }
.principal { padding-left: 16px; }
.chip { border: 1px solid var(--line); padding: 0 16px; background: #fff; color: var(--ink); font-weight: 650; }
.chip:hover { border-color: #c9d1e0; }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: #c8d6ff; color: var(--accent-2); }
.btn:disabled, .chip:disabled { opacity: 0.45; cursor: default; }
.baixar { flex: none; }
.contagem { padding: 0 10px; color: var(--muted); font-weight: 650; font-size: 0.88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.contagem b { color: var(--ink); }
.andar { width: 150px; }

/* cartão do escritório (desktop) */
.info { position: fixed; z-index: 4; left: 16px; top: 84px; width: min(320px, calc(100% - 32px)); padding: 16px 18px; border-radius: 22px; background: var(--vidro); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); box-shadow: var(--sombra); }
.info h1 { margin: 0 0 6px; font-size: 1.05rem; line-height: 1.25; letter-spacing: -0.015em; }
.info p { margin: 0 0 12px; color: var(--muted); font-size: 0.88rem; }
.info ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.info li { padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-2); font-size: 0.8rem; font-weight: 650; }

.carregando { position: fixed; inset: 0; z-index: 4; display: grid; place-items: center; pointer-events: none; transition: opacity 0.3s; }
.carregando.fora { opacity: 0; }
.carregando div { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: var(--vidro); box-shadow: var(--sombra); font-weight: 650; font-variant-numeric: tabular-nums; }
.carregando i { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--accent); animation: gira 0.8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

.aviso { position: fixed; z-index: 6; left: 50%; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 76px); max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 0.9rem; font-weight: 600; text-align: center; opacity: 0; transform: translate(-50%, 8px); transition: opacity 0.3s, transform 0.3s var(--ease); pointer-events: none; }
.aviso.on { opacity: 1; transform: translate(-50%, 0); }
.dica { position: fixed; z-index: 3; left: 50%; transform: translateX(-50%); top: calc(max(12px, env(safe-area-inset-top)) + 62px); margin: 0; width: max-content; max-width: calc(100% - 32px); padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / 0.6); color: var(--muted); font-size: 0.8rem; text-align: center; transition: opacity 0.6s; }
.dica.fora { opacity: 0; }
.sem-3d { position: fixed; inset: auto 16px 50% 16px; text-align: center; font-weight: 650; }

@media (max-width: 900px) {
  .info { display: none; }
}
@media (max-width: 640px) {
  .topo { padding-left: 12px; }
  .marca-txt { font-size: 0.7rem; letter-spacing: 0.06em; }
  /* no site (voltar + baixar) o nome do escritório precisa do espaço: some o rótulo e o baixar vira ícone */
  .topo:has(.baixar:not([hidden])) .marca-txt { display: none; }
  .baixar { width: 44px; padding: 0; }
  .baixar span { display: none; }
  .base { gap: 6px; }
  .principal { flex: 1 1 60%; }
  .andar { width: auto; flex: 1 1 110px; }
  .base .chip { padding: 0 13px; }
  .dica { font-size: 0.74rem; }
  .aviso { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 126px); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---- etiquetas dos agentes (nome, estado e tarefa) ---- */
#etiquetas { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 4; }
.et { position: absolute; left: 0; top: 0; display: grid; justify-items: center; gap: 2px; max-width: 190px; padding: 5px 9px; border-radius: 12px; background: rgb(255 255 255 / .94); color: #1b1630; font: 600 12px/1.25 system-ui, sans-serif; box-shadow: 0 6px 18px -8px rgb(40 20 60 / .55); border: 2px solid #8b7fa6; will-change: transform; }
.et.fora { display: none; }
.et b { font-weight: 700; }
.et-estado { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #5b5470; }
.et-bal { font-weight: 500; color: #3a3350; text-align: center; overflow-wrap: anywhere; }
.et.trabalhando { border-color: #3d66e6; } .et.trabalhando .et-estado { color: #2748b8; }
.et.concluido { border-color: #12805c; background: #e7f6ef; } .et.concluido .et-estado { color: #0b5d43; }
.et.erro { border-color: #c0362c; background: #fdecea; } .et.erro .et-estado { color: #a1281f; }
@media (max-width: 760px) { .et { max-width: 140px; font-size: 11px; padding: 4px 7px; } }

/* ---- etiquetas clicáveis e painel do agente ---- */
.et { pointer-events: auto; cursor: pointer; }
.et:focus-visible, .et.sel { outline: 3px solid #7c3aed; outline-offset: 2px; }
#painel-agente { position: fixed; right: 12px; top: 72px; z-index: 6; width: min(320px, calc(100vw - 24px)); max-height: calc(100vh - 160px); overflow: auto; padding: 14px 16px; border-radius: 16px; background: rgb(255 255 255 / .96); color: #1b1630; font: 500 13px/1.4 system-ui, sans-serif; box-shadow: 0 14px 34px -14px rgb(40 20 60 / .6); }
#painel-agente[hidden] { display: none; }
#painel-agente header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#painel-agente h2 { margin: 0; font-size: 16px; }
#pa-fechar { min-width: 44px; min-height: 44px; border: 0; border-radius: 12px; background: #efeaf8; color: #1b1630; font-size: 22px; line-height: 1; cursor: pointer; }
#pa-funcao { margin: 2px 0 10px; color: #5b5470; }
#painel-agente dl { margin: 0; display: grid; gap: 2px; }
#painel-agente dt { margin-top: 8px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #5b5470; }
#painel-agente dd { margin: 0; overflow-wrap: anywhere; }
.pa-nota { margin: 12px 0 0; font-size: 11.5px; color: #6b6480; }
@media (max-width: 760px) { #painel-agente { top: auto; right: 8px; left: 8px; bottom: 84px; width: auto; max-height: 45vh; } }
@media (prefers-reduced-motion: reduce) { .et { transition: none; } }

/* ---- bloco da equipe (sempre visível), como no painel 2D ---- */
#info { display: none; }
#equipe { position: fixed; left: 12px; top: 72px; z-index: 5; width: min(330px, calc(100vw - 24px)); max-height: calc(100vh - 170px); display: flex; flex-direction: column; border-radius: 16px; background: rgb(255 255 255 / .95); color: #1b1630; font: 500 13px/1.35 system-ui, sans-serif; box-shadow: 0 14px 34px -14px rgb(40 20 60 / .6); overflow: hidden; }
#equipe[hidden] { display: none; }
#equipe header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 8px 14px; border-bottom: 1px solid #ece7f6; }
#equipe h2 { margin: 0; font-size: 15px; }
#equipe header p { margin: 2px 0 0; font-size: 11.5px; color: #5b5470; }
#eq-recolher { min-width: 44px; min-height: 44px; border: 0; border-radius: 12px; background: #efeaf8; color: #1b1630; font-size: 20px; line-height: 1; cursor: pointer; }
#eq-lista { list-style: none; margin: 0; padding: 8px; display: grid; gap: 6px; overflow: auto; }
#equipe.recolhido #eq-lista { display: none; }
.eq-card { width: 100%; display: grid; grid-template-columns: 14px 1fr auto; align-items: start; gap: 9px; padding: 8px 10px; border: 2px solid transparent; border-radius: 12px; background: #f6f3fb; color: inherit; font: inherit; text-align: left; cursor: pointer; min-height: 44px; }
.eq-card:hover { background: #efeaf8; }
.eq-card:focus-visible { outline: 3px solid #7c3aed; outline-offset: 1px; }
.eq-cor { width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; background: #9aa0b4; }
.eq-txt { display: grid; gap: 1px; min-width: 0; }
.eq-txt b { font-size: 13.5px; }
.eq-cargo { font-size: 11.5px; color: #5b5470; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eq-bal { font-size: 11.5px; color: #3a3350; overflow-wrap: anywhere; }
.eq-st { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; background: #e4e0ee; color: #4b4560; white-space: nowrap; }
.eq-card[data-estado="trabalhando"] { border-color: #3d66e6; } .eq-card[data-estado="trabalhando"] .eq-st { background: #3d66e6; color: #fff; }
.eq-card[data-estado="concluido"] { border-color: #12805c; background: #e7f6ef; } .eq-card[data-estado="concluido"] .eq-st { background: #12805c; color: #fff; }
.eq-card[data-estado="erro"] { border-color: #c0362c; background: #fdecea; } .eq-card[data-estado="erro"] .eq-st { background: #c0362c; color: #fff; }
@media (max-width: 760px) { #equipe { top: 64px; max-height: 50vh; } }

/* ---- edição do agente e janela da identidade ---- */
.pa-acoes { display: flex; gap: 6px; }
#pa-editar { min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: #7c3aed; color: #fff; font: 700 13px system-ui, sans-serif; cursor: pointer; }
#pa-form, #ee-form { display: grid; gap: 10px; }
#pa-form label, #ee-form label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: #3a3350; }
#pa-form input[type="text"], #pa-form input:not([type]), #pa-form select, #ee-form input:not([type]), #ee-form input[type="text"], #ee-form select { min-height: 44px; padding: 0 10px; border: 2px solid #d9d3e8; border-radius: 10px; background: #fff; color: #1b1630; font: 500 14px system-ui, sans-serif; }
#pa-form input:focus-visible, #pa-form select:focus-visible, #ee-form input:focus-visible, #ee-form select:focus-visible { outline: 3px solid #7c3aed; outline-offset: 1px; }
input[type="color"] { width: 100%; min-height: 44px; padding: 3px; border: 2px solid #d9d3e8; border-radius: 10px; background: #fff; cursor: pointer; }
.pf-cores, .ee-cores { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pf-botoes, .ee-botoes, .ee-mais { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-botoes button, .ee-botoes button, .ee-mais button, .ee-logo button { min-height: 44px; padding: 0 14px; border: 2px solid #d9d3e8; border-radius: 12px; background: #fff; color: #1b1630; font: 700 13px system-ui, sans-serif; cursor: pointer; }
#pf-salvar, #ee-salvar { background: #7c3aed; border-color: #7c3aed; color: #fff; }
#editor-esc { width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 18px 20px; border: 0; border-radius: 18px; background: #fff; color: #1b1630; box-shadow: 0 24px 60px -20px rgb(20 10 40 / .7); overflow: auto; font: 500 13px/1.4 system-ui, sans-serif; }
#editor-esc::backdrop { background: rgb(20 10 40 / .45); }
#editor-esc h2 { margin: 0 0 4px; font-size: 18px; }
#editor-esc fieldset { margin: 0; padding: 10px; border: 2px solid #ece7f6; border-radius: 12px; }
#editor-esc legend { padding: 0 6px; font-size: 12px; font-weight: 700; }
.ee-logo { display: grid; gap: 8px; }
.ee-check { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 8px; min-height: 44px; }
.ee-check input { width: 22px; height: 22px; }
#ee-msg { margin: 0; min-height: 1.4em; color: #5b5470; }
#editor-esc summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }

/* ---- ferramentas no bloco da equipe e controles do boneco do zero ---- */
.eq-tools { font-size: 10.5px; color: #6b6480; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eq-tools:empty { display: none; }
#pf-zero { display: grid; gap: 10px; }
#pf-zero[hidden] { display: none; }
#pf-zero input[type="range"] { width: 100%; min-height: 32px; accent-color: #7c3aed; }
.pf-acess { display: flex; flex-wrap: wrap; gap: 6px 14px; }
#painel-agente .pf-check { display: flex; align-items: center; gap: 8px; min-height: 36px; font-weight: 600; }
#painel-agente .pf-check input { width: 20px; height: 20px; }
#pa-tools, #pa-rel, #pa-skills { font-size: 12.5px; }

/* ---- janela de Gestão ---- */
#gestao { width: min(980px, calc(100vw - 20px)); height: min(760px, calc(100vh - 20px)); padding: 0; border: 0; border-radius: 18px; background: #fff; color: #1b1630; box-shadow: 0 24px 60px -20px rgb(20 10 40 / .7); font: 500 13.5px/1.45 system-ui, sans-serif; overflow: hidden; }
#gestao[open] { display: flex; flex-direction: column; }
#gestao::backdrop { background: rgb(20 10 40 / .5); }
.gs-topo { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #ece7f6; }
.gs-topo h2 { margin: 0; font-size: 18px; }
.gs-x { min-width: 44px; min-height: 44px; border: 0; border-radius: 12px; background: #efeaf8; color: #1b1630; font-size: 22px; cursor: pointer; }
.gs-abas { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; border-bottom: 1px solid #ece7f6; }
.gs-aba { min-height: 44px; padding: 0 14px; border: 2px solid transparent; border-radius: 12px; background: #f3eff9; color: #3a3350; font: 700 13px system-ui, sans-serif; white-space: nowrap; cursor: pointer; }
.gs-aba[aria-selected="true"] { background: #7c3aed; color: #fff; }
.gs-aba:focus-visible, .gs-btn:focus-visible, .gs-cab:focus-visible { outline: 3px solid #7c3aed; outline-offset: 2px; }
.gs-corpo { flex: 1; overflow: auto; padding: 14px 16px 24px; }
.gs-corpo h3 { margin: 18px 0 6px; font-size: 15px; }
.gs-corpo h4 { margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #5b5470; }
.gs-ajuda { margin: 0 0 12px; color: #4b4560; }
.gs-pe { margin: 8px 0 0; font-size: 11.5px; color: #6b6480; overflow-wrap: anywhere; }
.gs-cartoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; align-items: start; }
.gs-cartao { padding: 10px 12px; border: 2px solid #ece7f6; border-radius: 14px; background: #fbf9fe; }
.gs-cab { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.gs-cor { width: 14px; height: 14px; border-radius: 50%; background: #9aa0b4; }
.gs-nome { display: grid; }
.gs-nome small { color: #5b5470; }
.gs-modelo { font-size: 11px; color: #5b5470; white-space: nowrap; }
.gs-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.gs-chip { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #e4e0ee; color: #3a3350; }
.gs-chip.risco-baixo { background: #dff3e9; color: #0b5d43; }
.gs-chip.risco-medio { background: #fdf0d2; color: #7a5200; }
.gs-chip.risco-alto { background: #fddcd8; color: #a1281f; }
.gs-vazio { color: #6b6480; font-size: 12px; }
.gs-chama { margin: 4px 0 0; font-size: 12px; color: #4b4560; }
.gs-detalhe { margin-top: 8px; padding-top: 6px; border-top: 1px dashed #d9d3e8; font-size: 12.5px; }
.gs-detalhe[hidden] { display: none; }
.gs-detalhe ul, .gs-corpo ul, .gs-corpo ol { margin: 4px 0; padding-left: 20px; }
.gs-legenda p { margin: 6px 0; }
.gs-grafo { display: block; width: 100%; height: auto; max-height: 460px; margin: 4px 0 8px; background: #fbf9fe; border: 2px solid #ece7f6; border-radius: 14px; }
.gs-g-nome { font: 700 13px system-ui, sans-serif; fill: #1b1630; }
.gs-g-sub { font: 500 10.5px system-ui, sans-serif; fill: #5b5470; }
.gs-conj { margin: 0 0 10px; padding: 10px 12px; border: 2px solid #ece7f6; border-radius: 12px; }
.gs-conj legend { padding: 0 6px; font-weight: 700; }
.gs-linha { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0; }
.gs-marca { display: flex; align-items: flex-start; gap: 8px; min-height: 36px; padding: 4px 0; font-weight: 500; cursor: pointer; }
.gs-marca input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.gs-ferr-item { padding: 6px 8px; border-radius: 10px; }
.gs-ferr-item small { display: block; color: #5b5470; font-weight: 500; }
.gs-ferr-item.risco-alto { background: #fff3f1; }
.gs-form { display: grid; gap: 12px; }
.gs-campo { display: grid; gap: 4px; font-weight: 700; }
.gs-campo span { font-size: 12.5px; }
.gs-campo small { color: #5b5470; font-weight: 500; }
.gs-form input[type="text"], .gs-form input[type="number"], .gs-form select, .gs-form textarea { min-height: 44px; padding: 8px 10px; border: 2px solid #d9d3e8; border-radius: 10px; background: #fff; color: #1b1630; font: 500 14px system-ui, sans-serif; width: 100%; box-sizing: border-box; }
.gs-form textarea { resize: vertical; }
.gs-form input:focus-visible, .gs-form select:focus-visible, .gs-form textarea:focus-visible { outline: 3px solid #7c3aed; outline-offset: 1px; }
.gs-duas { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.gs-confirma { display: grid; gap: 4px; }
.gs-aviso { margin: 0; padding: 8px 10px; border-radius: 10px; background: #fdf0d2; color: #7a5200; font-weight: 700; }
.gs-conf { padding: 8px 10px; border: 2px solid #f1b8b0; border-radius: 10px; background: #fff3f1; }
.gs-acoes { display: flex; gap: 8px; }
.gs-btn { min-height: 44px; padding: 0 18px; border: 2px solid #d9d3e8; border-radius: 12px; background: #fff; color: #1b1630; font: 700 14px system-ui, sans-serif; cursor: pointer; }
.gs-btn.principal { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.gs-btn:disabled { opacity: .55; cursor: wait; }
.gs-msg { margin: 6px 0 0; min-height: 1.3em; color: #4b4560; overflow-wrap: anywhere; }
.gs-msg.ok { color: #0b5d43; font-weight: 700; }
.gs-msg.erro { color: #a1281f; font-weight: 700; }
@media (max-width: 760px) { #gestao { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; } .gs-cartoes { grid-template-columns: 1fr; } }

/* ---- entrada no prédio ---- */
#login { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgb(20 10 40 / .78); backdrop-filter: blur(6px); font: 500 14px/1.45 system-ui, sans-serif; overflow: auto; }
#login[hidden] { display: none; }
.lg-cartao { width: min(440px, 100%); padding: 22px 22px 18px; border-radius: 18px; background: #fff; color: #1b1630; box-shadow: 0 24px 60px -20px rgb(0 0 0 / .7); }
.lg-form { display: grid; gap: 12px; }
.lg-form h2 { margin: 0; font-size: 20px; }
.lg-texto { margin: 0; color: #4b4560; }
.lg-campo { display: grid; gap: 4px; font-weight: 700; font-size: 13px; }
.lg-campo small { color: #5b5470; font-weight: 500; }
.lg-campo input, .lg-campo select { min-height: 46px; padding: 0 12px; border: 2px solid #d9d3e8; border-radius: 10px; background: #fff; color: #1b1630; font: 500 15px system-ui, sans-serif; }
.lg-campo input:focus-visible, .lg-campo select:focus-visible, .lg-btn:focus-visible, .lg-empresa:focus-visible { outline: 3px solid #7c3aed; outline-offset: 2px; }
.lg-btn { min-height: 46px; padding: 0 18px; border: 0; border-radius: 12px; background: #7c3aed; color: #fff; font: 700 15px system-ui, sans-serif; cursor: pointer; }
.lg-btn.secundario { background: #efeaf8; color: #1b1630; }
.lg-btn:disabled { opacity: .6; cursor: wait; }
.lg-msg { margin: 0; min-height: 1.3em; color: #a1281f; font-weight: 700; overflow-wrap: anywhere; }
.lg-lista { display: grid; gap: 8px; }
.lg-empresa { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 2px solid #e4def2; border-radius: 12px; background: #fbf9fe; color: #1b1630; font: 700 15px system-ui, sans-serif; text-align: left; cursor: pointer; }
.lg-empresa:hover { border-color: #7c3aed; }
.lg-bolinha { width: 16px; height: 16px; border-radius: 50%; flex: none; }

/* ---- rotinas, aprovações e canais ---- */
.gs-servico { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; font-weight: 700; }
.gs-servico.ligado { background: #dff3e9; color: #0b5d43; }
.gs-servico.desligado { background: #fdf0d2; color: #7a5200; }
.gs-cartao.desligada { opacity: .65; }
.gs-agenda { padding: 10px 12px; border: 2px dashed #d9d3e8; border-radius: 12px; display: grid; gap: 8px; }
.gs-agenda[hidden] { display: none; }
.gs-resumo { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.gs-cartao.aprov-aprovado { border-color: #8fd6b6; }
.gs-cartao.aprov-reprovado { border-color: #f1b8b0; opacity: .8; }
.gs-cartao.aprov-pendente { border-color: #7c3aed; }
.gs-editor { margin-top: 8px; padding: 8px 0; }
.gs-acoes { flex-wrap: wrap; }
.gs-vazio { color: #6b6480; }

/* ---- calendário editorial ---- */
.cal-topo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.cal-topo .gs-btn { min-width: 48px; }
.cal-mes { flex: 1; min-width: 150px; margin: 0; text-align: center; text-transform: capitalize; font-size: 18px; }
.cal-legenda { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.cal-grade { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-cab { padding: 4px 0; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #5b5470; }
.cal-dia { min-height: 96px; padding: 4px; display: flex; flex-direction: column; gap: 3px; border: 2px solid #ece7f6; border-radius: 10px; background: #fbf9fe; min-width: 0; }
.cal-dia.vazio { border-color: transparent; background: none; }
.cal-dia.hoje { border-color: #7c3aed; background: #f4efff; }
.cal-num { align-self: flex-start; min-width: 32px; min-height: 28px; padding: 0 6px; border: 0; border-radius: 8px; background: none; color: #3a3350; font: 700 13px system-ui, sans-serif; cursor: pointer; }
.cal-num:hover, .cal-num:focus-visible { background: #e4def2; outline: 2px solid #7c3aed; outline-offset: 1px; }
.cal-chip { display: block; max-width: 100%; padding: 2px 7px; border: 0; border-radius: 999px; font: 700 11px/1.5 system-ui, sans-serif; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: #e4e0ee; color: #3a3350; }
button.cal-chip { cursor: pointer; }
button.cal-chip:focus-visible { outline: 2px solid #1b1630; outline-offset: 1px; }
.cal-mais { font-size: 11px; color: #5b5470; padding-left: 4px; }
.st-ideia { background: #e4e0ee; color: #3a3350; }
.st-texto { background: #dbe6ff; color: #1d3a8a; }
.st-arte { background: #ecdcff; color: #5b1fa8; }
.st-revisao { background: #fdf0d2; color: #7a5200; }
.st-aprovado { background: #dff3e9; color: #0b5d43; }
.st-agendado { background: #cdeff0; color: #0b5560; }
.st-publicado { background: #0b5d43; color: #fff; }
.st-cancelado { background: #fddcd8; color: #a1281f; text-decoration: line-through; }
.cal-editor:not(:empty) { margin-top: 12px; padding: 12px 14px; border: 2px solid #7c3aed; border-radius: 14px; background: #fff; }
.cal-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cal-linha { width: 100%; display: grid; grid-template-columns: 110px 1fr auto auto; align-items: center; gap: 10px; min-height: 44px; padding: 4px 12px; border: 2px solid #ece7f6; border-radius: 12px; background: #fbf9fe; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cal-linha:hover, .cal-linha:focus-visible { border-color: #7c3aed; outline: none; }
.cal-quando { font-weight: 700; font-size: 12.5px; text-transform: capitalize; }
.cal-tit { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-rede { font-size: 11.5px; color: #5b5470; }
.cal-notion { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 12px; border-radius: 12px; background: #f3eff9; font-size: 12.5px; }
@media (max-width: 760px) {
  .cal-dia { min-height: 54px; padding: 2px; }
  .cal-dia .cal-chip { font-size: 0; padding: 0; width: 100%; height: 8px; border-radius: 4px; }
  .cal-dia .cal-mais { display: none; }
  .cal-linha { grid-template-columns: 1fr auto; }
  .cal-linha .cal-quando { grid-column: 1; } .cal-linha .cal-tit { grid-column: 1; } .cal-linha .cal-rede { display: none; }
}

/* ---- carrosséis ---- */
.car-blocos { display: grid; gap: 10px; }
.car-bloco legend { font-weight: 800; }
.car-codigo { font-family: Consolas, "Cascadia Code", monospace; }
.car-previa { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.car-previa:empty::after { content: "As imagens aparecem aqui depois de gerar."; color: #6b6480; }
.car-fig { margin: 0; display: grid; gap: 6px; }
.car-fig img { width: 100%; height: auto; border: 2px solid #ece7f6; border-radius: 10px; background: #17112b; }
.car-fig a { text-decoration: none; text-align: center; display: grid; align-items: center; }
