:root {
  --bg: #f5f7fb; --card: #ffffff; --texto: #1b2433; --suave: #5b677a;
  --borda: #e3e8f0; --destaque: #2f6df6; --sombra: 0 1px 2px rgba(20,30,50,.06), 0 8px 24px rgba(20,30,50,.06);
  --fundo-icone: #f1f4f9; --erro-bg: #fdecec; --erro: #a12626; --ok-bg: #e8f6ee; --ok: #1d6b3f;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420; --card: #171e2e; --texto: #e8ecf5; --suave: #9aa6bd;
    --borda: #263049; --destaque: #6b9bff; --sombra: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    --fundo-icone: #232c42; --erro-bg: #3a1c1f; --erro: #ff9a9a; --ok-bg: #16301f; --ok: #8ee0ae;
  }
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--texto); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.5; }
main { max-width: 960px; margin: 0 auto; padding: 32px 16px 64px; }
main.estreito { max-width: 440px; padding-top: 12vh; }
header { text-align: center; margin: 12px 0 32px; }
header h1 { margin: 0 0 8px; font-size: clamp(1.7rem, 4vw, 2.3rem); letter-spacing: -.02em; }
header p { margin: 0; color: var(--suave); }
a { color: var(--destaque); }

.topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.quem { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.quem strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quem span { color: var(--suave); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline { margin: 0; }

.busca { display: block; width: 100%; max-width: 420px; margin: 20px auto 0; padding: 11px 16px; border: 1px solid var(--borda); border-radius: 999px; background: var(--card); color: var(--texto); font: inherit; outline: none; }
.busca:focus, input:focus { border-color: var(--destaque); box-shadow: 0 0 0 3px rgba(47,109,246,.22); outline: none; }
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.bloco { display: flex; flex-direction: column; gap: 14px; padding: 22px; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--borda); border-radius: 16px; box-shadow: var(--sombra); transition: transform .15s ease, border-color .15s ease; }
.bloco:hover, .bloco:focus-visible { transform: translateY(-3px); border-color: var(--cor); outline: none; }
.icone { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; background: var(--fundo-icone); }
.icone img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; display: block; }
.bloco h2 { margin: 0; font-size: 1.1rem; }
.bloco p { margin: 0; color: var(--suave); font-size: .93rem; flex: 1; }
.rodape-bloco { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; color: var(--cor); font-weight: 600; }
.vazio { text-align: center; color: var(--suave); margin-top: 24px; display: none; }
footer { text-align: center; margin-top: 40px; color: var(--suave); font-size: .85rem; }

.cartao-login { display: flex; flex-direction: column; gap: 14px; padding: 28px; background: var(--card); border: 1px solid var(--borda); border-radius: 18px; box-shadow: var(--sombra); }
.cartao-login h1, .cartao-login h2 { margin: 0; font-size: 1.6rem; letter-spacing: -.02em; }
.cartao-login .sub { margin: 0; color: var(--suave); }
.etq { text-transform: uppercase; letter-spacing: .08em; color: var(--destaque); font-weight: 700; font-size: .72rem; }
label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 600; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; color: var(--suave); }
input[type=email], input[type=password], input[type=text] { padding: 11px 14px; border: 1px solid var(--borda); border-radius: 10px; background: var(--bg); color: var(--texto); font: inherit; font-weight: 400; }
small { color: var(--suave); font-size: .8rem; }
.btn, .btn-sec { font: inherit; font-weight: 600; border-radius: 10px; cursor: pointer; padding: 11px 18px; border: 1px solid transparent; }
.btn { background: var(--destaque); color: #fff; }
.btn:hover { filter: brightness(1.08); }
.btn-sec { background: transparent; color: var(--texto); border-color: var(--borda); padding: 8px 16px; }
.btn-sec:hover { border-color: var(--destaque); }
.msg { padding: 10px 14px; border-radius: 10px; font-size: .92rem; margin: 0 0 4px; }
.msg.erro { background: var(--erro-bg); color: var(--erro); }
.msg.ok { background: var(--ok-bg); color: var(--ok); }
.minha-senha { max-width: 440px; margin: 40px auto 0; background: var(--card); border: 1px solid var(--borda); border-radius: 14px; padding: 4px 18px; }
.minha-senha summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.minha-senha form { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 18px; }
