/* ========================================
   Authentication Pages - Premium Styling
   ======================================== */

/* Page Layout */
.auth-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background: linear-gradient(135deg, #0A1628 0%, #152238 50%, #1a2d4a 100%);
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    /* Prevent horizontal scroll from animations */
}

/* Animated Background */
.auth-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.auth-shapes .shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: float-shape 20s ease-in-out infinite;
}

.auth-shapes .shape-1 {
    width: 500px;
    height: 500px;
    background: rgba(30, 155, 215, 0.2);
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.auth-shapes .shape-2 {
    width: 400px;
    height: 400px;
    background: rgba(75, 184, 232, 0.15);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

.auth-shapes .shape-3 {
    width: 300px;
    height: 300px;
    background: rgba(30, 155, 215, 0.1);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

.auth-shapes .shape-4 {
    width: 200px;
    height: 200px;
    background: rgba(16, 185, 129, 0.1);
    bottom: 20%;
    left: 20%;
    animation-delay: -15s;
}

@keyframes float-shape {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -30px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(-30px, -20px) scale(1.02);
    }
}

/* Floating Icons */
.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-icon {
    position: absolute;
    font-size: 24px;
    color: rgba(30, 155, 215, 0.15);
    animation: float-icon 15s ease-in-out infinite;
}

.floating-icon.f1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-icon.f2 {
    top: 20%;
    right: 15%;
    animation-delay: -2s;
    font-size: 20px;
}

.floating-icon.f3 {
    bottom: 30%;
    left: 5%;
    animation-delay: -4s;
    font-size: 28px;
}

.floating-icon.f4 {
    top: 60%;
    right: 10%;
    animation-delay: -6s;
}

.floating-icon.f5 {
    bottom: 15%;
    left: 40%;
    animation-delay: -8s;
    font-size: 22px;
}

.floating-icon.f6 {
    top: 40%;
    left: 20%;
    animation-delay: -10s;
    font-size: 18px;
}

@keyframes float-icon {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.15;
    }

    50% {
        transform: translateY(-30px) rotate(180deg);
        opacity: 0.3;
    }
}

/* Auth Container */
.auth-container {
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1100px;
    width: 100%;
    min-height: 700px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 1;
}

/* Branding Panel */
.auth-branding {
    background: linear-gradient(135deg, rgba(30, 155, 215, 0.15) 0%, rgba(30, 155, 215, 0.05) 100%);
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(30, 155, 215, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.auth-logo img {
    height: 45px;
    width: auto;
}

.branding-content h1 {
    font-size: 36px;
    color: var(--white);
    margin-bottom: 15px;
    font-family: var(--font-display);
}

.branding-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 40px;
}

.branding-features {
    display: grid;
    gap: 20px;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
}

.brand-feature:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.brand-feature i {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.branding-footer p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

/* Form Panel */
.auth-form-panel {
    background: var(--white);
    padding: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-header h2 {
    font-size: 28px;
    color: var(--gray-900);
    margin-bottom: 10px;
    font-family: var(--font-display);
}

.auth-header p {
    color: var(--gray-500);
    font-size: 15px;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper>i:first-child {
    position: absolute;
    left: 15px;
    color: var(--gray-400);
    font-size: 16px;
    transition: var(--transition);
    z-index: 1;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
    color: var(--gray-800);
}

.input-wrapper input::placeholder {
    color: var(--gray-400);
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(30, 155, 215, 0.1);
}

.input-wrapper input:focus+i:first-child,
.input-wrapper:focus-within>i:first-child {
    color: var(--primary);
}

.select-wrapper {
    position: relative;
}

.select-wrapper select {
    appearance: none;
    cursor: pointer;
}

.select-wrapper .select-arrow {
    position: absolute;
    right: 15px;
    color: var(--gray-400);
    font-size: 12px;
    pointer-events: none;
}

.toggle-password {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--primary);
}

/* Password Strength */
.password-strength {
    height: 4px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    margin-top: 8px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.strength-bar.weak {
    width: 25%;
    background: #EF4444;
}

.strength-bar.fair {
    width: 50%;
    background: #F59E0B;
}

.strength-bar.good {
    width: 75%;
    background: #3B82F6;
}

.strength-bar.strong {
    width: 100%;
    background: #10B981;
}

.password-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.password-hints .hint {
    font-size: 12px;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: 5px;
}

.password-hints .hint i {
    font-size: 6px;
}

.password-hints .hint.valid {
    color: var(--success);
}

.password-hints .hint.valid i {
    font-size: 12px;
}

.password-hints .hint.valid i::before {
    content: '\f058';
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-600);
}

.checkbox-wrapper input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.checkbox-wrapper input:checked+.checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-wrapper input:checked+.checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: var(--white);
}

.checkbox-wrapper a {
    color: var(--primary);
    text-decoration: underline;
}

.forgot-link {
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Button Full Width */
.btn-full {
    width: 100%;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--gray-400);
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

/* Social Login */
.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.social-btn:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.social-btn.google i {
    color: #EA4335;
}

.social-btn.microsoft i {
    color: #00A4EF;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--gray-100);
}

.auth-footer p {
    font-size: 14px;
    color: var(--gray-500);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Input Error State */
.input-wrapper.error input {
    border-color: #EF4444;
}

.input-wrapper.error>i:first-child {
    color: #EF4444;
}

.error-message {
    font-size: 12px;
    color: #EF4444;
    margin-top: 5px;
}

/* Success Animation */
@keyframes success-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.btn.success {
    background: var(--success) !important;
    animation: success-pulse 0.5s ease;
}

/* Responsive */
@media (max-width: 900px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .auth-branding {
        display: none;
    }

    .auth-form-panel {
        padding: 40px 30px;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 15px;
    }

    .auth-form-panel {
        padding: 30px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .social-login {
        grid-template-columns: 1fr;
    }

    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}