/* ════════════════════════════════════════════════════════════════════════
   IMOBPRO • LOGIN CSS
   ══════════════════════════════════════════════════════════════════════════ */

:root {
    --primary:       #4f46e5;
    --primary-hover: #4338ca;
    --primary-soft:  #e0e7ff;
    --text:          #0f172a;
    --text-muted:    #64748b;
    --border:        #e2e8f0;
    --border-strong: #cbd5e1;
    --danger:        #ef4444;
    --danger-bg:     #fee2e2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ─── SHELL ────────────────────────────────────────────────────────────── */
.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}

/* ─── LADO ESQUERDO ────────────────────────────────────────────────────── */
.login-hero {
    background: radial-gradient(ellipse at top left, #312e81 0%, #1e1b4b 50%, #0f172a 100%);
    color: #fff;
    display: flex;
    align-items: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}
.login-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(79,70,229,.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(124,58,237,.3) 0%, transparent 50%);
    pointer-events: none;
}

.login-hero-inner { position: relative; max-width: 480px; }

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 64px;
}
.brand-mark {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: -.02em;
}
.brand-text { font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand-text span { color: #a78bfa; }

.login-hero-title {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.03em;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.login-hero-sub {
    font-size: 15px;
    color: rgba(255,255,255,.7);
    line-height: 1.6;
    margin-bottom: 40px;
}

.login-hero-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.login-hero-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255,255,255,.85);
}
.login-hero-features svg {
    width: 18px; height: 18px;
    color: #a78bfa;
    flex-shrink: 0;
    background: rgba(167,139,250,.15);
    padding: 4px;
    border-radius: 50%;
    box-sizing: content-box;
}

/* ─── LADO DIREITO ─────────────────────────────────────────────────────── */
.login-panel {
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

/* ─── TABS ─────────────────────────────────────────────────────────────── */
.login-tabs {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 32px;
    width: fit-content;
}
.tab-btn {
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    transition: background .15s, color .15s;
}
.tab-btn.active {
    background: #fff;
    color: var(--text);
    box-shadow: 0 1px 3px rgb(15 23 42 / .1);
}

/* ─── FORM ─────────────────────────────────────────────────────────────── */
.auth-form { display: none; flex-direction: column; gap: 16px; }
.auth-form.active { display: flex; }
.auth-form h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.form-sub { color: var(--text-muted); font-size: 14px; margin-top: -8px; margin-bottom: 8px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: var(--text); }
.field input {
    width: 100%;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.field input:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.field-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    width: 100%;
}

.field-grid .field {
    min-width: 0;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: 0;
    margin-top: 8px;
    transition: background .15s, transform .1s;
    box-shadow: 0 4px 14px -4px rgb(79 70 229 / .5);
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex; align-items: center; gap: 8px;
}
.alert--error   { background: var(--danger-bg); color: var(--danger); border: 1px solid #fca5a5; }
.alert--success { background: #dcfce7; color: #16a34a; border: 1px solid #86efac; }

.login-footer {
    margin-top: 48px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* ─── RESPONSIVO ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-hero { display: none; }
    .login-panel { padding: 32px 20px; min-height: 100vh; }
}
@media (max-width: 480px) {
    .field-grid { grid-template-columns: 1fr; }
}
