:root {
    --primary: #008E78;     /* Verde Cogelsa */
    --primary-dark: #007A66; /* Versión oscura para hovers */
    --primary-light: #E5F4F1; /* Versión clara para fondos */
    --dark: #1D1D1B;        /* Negro corporativo */
    --light: #F5F5F5;       /* Gris claro para fondos */
    --gray: #6C757D;        /* Gris para textos secundarios */
    --success: #28A745;     /* Verde para estados positivos */
    --warning: #FFC107;     /* Amarillo para advertencias */
    --danger: #DC3545;      /* Rojo para errores */
}

/* Estilos generales */
body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--light);
}

/* Navbar personalizada */
.navbar {
    background-color: white !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,142,120,0.1);
}

.navbar-brand img {
    height: 80px;
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* Enlaces de navegación modernos */
.nav-link-modern {
    color: var(--dark) !important;
    font-weight: 500;
    padding: 0.75rem 1.5rem !important;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    margin: 0 0.25rem;
    overflow: hidden;
}

.nav-link-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,142,120,0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link-modern:hover::before {
    left: 100%;
}

.nav-link-modern:hover {
    color: var(--primary) !important;
    background-color: rgba(0,142,120,0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,142,120,0.2);
}

.nav-link-modern.active {
    color: var(--primary) !important;
    background-color: var(--primary-light);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,142,120,0.15);
}

.nav-link-modern.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 2px;
}

/* Top Bar */
.bg-primary {
    background-color: var(--primary) !important;
}

/* Botón del carrito */
.cart-btn {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,142,120,0.3);
    background-color: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

.cart-btn .badge {
    animation: pulse 2s infinite;
}

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

/* Dashboard Cards */
.dashboard-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #008E78, #006B5A);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.dashboard-card:hover::before {
    transform: scaleX(1);
}

.dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.dashboard-card-primary {
    background: linear-gradient(135deg, #008E78 0%, #006B5A 100%);
    color: white;
}

.dashboard-card-success {
    background: linear-gradient(135deg, #00A085 0%, #008E78 100%);
    color: white;
}

.dashboard-card-info {
    background: linear-gradient(135deg, #00B894 0%, #008E78 100%);
    color: white;
}

.dashboard-card-warning {
    background: linear-gradient(135deg, #00C9A7 0%, #008E78 100%);
    color: white;
}

.dashboard-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.dashboard-card-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-card-subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    color: white !important;
}

.dashboard-card-subtitle .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.dashboard-card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.dashboard-card:hover .dashboard-card-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.3);
}

/* Animaciones para los valores */
.dashboard-card-value {
    animation: countUp 1s ease-out;
}

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

/* Dashboard Section Cards */
.dashboard-section-card {
    border: none;
    border-radius: 20px;
    background: white;
    transition: all 0.3s ease;
}

.dashboard-section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

.dashboard-section-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0, 142, 120, 0.1);
    border-radius: 20px 20px 0 0 !important;
    padding: 1.5rem;
}

.dashboard-section-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #008E78 0%, #006B5A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 142, 120, 0.3);
}

/* Top Products Compact */
.top-products-compact {
    padding: 0;
}

.compact-product-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    gap: 1rem;
}

.compact-product-item:last-child {
    border-bottom: none;
}

.compact-product-item:hover {
    background: linear-gradient(135deg, rgba(0, 142, 120, 0.02) 0%, rgba(0, 142, 120, 0.05) 100%);
    transform: translateX(3px);
}

.compact-rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #008E78 0%, #006B5A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 2px 6px rgba(0, 142, 120, 0.3);
    flex-shrink: 0;
}

.compact-info {
    flex-grow: 1;
    min-width: 0;
    max-width: 200px;
}

.compact-name {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.compact-code {
    color: #6c757d;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    background: rgba(108, 117, 125, 0.1);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    display: inline-block;
}

.compact-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    min-width: 280px;
    flex-shrink: 0;
}

.compact-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.4rem 0.3rem;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 6px;
    border: 1px solid rgba(0, 142, 120, 0.1);
    transition: all 0.3s ease;
}

.compact-stat-item:hover {
    background: rgba(0, 142, 120, 0.05);
    border-color: rgba(0, 142, 120, 0.2);
}

.compact-stat-item i {
    font-size: 0.75rem;
    color: #008E78;
    margin-bottom: 0.2rem;
}

.compact-stat-item span {
    font-size: 0.75rem;
    color: #495057;
    font-weight: 500;
    line-height: 1.1;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid rgba(0, 142, 120, 0.1);
}

