/* ===== Telas de acesso (login, recuperar senha…) ===== */
:root {
    --ink: #0f2229; --muted: #5b6f77; --line: #d9e3e1; --primary: #0f7b6c; --primary-600: #0b6a5d; --primary-50: #e1f2ef;
    --deep: #0d2830; --mint: #3ddbc0; --danger: #d4443b; --danger-50: #fbe4e2;
    --font-ui: 'Public Sans', system-ui, sans-serif; --font-display: 'Bricolage Grotesque', 'Public Sans', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body.auth-body { margin: 0; font-family: var(--font-ui); color: var(--ink); background: #f4f7f6; -webkit-font-smoothing: antialiased; }
.auth { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr); min-height: 100vh; min-height: 100dvh; }

/* Painel de marca com a planta baixa */
.auth-art { position: relative; overflow: hidden; background: var(--deep); color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(1.5rem, 4vw, 3rem); isolation: isolate; }
.auth-art::before { content: ''; position: absolute; inset: 0; z-index: -2; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 32px 32px; mask-image: radial-gradient(ellipse at 60% 50%, #000 35%, transparent 80%); }
.auth-art::after { content: ''; position: absolute; z-index: -1; width: 520px; height: 520px; right: -160px; bottom: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(61, 219, 192, .22), transparent 65%); }
.auth .brand, .auth .brand:hover { color: #fff; text-decoration: none; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: #fff; }
.brand .mark { width: 44px; height: 44px; border-radius: 12px; background: var(--primary); display: grid; place-items: center; font-size: 1.35rem; overflow: hidden; flex: none; }
.brand .mark img { width: 100%; height: 100%; object-fit: cover; }
.brand b { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.1; display: block; }
.brand small { opacity: .7; font-size: .8rem; }
.art-copy h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.08; letter-spacing: -.02em; max-width: 15ch; margin: 0 0 .9rem; }
.art-copy p { max-width: 42ch; opacity: .75; margin: 0; font-size: 1.02rem; line-height: 1.55; }

.plan { width: auto; max-width: 100%; height: min(44vh, 400px); margin: 1.25rem auto; display: block; overflow: visible; flex: 0 1 auto; }
.plan .wall { fill: none; stroke: rgba(255,255,255,.92); stroke-width: 4.5; stroke-linecap: square; stroke-linejoin: miter; }
.plan .part { fill: none; stroke: rgba(255,255,255,.88); stroke-width: 3; stroke-linecap: square; }
.plan .win { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 1.6; }
.plan .door { fill: none; stroke: var(--mint); stroke-width: 1.8; stroke-linecap: round; }
.plan .furn { fill: none; stroke: rgba(255,255,255,.38); stroke-width: 1.6; stroke-linejoin: round; }
.plan .dim { fill: none; stroke: rgba(255,255,255,.35); stroke-width: 1; }
.plan text { fill: rgba(255,255,255,.62); font-family: var(--font-ui); font-size: 13px; letter-spacing: .02em; }
.plan [data-d] { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.5s cubic-bezier(.5, 0, .2, 1) forwards; animation-delay: calc(var(--i, 0) * 120ms); }
.plan .fade { opacity: 0; animation: fadein .9s ease forwards; animation-delay: calc(1.3s + var(--i, 0) * 90ms); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }

/* Painel do formulário */
.auth-pane { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 2rem 1.25rem; position: relative; }
.auth-card { width: 100%; max-width: 410px; }
.auth-card .mobile-brand { display: none; }
.auth-card h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; letter-spacing: -.02em; margin: 0 0 .35rem; }
.auth-card .lead { color: var(--muted); margin: 0 0 1.75rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: .35rem; }
.control { position: relative; }
.control > i.lead-ico { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; font-size: 1.05rem; }
.control input { width: 100%; height: 50px; padding: 0 3rem 0 2.75rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.control input::placeholder { color: #98a9ae; }
.control input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(15, 123, 108, .15); }
.control input.is-invalid { border-color: var(--danger); }
.control .reveal { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); border-radius: 10px; display: grid; place-items: center; font-size: 1.1rem; }
.control .reveal:hover { background: var(--primary-50); color: var(--primary); }
.hint { font-size: .8rem; color: #8a5a00; margin-top: .4rem; }
.field-error { color: var(--danger); font-size: .82rem; margin-top: .35rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.25rem 0 1.4rem; font-size: .9rem; }
.check { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.auth a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth a:hover { text-decoration: underline; }
.btn-main { width: 100%; height: 52px; border: 0; border-radius: 12px; background: var(--primary); color: #fff; font: 700 1rem var(--font-ui); display: inline-flex; align-items: center; justify-content: center; gap: .6rem; transition: background .15s, transform .1s; cursor: pointer; }
.btn-main:hover { background: var(--primary-600); }
.btn-main:active { transform: translateY(1px); }
.btn-main:disabled { opacity: .75; cursor: progress; }
.btn-main .spin { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: none; }
.btn-main.is-loading .spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.alert-x { border-radius: 12px; padding: .85rem 1rem; margin-bottom: 1.25rem; display: flex; gap: .7rem; align-items: flex-start; font-size: .92rem; }
.alert-x.err { background: var(--danger-50); color: #a3302a; animation: shake .4s; }
.alert-x.ok { background: #dff3e6; color: #17703d; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.auth-foot { margin-top: 2rem; text-align: center; color: var(--muted); font-size: .8rem; }
.back-link { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1.4rem; font-size: .9rem; }
.center-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-size: 1.8rem; margin-bottom: 1.2rem; }

@media (max-width: 991.98px) {
    .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .auth-art { padding: 1.1rem 1.25rem; flex-direction: row; align-items: center; }
    .auth-art .plan, .auth-art .art-copy { display: none; }
    .auth-pane { justify-content: flex-start; padding-top: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
    .plan [data-d] { animation: none; stroke-dashoffset: 0; }
    .plan .fade { animation: none; opacity: 1; }
    .alert-x.err { animation: none; }
}
