/* Área restrita: mesmas cores e tipografia do site principal. */
:root {
  color-scheme: light;
  --paper: #f6f5f1;
  --surface: #ffffff;
  --ink: #1b1d21;
  --muted: #5b6068;
  --line: #e2e0da;
  --accent: #1f5c63;
  --accent-soft: #e4eeee;
  --danger: #b3261e;
  --danger-soft: #fbe9e7;
  --ok-soft: #e4eeee;
  --logo-filter: none;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #121417;
    --surface: #1a1d21;
    --ink: #eceae5;
    --muted: #a3a8b0;
    --line: #2b2f35;
    --accent: #7cc2c8;
    --accent-soft: #1d2d30;
    --danger: #f2a39b;
    --danger-soft: #3a1f1d;
    --ok-soft: #1d2d30;
    --logo-filter: invert(1);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #121417;
  --surface: #1a1d21;
  --ink: #eceae5;
  --muted: #a3a8b0;
  --line: #2b2f35;
  --accent: #7cc2c8;
  --accent-soft: #1d2d30;
  --danger: #f2a39b;
  --danger-soft: #3a1f1d;
  --ok-soft: #1d2d30;
  --logo-filter: invert(1);
}

* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; }
h1 { font-size: clamp(30px, 4.5vw, 40px); }
h2 { font-size: 22px; margin-bottom: 14px; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Topo e menu */
.topo { background: var(--surface); border-bottom: 1px solid var(--line); }
.barra { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 12px; }
.marca { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.marca img { width: 32px; height: 32px; filter: var(--logo-filter); }
.acoes-topo { display: flex; align-items: center; gap: 12px; }
.acoes-topo form { margin: 0; }
.quem { color: var(--muted); font-size: 14px; }
.menu { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.menu a {
  white-space: nowrap; padding: 7px 14px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-size: 15px;
}
.menu a:hover { color: var(--ink); background: var(--paper); }
.menu a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.tema {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer;
}
.tema:hover { border-color: var(--accent); color: var(--accent); }
.tema svg { width: 18px; height: 18px; }
.tema .sol { display: none; }
:root[data-tema-atual="escuro"] .tema .sol { display: block; }
:root[data-tema-atual="escuro"] .tema .lua { display: none; }

/* Conteúdo */
.conteudo { flex: 1; padding-top: 36px; padding-bottom: 56px; }
.sub { color: var(--muted); margin: 8px 0 28px; }
.nota { color: var(--muted); font-size: 14px; }
.vazio { color: var(--muted); }
.bloco { margin-top: 36px; }
.cartao { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.caixa-estreita { max-width: 440px; margin: 12px auto 0; }
.aviso { border-radius: 10px; padding: 12px 16px; margin: 0 0 18px; font-weight: 600; font-size: 15px; }
.aviso.ok { background: var(--ok-soft); color: var(--accent); }
.aviso.erro { background: var(--danger-soft); color: var(--danger); }

.atalhos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.atalho {
  display: grid; gap: 4px; padding: 20px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.atalho:hover { border-color: var(--accent); }
.atalho strong { font-size: 17px; }
.atalho span { color: var(--muted); font-size: 14px; }
.atalho.destaque { border-left: 4px solid var(--accent); }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.links a {
  display: block; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; text-decoration: none; font-weight: 600;
}
.links a:hover { border-color: var(--accent); }
.mapa { width: 100%; height: 320px; border: 0; border-radius: 12px; margin: 6px 0 14px; background: var(--paper); }

.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.item-compartilhado { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.item-compartilhado img { width: 100%; height: 180px; object-fit: cover; }
.item-compartilhado figcaption { display: grid; gap: 4px; padding: 14px 16px; }
.item-compartilhado figcaption span { color: var(--muted); font-size: 14px; }
.item-compartilhado .botao { justify-self: start; margin-top: 6px; }

/* Formulários e botões */
.formulario { display: grid; gap: 16px; }
.formulario.em-linha { grid-template-columns: 1.4fr 1fr 0.8fr auto; align-items: end; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
label small { color: var(--muted); font-weight: 400; }
label.opcao { display: flex; align-items: center; gap: 10px; font-weight: 400; }
input, select {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; width: 100%;
}
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
input[type="file"] { padding: 10px; background: var(--surface); }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.botao.primario { background: var(--accent); color: var(--paper); }
.botao.secundario { background: transparent; color: var(--accent); border-color: var(--accent); }
.botao.perigo { background: transparent; color: var(--danger); border-color: var(--danger); }
.botao.discreto { background: transparent; color: var(--muted); padding: 6px 10px; border-color: var(--line); }
.botao.pequeno { padding: 6px 12px; font-size: 14px; }
.formulario > .botao { justify-self: start; }

/* Tabelas */
.tabela { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tabela th, .tabela td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabela th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela .acoes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.tabela .acoes form { margin: 0; }
.tabela tr.inativa td { color: var(--muted); }
.selo { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.destaque-senha { border-left: 4px solid var(--accent); margin-bottom: 8px; }
.destaque-senha p { margin: 0 0 6px; }
.destaque-senha .senha code { font-size: 22px; letter-spacing: .08em; }

.passos { margin: 0; padding-left: 22px; display: grid; gap: 12px; }
.passos code { word-break: break-all; background: var(--accent-soft); color: var(--accent); padding: 2px 6px; border-radius: 6px; }

.rodape { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 22px; padding-bottom: 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.rodape a { color: var(--muted); }

@media (max-width: 760px) {
  .quem { display: none; }
  .formulario.em-linha { grid-template-columns: 1fr; }
  .tabela, .tabela tbody, .tabela tr, .tabela td { display: block; width: 100%; }
  .tabela thead { display: none; }
  .tabela tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .tabela td { border: 0; padding: 4px 14px; }
  .tabela td[data-rotulo]::before { content: attr(data-rotulo); display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
  .tabela .acoes { justify-content: flex-start; padding-bottom: 10px; }
}
