/* © Atia Hegazy — atiaeno.com */
/* ===== AUTH PAGES — Split-Screen Premium Design ===== */

/* Hide footer on auth pages */
body:has(.auth-page-section) .footer {
    display: none;
}

body:has(.auth-page-section) .navbar {
    display: none;
}

.main-content {
    margin-top: 0;

}

body:has(.auth-page-section) .main-content {
    padding-top: 0;
}

/* ---- Layout ---- */
.auth-page-section {
    background: #f8fafb;
    min-height: 100vh;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.auth-page-section::before {
    display: none;
}

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

/* ---- Left Visual Panel ---- */
.auth-visual {
    background: linear-gradient(160deg, #022c22 0%, #064e3b 40%, #065f46 70%, #047857 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 3rem;
    overflow: hidden;
}

.auth-visual-bg {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(52, 211, 153, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 95, 70, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.auth-visual-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(45deg,
            transparent,
            transparent 30px,
            rgba(255, 255, 255, 0.015) 30px,
            rgba(255, 255, 255, 0.015) 31px);
    pointer-events: none;
}

/* Back to home button */
.auth-back-home {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 100px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.auth-back-home:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.auth-back-home i {
    font-size: 0.6875rem;
    transition: transform 0.2s;
}

.auth-back-home:hover i {
    transform: translateX(-2px);
}

.auth-visual-content {
    position: relative;
    z-index: 2;
    max-width: 420px;
}

.auth-visual-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.4rem 0.875rem;
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2rem;
    backdrop-filter: blur(8px);
}

.auth-visual-badge i {
    font-size: 0.5625rem;
    color: #34d399;
}

.auth-visual-title {
    font-family: var(--font-headings, 'Plus Jakarta Sans', sans-serif);
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.15;
    color: white;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.auth-visual-title span {
    background: linear-gradient(135deg, #34d399 0%, #6ee7b7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-visual-desc {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2.5rem;
    max-width: 360px;
}

/* Stats row */
.auth-visual-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.auth-stat {
    text-align: center;
    flex: 1;
}

.auth-stat-num {
    font-family: var(--font-headings, 'Plus Jakarta Sans', sans-serif);
    font-size: 1.375rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.auth-stat-label {
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.auth-stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.12);
}

/* Trust row */
.auth-visual-trust {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6);
}

.auth-trust-avatars {
    display: flex;
}

.auth-trust-av {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 700;
    color: white;
    border: 2px solid #064e3b;
    margin-left: -6px;
}

.auth-trust-av:first-child {
    margin-left: 0;
}

.auth-trust-more {
    background: rgba(255, 255, 255, 0.15) !important;
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Floating decorative */
.auth-float {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.875rem;
    backdrop-filter: blur(6px);
    animation: authFloat 6s ease-in-out infinite;
}

.auth-float-1 {
    top: 12%;
    right: 10%;
    animation-delay: 0s;
}

.auth-float-2 {
    bottom: 18%;
    left: 8%;
    animation-delay: 2s;
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.auth-float-3 {
    bottom: 35%;
    right: 6%;
    animation-delay: 4s;
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

@keyframes authFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* ---- Right Form Panel ---- */
.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: #fff;
    position: relative;
}

.auth-form-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(6, 95, 70, 0.08) 30%, rgba(6, 95, 70, 0.08) 70%, transparent);
}

.auth-form-inner {
    width: 100%;
    max-width: 550px;
}
.auth-form {
    padding: 42px 50px;
    border: 1px solid #bad1ba0a;
    width: 100%;
    border-radius: 4px;
    background: #d6e8d64d;
}

/* Brand */
.auth-form-panel .auth-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 2.5rem;
    justify-content: center;
}

.auth-form-panel .auth-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
}

.auth-form-panel .auth-brand .brand-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
    letter-spacing: -0.01em;
}

.auth-form-panel .auth-brand .brand-tag {
    font-size: 0.5625rem;
    font-weight: 500;
    color: #059669;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Form header */
.auth-form-panel .auth-form h3 {
    font-family: var(--font-headings, 'Plus Jakarta Sans', sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    margin-bottom: 0.375rem;
    text-align: center;
    font-family: 'Bebas Neue';
}

.auth-form-panel .auth-form .auth-subtitle {
    font-size: 0.875rem;
    color: #31363b;
    margin-bottom: 2rem;
    text-align: center;
}

/* Fields */
.auth-field {
    margin-bottom: 10px;
}

.auth-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
    margin-bottom: 0;
}

.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.auth-label-row .auth-label {
    margin-bottom: 0;
}

.auth-forgot-link {
    font-size: 0.75rem;
    font-weight: 500;
    color: #059669;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-forgot-link:hover {
    color: #047857;
    text-decoration: underline;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 0.875rem;
    font-size: 0.8125rem;
    color: #94a3b8;
    pointer-events: none;
    z-index: 1;
    transition: color 0.2s;
}

.auth-input {
    width: 100%;
    padding: 0.6875rem 0.875rem 0.6875rem 2.5rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text-primary, #0f172a);
    background: #f8fafc;
    transition: all 0.2s ease;
    outline: none;
}

.auth-input::placeholder {
    color: #cbd5e1;
}

.auth-input:focus {
    border-color: #059669;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.08);
}

.auth-input:focus~.auth-input-icon,
.auth-input:focus+.auth-input-icon {
    color: #059669;
}

.auth-input-wrap:focus-within .auth-input-icon {
    color: #059669;
}

.auth-input.is-invalid {
    border-color: #ef4444;
}

.auth-toggle-pw {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.8125rem;
    padding: 0.25rem;
    transition: color 0.2s;
    z-index: 1;
}

.auth-toggle-pw:hover {
    color: #059669;
}

.auth-field-error {
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Remember */
.auth-remember {
    margin-bottom: 1.25rem;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    user-select: none;
}

.auth-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.auth-check-box {
    width: 16px;
    height: 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 4px;
    transition: all 0.15s ease;
    position: relative;
    flex-shrink: 0;
}

.auth-check input:checked+.auth-check-box {
    background: #059669;
    border-color: #059669;
}

.auth-check input:checked+.auth-check-box::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 4.5px;
    width: 5px;
    height: 8px;
    border: solid white;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

/* Captcha */
.auth-captcha {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background: #f1f5f9;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* Submit */
.auth-submit {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.auth-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.2s;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.auth-submit:hover::before {
    opacity: 1;
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit i {
    font-size: 0.8125rem;
    transition: transform 0.2s;
}

.auth-submit:hover i {
    transform: translateX(3px);
}

/* Footer */
.auth-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

.auth-footer p {
    font-size: 0.8125rem;
    color: var(--text-muted, #94a3b8);
    margin: 0;
}

.auth-footer a {
    color: #059669;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: #047857;
    text-decoration: underline;
}

/* Alerts */
.auth-form-panel .auth-alert {
    border-radius: 8px;
    padding: 0.875rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.auth-form-panel .auth-alert-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.auth-form-panel .auth-alert-danger i {
    font-size: 0.75rem;
    margin-right: 0.25rem;
}

.auth-form-panel .auth-alert-success {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .auth-visual {
        padding: 3rem 2rem;
    }

    .auth-visual-title {
        font-size: 1.875rem;
    }
}

@media (max-width: 768px) {

    .auth-split {
        display: block;
    }

    /* Ensure main-content margin-top is 0 on mobile auth pages */
    body:has(.auth-page-section) .main-content {
        margin-top: 0 !important;
    }

    .auth-split {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        display: none;
    }

    .auth-form-panel {
        padding: 2rem 1.5rem;
        min-height: 100vh;
    }

    .auth-form-panel::before {
        display: none;
    }

    .auth-form-panel .auth-brand {
        justify-content: center;
        margin-top: 3rem;
    }

    .auth-form-panel .auth-form h3 {
        text-align: center;
    }

    .auth-form-panel .auth-form .auth-subtitle {
        text-align: center;
    }

    /* Add mobile back to home button */
    .auth-form-panel {
        position: relative;
    }

    .auth-back-home-mobile {
        position: absolute;
        top: 1rem;
        left: 1rem;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
        background: rgba(5, 150, 105, 0.1);
        border: 1px solid rgba(5, 150, 105, 0.2);
        border-radius: 100px;
        color: #059669;
        font-size: 0.75rem;
        font-weight: 500;
        text-decoration: none;
        transition: all 0.2s ease;
        z-index: 10;
        margin-bottom: 1rem;
    }

    .auth-back-home-mobile:hover {
        background: rgba(5, 150, 105, 0.15);
        color: #047857;
        transform: translateY(-1px);
    }

    .auth-back-home-mobile i {
        font-size: 0.6875rem;
        transition: transform 0.2s;
    }

    .auth-back-home-mobile:hover i {
        transform: translateX(-2px);
    }
}