/* ============================================================
   WILLYLABS - HOJA DE ESTILO OFICIAL (DASHBOARD & LOGIN)
   ============================================================ */

/* 1. VARIABLES Y RESET */
:root {
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-dash: #f4f7fe;
    --primary: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --secondary: #7dd3fc;
    --text-dark: #1e1b4b;
    --text-muted: #64748b;
    --accent: #f0abfc;
    --radius: 12px;
    --transition: all 0.3s ease;
    --shadow: 0 4px 15px rgba(139, 92, 246, 0.1);
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 2. HEADER SUPERIOR (NAVBAR-TOP) */
.navbar-top {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    display: flex;
    align-items: center;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* --- ACCIONES DERECHAS Y DROPDOWN --- */
.nav-right-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-action {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
}

/* Imagen de Dobbi */
.dobbi-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
    background-color: var(--bg-dash);
    transition: var(--transition);
}

.profile-action:hover .dobbi-avatar {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
    transform: scale(1.1);
}

/* Icono de Usuario */
.user-icon {
    font-size: 1.8rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.user-icon:hover, .user-icon[aria-expanded="true"] {
    color: var(--primary);
    transform: scale(1.1);
}

/* Estilos personalizados del menú desplegable */
.custom-dropdown {
    width: auto;
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px 0;
    margin-top: 15px !important;
}

.custom-dropdown .dropdown-item {
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
}

.custom-dropdown .dropdown-item-text {
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
}

.custom-dropdown .dropdown-item:hover {
    background-color: var(--bg-dash);
    color: var(--primary);
}

.header-container {
    width: 92%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.navbar-top .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary-dark);
}

.nav-links-top {
    display: flex;
    gap: 30px;
}

.nav-links-top .nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    transition: var(--transition);
}

.nav-links-top .nav-link:hover {
    color: var(--primary);
}

/* 3. ESTRUCTURA DE CONTENIDO */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* 4. LOGIN SPLIT SYSTEM */
.login-split {
    display: flex;
    flex: 1;
    height: calc(100vh - var(--header-height));
    width: 100%;
}

.login-form-side {
    flex: 1;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.login-box {
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.8s ease;
}

.login-box h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.login-box p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Estilos de Formulario */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
    background: white;
}

.btn-primary-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.3);
}

.btn-primary-login:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 15px 25px -5px rgba(139, 92, 246, 0.4);
}

.login-footer {
    margin-top: 25px;
    text-align: center;
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.login-image-side {
    flex: 1.2;
    position: relative;
    background: url('/assets/willylabs_image.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.glass-info {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.glass-info h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.tech-tags {
    margin-top: 25px;
    display: flex;
    gap: 12px;
}

.tech-tags span {
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ESTILO DE ALERTAS */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: shake 0.4s ease-in-out;
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fee2e2;
}

.alert-error i {
    color: #ef4444;
}

/* 5. TOOLTIPS E INPUTS CON ICONOS (ACTUALIZADO) */
.input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.input-field {
    width: 100%;
    padding-right: 45px;
    box-sizing: border-box;
}

.form-control.has-icon {
    padding-right: 45px;
}

.help-icon-container {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    z-index: 10;
}

.help-icon {
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.help-icon:hover {
    transform: scale(1.15);
}

.tooltip {
    display: none;
    position: absolute;
    bottom: 125%;
    right: 0;
    width: auto;
    max-width: 300px;
    background: var(--text-dark);
    color: var(--bg-white);
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 10;
    box-shadow: var(--shadow);
}

.custom-popover {
    --bs-popover-border-color: var(--primary);
    --bs-popover-header-bg: var(--primary);
    --bs-popover-header-color: var(--bg-white);
    --bs-popover-body-color: var(--text-dark);
    --bs-popover-bg: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: none;
    font-family: 'Inter', sans-serif;
}

.custom-popover .popover-header {
    font-weight: 600;
    border-bottom: none;
    border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0 !important;
}

.custom-popover .popover-body {
    padding: 15px;
    font-size: 0.9rem;
}

.bs-popover-top .popover-arrow::after,
.bs-popover-auto[data-popper-placement^="top"] .popover-arrow::after {
    border-top-color: var(--bg-white);
}

a[target="_blank"]::after {
    content: "\f08e";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: 6px;
    font-size: 0.85em;
    opacity: 0.7;
    text-decoration: none;
    display: inline-block;
}

/* Estilos generales del chat */
#dobbiSidebar {
    width: 400px; /* Ancho del panel */
    border-left: 1px solid #e0e0e0;
}

.chat-message {
    max-width: 85%;
    margin-bottom: 1rem;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Mensajes del Usuario */
.msg-user {
    background-color: #0d6efd;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    margin-left: auto;
}

/* Mensajes de Dobbi */
.msg-dobbi {
    background-color: #ffffff;
    color: #333;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    margin-right: auto;
}

/* --- Formateo del Markdown renderizado dentro de Dobbi --- */
.msg-dobbi h1, .msg-dobbi h2, .msg-dobbi h3 {
    color: #0d6efd;
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 10px;
}

.msg-dobbi h1 { font-size: 1.3rem; }
.msg-dobbi h2 { font-size: 1.2rem; }
.msg-dobbi h3 { font-size: 1.1rem; }

.msg-dobbi p { margin-bottom: 0.5rem; }
.msg-dobbi p:last-child { margin-bottom: 0; }

.msg-dobbi pre {
    background-color: #212529;
    color: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    overflow-x: auto;
}

.msg-dobbi code {
    background-color: #f1f3f5;
    color: #d63384;
    padding: 2px 4px;
    border-radius: 4px;
}

.msg-dobbi table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}
.msg-dobbi table th, .msg-dobbi table td {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
}
.msg-dobbi table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
}

/* ============================================================
   8. SISTEMA DE TABS DINÁMICOS
   ============================================================ */

/* Contenedor principal de los tabs */
.tabs-wrapper {
    width: 100%;
    padding: 20px 20px 0 20px;
    background-color: var(--bg-dash); /* Fondo del área superior */
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    position: relative; /* NUEVO */
    z-index: 10;        /* NUEVO: Fuerza el menú sobre el contenido */
}

.tabs-header {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    overflow: visible; /* CAMBIADO: Evita que el menú se corte por debajo */
    flex-wrap: wrap;   /* NUEVO: Permite que los tabs bajen de línea si son muchos */
    scrollbar-width: none;
}

.tabs-header::-webkit-scrollbar {
    display: none;
}

/* Tab individual */
.tab-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background-color: rgba(255,255,255, 0.5); /* Ligeramente translúcido cuando inactivo */
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    min-width: 120px;
    max-width: 250px;
}

