/* =============================================
   MEJORAS PROFESIONALES ADICIONALES
   ============================================= */

/* Gradientes para tarjetas */
.stat-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(79, 70, 229, 0.05) 100%);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -10px rgba(79, 70, 229, 0.3);
}

/* Iconos de estadísticas más prominentes */
.stat-icon {
    width: 60px;
    height: 60px;
    font-size: 1.75rem;
}

/* Animación de números */
@keyframes countUp {
    from {
        opacity: 0.5;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-value {
    animation: countUp 0.5s ease-out;
}

/* Mejor estilo de inputs con focus */
.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    transform: translateY(-1px);
}

/* Loading state para botones */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Cards de clientes/productos mejoradas */
.client-card,
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.client-card:hover,
.product-card:hover {
    background: rgba(79, 70, 229, 0.05);
    border-color: var(--primary-color);
    transform: translateX(4px);
}

/* Modal animations */
.modal {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal .form-card {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Login card enhancement */
.login-card {
    animation: slideUp 0.5s ease;
}

.login-header i {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Footer del sistema */
.system-footer {
    position: fixed;
    bottom: 0;
    right: 0;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-top-left-radius: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    z-index: 10;
}

/* Separator utilities */
.separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 2rem 0;
}

/* Mejoras en badges */
.badge {
    font-weight: 600;
    letter-spacing: 0.025em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Tooltips simples */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 0.5rem 0.75rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* Dashboard grid improvements */
.stats-grid {
    gap: 1.5rem;
}

/* Transiciones suaves globales */
* {
    transition: color 0.2s, background-color 0.2s;
}

/* Input groups mejorados */
.input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.form-control.with-icon {
    padding-left: 2.75rem;
}

/* Section headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.section-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

/* Better spacing for forms */
.form-group {
    margin-bottom: 1.25rem;
}

/* Improved button styling */
.btn {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8125rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Success/Error animations */
@keyframes success {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-indicator {
    animation: success 0.4s ease;
}