/* Enhanced Login Page Styles with Modern Design Elements */

.login-page-wrapper {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.login-hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.login-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(247, 115, 41, 0.9) 0%,
        rgba(189, 91, 35, 0.8) 50%,
        rgba(71, 39, 27, 0.9) 100%
    );
    z-index: 1;
}

.login-hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/page-banners/side-bg.jpeg') center/cover no-repeat;
    z-index: 0;
}

/* Animated Background Particles with Enhanced Effects */
.login-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.particle:nth-child(1) {
    width: 20px;
    height: 20px;
    top: 20%;
    left: 20%;
    animation-delay: 0s;
    background: rgba(247, 115, 41, 0.2);
}

.particle:nth-child(2) {
    width: 15px;
    height: 15px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
    background: rgba(255, 255, 255, 0.15);
}

.particle:nth-child(3) {
    width: 25px;
    height: 25px;
    top: 40%;
    left: 60%;
    animation-delay: 4s;
    background: rgba(189, 91, 35, 0.2);
}

.particle:nth-child(4) {
    width: 12px;
    height: 12px;
    top: 80%;
    left: 30%;
    animation-delay: 1s;
    background: rgba(255, 255, 255, 0.1);
}

.particle:nth-child(5) {
    width: 18px;
    height: 18px;
    top: 30%;
    left: 10%;
    animation-delay: 3s;
    background: rgba(247, 115, 41, 0.15);
}

.particle:nth-child(6) {
    width: 22px;
    height: 22px;
    top: 70%;
    left: 70%;
    animation-delay: 5s;
    background: rgba(255, 255, 255, 0.12);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* Login Container with Glass Morphism Effect */
.login-container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.login-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 80vh;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 100px rgba(247, 115, 41, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Left Panel - Enhanced Visual Design */
.login-visual-panel {
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(247, 115, 41, 0.1) 0%,
        rgba(189, 91, 35, 0.1) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    text-align: center;
    overflow: hidden;
}

.login-visual-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/page-banners/side-bg.jpeg') center/cover no-repeat;
    opacity: 0.3;
    z-index: 1;
}

/* Decorative Elements for Visual Panel */
.login-visual-panel::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(247, 115, 41, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: 1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-visual-content {
    position: relative;
    z-index: 2;
    color: #333;
}

.login-logo {
    width: 120px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.login-logo:hover {
    transform: scale(1.05);
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--color-orange), var(--color-dark-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.welcome-subtitle {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.visual-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.visual-icon {
    width: 60px;
    height: 60px;
    background: rgba(247, 115, 41, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-orange);
    transition: all 0.3s ease;
    border: 1px solid rgba(247, 115, 41, 0.2);
    backdrop-filter: blur(10px);
}

.visual-icon:hover {
    background: var(--color-orange);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(247, 115, 41, 0.3);
}

/* Right Panel - Enhanced Form Design */
.login-form-panel {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
}

.login-form-header {
    margin-bottom: 2rem;
    text-align: center;
}

.login-form-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    position: relative;
}

.login-form-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-orange), var(--color-dark-orange));
    border-radius: 2px;
}

.login-form-subtitle {
    color: #666;
    font-size: 1rem;
    margin-top: 1rem;
}

/* Enhanced Form Styles with Modern Design */
.enhanced-form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.enhanced-form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.enhanced-form-control {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(248, 249, 250, 0.8);
    color: #333;
    position: relative;
}

.enhanced-form-control:focus {
    outline: none;
    border-color: var(--color-orange);
    box-shadow: 0 0 0 3px rgba(247, 115, 41, 0.1);
    background: white;
    transform: translateY(-1px);
}

.enhanced-form-control::placeholder {
    color: #adb5bd;
    transition: all 0.3s ease;
}

.enhanced-form-control:focus::placeholder {
    opacity: 0.7;
    transform: translateX(5px);
}

/* Enhanced Input Group with Modern Touch */
.enhanced-input-group {
    position: relative;
}

.enhanced-input-group .enhanced-form-control {
    padding-right: 3.5rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--color-orange);
    background: rgba(247, 115, 41, 0.1);
}

/* Enhanced Button with Gradient and Effects */
.enhanced-login-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--color-orange), var(--color-dark-orange));
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
    cursor: pointer;
}

.enhanced-login-btn::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;
}

