/* ============================================================
   PropTech auth screens — split layout (photo panel + form)
   Tokens live in app.css (:root). Flat colours only, no gradients.
   ============================================================ */

body.auth { background: var(--color-surface); }

.auth-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 100vh; }

/* Photo panel */
.auth-aside {
    position: relative; display: flex; flex-direction: column; justify-content: space-between; color: #fff;
    padding: 2.5rem 3rem; background-color: var(--color-primary);
    background-image: var(--auth-image, none); background-size: cover; background-position: center;
}
.auth-aside::before { content: ""; position: absolute; inset: 0; background: rgba(23,42,58,0.72); }
.auth-aside > * { position: relative; }
.auth-aside .brand { color: #fff; }
.auth-aside .brand:hover { text-decoration: none; }
.auth-aside .brand .brand-mark { background: var(--color-secondary); color: var(--color-primary); }
.auth-copy .eyebrow { color: var(--color-secondary); }
.auth-copy h2 { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; max-width: 14ch; margin-bottom: 1rem; color: #fff; }
.auth-copy p { color: rgba(255,255,255,0.88); max-width: 40ch; font-size: 1.05rem; }
.auth-points { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: 0.85rem; }
.auth-points li { display: flex; align-items: center; gap: 0.75rem; font-weight: 500; }
.auth-points .icon { color: var(--color-secondary); flex-shrink: 0; }
.auth-foot { font-size: 0.82rem; color: rgba(255,255,255,0.65); }

/* Form panel */
.auth-main { display: flex; flex-direction: column; padding: 1.5rem 2rem 2rem; background: var(--color-surface); }
.auth-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.auth-top .brand { display: none; color: var(--color-primary); }
.auth-back { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; font-weight: 500; color: var(--color-text-muted); margin-left: auto; }
.auth-back:hover { color: var(--color-primary); text-decoration: none; }
.auth-center { flex: 1; display: flex; align-items: center; justify-content: center; }
.auth-card { width: 100%; max-width: 440px; padding: 1rem 0 2rem; }

.auth-head { margin-bottom: 1.75rem; }
.auth-head h1, .auth-card > h2:first-child { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.4rem; text-align: left; }
.auth-head p, .auth-card > p.text-center { color: var(--color-text-muted); margin: 0; }
.auth-card > h2, .auth-card > p.text-center { text-align: left !important; }
.auth-card .field label { font-weight: 600; }

.auth-alert { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.85rem 1rem; border-radius: var(--radius); font-size: 0.9rem; margin-bottom: 1.25rem; }
.auth-alert .icon { flex-shrink: 0; margin-top: 2px; }
.auth-alert--ok { background: var(--color-success-light); color: var(--color-success); }
.auth-alert--err { background: #fbe9e7; color: #7f1d1d; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 3rem; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--color-text-muted); cursor: pointer; border-radius: 50%; }
.pw-toggle:hover { color: var(--color-primary); background: var(--color-bg); }

.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0.25rem 0 1.5rem; }
.auth-row label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 500; margin: 0; cursor: pointer; }
.auth-row a { font-size: 0.9rem; font-weight: 600; color: var(--color-accent-dark); }

.pw-rules { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; font-size: 0.8rem; color: var(--color-text-muted); }
.pw-rules li { display: inline-flex; align-items: center; gap: 0.3rem; }
.pw-rules li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-border); }
.pw-rules li.ok { color: var(--color-success); }
.pw-rules li.ok::before { background: var(--color-success); }

.auth-steps { display: flex; gap: 6px; margin-bottom: 1.5rem; }
.auth-steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--color-border); }
.auth-steps i.on { background: var(--color-accent); }
.auth-steps-label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 0.6rem; }

.auth-footer { text-align: left; margin-top: 1.5rem; font-size: 0.92rem; color: var(--color-text-muted); }
.auth-footer a { font-weight: 600; color: var(--color-accent-dark); }