.tab-item:hover {
    background-color: var(--bg-light);
    color: var(--primary);
}

/* Estado activo del tab */
.tab-item.active {
    background-color: var(--bg-white);
    color: var(--primary-dark);
    border-top: 3px solid var(--primary);
    font-weight: 600;
    z-index: 2;
    margin-bottom: -1px;
    box-shadow: 0 -4px 10px rgba(139, 92, 246, 0.05);
}

.tab-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.tab-action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    opacity: 0.5;
}

.tab-item:hover .tab-action-btn {
    opacity: 1;
}

.tab-action-btn:hover {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--primary);
}

.tab-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: transparent;
    color: var(--text-muted);
    border: 1px dashed rgba(139, 92, 246, 0.3);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 2px;
    flex-shrink: 0;
}

.tab-add-btn:hover {
    background-color: var(--bg-white);
    color: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

/* Área de contenido de los tabs */
.tab-content-wrapper {
    flex: 1;
    padding: 30px 40px; /* Mayor padding para que el contenido respire como documento */
    background-color: var(--bg-white); /* Fusión total con el tab activo */
    overflow-y: auto;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-pane.active {
    display: block;
}

/* ============================================================
   9. RENDERIZADO MARKDOWN (.willy-markdown)
   ============================================================ */

.willy-markdown {
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 1rem;
    /* Se elimina background, padding, border-radius y sombra para integrarlo completamente al tab */
}

/* Encabezados - Más limpios y corporativos */
.willy-markdown h1,
.willy-markdown h2,
.willy-markdown h3,
.willy-markdown h4,
.willy-markdown h5,
.willy-markdown h6 {
    color: var(--primary-dark);
    font-weight: 700;
    margin-top: 1.8em;
    margin-bottom: 0.8em;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.willy-markdown h1 {
    font-size: 2.4rem;
    border-bottom: 2px solid rgba(139, 92, 246, 0.15);
    padding-bottom: 0.3em;
    margin-top: 0;
}
.willy-markdown h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
}
.willy-markdown h3 { font-size: 1.4rem; color: var(--text-dark); }
.willy-markdown h4 { font-size: 1.2rem; }

/* Párrafos y Textos */
.willy-markdown p {
    margin-bottom: 1.4em;
    color: var(--text-muted);
}

.willy-markdown a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border-bottom: 1px dashed transparent;
}

.willy-markdown a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
}

.willy-markdown strong {
    font-weight: 700;
    color: var(--text-dark);
}

/* Listas - Viñetas personalizadas al estilo WillyLabs */
.willy-markdown ul,
.willy-markdown ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
    color: var(--text-muted);
}

.willy-markdown li {
    margin-bottom: 0.5em;
}

.willy-markdown ul li::marker {
    color: var(--primary);
    font-size: 1.2em;
}

.willy-markdown li > ul,
.willy-markdown li > ol {
    margin-top: 0.5em;
    margin-bottom: 0;
}

/* Blockquotes (Notas/Citas) - Estilo Tarjeta Informativa */
.willy-markdown blockquote {
    margin: 2em 0;
    padding: 1.2em 1.5em;
    border-left: 4px solid var(--primary);
    background-color: var(--bg-dash); /* Llama la atención suavemente usando el tono del fondo viejo */
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-dark);
    font-style: normal;
}

