/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    
}


      /* Enhanced styles for better UX */
        .alert {
            padding: 12px 16px;
            margin-bottom: 20px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            animation: slideIn 0.3s ease-out;
        }
        
        .alert-danger {
            background-color: #fef2f2;
            color: #dc2626;
            border: 1px solid #fecaca;
        }
        
        .alert-success {
            background-color: #f0fdf4;
            color: #16a34a;
            border: 1px solid #bbf7d0;
        }
        
        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .loading-spinner {
            display: inline-block;
            width: 16px;
            height: 16px;
            border: 2px solid #ffffff40;
            border-radius: 50%;
            border-top-color: #ffffff;
            animation: spin 1s ease-in-out infinite;
            margin-right: 8px;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        

.tagline {
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.5rem;
    letter-spacing: 0.5px;
}

.system-title {
    color: #7f8c8d;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    font-weight: 500;
}

/* ===== HEADER (for authenticated pages) ===== */
.header {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.header .logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0;
}

.header .logo {
    font-size: 1.8rem;
}

.header .logo .check {
    width: 35px;
    height: 35px;
    font-size: 1rem;
}

.header .tagline {
    font-size: 0.8rem;
    margin-top: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #3498db, #27ae60);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: #2c3e50;
}

.user-role {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.logout-btn {
    padding: 0.5rem 1rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

/* ===== MAIN CONTAINERS ===== */
.login-container,
.main-container {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.login-container::before,
.main-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #27ae60);
}

/* ===== PAGE TITLES ===== */
.login-title,
.page-title {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-subtitle,
.page-subtitle {
    color: #7f8c8d;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}


.validation-message {
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.validation-message.show {
    opacity: 1;
}

.validation-message.error {
    color: #dc2626;
}

.validation-message.success {
    color: #16a34a;
}

.input-container {
    position: relative;
    transition: all 0.2s ease;
}

.input-container:focus-within {
    transform: translateY(-1px);
}

.form-input:focus {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.login-button {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}

.login-button:disabled {
    cursor: not-allowed;
}

.forgot-password {
    text-align: center;
    margin-top: 20px;
}

.forgot-password a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.forgot-password a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, 1a1a2e 0%, 16213e 100%);
        color: #e8e8e8;
    }
    
    .login-container {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .form-input::placeholder {
        color: #a0a0a0;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .login-container {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .logo-container img {
        height: 80px;
        width: 160px;
    }
    
    .system-title {
        font-size: 20px;
    }
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    position: relative;
}


.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    z-index: 1;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    font-size: 1rem;
    z-index: 1;
}

.password-toggle:hover {
    color: #3498db;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-input.error {
    border-color: #e74c3c;
    background: #fdf2f2;
}

.form-input.success {
    border-color: #27ae60;
    background: #f0fff4;
}

.form-input::placeholder {
    color: #bdc3c7;
}

/* ===== FORM MESSAGES ===== */
.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

.success-message {
    color: #27ae60;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

/* ===== PASSWORD STRENGTH ===== */
.password-strength {
    margin-top: 0.5rem;
}

.strength-meter {
    width: 100%;
    height: 4px;
    background: #e0e6ed;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== PASSWORD REQUIREMENTS ===== */
.password-requirements {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.requirements-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: #7f8c8d;
}

.requirement.met {
    color: #27ae60;
}

.requirement-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.requirement .requirement-icon {
    border: 2px solid #bdc3c7;
}

.requirement.met .requirement-icon {
    background: #27ae60;
    border-color: #27ae60;
    color: white;
}

/* ===== BUTTONS ===== */
.login-button,
.change-password-btn {
    width: 100%;
    padding: 1rem;
    background: #303466;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.login-button:hover,
.change-password-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(44, 62, 80, 0.3);
}

.change-password-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.button-group .change-password-btn {
    flex: 1;
    margin-bottom: 0;
}

.cancel-btn {
    flex: 0.5;
    padding: 1rem;
    background: transparent;
    color: #7f8c8d;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    border-color: #bdc3c7;
    color: #2c3e50;
}

/* ===== DEMO SECTION (Login Page Only) ===== */
.demo-section {
    border-top: 1px solid #e0e6ed;
    padding-top: 1.5rem;
}

.demo-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #2c3e50;
    font-weight: 600;
    transition: color 0.3s ease;
}

.demo-header:hover {
    color: #3498db;
}

.info-icon {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.dropdown-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.demo-content {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.demo-account {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e6ed;
    cursor: pointer;
    transition: all 0.3s ease;
}

.demo-account:hover {
    border-color: #3498db;
    transform: translateX(5px);
}

.demo-account:last-child {
    margin-bottom: 0;
}

.account-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.account-email {
    font-size: 0.85rem;
    color: #7f8c8d;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .login-container,
    .main-container {
        padding: 2rem;
        margin: 1rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .cancel-btn {
        flex: 1;
    }
    
    .logo {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .login-container,
    .main-container {
        padding: 1.5rem;
    }
    
    .logo {
        font-size: 1.8rem;
    }
    
    .page-title,
    .login-title {
        font-size: 1.5rem;
    }
}