:root {
    --color-primary: #2563EB;
    --primary-dark: #1D4ED8;
    --color-secondary: #E2E8F0;
    --color-primary-alt: #03e079;
    --text-color: #1E293B;
    --text-light: #64748B;
    --text-secondary: #334155;
    --background-color: #F8FAFC;
    --white: #FFFFFF;
    --sidebar-bg: #1A2234;
    --sidebar-bg-rgb: 26, 34, 52;
    --sidebar-text: #E2E8F0;
    --sidebar-active: #2563EB;
    --card-bg: #FFFFFF;
    --border-color: #E2E8F0;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;

    --color-gray-100: #d9d9d9;
    
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 70px;
    --topbar-height: 60px;
    --border-radius: 8px;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

body {
    font-family: "Inter", sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Scroll personalizado */
* {
    scrollbar-width: thin;
    scrollbar-color:  var(--text-light) transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background-color: var(--text-light);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: #1e4ed8;
}


.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.app-container-login {
    background-color: var(--sidebar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
}

.main-content {
    flex: 1;
    margin-left: 0;
    transition: margin-left 0.3s ease;
    width: 100%;
}

.main-content-login {
    width: 100%;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Botones */
button {
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
    font-weight: 450 !important;
}

.btn-view-all {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--color-primary);
    color: var(--white);
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 500;
    margin-top: 16px;
    transition: background-color 0.2s;
}   

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


/* Select */
.custom-select {
    position: relative;
    width: fit-content;
}

.select-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-light);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.select-borderless .select-btn {
    border: none;
    background: none;
    padding: 0;
}

.select-with-border .select-btn {
    border: 1px solid var(--border-color);
    background-color: var(--white);
}

.select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 120px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
    margin-top: 4px;
    overflow: hidden;
}

.select-dropdown.open {
    display: block;
}

.select-option {
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.1s;
}

.select-option:hover {
    background-color: var(--color-secondary);
}

.stats-period {
    font-size: 12px;
    color: var(--text-light);
}

@media (min-width: 768px) {
    .main-content {
        margin-left: var(--sidebar-width);
    }
    
    .sidebar.collapsed + .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }
}




















.btn-primary, .btn-secondary {
    font-size: 15px !important;
}


.btn-primary, .btn-primary-alt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: var(--color-primary);
    color: var(--white);
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: background-color 0.2s;
    font-size: 16px;
    height: fit-content !important;
}

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

.btn-primary-alt {
    background-color: var(--color-primary-alt);
    color: var(--text-color);
}

.btn-secondary, .btn-secondary-alt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: var(--white);
    color: var(--text-color);
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
    font-weight: 500;
    transition: background-color 0.2s;
    width: fit-content !important;
    height: fit-content !important;
}

.btn-secondary:hover {
    background-color: var(--color-secondary);
}

.btn-secondary-alt-02 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background-color: transparent;
    color: var(--color-primary);
    font-weight: 500;
    font-size: 14px;
}


/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge.badge-primary {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.badge.badge-secondary {
    background: rgba(107, 114, 128, 0.1);
    color: #374151;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Contenido de página */
.page-content {
    padding: 24px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-direction: column;
    margin-bottom: 24px;
    gap: 16px;
}

.page-header .btn-primary {
    width: 100%;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 600;
}



.desktop-only {
    display: none;
}

.mobile-only {
    display: block;
}

@media (min-width: 768px) {
    .main-content {
        margin-left: var(--sidebar-width);
    }

    .page-header {
        flex-direction: row;
    }

    .page-header .btn-primary {
        width: fit-content;
    }
    
    .sidebar.collapsed + .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }
    
    .desktop-only {
        display: block;
    }
    
    .mobile-only {
        display: none;
    }
}


@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
}

@media (min-width: 768px) {
    .desktop-only {
        display: block !important;
    }
    
    .mobile-only {
        display: none !important;
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
    }
    
    .sidebar.collapsed + .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }
}

/* Input buscador */
.search-container {
    margin-bottom: 16px;
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 10px 12px;
    padding-left: 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
}

.search-container iconify-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}






/* Formularios */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 16px;
    color: var(--text-primary);
}

input,
select,
textarea {
    width: 100%;
    padding: 14px 12px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--background-color);
    color: var(--text-primary);
    transition: border-color 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

.dataTables_length label select,
.dataTables_length input {
    width: 100% !important;
    padding: 10px 12px !important;
    font-size: 15px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
    background-color: var(--background-color) !important;
    color: var(--text-primary) !important;
    transition: border-color 0.2s ease !important;
}

.dataTables_length label select {
    width: fit-content !important;
}




.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}








/* Visor de imagen */
.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.image-viewer.active {
    display: flex;
}

.image-viewer-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.image-viewer-close {
    position: absolute;
    top: -50px;
    right: -50px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.product-image,
.product-card-image {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.product-image:hover,
.product-card-image:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .image-viewer-close {
        top: 20px;
        right: 20px;
        background: rgba(0, 0, 0, 0.7);
    }
    
    .image-viewer-content {
        max-width: 95%;
        max-height: 95%;
    }
}













.data-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}














/* ===================================
   ESTADOS Y BADGES
   =================================== */

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}



.badge-success {
    background-color: #22C55E;
    color: #fff;
}

.badge-danger {
    background-color: #F2F6FA;
    color: #000;
}



.badge.badge-warning {
    background-color: #fbbf24;
    color: #92400e;
}

.badge.badge-danger {
    background-color: #f87171;
    color: #991b1b;
}

.badge.badge-success {
    background-color: #34d399;
    color: #065f46;
}





/* ===================================
   VENTANA DE NOTIFICACIONES
   =================================== */

.notification-container {
    position: relative;
}

.notification-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
}

.notification-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.notification-dropdown {
    position: fixed;
    top: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: var(--shadow);
    width: 340px;
    max-height: 400px;
    overflow: hidden;
    z-index: 1000;
    margin-top: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.notification-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.notification-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.notification-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.notification-list {
    padding: 10px 0;
    overflow-y: scroll;
    height: 350px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s ease;
}

.notification-item:hover {
    background: #d9d9e1;
}

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

.notification-dot {
    width: 8px;
    height: 8px;
    background: #ff4444;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.notification-content p {
    margin: 0 0 4px 0;
    font-size: 15px;
    color: #1F2937;
    line-height: 1.4;
}

.notification-date {
    font-size: 12px;
    color: #4B5563;
}