.willy-markdown blockquote p {
    margin-bottom: 0;
    color: var(--text-dark);
}

/* Código Inline y Bloques - Estética Terminal Limpia */
.willy-markdown code {
    font-family: 'Courier New', Courier, monospace;
    background-color: rgba(139, 92, 246, 0.08);
    color: var(--primary-dark);
    padding: 0.2em 0.5em;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
}

.willy-markdown pre {
    background-color: #1e1b4b;
    color: #f8fafc;
    padding: 1.5em;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 1.5em 0;
    box-shadow: 0 8px 20px rgba(30, 27, 75, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.willy-markdown pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    font-size: 0.9em;
    font-weight: normal;
}

/* Tablas - Estilo Data Grid Moderno */
.willy-markdown table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2em 0;
    background-color: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.willy-markdown th,
.willy-markdown td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--bg-light);
}

.willy-markdown th {
    background-color: var(--bg-dash);
    color: var(--text-dark);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.willy-markdown tr:last-child td {
    border-bottom: none;
}

.willy-markdown tr:hover td {
    background-color: var(--bg-light);
}

/* Imágenes - Responsivas e Integradas */
.willy-markdown img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 1.5rem auto;
    display: block;
}

/* Línea Horizontal - Separador Elegante */
.willy-markdown hr {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(139, 92, 246, 0.3), transparent);
    margin: 2.5em 0;
}

/* ============================================================
   10. WIDGET DE CLIMA (NAVBAR)
   ============================================================ */

.weather-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 30px;
    padding-right: 20px;
    border-right: 1px solid rgba(139, 92, 246, 0.1);
    height: 40px; /* Centrado vertical respecto al header de 80px */
}

.weather-icon-container {
    font-size: 1.6rem;
    color: var(--primary); /* Usando el violeta de WillyLabs */
    display: flex;
    align-items: center;
}

.weather-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

.weather-city {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.weather-temp {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Animación sutil para el icono */
.weather-icon {
    animation: pulseWeather 3s infinite ease-in-out;
}

/* 6. ANIMACIONES */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 7. RESPONSIVE */
@media (max-width: 992px) {
    .login-image-side {
        display: none;
    }
    .header-container {
        width: 95%;
    }
}


/* ============================================================
   11. PANELES DASHBOARD (KPIs, Gráficos, Tablas)
   ============================================================ */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    width: 100%;
}

/* Tarjetas Base */
.kpi-card, .chart-card, .table-card {
    background-color: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid rgba(139, 92, 246, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Tamaños en la grilla */
.kpi-card { grid-column: span 4; }
.chart-card { grid-column: span 6; }
.table-card { grid-column: span 12; }

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
}

/* Estilos internos KPI */
.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.kpi-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
}

.kpi-trend {
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.kpi-trend.positive { color: #10b981; } /* Verde */
.kpi-trend.negative { color: #ef4444; } /* Rojo */
.kpi-trend span { color: var(--text-muted); }

/* Ajustes a la librería Grid.js para igualar diseño WillyLabs */
.gridjs-wrapper {
    border-radius: var(--radius);
    border: 1px solid rgba(139, 92, 246, 0.1) !important;
}
.gridjs-th {
    background-color: var(--bg-dash) !important;
    color: var(--text-dark) !important;
    font-weight: 700 !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .chart-card { grid-column: span 12; }
}
@media (max-width: 768px) {
    .kpi-card { grid-column: span 12; }
}


/* ============================================================
   12. MEGA MENÚ DE SERVICIOS (NAVBAR)
   ============================================================ */

.custom-mega-menu {
    width: 750px;
    max-width: 90vw;
    border: none;
    border-radius: var(--radius);
    box-shadow: 0 15px 35px rgba(30, 27, 75, 0.15);
    margin-top: 15px !important;
    overflow: hidden;

    /* CORRECCIÓN DE POSICIÓN */
    left: 0 !important; /* Alinea el menú exactamente desde donde empieza el ícono */
    right: auto !important;
    transform: none !important; /* Eliminamos el desplazamiento negativo que lo sacaba de pantalla */
}

/* Columna Izquierda */
.mega-sidebar {
    width: 280px;
    background-color: var(--bg-white);
    flex-shrink: 0;
}

.mega-sidebar .nav-link {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: var(--transition);
}

.mega-sidebar .nav-link:hover {
    background-color: var(--bg-light);
    color: var(--primary);
}

.mega-sidebar .nav-link.active {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--primary-dark);
    font-weight: 600;
}

.w-20px {
    width: 20px; /* Alinea los iconos de la lista */
}

/* Columna Derecha */
.mega-content {
    background-color: var(--bg-dash);
    min-height: 300px;
}

/* Tarjetas de sub-servicios */
.service-card {
    display: block;
    background-color: var(--bg-white);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.08);
    height: 100%;
    transition: var(--transition);
}

.service-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}