@media (max-width: 900px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-aside { padding: 1rem 1.25rem; min-height: 0; }
    .auth-aside .auth-copy, .auth-aside .auth-foot { display: none; }
    .auth-main { padding: 1.25rem 1.25rem 2rem; }
    .auth-center { align-items: flex-start; }
    .auth-head h1, .auth-card > h2:first-child { font-size: 1.6rem; }
}

/* ------------------------------------------------------------
   Compact sign-up: everything fits on one screen where possible
   ------------------------------------------------------------ */

.auth-card--wide { max-width: 520px; }
.auth-card--compact { padding-top: 0; padding-bottom: 1rem; }
.auth-card--compact .auth-head { margin-bottom: 1.1rem; }
.auth-card--compact .auth-head h1 { font-size: 1.6rem; }
.auth-card--compact .auth-head p { font-size: 0.92rem; }
.auth-card--compact .field { margin-bottom: 0.85rem; }
.auth-card--compact .field label { margin-bottom: 0.3rem; font-size: 0.85rem; }
.auth-card--compact input:not([type="radio"]):not([type="checkbox"]) { min-height: 46px; }
.auth-card--compact .auth-footer { margin-top: 1rem; }

/* Two fields per row; the stacking one collapses on narrow screens, the names pair stays side by side */
.auth-card .form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.auth-card .form-pair > .field { min-width: 0; }

/* "I'm looking to": equal-width segmented buttons */
.auth-card .choice-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; padding: 4px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius); }
.auth-card .choice-row input { position: absolute; opacity: 0; pointer-events: none; }
.auth-card .choice-row label {
    display: flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 44px; margin: 0; padding: 0 0.5rem;
    border-radius: 8px; border: 1px solid transparent; background: transparent;
    font-family: var(--font-heading); font-weight: 700; font-size: 0.88rem; color: var(--color-text-muted); cursor: pointer;
    transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.auth-card .choice-row label:hover { color: var(--color-primary); }
.auth-card .choice-row input:checked + label { background: var(--color-primary); color: #fff; box-shadow: var(--shadow); }
.auth-card .choice-row input:focus-visible + label { box-shadow: var(--focus-ring); }
.auth-card .choice-row .icon { flex-shrink: 0; }
.choice-hint { margin: 0.4rem 0 0; font-size: 0.82rem; color: var(--color-text-muted); }

/* Password rules: one quiet line, never a tall block */
.auth-card--compact .pw-rules { margin-top: 0.4rem; font-size: 0.78rem; gap: 0.2rem 0.85rem; }

/* Buttons: consistent size, no jumping when the label changes */
.auth-card .btn-block { min-height: 50px; font-size: 1rem; }
.pw-toggle { width: 40px; height: 40px; right: 4px; }
.pw-wrap input { padding-right: 2.9rem; }

@media (max-width: 900px) {
    .auth-aside { padding: 0.75rem 1.25rem; }
    .auth-main { padding: 0.75rem 1.25rem 1.5rem; }
    .auth-top { margin-bottom: 0.25rem; }
    .auth-card { padding-top: 0.5rem; }
    .auth-card--compact .auth-head { margin-bottom: 0.9rem; }
}
@media (max-width: 520px) {
    .auth-card .form-pair--stack { grid-template-columns: 1fr; gap: 0; }
    .auth-card .choice-row .icon { display: none; }
    .auth-card .choice-row label { font-size: 0.84rem; padding: 0 0.25rem; }
}
/* Short laptop screens: tighten vertical rhythm instead of scrolling */
@media (min-width: 901px) and (max-height: 820px) {
    .auth-main { padding-top: 1rem; padding-bottom: 1rem; }
    .auth-card--compact .field { margin-bottom: 0.7rem; }
    .auth-card--compact input:not([type="radio"]):not([type="checkbox"]) { min-height: 44px; }
    .auth-card--compact .auth-head { margin-bottom: 0.9rem; }
}
