/* Login Page Styles - Reusable across all pages */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    z-index: -1;
}

body::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    animation: float 25s ease-in-out infinite reverse;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.login-container {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.login-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 48px 40px 32px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.logo-container {
    margin-bottom: 24px;
}

.logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 16px;
    color: #64748b;
    font-weight: 400;
}

.login-body {
    padding: 40px;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 18px;
    transition: color 0.3s ease;
}

.form-input:focus + .input-icon {
    color: #3b82f6;
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 4px;
}

.password-toggle:hover {
    color: #3b82f6;
}

.login-button {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.4);
    text-decoration: none;
    color: #ffffff;
}

.login-button:active {
    transform: translateY(0);
}

.error-message {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid #fecaca;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.error-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.footer-text {
    text-align: center;
    padding: 24px 40px;
    background: #f8fafc;
    color: #64748b;
    font-size: 14px;
    border-top: 1px solid #e2e8f0;
}

/* Management Access Denied Specific Styles */
.access-denied-message {
    text-align: center;
    padding: 20px 0;
}

.access-denied-icon {
    font-size: 64px;
    color: #dc2626;
    margin-bottom: 24px;
    animation: bounce 1s ease-in-out;
}

.access-denied-text {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 32px;
    line-height: 1.6;
}

.management-return-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    max-width: 250px;
    margin: 0 auto;
}

.management-return-btn:hover {
    box-shadow: 0 12px 35px rgba(220, 38, 38, 0.4);
}

.redirect-countdown {
    margin-top: 20px;
    color: #64748b;
    font-size: 14px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { 
        transform: translateY(0); 
    }
    40% { 
        transform: translateY(-10px); 
    }
    60% { 
        transform: translateY(-5px); 
    }
}

@keyframes pulse {
    0% { 
        transform: scale(1); 
        opacity: 1; 
    }
    50% { 
        transform: scale(1.05); 
        opacity: 0.8; 
    }
    100% { 
        transform: scale(1); 
        opacity: 1; 
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        padding: 16px;
    }

    .login-container {
        max-width: 100%;
        border-radius: 20px;
    }

    .login-header {
        padding: 32px 24px 24px;
    }

    .login-body {
        padding: 32px 24px;
    }

    .footer-text {
        padding: 20px 24px;
    }

    .login-title {
        font-size: 24px;
    }

    .form-input {
        padding: 14px 18px 14px 46px;
        font-size: 16px;
    }

    .input-icon {
        left: 16px;
        font-size: 16px;
    }

    .password-toggle {
        right: 16px;
        font-size: 16px;
    }

    .access-denied-icon {
        font-size: 48px;
    }
}

/* Loading state */
.login-button.loading {
    opacity: 0.8;
    cursor: not-allowed;
}

.login-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Smooth animations */
.login-container {
    animation: slideUp 0.6s ease-out;
}

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

/* 404 Page Specific Styles */
.not-found-message {
    text-align: center;
    padding: 20px 0;
}

.not-found-icon {
    font-size: 64px;
    color: #f59e0b;
    margin-bottom: 24px;
    animation: bounce 1s ease-in-out;
}

.not-found-text {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 32px;
    line-height: 1.6;
}

.not-found-return-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    max-width: 250px;
    margin: 0 auto;
}

.not-found-return-btn:hover {
    box-shadow: 0 12px 35px rgba(245, 158, 11, 0.4);
}

/* Responsive adjustments for 404 page */
@media (max-width: 768px) {
    .not-found-icon {
        font-size: 48px;
    }
}