/**
 * Login Page Styles — Contract Box Realty
 */

body {
    background: linear-gradient(145deg, #0f2440 0%, #1a3a5c 50%, #0e1e30 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-wrap {
    width: 100%;
    max-width: 420px;
}

/* ── Card ───────────────────────────────────────────────────────────────── */
.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.login-header {
    background: linear-gradient(135deg, #1a3a5c 0%, #0f2440 100%);
    padding: 36px 32px 28px;
    text-align: center;
    border-bottom: 3px solid var(--accent);
}

.login-logo-wrap {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.10);
    border: 2px solid rgba(201,168,76,0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.login-logo-svg {
    width: 38px;
    height: 38px;
    fill: var(--accent);
}

.login-brand {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .02em;
}

.login-tagline {
    font-size: .82rem;
    color: rgba(255,255,255,.65);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* ── Body ───────────────────────────────────────────────────────────────── */
.login-body {
    padding: 36px 32px 32px;
}

/* ── Steps ──────────────────────────────────────────────────────────────── */
.step { display: none; }
.step.active {
    display: block;
    animation: fadeIn var(--t-normal);
}
.step h2 {
    font-size: 1.15rem;
    margin-bottom: 6px;
    color: var(--text-primary);
}
.step .step-sub {
    font-size: .875rem;
    color: var(--text-muted);
    margin-bottom: 22px;
}

/* ── Masked email badge ─────────────────────────────────────────────────── */
.email-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-stripe);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: .875rem;
    color: var(--text-secondary);
    margin-bottom: 22px;
}
.email-badge svg { width: 14px; height: 14px; opacity: .6; flex-shrink: 0; }

/* ── OTP countdown timer ────────────────────────────────────────────────── */
.otp-timer {
    text-align: center;
    font-size: .82rem;
    color: var(--text-muted);
    margin-top: 12px;
    min-height: 20px;
}
.otp-timer.expiring { color: var(--error); font-weight: 600; }

/* ── Resend ─────────────────────────────────────────────────────────────── */
.resend-row {
    text-align: center;
    margin-top: 10px;
}
.resend-row button {
    background: none;
    border: none;
    color: var(--primary);
    font-size: .875rem;
    cursor: pointer;
    padding: 4px 8px;
    font-family: var(--font-sans);
    border-radius: var(--radius);
    transition: background var(--t-fast);
}
.resend-row button:hover  { background: var(--bg-hover); }
.resend-row button:disabled { color: var(--text-muted); cursor: default; }
.resend-row button:disabled:hover { background: none; }

/* ── Success step ───────────────────────────────────────────────────────── */
.success-circle {
    width: 72px; height: 72px;
    background: var(--success);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    animation: popIn .4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.success-circle svg { width: 36px; height: 36px; fill: #fff; }

@keyframes popIn {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.success-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 4px;
}
.success-role {
    font-size: .875rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 18px;
}

/* ── New account link ───────────────────────────────────────────────────── */
.new-account-row {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: .875rem;
    color: var(--text-muted);
}
.new-account-row a {
    color: var(--accent);
    font-weight: 600;
    margin-left: 4px;
}
.new-account-row a:hover { color: var(--accent-dark); }

/* ── Back link ──────────────────────────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: .82rem;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    margin-bottom: 20px;
    font-family: var(--font-sans);
    transition: color var(--t-fast);
}
.back-link:hover { color: var(--text-secondary); }
.back-link svg { width: 14px; height: 14px; }

/* ── Footer note ────────────────────────────────────────────────────────── */
.login-footer {
    text-align: center;
    padding: 14px 32px 20px;
    font-size: .78rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .login-header { padding: 28px 24px 22px; }
    .login-body   { padding: 28px 24px 24px; }
    .login-footer { padding: 12px 24px 16px; }
}

/* ── Dark mode ──────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    body { background: linear-gradient(145deg, #080f18 0%, #0f1923 60%, #060c14 100%); }

    .login-card        { background: #1a2535; }
    .login-body        { background: #1a2535; }
    .login-footer      { background: #1a2535; border-color: #2a3d52; }
    .email-badge       { background: #1e2b3c; border-color: #2a3d52; }
    .new-account-row   { border-color: #2a3d52; }
}
