/* Estilos adicionales para módulos funcionales - Sistema San Miguel */
/* Integración con Bootstrap 5 manteniendo colores corporativos */

/* Variables CSS adicionales para nuevos módulos */
:root {
    --bs-primary: #1e3a8a; /* Azul marino del logo */
    --bs-secondary: #20b2aa; /* Verde turquesa del logo */
    --bs-success: #28a745;
    --bs-danger: #dc3545;
    --bs-warning: #ffc107;
    --bs-info: #17a2b8;
    --bs-light: #f8f9fa;
    --bs-dark: #343a40;
}

/* Sobrescribir colores de Bootstrap para mantener identidad corporativa */
.btn-primary {
    background-color: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
}

.btn-primary:hover {
    background-color: #152c6c !important;
    border-color: #152c6c !important;
}

.btn-secondary {
    background-color: var(--primary-teal) !important;
    border-color: var(--primary-teal) !important;
}

.btn-secondary:hover {
    background-color: #189a94 !important;
    border-color: #189a94 !important;
}

.text-primary {
    color: var(--primary-blue) !important;
}

.text-secondary {
    color: var(--primary-teal) !important;
}

.bg-primary {
    background-color: var(--primary-blue) !important;
}

.bg-secondary {
    background-color: var(--primary-teal) !important;
}

/* Estilos específicos para módulos funcionales */

/* Dashboard - Tarjetas de estadísticas mejoradas */
.dashboard-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.dashboard-icon {
    font-size: 3rem;
    color: var(--primary-teal);
    margin-bottom: 1rem;
}

.dashboard-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-blue);
}

.dashboard-label {
    color: var(--secondary-gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Gestión de Clientes - Tarjetas de perfil */
.client-card {
    border-left: 4px solid var(--primary-teal);
    transition: all 0.3s ease;
}

.client-card:hover {
    border-left-color: var(--primary-blue);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.client-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.client-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

/* Gestión de Préstamos - Indicadores de progreso */
.loan-progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
    overflow: hidden;
}

.loan-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-teal), var(--primary-blue));
    transition: width 0.6s ease;
}

.loan-amount {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-blue);
}

.loan-status {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
    text-align: center;
}

.loan-approved {
    background-color: #d4edda;
    color: #155724;
}

.loan-pending {
    background-color: #fff3cd;
    color: #856404;
}

.loan-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

/* Gestión de Pagos - Timeline */
.payment-timeline {
    position: relative;
    padding-left: 2rem;
}

.payment-timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--primary-teal);
}

.payment-item {
    position: relative;
    margin-bottom: 2rem;
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.payment-item::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 1rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-teal);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--primary-teal);
}

.payment-date {
    font-size: 0.9rem;
    color: var(--secondary-gray);
    margin-bottom: 0.5rem;
}

.payment-amount {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-blue);
}

/* Reportes - Gráficos y métricas */
.metric-card {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-teal));
    color: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
}

.metric-value {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 1rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chart-container {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Marketing - Campañas */
.campaign-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.campaign-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.campaign-header {
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-teal));
    color: white;
    padding: 1.5rem;
}

.campaign-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.campaign-type {
    font-size: 0.9rem;
    opacity: 0.9;
}

.campaign-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1.5rem;
}

.metric {
    text-align: center;
}

.metric-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-blue);
}

.metric-text {
    font-size: 0.8rem;
    color: var(--secondary-gray);
    text-transform: uppercase;
}

/* Soporte - Chat y tickets */
.chat-container {
    height: 400px;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background-color: var(--primary-blue);
    color: white;
    padding: 1rem;
    font-weight: 500;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background-color: #f8f9fa;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    background-color: white;
}

.message {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    max-width: 70%;
}

.message-user {
    background-color: var(--primary-blue);
    color: white;
    margin-left: auto;
}

.message-agent {
    background-color: white;
    color: var(--dark-gray);
    border: 1px solid #dee2e6;
}

.ticket-priority {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.priority-high {
    background-color: #f8d7da;
    color: #721c24;
}

.priority-medium {
    background-color: #fff3cd;
    color: #856404;
}

.priority-low {
    background-color: #d4edda;
    color: #155724;
}

/* Integraciones - Conectores */
.integration-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.integration-card:hover {
    border-color: var(--primary-teal);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 178, 170, 0.2);
}

.integration-card.connected {
    border-color: var(--success);
    background-color: #f8fff9;
}

.integration-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-teal);
}

.integration-card.connected .integration-icon {
    color: var(--success);
}

.integration-status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 1rem;
}

.status-connected {
    background-color: #d4edda;
    color: #155724;
}

.status-disconnected {
    background-color: #f8d7da;
    color: #721c24;
}

/* Navegación lateral mejorada */
.sidebar-nav {
    background-color: var(--primary-blue);
    min-height: 100vh;
    padding-top: 2rem;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    border-radius: 0 25px 25px 0;
    margin-right: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: white;
    background-color: var(--primary-teal);
}

.nav-link i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-card {
        margin-bottom: 1rem;
    }
    
    .campaign-metrics {
        grid-template-columns: 1fr;
    }
    
    .chat-container {
        height: 300px;
    }
    
    .metric-card {
        padding: 1.5rem;
    }
    
    .metric-value {
        font-size: 2rem;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Utilidades adicionales */
.border-primary {
    border-color: var(--primary-blue) !important;
}

.border-secondary {
    border-color: var(--primary-teal) !important;
}

.shadow-custom {
    box-shadow: 0 4px 6px rgba(30, 58, 138, 0.1) !important;
}

.gradient-bg {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-teal));
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

