/* Instant Gateway — Merchant Login Page */
:root {
    --gold: #C9A84C;
    --gold-dk: #D4A017;
    --gold-lt: #F0C040;
    --navy: #1A2340;
    --navy-dk: #0D1B2A;
    --muted: #6b7280;
    --font: 'Outfit', 'Inter', sans-serif;
}

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

.auth-login-page {
    font-family: var(--font);
    min-height: 100vh;
    background: #f4f5f9;
    color: var(--navy);
}

.al-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ── Left Panel ── */
.al-left {
    background: linear-gradient(160deg, var(--navy-dk) 0%, var(--navy) 55%, #243056 100%);
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.al-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(201,168,76,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(240,192,64,0.08) 0%, transparent 40%);
    pointer-events: none;
}
.al-left-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(201,168,76,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201,168,76,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.al-left-inner { position: relative; z-index: 2; }

.al-back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 48px;
    transition: color 0.3s;
}
.al-back-home:hover { color: var(--gold-lt); }

.al-logo-box {
    display: inline-flex;
    padding: 10px 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(201,168,76,0.25);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    margin-bottom: 40px;
}
.al-logo-box img {
    max-height: 64px;
    max-width: 200px;
    object-fit: contain;
}

.al-left h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 16px;
}
.al-left h2 span {
    background: linear-gradient(90deg, var(--gold-lt), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.al-left-desc {
    font-size: 16px;
    color: rgba(255,255,255,0.55);
    line-height: 1.75;
    max-width: 400px;
    margin-bottom: 40px;
}

.al-features { display: flex; flex-direction: column; gap: 16px; }
.al-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(201,168,76,0.15);
    border-radius: 14px;
    transition: all 0.35s ease;
    animation: alFadeUp 0.7s ease both;
}
.al-feature:nth-child(1) { animation-delay: 0.2s; }
.al-feature:nth-child(2) { animation-delay: 0.35s; }
.al-feature:nth-child(3) { animation-delay: 0.5s; }
.al-feature:hover {
    background: rgba(201,168,76,0.08);
    border-color: rgba(201,168,76,0.3);
    transform: translateX(6px);
}
.al-feature-icon {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dk));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy-dk);
    flex-shrink: 0;
}
.al-feature-text strong {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}
.al-feature-text span {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
}

.al-left-footer {
    position: relative;
    z-index: 2;
    font-size: 13px;
    color: rgba(255,255,255,0.35);
    padding-top: 32px;
}

/* floating orbs */
.al-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    animation: alOrb 8s ease-in-out infinite;
}
.al-orb-1 { width: 200px; height: 200px; background: rgba(201,168,76,0.2); top: 10%; right: 10%; }
.al-orb-2 { width: 150px; height: 150px; background: rgba(240,192,64,0.1); bottom: 20%; left: 5%; animation-delay: -4s; }

/* ── Right Panel ── */
.al-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    background: #f4f5f9;
}
.al-form-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 24px;
    padding: 44px 40px;
    box-shadow: 0 4px 24px rgba(26,35,64,0.06), 0 24px 64px rgba(26,35,64,0.08);
    border: 1px solid rgba(26,35,64,0.06);
    animation: alCardIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    position: relative;
    overflow: hidden;
}
.al-form-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-lt), var(--gold), var(--gold-dk));
}

.al-form-head { margin-bottom: 32px; }
.al-form-head h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.al-form-head p {
    font-size: 15px;
    color: var(--muted);
}

/* Alerts */
.al-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 24px;
    animation: alShake 0.5s ease;
}
.al-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}
.al-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

/* Form */
.al-group { margin-bottom: 22px; }
.al-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 8px;
}
.al-input-wrap { position: relative; }
.al-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    display: flex;
}
.al-input {
    width: 100%;
    height: 52px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 0 48px;
    font-size: 15px;
    font-family: var(--font);
    color: var(--navy);
    background: #fafbfc;
    transition: all 0.3s ease;
    outline: none;
}
.al-input.with-prefix { padding-left: 72px; }
.al-input:focus {
    border-color: var(--gold);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(201,168,76,0.12);
}
.al-input.is-invalid { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,0.1); }
.al-input.is-valid { border-color: #22c55e; }
.al-prefix {
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    pointer-events: none;
}
.al-pwd-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px;
    display: flex;
    transition: color 0.3s;
}
.al-pwd-toggle:hover { color: var(--gold-dk); }
.al-field-error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 6px;
    display: none;
}
.al-field-error.show { display: block; }

