/* ========================================
   MODERN AUTHENTICATION PAGES STYLES
   ======================================== */

/* Modern Auth Container */
.modern-auth-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #1e3a8a 100%);
    overflow-y: auto;
    padding: 1rem;
}

/* Animated Background */
.auth-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    animation: backgroundFloat 20s ease-in-out infinite;
}

@keyframes backgroundFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

/* Modern Auth Card */
.modern-auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: 0;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    animation: cardSlideIn 0.8s ease-out forwards;
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.modern-auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--corporate-gradient-hero);
    z-index: 1;
}

.modern-auth-card.card-loaded {
    transform: translateY(0);
    opacity: 1;
}

@keyframes cardSlideIn {
    0% {
        transform: translateY(40px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Auth Card Header */
.auth-card-header {
    text-align: center;
    padding: 1.5rem 2rem 1.25rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
    position: relative;
}

.auth-logo-container {
    margin-bottom: 1rem;
}

.auth-logo {
    width: 60px;
    height: 60px;
    background: var(--corporate-gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.2);
    animation: logoFloat 3s ease-in-out infinite;
}

.auth-logo i {
    font-size: 1.5rem;
    color: var(--corporate-white);
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--corporate-secondary-dark);
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--corporate-primary) 0%, var(--corporate-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: var(--corporate-secondary-light);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Auth Card Body */
.auth-card-body {
    padding: 1.5rem 2rem 2rem;
}

/* Modern Form */
.modern-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
    align-items: start;
}

.modern-form > .modern-btn-primary,
.modern-form > .auth-divider,
.modern-form > .modern-btn-secondary {
    grid-column: 1 / -1;
}

/* Modern Form Group */
.modern-form-group {
    position: relative;
}

/* Input Group Modern */
.input-group-modern {
    position: relative;
    background: var(--corporate-white);
    border-radius: 16px;
    border: 2px solid var(--corporate-lighter);
    transition: all 0.3s ease;
    overflow: hidden;
}

.input-group-modern:focus-within {
    border-color: var(--corporate-primary);
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
    transform: translateY(-2px);
}

.input-group-modern:hover:not(:focus-within) {
    border-color: var(--corporate-secondary-light);
}

/* Input Icon */
.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--corporate-secondary-light);
    font-size: 1.1rem;
    z-index: 2;
    transition: all 0.3s ease;
}

.input-group-modern:focus-within .input-icon {
    color: var(--corporate-primary);
    transform: translateY(-50%) scale(1.1);
}

/* Modern Form Control */
.modern-form-control {
    width: 100%;
    padding: 0.875rem 0.875rem 0.875rem 2.75rem;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    color: var(--corporate-secondary-dark);
    outline: none;
    transition: all 0.3s ease;
}

.modern-form-control::placeholder {
    color: var(--corporate-secondary-light);
    opacity: 1;
}

/* Floating Label - Hidden (using placeholder instead) */
.floating-label {
    display: none;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--corporate-secondary-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--corporate-primary);
    background: rgba(30, 58, 138, 0.1);
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
}

.strength-indicator {
    display: flex;
    gap: 0.2rem;
    margin-bottom: 0.4rem;
}

.strength-bar {
    height: 3px;
    flex: 1;
    background: var(--corporate-lighter);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-bar.active {
    animation: strengthFill 0.3s ease;
}

@keyframes strengthFill {
    0% { width: 0; }
    100% { width: 100%; }
}

.strength-text {
    font-size: 0.8rem;
    color: var(--corporate-secondary-light);
    font-weight: 500;
}

/* Modern Checkbox */
.modern-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 0;
    grid-column: 1 / -1;
}

.modern-checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.modern-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--corporate-secondary-dark);
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid var(--corporate-secondary-light);
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
    background: var(--corporate-white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-checkbox:hover .checkbox-custom {
    border-color: var(--corporate-primary);
}

.modern-checkbox-input:checked ~ .modern-checkbox-label .checkbox-custom {
    background: var(--corporate-primary);
    border-color: var(--corporate-primary);
}

.modern-checkbox-input:checked ~ .modern-checkbox-label .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid var(--corporate-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Modern Buttons */
.modern-btn-primary {
    background: var(--corporate-gradient-primary);
    color: var(--corporate-white);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.modern-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.modern-btn-primary:hover::before {
    left: 100%;
}

.modern-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.4);
}

.modern-btn-primary:active {
    transform: translateY(0);
}

.modern-btn-primary.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-icon {
    transition: transform 0.3s ease;
}

.modern-btn-primary:hover .btn-icon {
    transform: translateX(4px);
}

.modern-btn-secondary {
    background: transparent;
    color: var(--corporate-primary);
    border: 2px solid var(--corporate-primary);
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    gap: 0.5rem;
}

.modern-btn-secondary:hover {
    background: var(--corporate-primary);
    color: var(--corporate-white);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.2);
    text-decoration: none;
}

/* Auth Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--corporate-lighter), transparent);
}

.auth-divider span {
    background: var(--corporate-white);
    color: var(--corporate-secondary-light);
    padding: 0 1rem;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Validation Message */
.validation-message {
    color: var(--corporate-warning);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: block;
    font-weight: 500;
}

/* Modern Alert */
.modern-alert {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: var(--corporate-warning);
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .modern-auth-card {
        max-width: 750px;
    }
}

@media (max-width: 768px) {
    .modern-auth-container {
        padding: 1rem 0.5rem;
    }
    
    .modern-auth-card {
        max-width: 600px;
    }
    
    .modern-form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .auth-card-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .auth-card-body {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .auth-logo {
        width: 50px;
        height: 50px;
    }
    
    .auth-logo i {
        font-size: 1.25rem;
    }
    
    .auth-title {
        font-size: 1.25rem;
    }
    
    .auth-subtitle {
        font-size: 0.8rem;
    }
    
    .modern-form-control {
        padding: 0.75rem 0.75rem 0.75rem 2.5rem;
        font-size: 0.9rem;
    }
    
    .floating-label {
        left: 2.5rem;
        font-size: 0.9rem;
    }
    
    .floating-label.active {
        left: 2rem;
        font-size: 0.75rem;
    }
    
    .modern-btn-primary,
    .modern-btn-secondary {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .modern-auth-container {
        padding: 0.5rem 0.25rem;
    }
    
    .modern-auth-card {
        max-width: 380px;
        border-radius: 12px;
    }
    
    .modern-form {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    
    .auth-card-header {
        padding: 1rem 1rem 0.75rem;
    }
    
    .auth-card-body {
        padding: 0.75rem 1rem 1rem;
    }
    
    .auth-logo {
        width: 45px;
        height: 45px;
    }
    
    .auth-title {
        font-size: 1.125rem;
    }
    
    .row {
        margin: 0;
    }
    
    .col-md-6, .col-lg-4, .col-md-8, .col-lg-6, .col-xl-5 {
        padding: 0;
    }
}