/* Estilo comum das páginas Tecnologia, Atendimento e Usuários (mesma identidade do index.html) */
:root {
  color-scheme: light;
  --ground: #f5f5f5; --surface: #ffffff; --surface-2: #fafafa;
  --ink: #1b1b1b; --ink-soft: #4d4d4d; --ink-muted: #858585;
  --line: #e8e8e8; --line-strong: #d4d4d4;
  --accent: #1b1b1b; --accent-soft: #eefbfa; --accent-ink: #2c5c54; --chip-bg: #efefef;
  --good: #2e8a4e; --good-bg: #e6f4ea; --warn: #9a6b00; --warn-bg: #fff4d6; --critical: #d54309; --critical-bg: #fbeae3;
  --s1: #2c5c54; --s2: #d54309; --s3: #9a8a1c; --s4: #3e5fb0;
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #131313; --surface: #1b1b1b; --surface-2: #202020;
    --ink: #f2f2f2; --ink-soft: #c4c4c4; --ink-muted: #8e8e8e;
    --line: #2d2d2d; --line-strong: #3b3b3b;
    --accent: #f2f2f2; --accent-soft: #1d2f2c; --accent-ink: #8fcfca; --chip-bg: #262626;
    --good: #5cc07a; --good-bg: #15291c; --warn: #e7b84a; --warn-bg: #2e2612; --critical: #f07443; --critical-bg: #331e16;
    --s1: #5aa899; --s2: #ec6a35; --s3: #ddd472; --s4: #8aa6ef;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #131313; --surface: #1b1b1b; --surface-2: #202020;
  --ink: #f2f2f2; --ink-soft: #c4c4c4; --ink-muted: #8e8e8e;
  --line: #2d2d2d; --line-strong: #3b3b3b;
  --accent: #f2f2f2; --accent-soft: #1d2f2c; --accent-ink: #8fcfca; --chip-bg: #262626;
  --good: #5cc07a; --good-bg: #15291c; --warn: #e7b84a; --warn-bg: #2e2612; --critical: #f07443; --critical-bg: #331e16;
  --s1: #5aa899; --s2: #ec6a35; --s3: #ddd472; --s4: #8aa6ef;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; background: var(--ground); color: var(--ink);
  font: 14px/1.5 Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
h1, h2, h3 { font-family: Lexend, system-ui, sans-serif; font-weight: 500; margin: 0; text-wrap: balance; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 10px 20px;
  background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.topbar img { height: 24px; display: block; }
.topbar .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .topbar .logo-light { display: none; }
  :root:not([data-theme="light"]) .topbar .logo-dark { display: block; }
}
:root[data-theme="dark"] .topbar .logo-light { display: none; }
:root[data-theme="dark"] .topbar .logo-dark { display: block; }
.eyebrow { font: 500 11px Lexend, system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.spacer { flex: 1; }
.muted { color: var(--ink-muted); }
.small { font-size: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: 100px; border: 1.5px solid var(--ink); background: transparent; color: inherit;
  font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--chip-bg); }
.btn.primary { background: var(--ink); color: var(--surface); }
.btn.primary:hover { opacity: .9; }
.btn.danger { border-color: var(--critical); color: var(--critical); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.sm { height: 26px; padding: 0 10px; font-size: 12px; }
main { padding: 20px; max-width: 1400px; margin: 0 auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.card h2 { font-size: 15px; margin-bottom: 4px; }
.card .desc { color: var(--ink-muted); font-size: 12.5px; margin: 0 0 12px; }
.grid { display: grid; gap: 14px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; min-height: 36px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface); outline: none;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
label.f { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin: 0 0 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 100px; background: var(--chip-bg); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.aviso { padding: 10px 14px; border-radius: 12px; font-size: 13px; margin-bottom: 12px; }
.aviso.erro { background: var(--critical-bg); color: var(--critical); }
.aviso.ok { background: var(--good-bg); color: var(--good); }
.aviso[hidden] { display: none; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 600; color: var(--ink-muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.r, th.r { text-align: right; }
.table-wrap { overflow-x: auto; }
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 0; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
dialog::backdrop { background: rgba(0,0,0,.4); }
.dlg-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dlg-body { padding: 16px 18px; overflow-y: auto; max-height: calc(100vh - 160px); }
.dlg-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); }
@media (max-width: 640px) { main { padding: 14px 16px; } .topbar { padding: 10px 16px; } }

/* Aviso flutuante (canto inferior direito): confirma uma ação sem tirar a pessoa do lugar da página */
.toast-area { position: fixed; right: 20px; bottom: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.4;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--good);
  box-shadow: 0 10px 28px rgba(0,0,0,.16); animation: toast-in .18s ease-out; }
.toast.erro { border-left-color: var(--critical); }
.toast .ico { flex: none; font-weight: 700; color: var(--good); }
.toast.erro .ico { color: var(--critical); }
.toast .txt { flex: 1; }
.toast button { flex: none; border: 0; background: none; color: var(--ink-muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px; }
.toast.saindo { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .toast-area { left: 16px; right: 16px; bottom: 16px; max-width: none; } }

/* Página aberta na janela flutuante (assets/janela.js): sem o logo, topo colado na borda da janela */
body.em-janela .topbar > a:first-child { display: none; }
body.em-janela .topbar { padding-left: 20px; }
