/* ================= LOGIN MODAL ================= */
.login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.login-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.login-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(6, 102, 204, 0.25);
    width: 100%;
    max-width: 420px;
    padding: 50px 40px;
    position: relative;
    animation: slideUp 0.4s ease;
    border: 1px solid rgba(0, 102, 204, 0.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    z-index: 9999;
    color: #999;
    transition: color 0.3s ease;
}

.login-close:hover {
    color: #333;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.login-header h2 {
    color: var(--primary);
    font-size: 28px;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-light);
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.form-group input {
    padding: 12px 16px;
    border: 1.5px solid #e0e8f6;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: #fafbff;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    background: white;
}

.form-group input::placeholder {
    color: #999;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.remember-forgot input[type="checkbox"] {
    cursor: pointer;
}

.remember-forgot a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.remember-forgot a:hover {
    color: var(--primary-dark);
}

.login-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
    width: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: var(--text-light);
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: var(--primary-dark);
}

/* ================= DEMO CREDENTIALS ================= */
.demo-credentials {
    background: #f0f9ff;
    border-left: 4px solid var(--primary);
    padding: 12px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-dark);
    margin-top: 15px;
    line-height: 1.5;
}

.demo-credentials strong {
    color: var(--primary);
}

/* ================= ERROR MESSAGE ================= */
.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    border-left: 4px solid #dc2626;
    display: none;
    margin-bottom: 10px;
}

.error-message.show {
    display: block;
    animation: slideUp 0.3s ease;
}

/* ================= SUCCESS MESSAGE ================= */
.success-message {
    background: #dcfce7;
    color: #16a34a;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    border-left: 4px solid #16a34a;
    display: none;
    margin-bottom: 10px;
}

.success-message.show {
    display: block;
    animation: slideUp 0.3s ease;
}

/* ================= LOADING STATE ================= */
.login-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.login-btn.loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 480px) {
    .login-container {
        width: 90%;
        padding: 40px 25px;
        margin: 20px;
    }

    .login-header h2 {
        font-size: 24px;
    }

    .login-icon {
        font-size: 40px;
    }
}

