/* Login Page Styles - login.css */
:root {
    --primary-color: #2563eb;
    --secondary-color: #f8fafc;
    --accent-color: #f97316;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow-light: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-medium: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-large: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    position: relative;
}

.container-fluid {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-large);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    position: relative;
    margin: 0 auto;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.logo-section {
    padding: 30px 25px 20px;
    text-align: center;
    background: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
}

.logo-section img {
    max-width: 150px;
    height: auto;
    max-height: 60px;
    object-fit: contain;
    filter: drop-shadow(var(--shadow-light));
}

.login-form {
    padding: 30px 25px;
}

.welcome-text {
    text-align: center;
    margin-bottom: 25px;
}

.welcome-text h2 {
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.welcome-text p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

.form-floating {
    margin-bottom: 16px;
    position: relative;
}

.form-floating .form-control {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 3rem 1rem 3rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fafbfc;
    height: 58px;
}

.form-floating .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
    background-color: white;
    outline: none;
}

.form-floating .form-control.is-invalid {
    border-color: #dc2626;
}

.form-floating label {
    padding-left: 3rem;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9rem;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 35%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
    z-index: 10;
    transition: color 0.3s ease;
    pointer-events: none;
}

.form-floating:focus-within .input-icon {
    color: var(--primary-color);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    border-radius: 4px;
    border: 2px solid var(--border-color);
    margin-right: 6px;
    width: 16px;
    height: 16px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    font-size: 0.85rem;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    font-size: 0.85rem;
}

.forgot-password:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.btn-login {
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    border: none;
    border-radius: 12px;
    padding: 12px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 48px;
}

.btn-login::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;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

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

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    background: white;
    color: var(--text-light);
    padding: 0 12px;
    font-size: 0.85rem;
}

.register-link {
    text-align: center;
}

.register-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    font-size: 0.85rem;
}

.register-link a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.alert {
    border-radius: 10px;
    border: none;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-weight: 500;
    font-size: 0.9rem;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border-left: 4px solid #22c55e;
}

.alert-success i {
    margin-right: 8px;
}

.invalid-feedback {
    display: block !important;
    font-size: 0.8rem;
    color: #dc2626;
    margin-top: 4px;
    padding-left: 3rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    z-index: 15;
    padding: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.1);
}

.password-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Loading spinner */
.fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding: 15px;
    }

    .login-container {
        max-width: 100%;
        border-radius: 15px;
        margin: 0 10px;
    }

    .login-form,
    .logo-section {
        padding: 20px;
    }

    .welcome-text h2 {
        font-size: 1.3rem;
    }

    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 10px;
    }

    .login-container {
        margin: 0;
        border-radius: 12px;
    }

    .login-form,
    .logo-section {
        padding: 18px 15px;
    }

    .welcome-text h2 {
        font-size: 1.2rem;
    }

    .welcome-text p {
        font-size: 0.85rem;
    }

    .form-floating .form-control {
        height: 54px;
        padding: 0.9rem 2.8rem 0.9rem 2.8rem;
        font-size: 0.95rem;
    }

    .form-floating label {
        padding-left: 2.8rem;
        font-size: 0.85rem;
    }

    .input-icon {
        left: 0.9rem;
        font-size: 1rem;
    }

    .password-toggle {
        right: 0.9rem;
        width: 22px;
        height: 22px;
    }

    .invalid-feedback {
        padding-left: 2.8rem;
        font-size: 0.75rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --text-light: #333;
    }

    .form-floating .form-control {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