/* Donut Chart Container */
.donut-chart-container {
    position: relative;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.donut-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(0, 142, 120, 0.1);
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.legend-item:hover {
    background: rgba(0, 142, 120, 0.05);
    border-color: rgba(0, 142, 120, 0.2);
    transform: translateY(-1px);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-label {
    font-weight: 500;
    color: #495057;
}

.legend-value {
    font-weight: 600;
    color: #008E78;
    margin-left: 0.25rem;
}

/* Statistics Section */
.stats-section {
    margin-bottom: 1.5rem;
}

.stats-section:last-child {
    margin-bottom: 0;
}

.stats-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(0, 142, 120, 0.1);
}

.stats-section-header i {
    font-size: 1.25rem;
}

.stats-section-header h6 {
    color: #2c3e50;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 142, 120, 0.1);
}

.stat-card:hover {
    background: linear-gradient(135deg, rgba(0, 142, 120, 0.05) 0%, rgba(0, 142, 120, 0.1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 142, 120, 0.2);
}

.stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
}

.stats-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #008E78, transparent);
    margin: 1.5rem 0;
    border-radius: 1px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .compact-product-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .compact-info {
        max-width: none;
        width: 100%;
    }
    
    .compact-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        min-width: auto;
        width: 100%;
    }
    
    .compact-stat-item {
        padding: 0.3rem 0.2rem;
    }
    
    .compact-stat-item i {
        font-size: 0.7rem;
    }
    
    .compact-stat-item span {
        font-size: 0.7rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 250px;
        padding: 0.75rem;
    }
    
    .donut-chart-container {
        height: 200px;
    }
    
    .donut-legend {
        gap: 0.5rem;
    }
    
    .legend-item {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .compact-stats-grid {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }
    
    .compact-stat-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.4rem 0.6rem;
    }
    
    .compact-stat-item i {
        margin-bottom: 0;
        margin-right: 0.5rem;
    }
}

/* Responsividad mejorada */
@media (max-width: 991.98px) {
    .nav-link-modern {
        padding: 0.5rem 1rem !important;
        margin: 0.25rem 0;
        border-radius: 6px;
    }
    
    .navbar-brand img {
        height: 55px;
    }
    
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .dashboard-card-value {
        font-size: 2rem;
    }
    
    .dashboard-card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand img {
        height: 45px;
    }
    
    .nav-link-modern {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.9rem;
    }
    
    .cart-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .dashboard-card-value {
        font-size: 1.75rem;
    }
    
    .dashboard-card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .dashboard-card-title {
        font-size: 0.75rem;
    }
}

/* Botones */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-header {
    background-color: white;
    border-bottom: 2px solid var(--light);
    padding: 1.25rem;
}

/* Formularios */
.form-control, .form-select {
    border: 2px solid var(--light);
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 142, 120, 0.25);
}

/* Badges */
.badge {
    padding: 0.5em 1em;
    font-weight: 500;
}

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

/* Paginación */
.pagination .page-link {
    color: var(--primary);
    padding: 0.75rem 1rem;
    border: none;
    margin: 0 2px;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white !important;
}

/* Dropdown */
.dropdown-menu {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
}

.dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
}

/* Tooltips */
.tooltip {
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-brand img {
        height: 40px;
    }
    
    .navbar .nav-link {
        padding: 0.75rem 1rem !important;
    }
    
    .card-header {
        padding: 1rem;
    }
}

/* Animaciones */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

/* Estilos específicos para el catálogo */
.product-card {
    height: 100%;
    border-radius: 0.75rem;
    overflow: hidden;
}

.product-card .card-img-top {
    height: 200px;
    object-fit: contain;
    background-color: white;
    padding: 1rem;
    transition: transform 0.3s ease;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

.product-card .card-body {
    padding: 1.5rem;
}

.product-card .card-footer {
    background-color: white;
    padding: 1.25rem;
    border-top: 1px solid var(--light);
}

.price {
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 600;
}

/* Vista en lista */
.product-card.flex-row .card-img-top {
    width: 200px;
    height: 200px;
}

/* Filtros */
.filter-section {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-section .form-label {
    font-weight: 500;
    color: var(--dark);
}

/* Stock badge */
.stock-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 500;
    z-index: 1;
}

/* Breadcrumb personalizado */
.breadcrumb {
    background-color: transparent;
    padding: 1rem 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--primary);
}

/* Footer */
footer {
    background-color: var(--primary) !important;
}

footer a:hover {
    color: var(--primary-light) !important;
}

/* Checkbox personalizado */
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

/* LinkedIn Feed Styles */
.linkedin-feed-container {
    min-height: 400px;
}

.linkedin-integration-section {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

.linkedin-news-card {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.25rem;
    height: 100%;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.linkedin-news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.linkedin-news-card h6 {
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.linkedin-news-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.linkedin-news-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background-color: white;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.linkedin-news-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.news-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-light);
    border-radius: 50%;
    font-size: 1.2rem;
}

.news-content {
    flex: 1;
}

.news-content h6 {
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.news-content p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.news-content small {
    display: flex;
    align-items: center;
    color: #6c757d;
    font-size: 0.8rem;
}

.news-content .btn {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    padding: 0.375rem 0.75rem;
}

.linkedin-actions-card {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.25rem;
    height: 100%;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.linkedin-actions-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.linkedin-actions-card h6 {
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.linkedin-actions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.linkedin-action-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background-color: white;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.linkedin-action-item:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
    transform: translateX(5px);
}

.linkedin-share-section {
    padding: 1rem;
    background-color: white;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    margin-top: 1rem;
}

.linkedin-share-section h6 {
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.share-buttons .btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.share-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* LinkedIn Plugin Responsive */
@media (max-width: 768px) {
    .linkedin-integration-section {
        padding: 1rem;
    }
    
    .linkedin-news-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .linkedin-actions-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .linkedin-news-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .news-icon {
        align-self: center;
    }
    
    .linkedin-action-item {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-buttons .btn {
        min-width: auto;
    }
}

/* LinkedIn Integration Styling */
.linkedin-integration-section .btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.linkedin-integration-section .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}