/* Login Page Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-container {
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.6s ease;
}

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

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
    border-bottom: 4px solid #ffc107;
}

.logo-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.logo-container i {
    font-size: 2.5rem;
    color: white;
}

.logo-container .logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.login-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.login-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
}

.form-label i {
    margin-right: 0.5rem;
    color: #0d6efd;
}

.form-control {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-control {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #0d6efd;
}

.password-toggle i {
    font-size: 1.2rem;
}

.form-check {
    margin-bottom: 1.5rem;
}

.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #e0e0e0;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-label {
    margin-left: 0.5rem;
    color: #6c757d;
    cursor: pointer;
}

.btn-login {
    padding: 0.875rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
    background: linear-gradient(135deg, #0a58ca 0%, #084298 100%);
}

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

.alert {
    border-radius: 10px;
    padding: 0.875rem 1rem;
    margin-bottom: 1.5rem;
    border: none;
}

.alert-danger {
    background-color: #fee;
    color: #dc3545;
}

.login-footer {
    padding: 1.5rem 2rem;
    background-color: #f8f9fa;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.login-footer p {
    font-size: 0.875rem;
}

/* Loading state */
.btn-login.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-login.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 576px) {
    body {
        padding: 0;
        align-items: stretch;
    }

    .login-container {
        max-width: 100%;
        height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .login-card {
        border-radius: 0;
        box-shadow: none;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .login-header {
        padding: 2rem 1.5rem;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }

    .login-header p {
        font-size: 0.85rem;
    }

    .login-form {
        padding: 1.5rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .logo-container {
        width: 70px;
        height: 70px;
    }

    .logo-container i {
        font-size: 2rem;
    }
}

/* Animation for error alert */
.alert.show-alert {
    animation: shakeAlert 0.5s ease;
}

@keyframes shakeAlert {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Back button styles */
.back-button-container {
    padding: 0 2rem 1.5rem;
    text-align: center;
}

.btn-back {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #6c757d;
    background: transparent;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-back:hover {
    color: #0d6efd;
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
    transform: translateX(-3px);
}

.btn-back:active {
    transform: translateX(0);
}

.btn-back i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.btn-back:hover i {
    transform: translateX(-3px);
}

/* Responsive for back button */
@media (max-width: 576px) {
    .back-button-container {
        padding: 0 1.5rem 1.5rem;
    }
}