.enhanced-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(247, 115, 41, 0.3);
}

.enhanced-login-btn:hover::before {
    left: 100%;
}

.enhanced-login-btn:active {
    transform: translateY(0);
}

/* Additional Links with Enhanced Styling */
.login-links {
    margin-top: 1.5rem;
    text-align: center;
}

.login-link {
    color: var(--color-orange);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.login-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-orange);
    transition: width 0.3s ease;
}

.login-link:hover {
    color: var(--color-dark-orange);
    text-decoration: none;
}

.login-link:hover::after {
    width: 100%;
}

.register-link {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e1e5e9;
    font-size: 0.9rem;
    color: #666;
}

/* Enhanced Alert Styling */
.enhanced-alert {
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border: none;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.enhanced-alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
}

.enhanced-alert.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
    color: #155724;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.enhanced-alert.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
    color: #721c24;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Loading State with Enhanced Animation */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Form Validation Styles */
.enhanced-form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
    background: rgba(40, 167, 69, 0.05);
}

.enhanced-form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
    background: rgba(220, 53, 69, 0.05);
}

.validation-error {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility Improvements */
.enhanced-form-control:focus,
.enhanced-login-btn:focus,
.password-toggle:focus {
    outline: 2px solid var(--color-orange);
    outline-offset: 2px;
}

/* Mobile-First Approach - Enhanced Mobile Styles */
@media (max-width: 576px) {
    .login-hero-section {
        min-height: 100vh;
        padding: 0.5rem 0;
    }
    
    .login-container {
        padding: 0.5rem;
    }
    
    .login-grid {
        border-radius: 10px;
        min-height: auto;
    }
    
    .login-visual-panel {
        padding: 2rem 1.5rem;
        min-height: 250px;
    }
    
    .login-form-panel {
        padding: 2rem 1.5rem;
    }
    
    .welcome-title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .welcome-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .login-form-title {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .login-form-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .enhanced-form-control {
        padding: 0.9rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .enhanced-login-btn {
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .visual-icons {
        gap: 0.5rem;
        margin-top: 1.5rem;
    }
    
    .visual-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .login-logo {
        width: 90px;
        margin-bottom: 1.5rem;
    }
}

/* Tablet Adjustments */
@media (max-width: 768px) and (min-width: 577px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-grid {
        border-radius: 15px;
    }
    
    .login-visual-panel,
    .login-form-panel {
        padding: 2.5rem 2rem;
    }
    
    .welcome-title {
        font-size: 2rem;
    }
    
    .login-form-title {
        font-size: 1.75rem;
    }
}

/* Large Mobile Landscape */
@media (max-width: 992px) and (min-width: 769px) {
    .login-grid {
        grid-template-columns: 1fr;
    }
    
    .login-visual-panel {
        min-height: 350px;
    }
}

/* Additional enhancements for better UX */
@media (max-width: 992px) {
    .login-visual-panel {
        order: 1;
    }
    
    .login-form-panel {
        order: 2;
    }
}

/* Touch-friendly improvements for mobile */
@media (max-width: 768px) {
    .enhanced-form-control {
        min-height: 48px; /* iOS recommended touch target */
    }
    
    .enhanced-login-btn {
        min-height: 48px;
    }
    
    .password-toggle {
        min-width: 44px;
        min-height: 44px;
    }
    
    .login-link {
        padding: 0.5rem;
        display: inline-block;
    }
}

/* Landscape mobile adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .login-hero-section {
        min-height: auto;
        padding: 1rem 0;
    }
    
    .login-visual-panel {
        min-height: 200px;
        padding: 1.5rem;
    }
    
    .login-form-panel {
        padding: 1.5rem;
    }
    
    .welcome-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .welcome-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .visual-icons {
        display: none; /* Hide in landscape mobile for space */
    }
    
    .login-particles {
        display: none; /* Reduce animations on small screens */
    }
}

/* High DPI / Retina display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .login-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Prefers reduced motion - accessibility */
@media (prefers-reduced-motion: reduce) {
    .particle,
    .enhanced-login-btn::before,
    .visual-icon,
    .login-logo,
    .enhanced-form-control,
    .enhanced-login-btn {
        animation: none !important;
        transition: none !important;
    }
    
    .login-particles {
        display: none;
    }
}
