@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f7f2f0; --surface: #ffffff; --ink: #2a1a21; --ink-soft: #4d3a43; --muted: #806c75;
  --line: #e9dcd8; --brand: #a3245e; --brand-strong: #86194c; --brand-ink: #7a1645; --bad: #be123c; --bad-soft: #fde8ee;
  --ring: 0 0 0 4px rgba(163,36,94,.16);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}
:root[data-theme="dark"] {
  --bg: #140c10; --surface: #1d1318; --ink: #f5eaee; --ink-soft: #ddcbd3; --muted: #a58f99;
  --line: #34242b; --brand: #f08ab6; --brand-strong: #f6a9ca; --brand-ink: #ffc4dd; --bad: #fb7185; --bad-soft: #321520;
  --ring: 0 0 0 4px rgba(240,138,182,.22);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }

.pagina { min-height: 100%; display: grid; grid-template-columns: minmax(380px, 46%) 1fr; }

/* ---------- painel da marca ---------- */
.painel { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 44px clamp(32px, 5vw, 64px); color: #fdf0f5; background: #7a1645;
  border-right: 6px solid #f3c6d8; }
.painel > * { position: relative; }
.marca { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 15px; letter-spacing: .1px; }
.logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.14); color: #fff; flex: none; }
.logo svg { width: 23px; height: 23px; }
.painel-meio { max-width: 460px; }
.painel h2 { margin: 0 0 14px; font-family: var(--serif); font-size: clamp(30px, 3vw, 42px); line-height: 1.12; font-weight: 700; letter-spacing: -.4px; }
.painel p { margin: 0 0 26px; color: rgba(253,240,245,.84); font-size: 15px; line-height: 1.6; }
.procs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.procs li { background: var(--c); color: var(--t); padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; box-shadow: 0 0 0 1.5px rgba(255,255,255,.35); }
.painel-pe { font-size: 12.5px; color: rgba(253,240,245,.72); font-weight: 600; }

/* ---------- formulário ---------- */
.lado-form { position: relative; display: grid; place-items: center; padding: 40px 24px; }
.tema { position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center; color: var(--ink-soft); cursor: pointer; }
.tema svg { width: 18px; height: 18px; }
.tema .moon { display: none; }
[data-theme="dark"] .tema .sun { display: none; }
[data-theme="dark"] .tema .moon { display: block; }
.cartao { width: min(400px, 100%); }
/* logo da Secretaria de Saúde (versão branca no tema escuro) */
.logo-saude { display: flex; align-items: center; }
.logo-saude img { display: block; width: auto; }
.logo-saude .ls-branco { display: none; }
[data-theme="dark"] .logo-saude .ls-cor { display: none; }
[data-theme="dark"] .logo-saude .ls-branco { display: block; }
.cartao .logo-saude { margin-bottom: 34px; }
.cartao .logo-saude img { width: 100%; max-width: 360px; height: auto; }
.marca-cel { display: none; }
h1 { margin: 0; font-family: var(--serif); font-size: 34px; font-weight: 700; letter-spacing: -.3px; }
.sub { margin: 8px 0 28px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin: 0 0 7px; }
.campo { position: relative; margin-bottom: 18px; }
.campo > svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.campo input { width: 100%; height: 50px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface);
  padding: 0 46px 0 44px; font-size: 15.5px; transition: border-color .15s, box-shadow .15s; }
.campo input::placeholder { color: #9aaba3; }
.campo input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.ver { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.ver svg { width: 19px; height: 19px; }
.ver:hover, .ver.on { color: var(--brand-strong); background: rgba(163,36,94,.08); }
.erro { min-height: 20px; margin: -4px 0 12px; color: var(--bad); font-size: 13.5px; font-weight: 700; }
.erro:not(:empty) { padding: 10px 12px; border-radius: 10px; background: var(--bad-soft); margin: 0 0 14px; }
.entrar { width: 100%; height: 52px; border: 0; border-radius: 12px; background: var(--brand-strong); color: #fff; font-size: 16px; font-weight: 800;
  cursor: pointer; transition: transform .08s, filter .15s; box-shadow: 0 10px 24px -12px rgba(134,25,76,.8); }
.entrar:hover { filter: brightness(1.06); }
.entrar:active { transform: translateY(1px); }
.entrar:disabled { opacity: .7; cursor: default; }
[data-theme="dark"] .entrar { color: #2a0b19; background: var(--brand); }
.ajuda { margin: 22px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
:focus-visible { outline: none; box-shadow: var(--ring); }

/* ---------- celular e tablet em pé ---------- */
@media (max-width: 860px) {
  .pagina { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .painel { padding: 22px 20px 24px; gap: 14px; border-right: 0; border-bottom: 5px solid #f3c6d8; }
  .painel-meio h2 { font-size: 21px; margin-bottom: 8px; }
  .painel p { font-size: 13.5px; margin-bottom: 14px; }
  .painel-pe { display: none; }
  .procs { gap: 6px; }
  .procs li { font-size: 11.5px; padding: 5px 10px; }
  .lado-form { place-items: start center; padding: 28px 20px 40px; }
  .tema { top: 18px; right: 16px; background: rgba(255,255,255,.14); border-color: transparent; color: #fff; position: fixed; }
  h1 { font-size: 26px; }
  .sub { margin-bottom: 22px; }
  .campo input { font-size: 16px; }
}
@media (max-width: 420px) {
  .painel-meio p { display: none; }
}

/* regras da senha nova */
.regras { list-style: none; padding: 0; margin: -8px 0 16px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.regras li::before { content: "○"; margin-right: 6px; }
.regras li.ok { color: #15803d; }
.regras li.ok::before { content: "✓"; }
[data-theme="dark"] .regras li.ok { color: #4ade80; }
.ajuda a { color: var(--brand-ink); font-weight: 700; margin: 0 8px; }

/* marca da Carreta da Mulher (carreta com o laço rosa): o desenho já traz o fundo */
.logo:has(> svg.cm-marca) { background: none !important; box-shadow: none; padding: 0; overflow: hidden; }
.logo svg.cm-marca { width: 100%; height: 100%; display: block; }
/* sobre o fundo vinho, a marca ganha um contorno claro para não sumir */
.marca .logo:has(> svg.cm-marca) { box-shadow: 0 0 0 1.5px rgba(255,255,255,.4), 0 6px 16px rgba(0,0,0,.22); }

/* primeiro acesso */
.primeiro { margin: 14px 0 0; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--ink-soft); }
.link-primeiro { border: 1.5px solid var(--brand); background: transparent; color: var(--brand-ink, var(--brand)); font: inherit; font-weight: 800; padding: 9px 16px; min-height: 44px; border-radius: 10px; cursor: pointer; }
.link-primeiro:hover { background: var(--brand-soft); }
.voltar { border: 0; background: none; padding: 0; margin: 0 0 14px; min-height: 44px; font: inherit; font-size: 14px; font-weight: 700; color: var(--brand-ink, var(--brand)); cursor: pointer; }
.campo.sem-ic input, .campo.sem-ic select { padding: 0 14px; }
.campo select { width: 100%; height: 50px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 15.5px; }
.campo select:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
#cartao-sol .campo { margin-bottom: 14px; }
.ok-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft, #e3f4e8); color: var(--ok, #1d7a44); font-size: 28px; font-weight: 800; margin: 0 0 16px; }
@media (max-width: 700px) { .dupla { grid-template-columns: 1fr; } .campo input, .campo select { font-size: 16px; } }
