/* ============================================================
   EdgePath Auth — Premium Design System v20
   Reference: split-card with organic curved dark-green hero panel
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --primary:         #0B4F3A;
    --primary-hover:   #0D5D45;
    --primary-light:   #146B4E;
    --accent:          #27AE60;
    --accent-bright:   #2ECC71;
    --accent-glow:     rgba(39,174,96,0.18);

    --bg-main:         #EAECEE;
    --card-bg:         #FFFFFF;
    --text-main:       #111827;
    --text-secondary:  #6B7280;
    --border-color:    #E5E7EB;
    --border-focus:    rgba(11,79,58,0.35);

    --success:  #22C55E;
    --danger:   #EF4444;
    --warning:  #F59E0B;

    --radius-card:  28px;
    --radius-input: 18px;
    --radius-btn:   14px;
    --font-sans:    'Poppins', sans-serif;
    --transition:   all 0.28s cubic-bezier(0.4, 0, 0.2, 1);

    /* geometric background sizes */
    --geo-size: 180px;
}

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

/* ── Body / Page Background ────────────────────────────────── */
/* Exact match of the index.php hero backdrop (.eph-bg / .eph-bg::after):
   white base on the left, blending into a deep green radial gradient
   toward the right, via a soft linear mask. */
body {
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    overflow-x: hidden;
    background: #ffffff;
    position: relative;
}

/* the blended green backdrop, masked in from ~46% of the viewport */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 90% 80% at 78% 50%, #0b3d2e 0%, #0b3d2e 35%, #05140e 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,1) 46%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,1) 46%);
    z-index: 0;
}

/* ── Outer Container ───────────────────────────────────────── */
.auth-container {
    width: 100%;
    /* reduced max width to make the overall card smaller like the reference */
    max-width: 960px;
    margin: auto;
    position: relative;
    z-index: 2;
}

/* ── Card ──────────────────────────────────────────────────── */
/* No longer a single clipped/rounded card — .auth-left and .auth-right
   are each their own independently-rounded, independently-shadowed
   card, overlapping slightly. This container just positions them. */
.auth-card {
    width: 100%;
    /* tightened height to better match the reference mockup */
    min-height: 480px;
    display: flex;
    position: relative;
    animation: cardIn 0.7s cubic-bezier(0.16, 0.84, 0.44, 1) both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   LEFT HERO PANEL (46%) — its own fully-rounded card, sitting
   slightly behind the white panel so the two simply overlap.
   ============================================================ */
.auth-left {
    /* Left hero panel width matching reference proportions */
    width: 46%;
    flex-shrink: 0;
    background-color: var(--primary);
    background-image:
        radial-gradient(ellipse 80% 60% at 20% 80%, rgba(39,174,96,0.22) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 80% 10%, rgba(11,79,58,0.9) 0%, transparent 70%),
        linear-gradient(155deg, #0D5D45 0%, #0B4F3A 45%, #083728 100%);
    padding: 3rem 2.75rem 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
    /* Stylized rounded left panel: larger outer corners, tighter inner edge */
    border-radius: 28px 14px 14px 28px;
    box-shadow:
        0 6px 18px rgba(4,23,15,0.12),
        0 18px 48px rgba(2,8,6,0.08);
    z-index: 1;
}

/* decorative texture dots */
.auth-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle 1.5px at center, rgba(255,255,255,0.08) 0%, transparent 100%);
    background-size: 32px 32px;
    pointer-events: none;
}

