 :root {
    --sidebar-width: 260px;
    --primary-color: #4a90e2;
    --sidebar-bg: #1f2937;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* Sidebar Izquierdo */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
   /* background: var(--sidebar-bg);*/
    z-index: 1000;
    overflow-y: auto;
    background-image: url(/img/fondo2.webp);
    background-position: 0;
}

#sidebar .brand {
    padding: 1.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #818cf8;
    border-bottom: 1px solid #374151;
}

#sidebar .nav-link {
    color: #d1d5db;
    padding: 0.75rem 1rem;
    margin: 0.25rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.2s;
}

#sidebar .nav-link:hover {
    background: #374151;
    color: white;
}

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

#sidebar .nav-link i {
    width: 20px;
    margin-right: 0.75rem;
}

/* Estilo del Label superior */
.select-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

/* Contenedor relativo para posicionar la flecha */
.custom-select-wrapper {
    position: relative;
    display: block;
}

/* El Select estilizado */
.modern-select {
    appearance: none; /* Quita el diseño por defecto del navegador */
    -webkit-appearance: none;
    -moz-appearance: none;
    
    width: 100%;
    height: 45px;
    background: rgba(255, 255, 255, 0.05); /* Fondo oscuro semi-transparente */
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px; /* Bordes muy redondeados como tus botones */
    padding: 0 40px 0 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Efecto Hover */
.modern-select:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #3d8bfd; /* Color azul de tu logo */
}

/* Foco (cuando se hace clic) */
.modern-select:focus {
    outline: none;
    border-color: #3d8bfd;
    box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.25);
}

/* Creación de la flecha con CSS puro */
.custom-arrow {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 0; 
    height: 0; 
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.5); /* Flecha sutil */
    pointer-events: none; /* Para que no interfiera en el clic */
}

/* Estilo para las opciones (limitado por navegadores, pero ayuda) */
.modern-select option {
    background-color: #1a1d21; /* Color oscuro del sidebar */
    color: white;
    padding: 10px;
}

/* Contenido Principal */
#main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: #f3f4f6;
    padding: 2rem;
}

/* Cards de Estadísticas */
.stat-card {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card .icon-box {
    padding: 0.75rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* tablas */
.datatable{
    font-size: 0.8rem;
}

/* Tabla de Leads */

.lead-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.lead-row:hover {
    background-color: #eef2ff !important;
}

/* Badges de Estado */
.badge-nuevo { background-color: #fee2e2; color: #991b1b; }
.badge-interesado { background-color: #dbeafe; color: #1e40af; }
.badge-agendado { background-color: #d1fae5; color: #065f46; }
.badge-descartado { background-color: #f3f4f6; color: #374151; }

.badge-1 { background-color: #fee2e2; color: #991b1b; }
.badge-2 { background-color: #eed4fc; color: #1f1f1f; }
.badge-3 { background-color: #fae1d1; color: #1f1f1f; }
.badge-4 { background-color: #cadafa; color: #1f1f1f; }
.badge-5 { background-color: #e1f7db; color: #1f1f1f; }
.badge-0 { background-color: #a19b9b; color: #ffffff; }

/* Sidebar Derecho de Detalles */
#lead-detail-sidebar {
    position: fixed;
    top: 0;
    right: -40%;
    width: 40%;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1050;
    overflow-y: auto;
    transition: right 0.3s ease;
}

#lead-detail-sidebar.show {
    right: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    display: none;
}

.sidebar-overlay.show {
    display: block;
}

/* Calendario */
.time-slot {
    min-height: 60px;
    border-bottom: 1px solid #e5e7eb;
}

.time-label {
    width: 100px;
    border-right: 1px solid #e5e7eb;
    font-weight: 600;
    color: #6b7280;
}

.event-card {
    border-left: 4px solid;
    cursor: pointer;
    transition: all 0.2s;
}

.event-card:hover {
    transform: translateX(2px);
}

/* Notas */
.note-item {
    border-left: 4px solid #3b82f6;
    background: #eff6ff;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
}

.hidden {
    display: none !important;
}

input.form-control{
    display: inline-block;
    width: 400px;
}
.marginL10{
    margin-left: 10px;
}
#filter-apply{
    background-color: var(--primary-color);
} 
.dt-buttons.btn-group{
    padding: 10px;
}

/* Loading */
.loading-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(79, 70, 229, 0.2);
    border-radius: 50%;
    border-top-color: #4f46e5;
    animation: spin 0.8s linear infinite;
}

/* CALENDARIO*/

.calendar{
    width: 70%;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
 

/* TABLAS*/

.cabeceraProducto td {
    background:#fbe5d6 !important;
    
    font-weight:bold; 
}

/* Contenedor */
.dt-paging {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

/* Lista */
.dt-paging .pagination {
    gap: 6px;
}

/* Botones */
.dt-paging .page-item .page-link {
    border-radius: 8px;
    padding: 6px 12px;
    color: #333;
    border: 1px solid #ddd;
    background-color: #fff;
    transition: all 0.2s ease;
}

/* Hover */
.dt-paging .page-item:not(.active):not(.disabled) .page-link:hover {
    background-color: #f1f1f1;
    border-color: #bbb;
}

/* Activo */
.dt-paging .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    font-weight: 600;
}

/* Disabled */
.dt-paging .page-item.disabled .page-link {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Flechas un poco más grandes */
.dt-paging .page-link.first,
.dt-paging .page-link.last,
.dt-paging .page-link.previous,
.dt-paging .page-link.next {
    font-weight: bold;
}
