/* Admin Login Page Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.7)),
                url('../Assets/Images/waterfallbg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow-x: hidden;
}

/* Animated background overlay */
.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(16, 185, 129, 0.1) 0%, 
        rgba(34, 197, 94, 0.1) 25%, 
        rgba(22, 163, 74, 0.1) 50%, 
        rgba(21, 128, 61, 0.1) 75%, 
        rgba(20, 83, 45, 0.1) 100%);
    animation: gradientShift 8s ease-in-out infinite;
    z-index: -1;
}

@keyframes gradientShift {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Floating particles effect */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(255, 255, 255, 0.2), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: float 20s linear infinite;
    z-index: -1;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    padding: 3rem 2.5rem;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.logo i {
    font-size: 2rem;
    color: white;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.login-header h1 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.login-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 400;
}

.error-message {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1.25rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    z-index: 2;
    transition: all 0.3s ease;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 1.25rem 1.25rem 1.25rem 3.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    font-size: 1rem;
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 
        0 0 0 4px rgba(16, 185, 129, 0.1),
        0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

input[type="text"]:focus + .input-icon,
input[type="password"]:focus + .input-icon {
    color: #10b981;
    transform: scale(1.1);
}

.password-toggle {
    position: absolute;
    right: 1.25rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: #10b981;
    transform: scale(1.1);
}

.login-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    border-radius: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.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: 0.5s;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.4);
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:active {
    transform: translateY(-1px);
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.back-home-btn {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.back-home-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.back-home-btn i {
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
    }
    
    .login-card {
        padding: 2rem 1.5rem;
        border-radius: 1.5rem;
    }
    
    .login-header h1 {
        font-size: 1.75rem;
    }
    
    .logo {
        width: 70px;
        height: 70px;
    }
    
    .logo i {
        font-size: 1.75rem;
    }
    
    input[type="text"],
    input[type="password"] {
        padding: 1rem 1rem 1rem 3rem;
        font-size: 0.95rem;
    }
    
    .input-icon {
        left: 1rem;
        font-size: 1rem;
    }
    
    .password-toggle {
        right: 1rem;
        font-size: 1rem;
    }
    
    .login-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .back-home-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .logo {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #10b981, #059669);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #059669, #047857);
}

/* Loading animation for form submission */
.login-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.login-btn.loading span {
    display: none;
}

.login-btn.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    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: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus trap for accessibility */
.login-card:focus-within {
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(16, 185, 129, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .login-card {
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid white;
    }
    
    input[type="text"],
    input[type="password"] {
        background: rgba(0, 0, 0, 0.5);
        border: 2px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .background-overlay {
        animation: none;
    }
    
    body::before {
        animation: none;
    }
}