.al-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}
.al-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--muted);
    user-select: none;
}
.al-check input { display: none; }
.al-check-box {
    width: 20px; height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}
.al-check input:checked + .al-check-box {
    background: var(--gold);
    border-color: var(--gold);
}
.al-check input:checked + .al-check-box::after {
    content: '';
    width: 5px; height: 9px;
    border: solid var(--navy-dk);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}
.al-forgot {
    font-size: 13px;
    font-weight: 600;
    color: var(--gold-dk);
    text-decoration: none;
    transition: color 0.3s;
}
.al-forgot:hover { color: var(--navy); }

.al-btn-submit {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gold-lt), var(--gold), var(--gold-dk));
    color: var(--navy-dk);
    font-size: 15px;
    font-weight: 800;
    font-family: var(--font);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.35s ease;
    box-shadow: 0 4px 20px rgba(201,168,76,0.35);
    position: relative;
    overflow: hidden;
}
.al-btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(201,168,76,0.45);
}
.al-btn-submit:disabled { opacity: 0.7; cursor: not-allowed; }
.al-btn-submit .al-spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(13,27,42,0.2);
    border-top-color: var(--navy-dk);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
}
.al-btn-submit.loading .al-btn-text { display: none; }
.al-btn-submit.loading .al-spinner { display: block; }

.al-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0;
    color: #9ca3af;
    font-size: 13px;
}
.al-divider::before, .al-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}
.al-register {
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}
.al-register a {
    color: var(--gold-dk);
    font-weight: 700;
    text-decoration: none;
}
.al-register a:hover { color: var(--navy); text-decoration: underline; }

.al-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    font-size: 12px;
    color: #9ca3af;
}
.al-secure svg { color: var(--gold); }

.al-mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 28px;
}

/* Register page — no page scroll, fit viewport */
html:has(.auth-register-page),
.auth-register-page {
    height: 100%;
    overflow: hidden;
}
.auth-register-page {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}
.auth-register-page .al-wrap {
    height: 100vh;
    max-height: 100vh;
    min-height: 0;
    overflow: hidden;
}
.auth-register-page .al-left {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    padding: 28px 40px;
}
.auth-register-page .al-back-home { margin-bottom: 24px; }
.auth-register-page .al-logo-box { margin-bottom: 24px; padding: 8px 16px; }
.auth-register-page .al-logo-box img { max-height: 52px; }
.auth-register-page .al-left h2 { font-size: 1.65rem; margin-bottom: 10px; }
.auth-register-page .al-left-desc { font-size: 14px; margin-bottom: 24px; }
.auth-register-page .al-feature { padding: 10px 14px; }
.auth-register-page .al-feature-icon { width: 36px; height: 36px; margin-bottom: 0; }
.auth-register-page .al-features { gap: 10px; }
.auth-register-page .al-perks { margin-top: 16px; }

.al-right--register {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    align-items: center;
    padding: 16px 24px;
}
.al-form-card--register {
    max-width: 520px;
    max-height: calc(100vh - 32px);
    padding: 24px 28px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.al-form-head--compact { margin-bottom: 16px; }
.al-form-head--compact h1 { font-size: 1.45rem; margin-bottom: 0; }

.al-reg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
}
.al-group--full { grid-column: 1 / -1; }
.al-group--terms { margin-bottom: 8px !important; }