/* glowing arc accent in lower-right of hero panel */
.auth-left::after {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(39,174,96,0.18) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Logo ── */
.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.3px;
    flex-shrink: 0;
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.auth-logo:hover { opacity: 0.92; color: #FFFFFF; }

.auth-logo img {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
}

/* ── Hero Text ── */
.auth-hero-text {
    flex: 1;
    padding: 1.5rem 0 1rem;
    position: relative;
    z-index: 2;
}

.auth-hero-text h2 {
    font-size: clamp(1.85rem, 2.6vw, 2.6rem);
    font-weight: 800;
    line-height: 1.22;
    margin-bottom: 1rem;
    color: #FFFFFF;
    letter-spacing: -0.5px;
}

.auth-hero-text h2 span {
    color: var(--accent-bright);
    display: inline-block;
}

.auth-hero-text p {
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.72);
    max-width: 290px;
}

/* ── Illustration ──
   In normal document flow directly beneath .auth-hero-text
   (instead of absolutely pinned to the panel's bottom edge). */
.auth-illustration {
    width: 100%;
    max-width: 460px;
    margin: 32px auto 0;
}
.auth-illustration img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* ============================================================
   RIGHT FORM PANEL (54%) — its own fully-rounded card,
   overlapping the left panel by a small amount and sitting
   above it (with its own shadow), matching a simple two-card
   overlap instead of a shared curved divider.
   ============================================================ */
.auth-right {
    flex: 1;
    /* right panel styling to create the white card with large outer radii */
    padding: 2rem 3rem 2rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background-color: var(--card-bg);
    /* large radii on the outer (right) corners, small on the inner (left) edge */
    border-radius: 18px 34px 34px 18px;
    border: 1px solid rgba(6,35,24,0.03);
    box-shadow:
        0 6px 20px rgba(7,22,14,0.06),
        0 18px 50px rgba(6,18,12,0.04);
    /* overlap the left card by a small amount, like two stacked cards */
    /* overlap so the white panel visually aligns with the hero edge */
    margin-left: -36px;
    z-index: 2;
}

.auth-wrap {
    width: 100%;
    /* content column width tuned to the reference image */
    max-width: 420px;
    margin: 0 auto;
}

/* Social buttons placed above the form (as in the reference) */
.social-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

/* Small OR divider used between social buttons and form */
.or-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 18px;
}
.or-divider::before,
.or-divider::after {
    content: '';
    height: 1px;
    background: var(--border-color);
    flex: 1;
}
.or-divider span { font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; }

/* ── Language Selector ── */
.lang-selector {
    position: absolute;
    top: 1.75rem;
    right: 2.25rem;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
    padding: 6px 10px;
    border-radius: 8px;
}

.lang-selector:hover {
    color: var(--text-main);
    background: #F9FAFB;
}

.lang-selector svg {
    width: 13px;
    height: 13px;
}

/* ── Centered logo above the form header (right panel) ── */
.auth-form-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.auth-form-logo img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

/* ── Page Header ── */
.auth-header {
    margin-bottom: 1.75rem;
    text-align: center;
    animation: fadeUp 0.55s cubic-bezier(0.16, 0.84, 0.44, 1) both;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.35rem;
    letter-spacing: -0.3px;
}

.auth-header p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Tabs ── */
.auth-tabs {
    display: flex;
    background: #F3F4F6;
    border-radius: var(--radius-input);
    padding: 4px;
    margin-bottom: 1.75rem;
    position: relative;
}

.tab-btn {
    flex: 1;
    text-align: center;
    padding: 9px 12px;
    border-radius: calc(var(--radius-input) - 4px);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
    border: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.tab-btn.active { color: var(--text-main); }

.tab-slider {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    border-radius: calc(var(--radius-input) - 4px);
    background: #FFFFFF;
    box-shadow: 0 1px 4px rgba(0,0,0,0.09);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.auth-tabs.is-right .tab-slider {
    transform: translateX(100%);
}

/* ── Social Login Buttons (side by side) ── */
.social-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 1.25rem;
}

/* ── Form Groups ── */
.form-group {
    margin-bottom: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    animation: fadeUp 0.55s cubic-bezier(0.16, 0.84, 0.44, 1) 0.04s both;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.01em;
}

/* ── Input Container ── */
.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-container input,
.input-container select {
    width: 100%;
    height: 56px;
    padding: 0 1.1rem 0 3rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-input);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-main);
    background-color: #FAFAFA;
    transition: var(--transition);
    outline: none;
    -webkit-appearance: none;
}

