/* ================================================================
   PayFusion — Auth Pages Stylesheet
   Fonts: Syne + DM Sans (loaded by auth layout)
   Design inspiration: Stripe / Adyen / Airwallex / Checkout.com —
   restrained mesh gradient, confident type, glass form surface.
   NOTE: shared by login, register, and team/accept-invite.php —
   this file refines appearance only, never renames a selector.
================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Design tokens (colors, type, radius, spacing) now live in design-system.css, loaded before this file in every layout. */
html, body { height: 100%; }
body.auth-body {
    font-family: var(--font-body);
    background: var(--dark);
    color: var(--text);
    line-height: 1.6;
}

/* ── Page layout: side by side ── */
.auth-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ══════════ LEFT PANEL ══════════ */
.auth-panel {
    background: linear-gradient(160deg, #0d1a2e 0%, #060d1a 60%, #071520 100%);
    border-right: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.auth-panel::before {
    content: '';
    position: absolute;
    width: 560px; height: 560px;
    background: radial-gradient(circle, rgba(0,200,150,0.2) 0%, transparent 70%);
    filter: blur(20px);
    top: -180px; left: -140px;
    pointer-events: none;
}
.auth-panel::after {
    content: '';
    position: absolute;
    width: 340px; height: 340px;
    background: radial-gradient(circle, rgba(34,153,255,0.14) 0%, transparent 70%);
    filter: blur(20px);
    bottom: 30px; right: -80px;
    pointer-events: none;
}
.auth-panel-inner {
    position: relative; z-index: 1;
    display: flex; flex-direction: column;
    height: 100%;
    padding: 48px;
}
.auth-logo {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--font-display);
    font-size: 24px; font-weight: 700;
    color: var(--text); text-decoration: none;
    margin-bottom: auto;
    letter-spacing: -0.01em;
}
.auth-logo-icon { color: var(--brand); font-size: 22px; }
.auth-logo strong { color: var(--brand); }

.auth-panel-content { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 48px 0; }
.auth-panel-content h2 {
    font-family: var(--font-display);
    font-size: clamp(28px, 3vw, 46px);
    font-weight: 800;
    line-height: 1.06;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}
.auth-panel-content p {
    font-size: 15px; color: var(--text-muted);
    line-height: 1.7; margin-bottom: 36px;
    max-width: 380px;
}
.auth-trust-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; }
.trust-item {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px; color: var(--text-muted);
}
.trust-item span { color: var(--brand); font-weight: 700; font-size: 15px; flex-shrink: 0; }
.auth-gateways { display: flex; flex-wrap: wrap; gap: 8px; }
.gw-badge {
    padding: 5px 12px;
    border-radius: 99px;
    font-family: var(--font-display);
    font-size: 12px; font-weight: 700;
    border: 1px solid var(--gw-border, var(--border));
    color: var(--gw-color, var(--text-muted));
    transition: border-color .2s, transform .2s;
}
.gw-badge:hover { transform: translateY(-1px); }
.gw-badge.more { color: var(--text-muted); font-size: 11px; border-color: var(--border); }

.auth-panel-footer {
    font-size: 12px; color: var(--text-muted);
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* ══════════ RIGHT (FORM) SIDE ══════════ */
.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background: var(--dark);
    overflow-y: auto;
}
.auth-form-wrap {
    width: 100%;
    max-width: 420px;
}

/* Flash messages */
.auth-form-wrap > div[style*='padding'] {
    border-radius: 10px !important;
    font-size: 14px !important;
    margin-bottom: 20px !important;
}

/* ── Form header ── */
.auth-form-header { margin-bottom: 32px; }
.auth-form-header h1 {
    font-family: var(--font-display);
    font-size: 28px; font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}
.auth-form-header p { font-size: 15px; color: var(--text-muted); }

/* ── Form elements ── */
.auth-form { display: flex; flex-direction: column; gap: 0; }
.form-group { margin-bottom: 20px; }
.form-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}
.label-link { color: var(--brand); text-decoration: none; font-weight: 500; font-size: 13px; }
.label-link:hover { text-decoration: underline; }

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon {
    position: absolute; left: 14px;
    color: var(--text-muted);
    display: flex; align-items: center;
    pointer-events: none;
}
.input-wrap input {
    width: 100%;
    background: var(--dark-3);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 44px 12px 42px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s, background .2s;
    outline: none;
}
.input-wrap input::placeholder { color: var(--text-muted); opacity: 0.6; }
.input-wrap input:focus {
    border-color: var(--brand);
    background: var(--dark-4);
    box-shadow: 0 0 0 3px var(--brand-glow);
}
.input-toggle {
    position: absolute; right: 12px;
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); opacity: 0.5;
    display: flex; align-items: center;
    padding: 4px;
    transition: opacity .2s;
}
.input-toggle:hover { opacity: 1; }

/* Password strength */
.strength-bar {
    height: 3px;
    background: var(--dark-4);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}
.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width .3s, background .3s;
}
.strength-label { font-size: 11px; margin-top: 4px; font-weight: 600; }

/* ── Submit button ── */
.btn-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: var(--brand);
    color: #060d1a;
    border: none;
    border-radius: var(--radius);
    padding: 14px 24px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    margin-top: 8px;
    box-shadow: 0 4px 16px rgba(0,200,150,0.2);
}
.btn-auth:hover:not(:disabled) {
    background: var(--brand-d);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(0,200,150,0.36);
}
.btn-auth:active { transform: scale(.98); }
.btn-auth:disabled { opacity: 0.7; cursor: not-allowed; }
.btn-loader { display: inline-flex; align-items: center; gap: 8px; }
.btn-arrow { transition: transform .2s; }
.btn-auth:hover .btn-arrow { transform: translateX(3px); }

/* ── Spin animation ── */
.spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer links ── */
.auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}
.auth-switch a { color: var(--brand); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.auth-terms {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 16px;
    line-height: 1.6;
}
.auth-terms a { color: var(--text-muted); text-decoration: underline; }
.auth-terms a:hover { color: var(--brand); }

/* ══════════ RESPONSIVE ══════════ */
@media (max-width: 900px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-panel { display: none; }
    .auth-form-side { min-height: 100vh; padding: 32px 20px; }
    .auth-form-wrap { max-width: 100%; }
}
@media (max-width: 480px) {
    .auth-form-side { padding: 24px 16px; }
}