.auth-register-page .al-group { margin-bottom: 12px; }
.auth-register-page .al-group label { font-size: 12px; margin-bottom: 5px; }
.auth-register-page .al-input {
    height: 42px;
    font-size: 14px;
    padding: 0 40px;
}
.auth-register-page .al-input.with-prefix { padding-left: 64px; }
.auth-register-page .al-prefix { left: 38px; font-size: 13px; }
.auth-register-page .al-input-icon { left: 12px; }
.auth-register-page .al-pwd-toggle { right: 10px; }
.auth-register-page .al-strength { margin-top: 6px; }
.auth-register-page .al-strength-text { display: none; }
.auth-register-page .al-alert { padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }
.auth-register-page .al-check-terms { font-size: 12px; }
.auth-register-page .al-btn-submit--compact {
    height: 44px;
    font-size: 14px;
    margin-top: 4px;
}
.al-reg-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.al-reg-footer .al-register { margin: 0; text-align: left; font-size: 13px; }
.al-secure--inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #9ca3af;
    margin: 0;
}
.al-secure--inline svg { color: var(--gold); }
.al-check-terms {
    align-items: flex-start;
    line-height: 1.5;
}
.al-check-terms .al-check-box { margin-top: 2px; }
.al-check-terms a {
    color: var(--gold-dk);
    font-weight: 600;
    text-decoration: none;
}
.al-check-terms a:hover { text-decoration: underline; }
.al-strength {
    margin-top: 10px;
    display: none;
}
.al-strength.show { display: block; }
.al-strength-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}
.al-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.4s ease, background 0.4s;
}
.al-strength-fill.weak { width: 25%; background: #ef4444; }
.al-strength-fill.fair { width: 50%; background: #f59e0b; }
.al-strength-fill.good { width: 75%; background: #3b82f6; }
.al-strength-fill.strong { width: 100%; background: #22c55e; }
.al-strength-text { font-size: 11px; font-weight: 500; color: var(--muted); }
.al-perks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}
.al-perk {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(201,168,76,0.12);
    padding: 6px 12px;
    border-radius: 99px;
}
.al-perk svg { color: var(--gold-lt); width: 14px; height: 14px; }

/* Animations */
@keyframes alFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes alCardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes alOrb {
    0%, 100% { transform: translate(0,0); }
    50% { transform: translate(15px, -15px); }
}
@keyframes alShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 991px) {
    .al-wrap { grid-template-columns: 1fr; }
    .al-left { display: none; }
    .al-mobile-logo { display: block; margin-bottom: 16px; }
    .al-right { padding: 20px 16px; }
    .al-form-card { padding: 28px 22px; }

    .auth-register-page { overflow: hidden; }
    .auth-register-page .al-wrap { height: 100vh; overflow: hidden; }
    .auth-register-page .al-right--register {
        height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
        align-items: flex-start;
        padding-top: 20px;
    }
    .auth-register-page .al-right--register::-webkit-scrollbar { display: none; }
    .al-reg-grid { grid-template-columns: 1fr; gap: 0; }
    .al-form-card--register { max-height: none; }
}

/* Forgot password page */
.auth-forgot-page {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}
.auth-forgot-page .al-wrap {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}
.auth-forgot-page .al-left {
    height: 100vh;
    overflow: hidden;
    padding: 32px 40px;
}

.al-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
}
.al-step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    background: #fff;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s ease;
    flex-shrink: 0;
}
.al-step-dot.active {
    border-color: var(--gold);
    background: linear-gradient(135deg, var(--gold-lt), var(--gold));
    color: var(--navy-dk);
    box-shadow: 0 4px 16px rgba(201,168,76,0.35);
}
.al-step-dot.done {
    border-color: var(--gold);
    background: var(--navy);
    color: var(--gold-lt);
}
.al-step-line {
    flex: 1;
    max-width: 60px;
    height: 2px;
    background: #e5e7eb;
    transition: background 0.35s;
}
.al-step-line.active { background: linear-gradient(90deg, var(--gold), var(--gold-lt)); }

.al-step-panel { display: none; }
.al-step-panel.active { display: block; animation: alCardIn 0.5s ease both; }

.al-otp-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 8px 0 4px;
}
.al-otp-box {
    width: 46px;
    height: 52px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fafbfc;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--navy);
    outline: none;
    transition: all 0.25s ease;
    font-family: var(--font);
}
.al-otp-box:focus,
.al-otp-box.filled {
    border-color: var(--gold);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(201,168,76,0.12);
}
.al-otp-timer {
    text-align: center;
    margin: 16px 0 20px;
    font-size: 13px;
    color: var(--muted);
}
.al-otp-timer .count { color: var(--gold-dk); font-weight: 700; }
.al-resend-btn {
    background: none;
    border: none;
    color: var(--gold-dk);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    font-family: var(--font);
    text-decoration: underline;
}
.al-resend-btn:hover { color: var(--navy); }
.al-back-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gold-dk);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    margin-top: 16px;
    transition: color 0.3s;
}
.al-back-login:hover { color: var(--navy); }

@media (max-height: 720px) and (min-width: 992px) {
    .auth-register-page .al-left { padding: 20px 32px; }
    .auth-register-page .al-logo-box { margin-bottom: 16px; }
    .auth-register-page .al-left h2 { font-size: 1.35rem; }
    .auth-register-page .al-left-desc { display: none; }
    .auth-register-page .al-perks { display: none; }
    .al-form-card--register { padding: 18px 24px; }
    .auth-register-page .al-group { margin-bottom: 8px; }
    .auth-register-page .al-input { height: 38px; }
    .auth-register-page .al-btn-submit--compact { height: 40px; }
}
