/* Cardoso & Freitas · telas de acesso (login e instalador)
   Mesmos tokens do sistema: dourado institucional, preto, fundo claro, Cormorant Garamond + Inter. */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --gold: #AB7C1B; --gold-2: #D6AC50; --gold-dark: #8F6612; --gold-text: #7A5710; --gold-soft: #F4EBD8; --gold-line: #E8D9B5;
  --ink: #202020; --ink-2: #3A3A3A; --bg: #F7F6F3; --card: #FFFFFF; --line: #E8E3D8; --surface: #FCFBF8;
  --muted: #6B665E; --muted-2: #9A958C; --danger: #A23B2A; --ok: #2F6B3E;
  --radius: 18px; --shadow: 0 1px 2px rgba(32,32,32,.05), 0 24px 64px rgba(32,32,32,.14);
  --ring: 0 0 0 3px rgba(171,124,27,.20);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body.auth-body {
  min-height: 100vh; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--ink); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(214,172,80,.38) 0%, transparent 62%),
    radial-gradient(700px 380px at 96% 4%, rgba(171,124,27,.20) 0%, transparent 60%),
    linear-gradient(180deg, #202020 0, #202020 40vh, var(--bg) 40vh);
  display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 32px;
}
.auth-wrap { width: 100%; max-width: 432px; }
.auth-wrap.auth-wide { max-width: 640px; }
.auth-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 38px 36px 32px; border: 1px solid var(--line); position: relative; overflow: hidden; }
.auth-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-2), var(--gold)); }
.auth-logo { display: block; width: 204px; max-width: 68%; height: auto; margin: 2px auto 22px; }
.auth-card h1 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; font-size: 31px; line-height: 1.1; text-align: center; margin: 0 0 6px; color: var(--ink); }
.auth-card .lead { color: var(--ink-2); line-height: 1.6; margin: 6px 0 18px; }
.auth-sub { text-align: center; color: var(--muted); margin: 0 0 26px; font-size: 13.5px; }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.form input[type=text], .form input[type=email], .form input[type=password], .form input[type=number], .form input:not([type]) {
  width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14.5px; font-weight: 400;
  background: var(--surface); color: var(--ink); transition: border-color .12s, box-shadow .12s, background .12s;
}
.form input:hover { border-color: #D9D2C2; }
.form input:focus { outline: none; border-color: var(--gold); box-shadow: var(--ring); background: #fff; }
.form input::placeholder { color: var(--muted-2); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pw { position: relative; }
.pw input { padding-right: 48px !important; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; width: 36px; height: 36px;
  border-radius: 8px; cursor: pointer; color: var(--muted-2); display: grid; place-items: center; transition: background .12s, color .12s; }
.pw-toggle:hover { background: var(--gold-soft); color: var(--gold); }
.pw-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.pw-toggle svg { width: 18px; height: 18px; }
.check { display: flex !important; grid-template-columns: none; align-items: center; gap: 9px !important; font-weight: 500 !important; }
.check input { width: 17px; height: 17px; accent-color: var(--gold); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 10px;
  border: 1px solid transparent; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .12s, box-shadow .12s; }
.btn-primary { background: var(--gold); color: #fff; box-shadow: 0 1px 2px rgba(143,102,18,.4), inset 0 1px 0 rgba(255,255,255,.14); }
.btn-primary:hover { background: var(--gold-dark); }
.btn-primary:focus-visible { outline: none; box-shadow: var(--ring), 0 1px 2px rgba(143,102,18,.4); }
.btn-primary[disabled] { opacity: .6; cursor: wait; }
.btn-block { width: 100%; margin-top: 6px; }
.alert { border-radius: 10px; padding: 11px 14px; font-size: 13.5px; margin: 0 0 14px; line-height: 1.45; }
.alert-error { background: #FBEDEA; color: var(--danger); border: 1px solid #F1CFC8; }
.alert-ok { background: #EAF4EC; color: var(--ok); border: 1px solid #CFE6D3; }
.alert[hidden] { display: none; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
code { background: var(--gold-soft); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 4px 0 22px; counter-reset: s; justify-content: center; flex-wrap: wrap; }
.steps li { counter-increment: s; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 6px 12px 6px 8px; border-radius: 999px; background: #F2EFE8; }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 6px; border-radius: 50%; background: #fff; font-weight: 700; }
.steps li.on { background: var(--gold); color: #fff; }
.steps li.on::before { color: var(--gold); }
.steps li.done { background: var(--gold-soft); color: var(--gold-text); }
.auth-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 20px; }
@media (max-width: 560px) {
  body.auth-body { padding-top: 5vh; }
  .auth-card { padding: 30px 20px 24px; border-radius: 16px; }
  .row2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01ms !important; } }
