/* RecNotary — estilos
   Paleta da marca: azul-marinho da câmera e de "NOTARY", vinho da pena e de "REC",
   marrom do slogan e papel creme do fundo da logo. */
:root {
  --ink: #132845;          /* azul-marinho (marca) */
  --ink-2: #2A3F5F;
  --paper: #F8F5EF;        /* papel creme (fundo da logo) */
  --surface: #FFFFFF;
  --line: #DCD5CA;
  --line-soft: #ECE7DF;
  --muted: #5F6370;
  --seal: #701B3A;         /* vinho (marca) */
  --seal-deep: #521229;
  --brass: #4A281E;        /* marrom do slogan (integridade, selos) */
  --ok: #2E6A4C;
  --warn: #8A5A00;
  --studio: #0B1A30;
  --studio-2: #132845;
  --studio-line: #26395A;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r-sm: 4px;
  --r: 8px;
  --r-lg: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 15px/1.5 var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: 2rem; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
a { color: var(--ink); text-underline-offset: 3px; }
code, .hash { font-family: var(--mono); font-size: .82em; word-break: break-all; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #2F5B9A; outline-offset: 2px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: #fff; padding: 8px 12px; }

/* ---------- Estrutura ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.nav {
  background: var(--surface);
  border-left: 7px solid var(--ink);          /* lombada do livro */
  border-right: 1px solid var(--line);
  padding: 22px 0 18px;
  display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; padding: 0 18px; }
.brand-logo { width: 100%; max-width: 190px; height: auto; display: block; }
.nav nav { display: flex; flex-direction: column; }
.nav nav a {
  padding: 9px 22px; text-decoration: none; color: var(--ink-2); font-weight: 500;
  border-left: 3px solid transparent; display: flex; align-items: center; justify-content: space-between;
}
.nav nav a:hover { background: var(--paper); }
.nav nav a[aria-current="page"] { border-left-color: var(--seal); color: var(--ink); font-weight: 700; background: var(--paper); }
.badge { background: var(--seal); color: #fff; font-size: .72rem; font-weight: 700; border-radius: 10px; padding: 1px 7px; }

/* ---------- Topo: usuário logado ---------- */
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; justify-content: flex-end; align-items: center; gap: 12px;
  padding: 12px clamp(18px, 4vw, 48px); background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
body[data-view="gravar"] .topbar { display: none; }
.user-box { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 10px; background: none; border: 1px solid transparent; border-radius: 999px;
  padding: 4px 10px 4px 4px; font: 500 .93rem var(--sans); color: var(--ink); cursor: pointer;
}
.user-btn:hover, .user-btn[aria-expanded="true"] { background: var(--paper); border-color: var(--line); }
.user-btn .hello strong { font-weight: 700; }
.chev { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.user-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; overflow: hidden;
  background: var(--seal); color: #fff; font: 700 .82rem var(--sans); letter-spacing: .03em;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.sm { width: 30px; height: 30px; font-size: .72rem; }
.avatar.lg { width: 76px; height: 76px; font-size: 1.5rem; }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; z-index: 30;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px;
  box-shadow: 0 14px 40px rgba(19, 40, 69, .16);
}
.um-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.um-head p { margin: 0; font-size: .86rem; word-break: break-all; }
.um-head p:first-child { font-weight: 700; font-size: .93rem; }
.user-menu [role="menuitem"] {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: var(--r-sm);
  background: none; font: 500 .93rem var(--sans); color: var(--ink); cursor: pointer; text-align: left;
}
.user-menu [role="menuitem"]:hover, .user-menu [role="menuitem"]:focus-visible { background: var(--paper); outline: none; }
.user-menu [role="menuitem"] svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.user-menu .um-sair { color: var(--seal); }

.meus-dados .md-perfil { display: flex; align-items: center; gap: 18px; }
.md-nome { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--ink) !important; }
.md-perfil p { margin: 0 0 2px; }
.md-foto-acoes { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.md-senha { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.md-senha h3, #f-troca h2 { margin: 0; }
.md-senha > label[for], #f-troca > label[for] { margin-bottom: -5px; }
#f-troca .pwd-toggle svg, .md-senha .pwd-toggle svg { width: 20px; height: 20px; }

.u-cell { display: flex; align-items: center; gap: 10px; }
label.inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }
label.inline input { width: 18px; height: 18px; min-height: 0; accent-color: var(--ink); }
.papeis { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.papeis legend { font-size: .86rem; font-weight: 600; color: var(--ink-2); padding: 0 6px; }
.temp-pass { font: 700 1.4rem var(--mono); letter-spacing: .08em; text-align: center; padding: 14px; border: 1px dashed var(--seal); border-radius: var(--r-sm); color: var(--ink) !important; background: var(--paper); user-select: all; }

.main { padding: 30px clamp(18px, 4vw, 48px) 60px; max-width: 1240px; width: 100%; outline: none; }
.page-head { margin-bottom: 26px; max-width: 72ch; }
.lede { color: var(--muted); font-size: 1.02rem; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .86rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 12px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 .93rem var(--sans); padding: 10px 18px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  text-decoration: none; cursor: pointer; min-height: 40px;
}
.btn:hover { border-color: var(--ink-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--ink-2); }
.btn.danger { background: var(--seal); border-color: var(--seal); color: #fff; }
.btn.ghost { background: transparent; }
.btn.ghost-light { background: transparent; color: #E8EDF5; border-color: var(--studio-line); }
.btn.lg { padding: 13px 26px; font-size: 1rem; }
.btn.sm { padding: 5px 12px; min-height: 32px; font-size: .85rem; }
.link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* ---------- Formulários ---------- */
label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .86rem; color: var(--ink-2); }
input, select, textarea {
  font: 400 .95rem var(--sans); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px; min-height: 40px; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink-2); outline: 2px solid #2F5B9A40; }
input[aria-invalid="true"] { border-color: var(--seal); background: #FDF4F4; }
.form fieldset { border: 0; border-top: 1px solid var(--line); padding: 18px 0 8px; margin: 0 0 8px; }
.form legend { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; padding-right: 12px; }
.grid { display: grid; gap: 14px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.span2 { grid-column: span 2; }
.check { flex-direction: row; align-items: flex-start; gap: 12px; font-weight: 400; font-size: .95rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brass); padding: 14px 16px; border-radius: var(--r-sm); max-width: 80ch; }
.check input { width: 20px; height: 20px; min-height: 0; margin-top: 2px; flex: none; accent-color: var(--ink); }
.parte { display: grid; grid-template-columns: 2fr 1.2fr 1fr auto; gap: 10px; align-items: end; padding: 10px 0; border-bottom: 1px dashed var(--line-soft); }
.parte .rm { min-height: 40px; }
.parte-flags { grid-column: 1 / -1; display: flex; gap: 22px; flex-wrap: wrap; }
.parte-flags label.inline { font-size: .9rem; }

/* Modalidade do ato (físico / híbrido) */
.modalidade { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.modalidade .lbl { width: 100%; font-weight: 600; font-size: .86rem; color: var(--ink-2); }
.modalidade .opt {
  flex: 1 1 200px; flex-direction: row; align-items: flex-start; gap: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; font-weight: 400;
}
.modalidade .opt:has(input:checked) { border-color: var(--seal); box-shadow: inset 0 0 0 1px var(--seal); background: #FCF7F9; }
.modalidade .opt input { width: 18px; height: 18px; min-height: 0; margin-top: 2px; accent-color: var(--seal); flex: none; }
.modalidade .opt strong { display: block; color: var(--ink); font-size: .95rem; }
.modalidade .opt small { color: var(--muted); font-size: .82rem; }
.link-box { display: flex; gap: 8px; max-width: 760px; }
.link-box input { font-family: var(--mono); font-size: .85rem; background: var(--paper); }
.link-box .btn { flex: none; }
.tag.mod-fisico { background: var(--line-soft); color: var(--ink-2); margin-top: 4px; }
.tag.mod-hibrido { background: #F4E4EA; color: var(--seal); margin-top: 4px; }

/* Acervo: ações por linha */
.row-acoes { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.icon-btn {
  width: 34px; height: 32px; display: inline-grid; place-items: center; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; flex: none;
}
.icon-btn:hover { border-color: var(--seal); color: var(--seal); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Estúdio: videoconferência */
.rail .conf h3 { margin: 0; color: #fff; font-size: 1rem; }
.link-box.dark input { background: var(--studio); color: #E8EDF5; border-color: var(--studio-line); min-height: 34px; padding: 6px 8px; font-size: .78rem; }
.conf-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.conf-lista li { background: var(--studio); border: 1px solid var(--studio-line); border-radius: var(--r-sm); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.conf-lista li.vazio { color: #8E9BB2; font-size: .85rem; }
.conf-lista strong { display: block; color: #fff; font-size: .92rem; }
.conf-lista span { display: block; color: #AEB9CC; font-size: .8rem; }
.conf-lista em { font-style: normal; font-size: .78rem; font-weight: 700; }
.st-aguardando { color: #D8B04A; } .st-conectado { color: #6CC495; } .st-conectando { color: #AEB9CC; } .st-desconectado { color: #E07A82; }
.conf-acoes { display: flex; gap: 6px; flex-wrap: wrap; }
.remote-src { position: fixed; width: 2px; height: 2px; opacity: 0; pointer-events: none; left: 0; bottom: 0; }

/* Página do participante remoto */
.sala .sala-card { max-width: 560px; }
.sala-check { max-width: none; font-size: .86rem; padding: 12px 14px; }
.sala-palco { position: relative; aspect-ratio: 16 / 9; background: var(--studio); border-radius: var(--r); overflow: hidden; }
.sala-palco #v-remoto { width: 100%; height: 100%; object-fit: contain; display: block; }
.sala-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; margin: 0; color: #E8EDF5; font-size: .95rem; }
.sala-palco.ao-vivo .sala-msg { inset: auto 0 0 0; padding: 8px; background: rgba(10, 18, 32, .7); font-size: .85rem; }
.sala-rodape { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.rec-ind { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--seal); }
.rec-ind .dot { width: 10px; height: 10px; border-radius: 50%; background: #D9323C; animation: pulse 1.4s ease-in-out infinite; }

/* ---------- Painel ---------- */
.start { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.start-main { padding: 30px 32px; border-right: 1px solid var(--line-soft); }
.start-main h2 { font-size: 1.5rem; }
.start-main p { max-width: 52ch; color: var(--muted); }
.start-main .btn { margin: 6px 0 14px; }
/* Painel: gráficos de utilização */
.graficos { display: grid; gap: 18px; margin-top: 22px; }
.graficos.dois { grid-template-columns: 1fr 1fr; }
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px 16px; min-width: 0; }
.chart-head h2 { margin: 0 0 2px; }
.chart-head .hint { margin: 0 0 8px; }
.chart-total { margin: 0 0 6px; font-size: .9rem; color: var(--muted); }
.chart-total strong { color: var(--ink); font-size: 1.05rem; }
.conectados { margin: 0 0 6px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.conectados strong { font-size: 2rem; font-weight: 700; color: var(--ink); font-variant-numeric: proportional-nums; line-height: 1; }
.conectados .sub { flex-basis: 100%; font-size: .82rem; }
.chart-box { min-height: 220px; }
.onda { position: relative; }
.onda svg { display: block; width: 100%; height: auto; overflow: visible; outline: none; }
.onda svg:focus-visible { outline: 3px solid #2F5B9A; outline-offset: 4px; border-radius: 4px; }
.onda .grade { stroke: var(--line-soft); stroke-width: 1; }
.onda .eixo { fill: var(--muted); font: 500 11px var(--sans); font-variant-numeric: tabular-nums; }
.onda .mira { stroke: var(--line); stroke-width: 1; }
.onda .ponta, .onda .foco { stroke: var(--surface); stroke-width: 2; }
.onda .valor-ponta { fill: var(--ink); font: 700 12px var(--sans); }
.onda-tip {
  position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 6px 10px; box-shadow: 0 6px 18px rgba(19, 40, 69, .14); display: flex; flex-direction: column; white-space: nowrap; z-index: 2;
}
.onda-tip strong { color: var(--ink); font-size: .95rem; }
.onda-tip span { color: var(--muted); font-size: .78rem; }
.onda-btn { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.onda-tabela { margin-top: 8px; max-height: 240px; overflow-y: auto; }

.kpi-wrap { display: flex; flex-direction: column; }
.kpi-scope { margin: 0; padding: 14px 24px; font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--seal); border-bottom: 1px solid var(--line-soft); }
.figures { margin: 0; display: grid; grid-template-columns: 1fr 1fr; flex: 1; }
.figures div { padding: 22px 24px; border-bottom: 1px solid var(--line-soft); }
.figures div:nth-child(odd) { border-right: 1px solid var(--line-soft); }
.figures dt { font-size: .84rem; color: var(--muted); }
.figures dd { margin: 4px 0 0; font-family: var(--serif); font-size: 1.9rem; font-weight: 600; }
.notice { background: #FFF8E6; border: 1px solid #E8D29A; padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 18px; }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-size: .78rem; color: var(--muted); font-weight: 600; background: #F6F8FA; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr.total td { font-weight: 700; background: #FAF8F4; border-top: 1px solid var(--line); }
th.num { text-align: right; }
td.num { text-align: right; white-space: nowrap; }
td .sub { display: block; color: var(--muted); font-size: .82rem; }
.tag { display: inline-block; font-size: .76rem; font-weight: 600; padding: 2px 9px; border-radius: 10px; background: var(--line-soft); color: var(--ink-2); white-space: nowrap; }
.tag.concluido { background: #E3F0E8; color: var(--ok); }
.tag.gravando, .tag.enviando { background: #FFF1D6; color: var(--warn); }
.tag.erro, .tag.divergente, .tag.interrompida { background: #F9E3E4; color: var(--seal-deep); }
.tag.descartado, .tag.cancelado { background: #ECEEF1; color: var(--muted); }
.tag.criado { background: #E7ECF3; color: var(--ink-2); }
.tag.agendado { background: #E1EAF8; color: #1F4E8C; }
.tag.processamento { background: #EFE6F5; color: #5B2C83; }
/* Auditoria agrupada por ato */
.t-auditoria tbody.grupo { border-top: 2px solid var(--line); }
.t-auditoria tbody.grupo:first-of-type { border-top: 0; }
.t-auditoria td.g-ato { background: #FAF8F4; border-right: 1px solid var(--line-soft); }
.t-auditoria { table-layout: fixed; min-width: 980px; }
.t-auditoria td { overflow-wrap: anywhere; }
.t-auditoria td.g-hash { border-left: 1px solid var(--line-soft); }
.t-auditoria td.g-hash .hash { font-size: .7rem; color: var(--ink-2); }
.t-auditoria tbody.grupo tr:last-child td { border-bottom: 0; }
/* Auditoria: acessos ao sistema (login, tentativa recusada, saída) */
.aud-titulo, .aud-acessos h2 { font-family: var(--serif); font-size: 1.15rem; margin: 22px 0 4px; }
.aud-titulo { margin-top: 6px; }
.t-acessos { min-width: 820px; }
.t-acessos { table-layout: fixed; } .t-acessos td { overflow-wrap: break-word; } .t-acessos td.nw { white-space: nowrap; }
.t-acessos .ev { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #EEF0F4; color: var(--ink-2); }
.t-acessos .ev-login { background: #E3F0E8; color: var(--ok); }
.t-acessos .ev-login_falhou { background: #F6E3E8; color: var(--seal); }
.t-acessos tr.ev-falha td { background: #FDF7F8; }
/* Novo ato: endereço da diligência */
.diligencia { grid-column: 1 / -1; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--seal); border-radius: var(--r-sm); padding: 12px 14px; }
.diligencia .lbl { margin: 0 0 8px; font-weight: 600; font-size: .86rem; color: var(--ink-2); }
.dil-grid { grid-template-columns: 1fr .55fr .8fr 1.25fr; }
.dil-grid .dil-end, .dil-grid .dil-mun { grid-column: span 2; }
@media (max-width: 760px) { .dil-grid { grid-template-columns: 1fr; } .dil-grid .dil-end, .dil-grid .dil-mun { grid-column: auto; } }
.field-hint { font-weight: 400; color: var(--muted); font-size: .78rem; }
.row-acoes { flex-wrap: wrap; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.filters label { min-width: 140px; }
.filters .grow { flex: 1; min-width: 220px; }

.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); padding: 34px; text-align: center; }
.empty p { color: var(--muted); }

/* ---------- Estúdio de gravação ---------- */
.main.view-gravar { max-width: none; padding: 0; }
.studio { display: grid; grid-template-columns: 1fr 340px; min-height: 100vh; background: var(--studio); color: #E8EDF5; }
.stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 22px; }
.stage-frame { position: relative; width: 100%; }
.stage video, .stage img { display: block; width: 100%; max-height: calc(100vh - 44px - 130px); aspect-ratio: 16 / 9; object-fit: contain; background: #000; border-radius: var(--r); }
.stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: var(--r); }
.stage-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 40px; font-size: 1.05rem; color: #C9D3E3; }
.rec-flag {
  z-index: 2; position: absolute; top: 16px; left: 16px; display: flex; align-items: center; gap: 10px;
  background: rgba(15, 26, 43, .78); border: 1px solid var(--seal); padding: 6px 14px 6px 10px; border-radius: 20px; font-weight: 700;
}
.rec-flag .dot { width: 12px; height: 12px; border-radius: 50%; background: #E0434D; animation: pulse 1.4s ease-in-out infinite; }
.rec-flag.paused { border-color: #C9A24A; }
.rec-flag.paused .dot { background: #C9A24A; animation: none; }
@keyframes pulse { 50% { opacity: .25; } }

.rail { background: var(--studio-2); border-left: 1px solid var(--studio-line); padding: 22px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; max-height: 100vh; }
.rail-block { border-bottom: 1px solid var(--studio-line); padding-bottom: 18px; display: flex; flex-direction: column; gap: 12px; }
.rail label { color: #AEB9CC; }
.rail select { background: var(--studio); color: #E8EDF5; border-color: var(--studio-line); }
.rail select:disabled { opacity: .5; }
.ato-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ato-card-head h3 { margin: 0; color: #fff; font-size: 1rem; }
.icon-btn.dark { background: var(--studio); border-color: var(--studio-line); color: #E8EDF5; }
.icon-btn.dark:hover { border-color: #AEB9CC; color: #fff; }
.ato-info { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.ato-info dt { color: #AEB9CC; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-top: 6px; }
.ato-info dd { margin: 0; color: #fff; font-size: .95rem; }
.ato-info ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }

/* Estúdio: plano de fundo virtual */
.rail .fundo-on { color: #E8EDF5; font-weight: 600; }
.rail .fundo-on input { accent-color: var(--seal); }
.fundo-painel { display: flex; flex-direction: column; gap: 10px; }
.fundo-opcoes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fundo-op {
  display: flex; flex-direction: column; gap: 4px; padding: 4px; border-radius: var(--r-sm); cursor: pointer;
  background: none; border: 2px solid transparent; color: #C9D3E3; font: 500 .72rem var(--sans); text-align: center;
}
.fundo-op .thumb {
  display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 4px; background: var(--studio) center / cover no-repeat;
  border: 1px solid var(--studio-line); color: #AEB9CC; font-size: 1.3rem; font-weight: 400;
}
.fundo-op .thumb.blur { background: radial-gradient(circle at 50% 38%, #8E9BB2 0 18%, transparent 19%), linear-gradient(135deg, #5B6B83, #2C3B57); filter: blur(1.5px); }
.fundo-op .nome { line-height: 1.2; }
.fundo-op[aria-checked="true"] { border-color: var(--seal); color: #fff; }
.fundo-op:hover:not(:disabled) { color: #fff; }
.fundo-op:disabled, .fundo-op:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.fundo-op.enviar .thumb { border-style: dashed; }
.spec { font-size: .84rem; color: #AEB9CC; margin: 0; }
.meter { height: 6px; background: var(--studio); border-radius: 3px; overflow: hidden; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, #4FA37A, #D8B04A 70%, #E0434D); transform-origin: left; transform: scaleX(0); transition: transform 80ms linear; }

/* Controles de gravação fixos no rodapé da barra: sempre visíveis, mesmo quando a barra rola */
.controls {
  align-items: center; text-align: center; border-bottom: 0;
  position: sticky; bottom: -22px; z-index: 3; margin: auto -22px -22px; padding: 16px 22px 20px;
  background: var(--studio-2); border-top: 1px solid var(--studio-line); box-shadow: 0 -10px 18px rgba(11, 26, 48, .45); gap: 8px;
}
.rec-btn {
  width: 76px; height: 76px; border-radius: 50%; cursor: pointer; border: 0; position: relative; flex: none;
  background: radial-gradient(circle at 35% 30%, #A33A62, var(--seal) 50%, var(--seal-deep));
  box-shadow: 0 0 0 5px var(--studio-2), 0 0 0 7px #8E9BB2;
}
.rec-btn::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.35); }
.rec-btn::after { inset: 12px; }
.rec-btn:disabled { cursor: not-allowed; filter: grayscale(.85) brightness(.75); }
.rec-btn:not(:disabled):hover { filter: brightness(1.12); }
.rec-btn.on { box-shadow: 0 0 0 5px var(--studio-2), 0 0 0 7px #E0434D; filter: none; }
.rec-meta strong { display: block; font-family: var(--serif); font-size: 1.9rem; color: #fff; letter-spacing: .02em; line-height: 1.1; }
.rec-meta span { color: #AEB9CC; font-size: .85rem; }
.controls .row { width: 100%; }
.controls .cancelar-ato { width: 100%; color: #F0A3AA; border-color: #6B3A48; }
.controls .cancelar-ato:hover:not(:disabled) { color: #fff; border-color: #E0434D; background: rgba(224, 67, 77, .15); }

/* Mudo e câmera: sobre a imagem no estúdio e na página do participante remoto */
.midia-ctrl { position: absolute; z-index: 2; display: flex; gap: 12px; }
/* Barra abaixo da imagem: microfone (com teste) | mudo e câmera | alto-falante (com teste) */
.stage-bar { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 14px; }
.stage-bar .midia-ctrl { position: static; align-self: center; }
.stage-bar label { color: #AEB9CC; }
.stage-bar select { background: var(--studio-2); color: #E8EDF5; border-color: var(--studio-line); }
.stage-bar select:disabled { opacity: .5; }
.stage-bar #t-info { grid-column: 1 / -1; text-align: center; }
@media (max-width: 1100px) { .stage-bar { grid-template-columns: 1fr; } .stage-bar .midia-ctrl { justify-self: center; } }
.mc-btn {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(15, 26, 43, .82); border: 1px solid rgba(255, 255, 255, .28); color: #fff;
}
.mc-btn:hover { background: rgba(35, 50, 75, .95); }
.mc-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.mc-btn.off { background: #D9323C; border-color: #D9323C; }
.mc-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cam-off-aviso { position: absolute; inset: 0; display: grid; place-items: center; background: #0B1A30; border-radius: var(--r); color: #C9D3E3; font-weight: 600; z-index: 1; }
.sala-bar { position: static; justify-content: center; margin-top: 12px; }
.sala-bar .mc-btn { background: var(--studio); }
.sala-bar .mc-btn.off { background: #D9323C; }
.sala-aviso {
  margin: 0 0 12px; padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--studio); border-left: 4px solid var(--seal); color: #fff; font-size: .92rem; font-weight: 600; text-align: center;
}

/* Estúdio: grupos de teste de microfone e alto-falante */
.disp-grupo { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--studio); border: 1px solid var(--studio-line); border-radius: var(--r-sm); }
.disp-titulo { color: #AEB9CC; font-size: .9rem; font-weight: 600; }
.disp-teste { display: flex; align-items: center; gap: 10px; }
.disp-teste .meter, .disp-teste > .spec { flex: 1; }
.disp-teste .btn { flex: none; }
.disp-grupo .spec { font-size: .78rem; }
#t-info:empty { display: none; }
.conf-lista .conf-midia { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.conf-midia i { display: inline-flex; align-items: center; gap: 4px; font-style: normal; font-size: .75rem; color: #6CC495; }
.conf-midia i.off { color: #E07A82; }
.conf-midia svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rail-note { font-size: .8rem; color: #8E9BB2; margin: 0; }

/* ---------- Revisão / comprovante ---------- */
.review { display: grid; grid-template-columns: 1.5fr 1fr; gap: 26px; align-items: start; }
.player video, .player img { width: 100%; background: #000; border-radius: var(--r); aspect-ratio: 16 / 9; object-fit: contain; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.progress { height: 10px; background: var(--line-soft); border-radius: 5px; overflow: hidden; margin-top: 16px; }
.progress span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }

.receipt { max-width: 720px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 36px 40px; position: relative; }
.receipt .seal {
  position: absolute; top: 30px; right: 34px; width: 78px; height: 78px; border-radius: 50%;
  border: 3px double var(--brass); display: flex; align-items: center; justify-content: center;
  color: var(--brass); font-family: var(--serif); font-weight: 600; font-size: .78rem; text-align: center; line-height: 1.15;
  transform: rotate(-8deg);
}
.receipt h1, .receipt .lede { padding-right: 100px; }
.receipt .kv { margin: 22px 0; font-size: .95rem; }
.integ { font-size: .88rem; padding: 10px 12px; border-radius: var(--r-sm); margin: 10px 0 0; }
.integ.ok { background: #E3F0E8; color: var(--ok); }
.integ.bad { background: #F9E3E4; color: var(--seal-deep); }

/* ---------- Fila ---------- */
.queue { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.queue li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.queue li:last-child { border-bottom: 0; }
.queue li p { margin: 2px 0 0; font-size: .86rem; }
.queue .progress { grid-column: 1 / -1; margin: 0; }
.q-actions { display: flex; gap: 8px; }
.q-actions.col { flex-direction: column; align-items: stretch; min-width: 150px; }

/* Usuários: permissões, status de conta e logs */
.perm-list { display: flex; flex-wrap: wrap; gap: 4px; max-width: 260px; }
.perm-chip { display: inline-block; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: #E7ECF3; color: var(--ink-2); white-space: nowrap; }
.perm-chip.all { background: #F4E4EA; color: var(--seal); }
.kv .perm-chip { margin: 0 4px 4px 0; }
.tag.st-conta-ativo { background: #E3F0E8; color: var(--ok); }
.tag.st-conta-inativo { background: #ECEEF1; color: var(--muted); }
.tag.st-conta-bloqueado { background: #F9E3E4; color: var(--seal-deep); }
.t-usuarios td { min-width: 110px; }
.papeis.perms .hint { width: 100%; margin: 0 0 4px; }
.papeis .fixo { color: var(--muted); }
.papeis .fixo small { font-weight: 400; }
.status-hint { align-self: end; margin: 0 0 10px; }
.logs-dlg h3 { margin: 18px 0 8px; }
.logs-dlg > p { color: var(--muted); margin: 0; }
.ultimo-login { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--seal); border-radius: var(--r-sm); padding: 12px 16px; margin-top: 14px; }
.ultimo-login h3 { margin: 0 0 8px; }

/* ---------- Configurações ---------- */
.cfg { display: grid; gap: 22px; max-width: 980px; }
.cfg .panel h2 { margin-bottom: 12px; }
.cfg-cam { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.cfg-cam video { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: var(--r-sm); }
.cfg table input[type="radio"] { width: auto; min-height: 0; accent-color: var(--ink); }
.ok-txt { color: var(--ok); font-weight: 600; }
.bad-txt { color: var(--seal-deep); font-weight: 600; }

/* ---------- Modal e avisos ---------- */
dialog { border: 0; border-radius: var(--r-lg); padding: 0; width: min(520px, 94vw); box-shadow: 0 20px 60px rgba(15, 26, 43, .35); color: var(--ink); }
dialog.wide { width: min(980px, 96vw); }
dialog::backdrop { background: rgba(15, 26, 43, .55); }
.dlg { padding: 26px 28px; display: flex; flex-direction: column; gap: 14px; }
.dlg p { margin: 0; color: var(--muted); }
.dlg .actions { margin-top: 6px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.player-dlg video, .player-dlg img { width: 100%; max-height: 64vh; background: #000; border-radius: var(--r-sm); }

.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r-sm); max-width: 380px; font-size: .92rem; box-shadow: 0 8px 24px rgba(15, 26, 43, .3); }
.toast.err { background: var(--seal-deep); }
.toast.ok { background: var(--ok); }

/* ---------- Login ---------- */
.login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  border-top: 7px solid var(--ink);
  background: radial-gradient(1200px 600px at 85% -10%, #701B3A14, transparent 60%),
              radial-gradient(900px 500px at -10% 110%, #13284512, transparent 60%), var(--paper);
}
.login-card {
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--seal);
  border-radius: var(--r-lg); padding: 36px 40px 28px; width: 100%; max-width: 440px;
  box-shadow: 0 18px 50px rgba(19, 40, 69, .10);
}
.login-logo { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto 26px; }
.login-card h1 { font-size: 1.55rem; margin-bottom: 6px; }
.login-sub { color: var(--muted); font-size: .93rem; margin-bottom: 22px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form > label[for] { margin-bottom: -9px; }
.login-form .btn { width: 100%; margin-top: 6px; }
.login-card .hint { text-align: center; margin: 18px 0 0; }

.pwd { position: relative; }
.pwd input { padding-right: 48px; }
.pwd input::-ms-reveal, .pwd input::-ms-clear { display: none; }   /* evita o olho nativo do Edge duplicado */
.pwd-toggle {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
  width: 38px; height: 34px; display: grid; place-items: center;
  background: none; border: 0; border-radius: var(--r-sm); color: var(--muted); cursor: pointer;
}
.pwd-toggle:hover { color: var(--ink); background: var(--paper); }
.pwd-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pwd-toggle .i-eye-off { display: none; }
.pwd-toggle[aria-pressed="true"] .i-eye { display: none; }
.pwd-toggle[aria-pressed="true"] .i-eye-off { display: block; }
.caps { margin: -6px 0 0; font-size: .82rem; color: var(--warn); }
.login-err { margin: 0; padding: 10px 12px; border-radius: var(--r-sm); background: #F7E6EC; color: var(--seal-deep); font-size: .88rem; }

/* =====================================================================
   Tema "painel": barra lateral escura, cartões arredondados com sombra suave,
   ícones em quadrados coloridos. Só aparência: estrutura e posições não mudam.
   ===================================================================== */
:root {
  --sans: "Plus Jakarta Sans", "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --bg: #F3F1EC;                 /* fundo da área de trabalho (creme da marca, mais neutro) */
  --nav-bg: #0E1E36;             /* azul-marinho da marca, mais profundo */
  --nav-txt: #C3CCDA;
  --nav-hover: #18304F;
  --card-line: #E6E1D8;
  --shadow: 0 1px 2px rgba(19, 40, 69, .05), 0 6px 18px rgba(19, 40, 69, .06);
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
}
body { background: var(--bg); }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: 1.65rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }

/* Acervo: documento do acesso (processo, ofício ou termo) · Auditoria: visualização com senha de administrador */
.campo-doc { display: flex; gap: 8px; align-items: center; margin-top: -6px; }
.campo-doc input { flex: 1; }
.campo-doc .icon-btn { width: 42px; height: 40px; border-color: var(--seal); color: var(--seal); }
.campo-doc .icon-btn:hover { background: #FCF7F9; }
.campo-doc .icon-btn svg, .doc-anexo svg, .doc-ver svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.doc-anexo { display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 12px; border: 1px dashed var(--card-line); border-radius: var(--r-sm); font-size: .86rem; color: var(--muted); }
.doc-anexo.ok { border-style: solid; border-color: #9CC9AE; background: #F1F8F3; color: var(--ink); }
.doc-anexo.falta { border-color: var(--seal); background: #FDF3F6; color: var(--seal-deep); }
.doc-anexo span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.doc-ver { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--seal); border-color: var(--seal); }
.liberacao-adm { border: 1px solid var(--card-line); border-left: 4px solid var(--seal); border-radius: var(--r-sm); padding: 10px 14px 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.liberacao-adm legend { font-weight: 700; font-size: .9rem; color: var(--ink); padding: 0 6px; }
.liberacao-adm .hint { margin: 0; }
.doc-dlg iframe, .doc-dlg img { width: 100%; height: 64vh; border: 1px solid var(--card-line); border-radius: var(--r-sm); background: #fff; object-fit: contain; display: block; }

/* Novo ato: importar minuta em PDF */
.minuta-box {
  display: flex; align-items: flex-start; gap: 16px; margin: 0 0 22px; padding: 18px 20px;
  background: var(--surface); border: 1px dashed var(--seal); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.minuta-box > svg { width: 34px; height: 34px; flex: none; fill: none; stroke: var(--seal); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.minuta-txt { flex: 1; min-width: 0; }
.minuta-txt strong { display: block; color: var(--ink); }
.minuta-txt small { color: var(--muted); font-size: .86rem; }
.minuta-box .btn { flex: none; }
.minuta-box.soltar { background: #FCF7F9; border-style: solid; box-shadow: 0 0 0 4px rgba(112, 27, 58, .12); }
.minuta-info { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--r-sm); font-size: .88rem; background: var(--bg); }
.minuta-info.ok { background: #FFF8DB; border-left: 4px solid #D8A400; }
.minuta-info.err { background: #F9E3E4; border-left: 4px solid var(--seal); color: var(--seal-deep); }
.auto, input.auto, select.auto { background-color: #FFF6CC !important; border-color: #D8A400 !important; }
label.inline.auto { background: #FFF6CC; border-radius: 6px; padding: 2px 6px; }
@media (max-width: 760px) { .minuta-box { flex-direction: column; } }

/* Barra lateral escura */
.shell { grid-template-columns: 252px 1fr; }
.nav { background: var(--nav-bg); border: 0; padding: 18px 12px; gap: 20px; }
.brand { padding: 0 4px; }
.brand-chip { width: 100%; padding: 6px 8px 2px; }   /* versão clara da logo, direto sobre o fundo escuro */
.brand-logo { max-width: 100%; margin: 0 auto; }
.nav nav { gap: 4px; }
.nav nav a {
  justify-content: flex-start; gap: 12px; padding: 10px 14px; border: 0; border-radius: 10px;
  color: var(--nav-txt); font-weight: 500; font-size: .95rem;
}
.nav nav a:hover { background: var(--nav-hover); color: #fff; }
.nav nav a[aria-current="page"] { background: var(--seal); color: #fff; font-weight: 600; box-shadow: 0 6px 16px rgba(112, 27, 58, .45); }
.nav-ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav nav a .badge { margin-left: auto; background: #fff; color: var(--seal); }
.nav nav a[aria-current="page"] .badge { background: rgba(255, 255, 255, .22); color: #fff; }

/* Topo */
.topbar { min-height: 66px; padding: 10px clamp(18px, 3vw, 36px); border-bottom: 1px solid var(--card-line); }
.user-btn { border-color: var(--card-line); padding: 4px 12px 4px 4px; }
.user-btn:hover, .user-btn[aria-expanded="true"] { background: var(--bg); }
.avatar { box-shadow: none; }
.user-menu { border-color: var(--card-line); border-radius: var(--r); box-shadow: 0 18px 40px rgba(19, 40, 69, .16); }

/* Área de trabalho */
.main { padding: 28px clamp(18px, 3vw, 36px) 56px; max-width: 1320px; }
.page-head { margin-bottom: 22px; }
.page-head h1 { margin-bottom: .25em; }
.lede { font-size: .95rem; }

/* Cartões: mesmos blocos de antes, com cantos arredondados e sombra suave */
.table-wrap, .panel, .empty, .queue, .chart-card, .receipt, .start-main, .check, .diligencia, .modalidade .opt, .ultimo-login {
  border-color: var(--card-line); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.check, .diligencia, .ultimo-login { border-left-width: 4px; }
.empty { border-style: dashed; box-shadow: none; }

/* Painel: "Gravar um ato" e os indicadores viram cartões separados */
.start { background: none; border: 0; border-radius: 0; overflow: visible; gap: 18px; }
.start-main { background: var(--surface); border: 1px solid var(--card-line); border-right: 1px solid var(--card-line); padding: 26px 28px; }
.start-main h2 { font-size: 1.25rem; }
.kpi-wrap { gap: 10px; }
.kpi-scope { padding: 0 2px; border: 0; font-size: .74rem; }
.figures { gap: 14px; }
.figures div {
  display: grid; grid-template-columns: 52px 1fr; grid-template-areas: "ic num" "ic rot"; column-gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--card-line) !important; border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px 20px;
}
.figures div::before {
  content: ""; grid-area: ic; width: 52px; height: 52px; border-radius: 14px; background: var(--k, var(--ink));
}
.figures div::after {               /* ícone branco desenhado sobre o quadrado colorido */
  content: ""; grid-area: ic; justify-self: center; width: 24px; height: 24px; background: #fff;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
.figures dd { grid-area: num; margin: 0; font-family: var(--sans); font-size: 1.75rem; font-weight: 800; line-height: 1.1; }
.figures dt { grid-area: rot; font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.figures div:nth-child(1) { --k: var(--seal); --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.figures div:nth-child(2) { --k: var(--ink); --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E"); }
.figures div:nth-child(3) { --k: var(--brass); --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V9M10 19V5M16 19v-7M22 19H2'/%3E%3C/svg%3E"); }
.figures div:nth-child(4) { --k: var(--ok); --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V4M7.5 8.5 12 4l4.5 4.5'/%3E%3Cpath d='M4 15v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E"); }
.chart-card { padding: 22px 24px 18px; }
.section-head { margin: 30px 0 12px; }

/* Botões e campos */
.btn { border-radius: 10px; border-color: var(--card-line); font-weight: 600; }
.btn.primary { background: var(--seal); border-color: var(--seal); box-shadow: 0 4px 12px rgba(112, 27, 58, .25); }
.btn.primary:hover { background: var(--seal-deep); border-color: var(--seal-deep); }
.btn.danger { background: #B4232F; border-color: #B4232F; }
.btn:not(.primary):not(.danger):not(.ghost-light):hover { border-color: var(--ink-2); background: var(--bg); }
input, select, textarea { border-color: var(--card-line); border-radius: 10px; }
input:focus, select:focus, textarea:focus { border-color: var(--seal); outline: 3px solid rgba(112, 27, 58, .14); }
.icon-btn { border-radius: 8px; border-color: var(--card-line); }
.form fieldset { border-top-color: var(--card-line); }
.form legend { font-family: var(--sans); font-weight: 700; font-size: 1.05rem; }

/* Tabelas: linhas mais altas, cabeçalho limpo, etiquetas em pílula */
table { font-size: .9rem; }
th { background: #FAF9F6; color: var(--muted); font-size: .76rem; font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--card-line); }
td { padding: 14px 16px; border-bottom-color: #F0ECE5; vertical-align: middle; }
tbody tr:hover td { background: #FCFBF8; }
.t-auditoria td.g-ato, tr.total td { background: #FAF9F6; }
.tag, .perm-chip { border-radius: 999px; padding: 3px 10px; font-weight: 600; border: 1px solid rgba(0, 0, 0, .05); }

/* Modal e avisos */
dialog { border-radius: 18px; }
.toast { border-radius: 10px; }

/* Login */
.login { border-top: 0; }
.login-card { border-radius: 18px; border-color: var(--card-line); border-top-color: var(--seal); box-shadow: 0 24px 60px rgba(19, 40, 69, .12); }

/* ---------- Login em duas colunas (index.html) ---------- */
.login-split { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: #0B1626; color: #E8EDF5; }
.ls-hero {
  position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 44px clamp(28px, 5vw, 72px);
  background: radial-gradient(900px 600px at 105% 105%, rgba(112, 27, 58, .55), transparent 60%),
              radial-gradient(700px 500px at 0% 0%, rgba(46, 80, 130, .45), transparent 60%),
              linear-gradient(135deg, #0E1E36 0%, #132845 55%, #1C3558 100%);
}
.ls-logo { width: min(330px, 75%); height: auto; display: block; }   /* versão clara da logo, para o fundo escuro */
.ls-texto { margin-top: auto; margin-bottom: auto; max-width: 560px; }
.ls-texto h1 { color: #fff; font-size: clamp(2rem, 3.4vw, 2.9rem); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; margin-bottom: 18px; }
.ls-texto p { color: #C3CCDA; font-size: 1.08rem; line-height: 1.6; margin: 0 0 26px; }
.ls-selos { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ls-selos li { font-size: .82rem; font-weight: 600; color: #fff; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); }
.ls-acesso { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #0B1626; }
.ls-form { width: 100%; max-width: 400px; }
.ls-form h2 { color: #fff; font-size: 1.7rem; font-weight: 800; margin: 0 0 6px; }
.ls-sub { color: #8E9BB2; font-size: .95rem; margin: 0 0 28px; }
.login-split label { color: #C3CCDA; font-weight: 600; }
.login-split input { background: #142238; border-color: #26395A; color: #F2F5FA; min-height: 46px; }
.login-split input:focus { border-color: #B23A66; outline: 3px solid rgba(178, 58, 102, .28); }
.login-split .pwd-toggle { color: #8E9BB2; }
.login-split .pwd-toggle:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.login-split .btn.primary { min-height: 48px; font-size: 1rem; box-shadow: 0 10px 24px rgba(112, 27, 58, .45); }
.login-split .btn.primary:hover { background: #8A2349; border-color: #8A2349; }
.login-split .caps { color: #E5B85C; }
.login-split .login-err { background: rgba(224, 67, 77, .14); color: #F3B4BA; border: 1px solid rgba(224, 67, 77, .35); }
.login-split .hint { color: #6F7D95; text-align: center; margin: 26px 0 0; font-size: .85rem; }
@media (max-width: 900px) {
  .login-split { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .ls-hero { padding: 24px 22px 22px; }
  .ls-logo { width: min(240px, 70%); }
  .ls-texto { margin: 18px 0 0; }
  .ls-texto h1 { font-size: 1.35rem; margin: 0; }
  .ls-texto p, .ls-selos { display: none; }          /* no celular, o formulário fica visível sem rolar */
  .ls-acesso { padding: 26px 22px 40px; align-items: flex-start; }
  .ls-form h2 { font-size: 1.4rem; }
  .ls-sub { margin-bottom: 20px; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .graficos.dois { grid-template-columns: 1fr; }
  .studio { grid-template-columns: 1fr; }
  .rail { max-height: none; border-left: 0; border-top: 1px solid var(--studio-line); }
  .review, .start, .cfg-cam { grid-template-columns: 1fr; }
  .start-main { border-right: 0; border-bottom: 1px solid var(--line-soft); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: static; height: auto; border-left: 0; border-top: 6px solid var(--ink); }
  .nav nav { flex-direction: row; flex-wrap: wrap; }
  .nav nav a { border-left: 0; border-bottom: 3px solid transparent; padding: 8px 12px; }
  .nav nav a[aria-current="page"] { border-bottom-color: var(--seal); }
  .topbar { position: static; }
  .user-btn .hello { display: none; }
  .g3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .parte { grid-template-columns: 1fr; }
  .link-box { flex-direction: column; }
  .queue li { grid-template-columns: 1fr; }
  .login-card { padding: 28px 20px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@media print {
  .nav, .topbar, .toasts, .no-print, .skip { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  .receipt { border: 0; padding: 0; }
}
