/* ========== GLOBAL STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0066cc 0%, #0099ff 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

/* ========== LOGIN CONTAINER ========== */
.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    z-index: 1;
    position: relative;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

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

/* ========== LOGIN HEADER ========== */
.login-header {
    background: linear-gradient(135deg, #0066cc 0%, #0099ff 100%);
    padding: 40px 20px;
    text-align: center;
    color: white;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

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

.login-logo {
    font-size: 50px;
    margin-bottom: 15px;
    display: inline-block;
}

/* ========== LOGIN BODY ========== */
.login-body {
    padding: 40px;
}

.form-group {
    margin-bottom: 20px;
}

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

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    flex: 1;
    padding-right: 45px;
}

.btn-toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #0066cc;
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    top: 50%;
    transform: translateY(-50%);
}

.btn-toggle-password:hover {
    color: #0099ff;
    transform: translateY(-50%) scale(1.1);
}

.btn-toggle-password:active {
    transform: translateY(-50%) scale(0.95);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    background-color: #f9f9f9;
}

.form-group input.is-invalid {
    border-color: #dc3545;
}

.form-group input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.error-message {
    color: #dc3545 !important;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    font-weight: 400 !important;
}

.error-message.show {
    display: block;
}

.error-message label {
    color: #dc3545 !important;
    font-weight: 400 !important;
}

.error-message * {
    color: #dc3545 !important;
}

/* jQuery Validation error styling */
label.error {
    color: #dc3545 !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    display: block !important;
    margin-top: 5px !important;
    margin-left: 0 !important;
}

#errorUsername,
#errorPassword {
    color: #dc3545 !important;
    font-weight: 400 !important;
}

#errorUsername label,
#errorPassword label {
    color: #dc3545 !important;
    font-weight: 400 !important;
}

/* ========== FORM ELEMENTS ========== */
.form-check {
    margin-bottom: 20px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    border: 2px solid #0066cc;
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: #0066cc;
    border-color: #0066cc;
}

.form-check label {
    cursor: pointer;
    margin: 0 0 0 8px;
    user-select: none;
    font-size: 14px;
    font-weight: 500;
}

/* ========== LOGIN BUTTON ========== */
.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #0066cc 0%, #0099ff 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 102, 204, 0.3);
}

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

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

/* ========== LOGIN FOOTER ========== */
.login-footer {
    padding: 20px 40px;
    text-align: center;
    font-size: 13px;
    color: #666;
    border-top: 1px solid #f0f0f0;
}

.login-footer a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #0099ff;
    text-decoration: underline;
}

.divider {
    text-align: center;
    color: #999;
    font-size: 12px;
    margin: 20px 0;
}

.divider span {
    background: white;
    padding: 0 10px;
}

/* ========== ANIMATED BACKGROUND ========== */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.1;
}

.circle {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
}

.circle1 {
    width: 100px;
    height: 100px;
    top: 10%;
    left: 10%;
}

.circle2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.circle3 {
    width: 80px;
    height: 80px;
    bottom: 10%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-30px);
    }
}

/* ========== LOADING ANIMATION ========== */
.spinner-border {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 576px) {
    .login-container {
        max-width: 100%;
    }

    .login-body {
        padding: 30px 20px;
    }

    .login-footer {
        padding: 15px 20px;
    }

    .login-header {
        padding: 30px 15px;
    }

    .login-header h1 {
        font-size: 24px;
    }

    .login-logo {
        font-size: 40px;
    }
}
