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

:root {
    --navy:      #1B2559;
    --navy-dark: #131a40;
    --navy-mid:  #2D3A7C;
    --red:       #e30613;
    --red-dark:  #c0000f;
    --gray-50:   #f8fafc;
    --gray-100:  #f1f5f9;
    --gray-300:  #cbd5e1;
    --gray-500:  #64748b;
    --gray-700:  #334155;
    --white:     #ffffff;
}

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: var(--gray-50);
    color: var(--gray-700);
    -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════
   LAYOUT — two-column split
══════════════════════════════════════ */
.login-wrap {
    display: flex;
    min-height: 100vh;
}

/* ── Left panel (brand) ── */
.brand-panel {
    display: none;
    width: 45%;
    background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-mid) 100%);
    position: relative;
    overflow: hidden;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

@media (min-width: 900px) {
    .brand-panel { display: flex; }
}

/* decorative circles */
.brand-panel::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 420px; height: 420px;
    background: rgba(220,38,38,.12);
    border-radius: 50%;
}
.brand-panel::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 300px; height: 300px;
    background: rgba(255,255,255,.05);
    border-radius: 50%;
}

.brand-logo {
    width: 140px;
    height: 140px;
    background: #fff;
    border-radius: 28px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
    padding: 12px;
}
.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-panel h1 {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.3;
    margin-bottom: .75rem;
    position: relative;
    z-index: 1;
}
.brand-panel h1 span { color: #fca5a5; }

.brand-panel p {
    color: rgba(255,255,255,.65);
    font-size: .95rem;
    text-align: center;
    max-width: 280px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.brand-divider {
    width: 48px; height: 3px;
    background: linear-gradient(to right, var(--red), rgba(220,38,38,0));
    border-radius: 99px;
    margin: 1.5rem auto;
    position: relative; z-index: 1;
}

.brand-tagline {
    color: rgba(255,255,255,.55);
    font-size: .78rem;
    text-align: center;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-top: .5rem;
    position: relative;
    z-index: 1;
}

.brand-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2.5rem;
    position: relative;
    z-index: 1;
}
.brand-stat {
    text-align: center;
}
.brand-stat .num {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.brand-stat .num span { color: var(--red); }
.brand-stat .lbl {
    font-size: .7rem;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-top: 4px;
}
.brand-stat-divider {
    width: 1px;
    background: rgba(255,255,255,.15);
    align-self: stretch;
}

.brand-footer {
    position: absolute;
    bottom: 1.5rem;
    color: rgba(255,255,255,.4);
    font-size: .72rem;
    text-align: center;
    z-index: 1;
}

/* ── Right panel (form) ── */
.form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: var(--white);
    position: relative;
}

/* top accent bar on mobile */
.form-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--navy), var(--red));
}

.form-box {
    width: 100%;
    max-width: 400px;
}

/* mobile logo (hidden on desktop) */
.mobile-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}
@media (min-width: 900px) {
    .mobile-logo { display: none; }
}
.mobile-logo-box {
    width: 72px; height: 72px;
    background: #fff;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(27,37,89,.15);
    margin-bottom: .75rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}
.mobile-logo h2 { font-size: 1rem; font-weight: 700; color: var(--navy); }
.mobile-logo p  { font-size: .72rem; color: var(--gray-500); margin-top: 2px; }

/* form heading */
.form-heading { margin-bottom: 1.75rem; }
.form-heading h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .25rem;
}
.form-heading p { font-size: .875rem; color: var(--gray-500); }

/* ══════════════════════════════════════
   ALERTS
══════════════════════════════════════ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .75rem 1rem;
    border-radius: .5rem;
    font-size: .85rem;
    margin-bottom: 1.25rem;
    border-left: 4px solid;
    animation: slideIn .25s ease-out;
}
.alert-error   { background: #fef2f2; border-color: var(--red);    color: #991b1b; }
.alert-success { background: #f0fdf4; border-color: #16a34a;       color: #166534; }
.alert i { margin-top: 1px; flex-shrink: 0; }

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════
   FORM FIELDS
══════════════════════════════════════ */
.field { margin-bottom: 1.1rem; }

.form-label {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: .4rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.form-label i { color: var(--navy); font-size: .75rem; }

.input-wrap { position: relative; }

.form-input {
    width: 100%;
    padding: .75rem 1rem;
    border: 1.5px solid var(--gray-300);
    border-radius: .6rem;
    font-size: .9rem;
    font-family: inherit;
    background: var(--gray-50);
    color: #111827;
    transition: all .2s;
    outline: none;
}
.form-input:focus {
    border-color: var(--navy);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(27,37,89,.1);
}
.form-input.has-icon { padding-left: 2.5rem; }
.form-input.has-toggle { padding-right: 2.75rem; }
.form-input.error {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}

.input-icon {
    position: absolute;
    left: .85rem;
    top: 50%; transform: translateY(-50%);
    color: var(--gray-500);
    font-size: .85rem;
    pointer-events: none;
}

.toggle-pw {
    position: absolute;
    right: .85rem;
    top: 50%; transform: translateY(-50%);
    background: none; border: none;
    cursor: pointer;
    color: var(--gray-500);
    font-size: .85rem;
    padding: 4px;
    transition: color .2s;
}
.toggle-pw:hover { color: var(--navy); }

.forgot-link {
    display: block;
    text-align: right;
    font-size: .78rem;
    color: var(--red);
    text-decoration: none;
    margin-top: .4rem;
    font-weight: 500;
}
.forgot-link:hover { text-decoration: underline; }

/* step indicator */
.step-indicator {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.5rem;
}
.step { display: flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; color: var(--gray-500); }
.step-dot {
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem; font-weight: 700;
    transition: all .3s;
}
.step.active .step-dot  { background: var(--navy); border-color: var(--navy); color: #fff; }
.step.active            { color: var(--navy); }
.step.done .step-dot    { background: #16a34a; border-color: #16a34a; color: #fff; }
.step-line              { flex: 1; height: 2px; background: var(--gray-300); border-radius: 99px; }
.step-line.active       { background: var(--navy); }

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn {
    width: 100%;
    padding: .85rem 1rem;
    border-radius: .6rem;
    font-size: .9rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: .05em;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: all .2s;
    margin-top: .5rem;
    text-transform: uppercase;
}

.btn-next {
    background: var(--navy);
    color: #fff;
    box-shadow: 0 4px 14px rgba(27,37,89,.3);
}
.btn-next:hover { background: var(--navy-mid); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(27,37,89,.35); }
.btn-next:active { transform: translateY(0); }

.btn-signin {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    box-shadow: 0 4px 14px rgba(220,38,38,.35);
}
.btn-signin:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(220,38,38,.4); }
.btn-signin:active { transform: translateY(0); }
.btn-signin:disabled { opacity: .7; cursor: not-allowed; transform: none; }

.btn-back {
    background: none;
    color: var(--gray-500);
    font-size: .82rem;
    letter-spacing: 0;
    font-weight: 500;
    text-transform: none;
    padding: .4rem;
    margin-top: .25rem;
    box-shadow: none;
}
.btn-back:hover { color: var(--navy); background: none; }

.hidden { display: none !important; }

/* ══════════════════════════════════════
   TRUST BADGES
══════════════════════════════════════ */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-100);
}
.trust-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    font-size: .7rem;
    color: var(--gray-500);
    font-weight: 500;
}
.trust-badge i {
    width: 32px; height: 32px;
    background: var(--gray-100);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--navy);
    font-size: .8rem;
}
