/* Animações e estilos adicionais para área administrativa */

/* Spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spin {
    animation: spin 2s linear infinite;
}

/* Hover effects para cards */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Button group improvements */
.btn-group .btn {
    transition: all 0.2s ease;
}

.btn-group .btn:hover {
    transform: scale(1.05);
    z-index: 1;
}

/* Table row hover */
#usersTable tbody tr {
    transition: background-color 0.2s ease;
}

#usersTable tbody tr:hover {
    background-color: rgba(25, 135, 84, 0.1);
}

/* Badge pulse effect */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.badge.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Smooth transitions */
* {
    transition: background-color 0.2s ease;
}

/* Cart badge positioning */
.cart-badge {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
    border-radius: 10px;
}

/* Avatar circle */
.bg-success.rounded-circle {
    transition: transform 0.2s ease;
}

tr:hover .bg-success.rounded-circle {
    transform: scale(1.1);
}

/* Modal animations */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: none;
}

/* Input focus effects */
.form-control:focus,
.form-select:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* Success/Error message animations */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert {
    animation: slideInDown 0.3s ease-out;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .table-responsive {
        border: none;
    }
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-indicator.active {
    background-color: #198754;
    box-shadow: 0 0 6px #198754;
}

.status-indicator.inactive {
    background-color: #ffc107;
    box-shadow: 0 0 6px #ffc107;
}

.status-indicator.blocked {
    background-color: #dc3545;
    box-shadow: 0 0 6px #dc3545;
}
