/**
 * ============================================================================
 * DS EVA - AUTHENTICATION STYLES
 * ============================================================================
 */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

/* Parallax Background */
.auth-wrapper .parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.auth-container {
    display: flex;
    width: 100%;
    max-width: 900px;
    min-height: 500px;
    background-color: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.auth-container.single-column {
    max-width: 440px;
}

/* Branding Panel */
.auth-branding {
    flex: 0 0 340px;
    padding: 40px 30px;
    background: var(--gradient-primary);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Decorative lines on branding */
.auth-branding::before,
.auth-branding::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(-35deg);
}

.auth-branding::before {
    width: 200%;
    height: 1px;
    top: 30%;
    left: -50%;
}

.auth-branding::after {
    width: 200%;
    height: 2px;
    bottom: 25%;
    left: -50%;
}

/* Logo */
.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.auth-logo-img {
    height: 50px;
    width: auto;
}

.auth-logo-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    backdrop-filter: blur(10px);
}

.auth-logo-text {
    display: flex;
    flex-direction: column;
}

.auth-logo-text .brand-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

.auth-logo-text .brand-sub {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.auth-branding-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.auth-branding-content h2 {
    font-size: 1.35rem;
    color: #fff;
    margin-bottom: 12px;
}

.auth-branding-content p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 25px;
}

.auth-features {
    list-style: none;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.auth-features i {
    color: #86efac;
    font-size: 0.75rem;
}

/* Form Panel */
.auth-form-panel {
    flex: 1;
    padding: 40px 35px;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Phase Indicators */
.login-phases {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
}

.phase-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--border-primary);
    transition: all var(--transition-normal);
}

.phase-dot.active {
    background: var(--gradient-blue-purple);
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.5);
}

.phase-dot.completed {
    background-color: var(--secondary-green);
}

/* Login Phases */
.login-phase {
    display: none;
    animation: fadeInUp 0.3s ease;
}

.login-phase.active {
    display: block;
}

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

.phase-title {
    margin-bottom: 25px;
}

.phase-title h2 {
    font-size: 1.35rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.phase-title p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-form .form-control {
    padding: 12px 14px;
    padding-left: 42px;
    font-size: 0.875rem;
}

.auth-form .form-group-icon > i:first-of-type {
    left: 14px;
    font-size: 0.875rem;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 0.875rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--text-primary);
}

.auth-submit {
    margin-top: 8px;
    padding: 12px 20px;
    font-size: 0.875rem;
}

.auth-submit.loading .btn-text { display: none; }
.auth-submit.loading .spinner { display: block; }
.auth-submit .spinner { display: none; }

/* User Email Display */
.user-email-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    background: var(--gradient-blue-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.user-email {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.change-user {
    font-size: 0.75rem;
    color: var(--primary-blue);
}

/* Auth Links */
.auth-links {
    margin-top: 20px;
    text-align: center;
}

.auth-links a {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.auth-links a:hover {
    color: var(--primary-blue);
}

/* Auth Footer */
.auth-footer {
    margin-top: auto;
    padding-top: 20px;
    text-align: center;
}

/* Email Sent Phase */
.phase-email-sent {
    text-align: center;
    padding: 20px 0;
}

.phase-email-sent .success-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-blue-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.phase-email-sent .success-icon i {
    font-size: 1.75rem;
    color: #fff;
}

.phase-email-sent h2 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.phase-email-sent p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.email-highlight {
    color: var(--primary-blue);
    font-weight: 600;
}

/* Loading State */
#loading-state {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0.95;
}

.loading-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.loading-text i {
    font-size: 1.5rem;
    color: var(--primary-blue);
}

/* Registration Form */
.registration-form {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.registration-form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.registration-form .form-grid .form-group.full-width {
    grid-column: 1 / -1;
}

/* Password Requirements */
.password-requirements {
    padding: 14px;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-top: 8px;
}

.password-requirements h4 {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.password-requirements ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.password-requirements li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.password-requirements li i {
    font-size: 6px;
    color: var(--border-secondary);
}

.password-requirements li.valid {
    color: var(--secondary-green);
}

.password-requirements li.valid i {
    color: var(--secondary-green);
}

/* Verification Page */
.verification-page {
    text-align: center;
    padding: 30px 0;
}

.verification-page .status-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.verification-page .status-icon.success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.verification-page .status-icon.error {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.verification-page .status-icon i {
    font-size: 2rem;
    color: #fff;
}

.verification-page h2 {
    font-size: 1.35rem;
    margin-bottom: 10px;
}

.verification-page p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
        max-width: 420px;
    }
    
    .auth-branding {
        flex: 0 0 auto;
        padding: 30px 25px;
    }
    
    .auth-branding-content p,
    .auth-features {
        display: none;
    }
    
    .auth-form-panel {
        padding: 30px 25px;
    }
    
    .registration-form .form-grid {
        grid-template-columns: 1fr;
    }
    
    .password-requirements ul {
        grid-template-columns: 1fr;
    }
}