.input-container input::placeholder { color: #B0B7C3; }

.input-container input:hover:not(:focus),
.input-container select:hover:not(:focus) {
    border-color: #C9CDD4;
    background: #FFFFFF;
}

.input-container input:focus,
.input-container select:focus {
    background: #FFFFFF;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(11,79,58,0.09);
}

/* Icon inside input */
.input-container .input-icon {
    position: absolute;
    left: 1rem;
    color: #C0C7D0;
    width: 18px;
    height: 18px;
    pointer-events: none;
    transition: var(--transition);
}

.input-container:focus-within .input-icon {
    color: var(--primary);
}

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    padding: 4px;
    color: #B0B7C3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 5;
    border-radius: 6px;
}

.password-toggle:hover {
    color: var(--text-secondary);
    background: #F3F4F6;
}

.password-toggle svg { width: 18px; height: 18px; }

/* ── Actions Row ── */
.form-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.25rem 0 1.25rem;
    font-size: 0.84rem;
    animation: fadeUp 0.55s cubic-bezier(0.16, 0.84, 0.44, 1) 0.08s both;
}

/* ── Custom Checkbox ── */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-custom {
    height: 18px;
    width: 18px;
    background-color: #FFFFFF;
    border: 1.5px solid var(--border-color);
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox-container input:checked ~ .checkbox-custom {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkbox-custom::after {
    content: "";
    display: none;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.checkbox-container input:checked ~ .checkbox-custom::after { display: block; }

.checkbox-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.84rem;
}

.forgot-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.84rem;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ── Primary CTA Button ── */
.btn-primary {
    width: 100%;
    height: 52px;
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-btn);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(11,79,58,0.22), 0 1px 3px rgba(11,79,58,0.12);
    position: relative;
    overflow: hidden;
    animation: fadeUp 0.55s cubic-bezier(0.16, 0.84, 0.44, 1) 0.1s both;
    text-decoration: none;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.25s;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(11,79,58,0.28), 0 2px 6px rgba(11,79,58,0.14);
}

.btn-primary:hover::before { opacity: 1; }

.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-arrow {
    width: 17px;
    height: 17px;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.btn-primary:hover:not(:disabled) .btn-arrow { transform: translateX(4px); }

/* Spinner inside button */
.spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

.spinner-border {
    width: 1.2rem;
    height: 1.2rem;
    border: 0.2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
    display: none;
}

@keyframes spinner-border { to { transform: rotate(360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ── */
.divider {
    display: flex;
    align-items: center;
    margin: 1.25rem 0;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: fadeUp 0.55s cubic-bezier(0.16, 0.84, 0.44, 1) 0.12s both;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

.divider span { padding: 0 12px; }

/* ── Social / Google Button ── */
.btn-social,
.btn-google {
    height: 48px;
    background: #FFFFFF;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-input);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-decoration: none;
    transition: var(--transition);
    animation: fadeUp 0.55s cubic-bezier(0.16, 0.84, 0.44, 1) 0.15s both;
    width: 100%;
}

.btn-social:hover,
.btn-google:hover {
    background: #F8FAFB;
    border-color: #C9CDD4;
    color: var(--text-main);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

.btn-social:active,
.btn-google:active { transform: translateY(0); }

.btn-social svg,
.btn-google svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Auth Switch Text ── */
.auth-switch-text {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.86rem;
    color: var(--text-secondary);
    font-weight: 500;
    animation: fadeUp 0.55s cubic-bezier(0.16, 0.84, 0.44, 1) 0.18s both;
}

.auth-switch-text a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.auth-switch-text a:hover { text-decoration: underline; }

/* ── Alerts ── */
.auth-alert,
.ep-alert,
.alert-box,
.alert {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 22px;
    border-radius: 20px;
    border: 1px solid transparent;
    background: #ffffff;
    box-shadow: 0 10px 30px -18px rgba(16, 24, 40, 0.12);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.65;
    margin-bottom: 1.2rem;
    text-align: left;
    animation: slideInUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.auth-alert-danger,
.ep-alert-danger,
.alert-error,
.alert-danger {
    background: #FEF2F2;
    color: #991B1B;
    border-color: #FCA5A5;
}

.auth-alert-success,
.ep-alert-success,
.alert-success,
.alert-success {
    background: #F0FDF4;
    color: #047857;
    border-color: #86EFAC;
}

.auth-alert-info,
.ep-alert-info,
.alert-info,
.alert-info {
    background: #EFF6FF;
    color: #1D4ED8;
    border-color: #BFDBFE;
}

.auth-alert-warning,
.ep-alert-warning,
.alert-warning,
.alert-warning {
    background: #FFFBEB;
    color: #92400E;
    border-color: #FDE68A;
}

.auth-alert svg,
.ep-alert svg,
.alert-box svg,
.alert i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-box span,
.alert span {
    display: block;
    flex: 1;
}

.alert-zone {
    margin-bottom: 1.4rem;
}

@keyframes slideInUp {
    from { transform: translateY(8px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* ── OTP Input ── */
.form-control-otp,
input[name="otp_code"],
input[name="otp"] {
    width: 100%;
    height: 56px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-input);
    background: #FAFAFA;
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 8px;
    text-align: center;
    color: var(--text-main);
    transition: var(--transition);
    outline: none;
    padding: 0 1rem 0 3rem !important;
}

.form-control-otp:focus,
input[name="otp_code"]:focus,
input[name="otp"]:focus {
    border-color: var(--primary);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(11,79,58,0.09);
}

/* ── Page Icon Badge (for verify/reset/forgot) ── */
.page-icon-badge {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(39,174,96,0.10);
    border: 1.5px solid rgba(39,174,96,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.4rem;
    color: var(--accent);
}

.page-icon-badge svg { width: 28px; height: 28px; }

/* ── Back Link ── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 1.5rem;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--text-main);
    transform: translateX(-2px);
}

.back-link svg { width: 16px; height: 16px; }

/* ── Email Pill (verify-email) ── */
.email-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #166534;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 99px;
    margin: 0.85rem 0 1.35rem;
}

.email-pill svg { width: 14px; height: 14px; }

/* ── Resend Row ── */
.resend-row {
    text-align: center;
    margin-top: 1.35rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.resend-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    font-family: inherit;
}

.resend-link:hover { text-decoration: underline; }

/* ── Password Strength Bar ── */
#pwd-strength {
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    margin-top: 6px;
    transition: all 0.3s ease;
    width: 100%;
}

/* ── Two-column name row (register) ── */
.name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ── Toggle Wrapper (auth.php) ── */
.toggle-wrapper {
    background: #F3F4F6;
    border-radius: var(--radius-input);
    padding: 4px;
    display: flex;
    position: relative;
    margin-bottom: 1.75rem;
}

.toggle-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: color 0.28s;
}

.toggle-btn.active { color: var(--text-main); }

.toggle-pill {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: #FFFFFF;
    border-radius: calc(var(--radius-input) - 4px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.toggle-wrapper.mode-register .toggle-pill { transform: translateX(100%); }

/* ── Forms Track Slider (auth.php) ── */
.forms-viewport {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.forms-track {
    display: flex;
    width: 200%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.forms-track.mode-register { transform: translateX(-50%); }

.form-pane {
    width: 50%;
    flex-shrink: 0;
    padding: 2px;
}

/* ── Plan Selector ── */
.plan-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 1.1rem;
}

.plan-card {
    flex: 1;
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: #FFFFFF;
    text-align: left;
}

.plan-card input { position: absolute; opacity: 0; }

.plan-card .title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 3px;
}

.plan-card .desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.plan-card.active {
    border-color: var(--accent);
    background: rgba(39,174,96,0.05);
    box-shadow: 0 0 0 1px var(--accent);
}

.plan-card.active .title { color: var(--primary); }

/* ── Success State ── */
.success-state {
    display: none;
    text-align: center;
    padding: 2rem 0;
    animation: fadeIn 0.4s ease;
}

.success-state.show { display: block; }

.success-icon {
    width: 64px;
    height: 64px;
    background: rgba(39,174,96,0.10);
    color: var(--accent);
    border: 1px solid rgba(39,174,96,0.22);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-icon svg { width: 32px; height: 32px; }
.success-state h3 { font-size: 1.5rem; font-weight: 700; color: var(--text-main); margin-bottom: 0.5rem; }
.success-state p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 2rem; }

/* ── Forgot Password Overlay (auth.php) ── */
.forgot-wrap {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(4px);
    z-index: 10;
    padding: 4rem 4.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(8px);
}

.forgot-wrap.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* ── Ripple Effect ── */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transform: scale(0);
    pointer-events: none;
    animation: rippleAnim 0.6s linear forwards;
}

@keyframes rippleAnim {
    to { transform: scale(4); opacity: 0; }
}

/* ── Link text (auth.php misc) ── */
.link-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.link-text:hover { text-decoration: underline; }

/* ── Input group (auth.php) ── */
.input-group {
    position: relative;
    margin-bottom: 1.1rem;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 7px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #C0C7D0;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.form-control {
    width: 100%;
    height: 56px;
    padding: 0 1rem 0 3rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-input);
    background: #FAFAFA;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: var(--transition);
    outline: none;
}

.form-control::placeholder { color: #B0B7C3; }

.form-control:focus {
    background: #FFFFFF;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(11,79,58,0.09);
}

.toggle-eye {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #B0B7C3;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
}

.toggle-eye:hover { color: var(--text-secondary); background: #F3F4F6; }
.toggle-eye svg { width: 18px; height: 18px; }

/* ── Row Between (checkbox/links row) ── */
.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ── Social Button Row ── */
.btn-social.full-width,
.btn-google.full-width { width: 100%; }

/* ── Spinner (auth.php style) ── */
.spinner-auth {
    width: 20px;
    height: 20px;
    display: none;
}

.spinner-auth svg { width: 100%; height: 100%; }
.spinner-auth circle { fill: none; stroke-width: 6; stroke-linecap: round; }
.spinner-auth .epl-track { stroke: rgba(255,255,255,0.25); }
.spinner-auth .epl-arc { stroke: white; stroke-dasharray: 120 200; }
.btn-primary.is-loading .spinner-auth { display: block; }
.btn-primary.is-loading span:not(.spinner-auth) { opacity: 0.8; }

/* ── Preloader ── */
.ep-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(11,79,58,0.96) 0%, rgba(5,20,14,0.99) 100%);
    backdrop-filter: blur(10px);
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.ep-preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.ep-load-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.09);
    padding: 3rem 4rem;
    border-radius: var(--radius-card);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.ep-spinner-container {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ep-spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(39,174,96,0.12);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.5,0.1,0.4,0.9) infinite;
}

.ep-spinner-logo {
    width: 36px;
    height: 36px;
    filter: brightness(0) invert(1);
    animation: pulseLogo 2s ease-in-out infinite;
}

@keyframes pulseLogo {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

.ep-load-text {
    font-family: var(--font-sans);
    font-size: 0.83rem;
    font-weight: 600;
    color: #FFFFFF;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* ── General Animations ── */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .auth-right { padding: 3rem 3rem 3rem 4rem; }
}

@media (max-width: 900px) {
    .auth-card {
        flex-direction: column;
        max-width: 520px;
        min-height: auto;
        margin: 0 auto;
    }

    .auth-left {
        width: 100%;
        border-radius: var(--radius-card);
        padding: 2.5rem 2rem 2rem;
        text-align: center;
        align-items: center;
        min-height: 480px;
    }

    .auth-hero-text p { margin: 0 auto; max-width: 360px; }
    .auth-illustration {
        max-width: 320px;
        margin: 20px auto 0;
    }

    .auth-right {
        width: 100%;
        padding: 2.5rem 2rem;
        margin-left: 0;
        margin-top: -28px;
        border-radius: var(--radius-card);
    }

    .auth-wrap { max-width: 100%; }
    .forgot-wrap { padding: 2.5rem 2rem; }
    .name-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    body { padding: 1rem 0.75rem; }
    .auth-left { padding: 2rem 1.5rem 1.5rem; border-radius: 24px; }
    .auth-right { padding: 2rem 1.5rem; border-radius: 24px; margin-top: -20px; }
    .auth-illustration { display: none; }
    .name-row { grid-template-columns: 1fr; }
    .social-row { grid-template-columns: 1fr; }
    .plan-selector { flex-direction: column; }
}

/* Edge-Path-main authentication visual reference — presentation only. */
:root { --primary:#032B20; --primary-hover:#021f17; --accent:#22C55E; --accent-bright:#22C55E; --bg-main:#EBECEE; --radius-card:28px; --radius-input:16px; --radius-btn:16px; }
body { min-height:100vh; padding:1.5rem; background-color:#EBECEE; background-image:radial-gradient(#CBD5E1 1px,transparent 1px); background-size:24px 24px; }
body::before { background:radial-gradient(circle at 25% 0%,rgba(209,250,229,.58),transparent 29%),radial-gradient(circle at 75% 100%,rgba(203,213,225,.6),transparent 30%); -webkit-mask-image:none; mask-image:none; z-index:0; }
.auth-container { max-width:960px; }
.auth-card { min-height:520px; display:grid; grid-template-columns:1fr 1fr; overflow:hidden; background:#032B20; border-radius:28px; box-shadow:0 20px 60px -15px rgba(0,0,0,.18); }
.auth-left { width:auto; min-height:520px; padding:2.25rem; border-radius:28px 0 0 28px; box-shadow:none; background-color:#032B20; background-image:radial-gradient(circle at -8% -5%,rgba(34,197,94,.15),transparent 42%),radial-gradient(circle at 100% 92%,rgba(52,211,153,.15),transparent 45%); justify-content:space-between; }
.auth-left::before { background:none; }
.auth-left::after { content:''; right:auto; left:-50px; bottom:150px; width:720px; height:220px; border-radius:50%; background:none; border-top:1px solid rgba(34,197,94,.3); border-bottom:1px solid rgba(16,185,129,.2); transform:rotate(-7deg); }
.auth-logo { font-size:1.15rem; }.auth-logo img { width:29px; height:29px; }
.auth-hero-text { flex:0; padding:0; margin:1rem 0; }.auth-hero-text h2 { font-size:clamp(1.5rem,2.5vw,2.2rem); line-height:1.12; letter-spacing:-.035em; margin-bottom:.7rem; }.auth-hero-text h2 span { display:inline; color:#22C55E; }.auth-hero-text p { max-width:360px; font-size:.78rem; line-height:1.55; color:rgba(209,250,229,.8); }
.auth-illustration { position:relative; z-index:2; max-width:500px; margin:.75rem -2.25rem -2.25rem; overflow:hidden; }.auth-illustration img { width:110%; max-width:none; transform:translate(-4%,.6rem) scale(1.04); mix-blend-mode:screen; }
.auth-right { min-width:0; padding:2rem 2.25rem; margin:0; border:0; border-radius:28px; box-shadow:none; justify-content:space-between; }.auth-wrap { max-width:360px; margin:auto; }
.lang-selector { top:1.7rem; right:2rem; font-size:.72rem; }.auth-form-logo { margin-bottom:.65rem; }.auth-form-logo img { width:40px; height:40px; padding:9px; background:rgba(209,250,229,.8); border-radius:12px; }
.auth-header { margin-bottom:1rem; }.auth-header h1 { font-size:1.7rem; line-height:1.15; font-weight:800; color:#032B20; }.auth-header p { font-size:.78rem; }.auth-tabs { padding:6px; margin-bottom:1rem; border-radius:16px; background:rgba(243,244,246,.8); }.tab-btn { padding:8px 12px; border-radius:12px; font-size:.78rem; }.tab-slider { top:6px; bottom:6px; left:6px; width:calc(50% - 6px); border-radius:12px; }
.form-group { gap:0; margin-bottom:.75rem; }.form-group label { display:none; }.input-container input,.input-container select { height:46px; padding:0 .9rem 0 2.55rem; border-width:1px; border-radius:16px; font-size:.82rem; background:rgba(249,250,251,.5); }.input-container .input-icon { left:.85rem; width:16px; height:16px; }.password-toggle { right:.7rem; }
.form-actions-row { margin:.25rem 0 .85rem; font-size:.75rem; }.checkbox-custom { width:14px; height:14px; border-radius:4px; }.checkbox-label,.forgot-link { font-size:.75rem; }.btn-primary { height:48px; border-radius:16px; font-size:.82rem; background:#032B20; }.btn-arrow { width:16px; height:16px; }
.or-divider { margin:.8rem 0; gap:10px; }.or-divider span { font-size:.68rem; font-weight:500; color:#9CA3AF; }.social-top { display:block; margin:0; }.btn-google { height:42px; border-width:1px; border-radius:16px; font-size:.78rem; font-weight:500; }.auth-switch-text { border-top:1px solid #F3F4F6; margin-top:1.1rem; padding-top:1rem; font-size:.75rem; }
@media (max-width:900px) { body { padding:1rem; }.auth-card { display:flex; min-height:0; overflow:visible; }.auth-left { width:100%; min-height:460px; border-radius:28px; }.auth-right { width:100%; padding:2rem; margin-top:-24px; border-radius:28px; } }
@media (max-width:480px) { body { padding:.75rem; }.auth-left { padding:1.75rem 1.5rem; }.auth-right { padding:1.75rem 1.5rem; }.auth-illustration { display:none; }.lang-selector { right:1.25rem; } }

/* Supporting reset screens use the same compact visual language. */
.page-icon-badge { width:40px !important; height:40px !important; margin:0 auto .65rem !important; border:0 !important; border-radius:12px !important; background:rgba(209,250,229,.8) !important; color:#032B20 !important; }
.page-icon-badge svg { width:21px !important; height:21px !important; }
.email-pill { display:flex !important; width:fit-content; margin:.15rem auto .85rem !important; padding:5px 10px !important; font-size:.72rem !important; }
.back-link { display:flex; width:fit-content; margin:1rem auto 0; font-size:.75rem; }
.form-control-otp, input[name="otp_code"] { height:46px; border-radius:16px; font-size:1rem; }
.resend-row { margin-top:1rem; font-size:.75rem; }

/* Screenshot-style social separator used by every authentication form. */
.or-divider {
    display:flex;
    align-items:center;
    gap:12px;
    margin:14px 0 12px;
    color:#60708a;
    font-size:.72rem;
    font-weight:500;
    line-height:1;
}
.or-divider::before,
.or-divider::after {
    content:'';
    display:block;
    flex:1;
    height:1px;
    background:#E5E7EB !important;
}
.or-divider span { padding:0 2px; color:#60708a; font-size:.72rem; font-weight:500; letter-spacing:0; }
.btn-google {
    height:46px;
    border:1px solid #DFE3E8;
    border-radius:18px;
    color:#1F304A;
    background:#fff;
    font-size:.88rem;
    font-weight:500;
    gap:10px;
    box-shadow:0 2px 3px rgba(15,23,42,.05);
}
.btn-google:hover { background:#fff; border-color:#CBD5E1; box-shadow:0 4px 10px rgba(15,23,42,.08); }
.btn-google svg { width:22px; height:22px; }

/* Shared header and social-footer treatment across every auth form. */
.auth-header { text-align:center; }
.auth-header h1 { color:#032B20; font-weight:800; }
.auth-header p { color:#718096; }
.or-divider { margin:18px 0 14px; }
.or-divider span { padding:0 10px; font-size:.68rem; font-weight:700; letter-spacing:.08em; color:#98A2B3; white-space:nowrap; }
.btn-google { height:46px; font-weight:600; }

/* The verification form keeps its social action in the same footer position. */
.verify-auth-wrap { display:flex; flex-direction:column; }
.verify-auth-wrap .page-icon-badge { order:1; }
.verify-auth-wrap .auth-header { order:2; }
.verify-auth-wrap .email-pill { order:3; }
.verify-auth-wrap #alert-container { order:4; }
.verify-auth-wrap form { order:5; }
.verify-auth-wrap .or-divider { order:6; }
.verify-auth-wrap .social-top { order:7; }
.verify-auth-wrap .resend-row { order:8; }

/* Fill the desktop branding panel with the wide trading artwork. */
@media (min-width:901px) {
    .auth-illustration {
        height:780px;
        bottom:0;
    }
    .auth-illustration img {
        width:175%;
        height:auto;
        max-width:none;
        max-height:none;
        transform:none;
    }
}

/* Wide artwork override: enlarge the picture itself, not the form layout. */
@media (min-width:901px) {
    .auth-illustration {
        height:760px;
        bottom:0;
        overflow:visible;
    }
    .auth-illustration img {
        width:190%;
        height:auto;
        max-width:none;
        max-height:none;
        object-fit:contain;
        object-position:center bottom;
        transform:none;
    }
}

/* User-supplied artwork: enlarged and blended into the panel without a visible image box. */
.auth-illustration { max-width:none; height:230px; margin:.5rem -2.25rem -2.25rem; display:flex; align-items:flex-end; justify-content:center; }
.auth-illustration img { width:130%; max-width:none; height:auto; transform:translateY(12%) scale(1.03); mix-blend-mode:screen; }
@media (max-width:900px) { .auth-illustration { height:250px; } .auth-illustration img { width:105%; } }

/* Larger card and fully-contained user artwork. */
.auth-container { max-width:1080px; }
.auth-card { min-height:600px; }
.auth-left { min-height:600px; }
.auth-illustration {
    height:300px;
    margin:.35rem -1.25rem -1.25rem;
    overflow:visible;
    align-items:center;
}
.auth-illustration img {
    width:100%;
    max-width:520px;
    max-height:300px;
    object-fit:contain;
    transform:none;
    mix-blend-mode:screen;
}
@media (max-width:900px) {
    .auth-card,.auth-left { min-height:0; }
    .auth-illustration { height:270px; }
    .auth-illustration img { width:100%; max-height:270px; }
}

/* Reference composition: a large, fully visible illustration anchored to the panel bottom. */
.auth-illustration {
    position:absolute;
    z-index:1;
    left:0;
    right:0;
    bottom:-8px;
    height:360px;
    margin:0;
    display:flex;
    align-items:flex-end;
    justify-content:center;
    overflow:visible;
}
.auth-illustration img {
    width:auto;
    height:360px;
    max-width:none;
    max-height:none;
    object-fit:contain;
    transform:none;
}
@media (max-width:900px) {
    .auth-illustration { position:relative; bottom:auto; height:290px; margin:.5rem -1.5rem -1.75rem; }
    .auth-illustration img { height:290px; }
}

/* Keep copy at the top and reserve the full lower panel for the artwork. */
.auth-container { max-width:1120px; }
.auth-card { min-height:660px; }
.auth-left {
    min-height:660px;
    justify-content:flex-start;
}
.auth-hero-text {
    flex:0 0 auto;
    margin:2.4rem 0 0;
    padding:0;
    z-index:2;
}
.auth-illustration {
    top:auto;
    bottom:-6px;
    height:330px;
}
.auth-illustration img { height:330px; }
@media (max-width:900px) {
    .auth-card,.auth-left { min-height:0; }
    .auth-hero-text { margin:1.5rem 0 0; }
    .auth-illustration { position:relative; bottom:auto; height:290px; }
    .auth-illustration img { height:290px; }
}

/* Final desktop containment: larger panel with no artwork crop or text overlap. */
@media (min-width:901px) {
    .auth-container { max-width:1320px; }
    .auth-card { min-height:800px; }
    .auth-left { min-height:800px; }
    .auth-hero-text { margin-top:2.25rem; }
    .auth-illustration {
        top:auto;
        right:0;
        bottom:0;
        left:0;
        height:440px;
        padding:0;
    }
    .auth-illustration img {
        width:auto;
        height:440px;
        max-width:100%;
        max-height:440px;
        object-fit:contain;
        object-position:center bottom;
    }
}

/* Final illustration-only sizing rule. Keep this last so no earlier layout rule can override it. */
@media (min-width:901px) {
    .auth-illustration {
        height:560px !important;
        right:0 !important;
        bottom:-60px !important;
        left:0 !important;
        overflow:visible !important;
    }
    .auth-illustration img {
        width:100% !important;
        height:auto !important;
        max-width:none !important;
        max-height:none !important;
        object-fit:contain !important;
        object-position:center bottom !important;
        transform:translateX(-42px) scaleX(1.2) !important;
        transform-origin:center bottom;
    }
}
