/* =========================================
   MODO OSCURO GLOBAL
   SURTINEGOCIOS JAR
========================================= */

body.dark-mode {
    background: #101318;
    color: #ffffff;
}


/* =========================================
   LOGIN
========================================= */

body.dark-mode .login-card {
    background: #181c22;
    color: #ffffff;

    border: 1px solid #ff8a33;

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.45);
}


/* Logo */

body.dark-mode .login-card .logo {
    background: #ff6600;
}


/* Texto secundario */

body.dark-mode .login-card .text-muted {
    color: #b9bec7 !important;
}


/* Labels */

body.dark-mode .login-card .form-label {
    color: #ffffff;
}


/* Inputs */

body.dark-mode .login-card .form-control {
    background: #252a32;
    color: #ffffff;

    border: 1px solid #414854;
}


body.dark-mode .login-card .form-control::placeholder {
    color: #8f96a3;
}


body.dark-mode .login-card .form-control:focus {
    background: #252a32;
    color: #ffffff;

    border-color: #ff7a1a;

    box-shadow:
        0 0 0 0.2rem
        rgba(255, 102, 0, 0.15);
}


/* Botón */

body.dark-mode .login-card .btn-login {
    background: #ff6600;
    border-color: #ff6600;
    color: #ffffff;
}


body.dark-mode .login-card .btn-login:hover {
    background: #e85d00;
    border-color: #e85d00;
}


/* Volver a la tienda */

body.dark-mode .login-card a {
    color: #ff8a33;
}


body.dark-mode .login-card a:hover {
    color: #ffa15c;
}
/* =====================================================
   🌙 PANEL DEL DUEÑO
===================================================== */

/* Fondo general */
body.dark-mode .admin-layout,
body.dark-mode .admin-main {
    background: #101318;
    color: #f5f5f5;
}


/* =====================================================
   MENÚ LATERAL
===================================================== */

body.dark-mode .admin-sidebar {
    background: #171b21;
    color: #ffffff;
    border-right: 1px solid #343a44;
}

body.dark-mode .sidebar-logo {
    border-bottom-color: #343a44;
}

body.dark-mode .sidebar-logo h2,
body.dark-mode .sidebar-logo span {
    color: #ffffff;
}

body.dark-mode .sidebar-link {
    color: #d7dbe1;
}

body.dark-mode .sidebar-link:hover {
    background: #252a32;
    color: #ffffff;
}

body.dark-mode .sidebar-link.active {
    background: #ff6600;
    color: #ffffff;
}

body.dark-mode .sidebar-footer {
    border-top-color: #343a44;
}

body.dark-mode .sidebar-user {
    color: #ffffff;
}

body.dark-mode .sidebar-store-link {
    color: #ff8a33;
}


/* =====================================================
   BARRA SUPERIOR
===================================================== */

body.dark-mode .admin-topbar {
    background: #171b21;
    color: #ffffff;
    border-bottom: 1px solid #343a44;
}

body.dark-mode .admin-topbar h1 {
    color: #ffffff;
}

body.dark-mode .admin-topbar p {
    color: #aeb4be;
}

body.dark-mode .sidebar-toggle {
    background: #ff6600;
    color: #ffffff;
    border-color: #ff6600;
}


/* =====================================================
   SECCIONES
===================================================== */

body.dark-mode .admin-section {
    color: #f5f5f5;
}

body.dark-mode .admin-section h2,
body.dark-mode .admin-section h3,
body.dark-mode .section-header h2 {
    color: #ffffff;
}

body.dark-mode .admin-section-card {
    background: #181c22;
    color: #ffffff;

    border: 1px solid #343a44;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.25);
}


/* =====================================================
   TARJETAS
===================================================== */

body.dark-mode .admin-main .card {
    background: #181c22;
    color: #ffffff;

    border: 1px solid #343a44;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.25) !important;
}

body.dark-mode .dashboard-card {
    background: #181c22;
}

body.dark-mode .dashboard-card h2 {
    color: #ffffff;
}

body.dark-mode .dashboard-label {
    color: #b9bec7;
}


/* =====================================================
   TEXTOS BOOTSTRAP
===================================================== */

body.dark-mode .admin-main .text-muted {
    color: #aeb4be !important;
}

body.dark-mode .admin-main .form-text {
    color: #9299a5;
}


/* =====================================================
   TABLAS
===================================================== */

body.dark-mode .admin-main .table {
    --bs-table-bg: #181c22;
    --bs-table-color: #eeeeee;

    --bs-table-hover-bg: #252a32;
    --bs-table-hover-color: #ffffff;

    border-color: #343a44;
}

body.dark-mode .admin-main .table thead th {
    background: #20252d;
    color: #ffffff;

    border-bottom-color: #ff7a1a;
}

body.dark-mode .admin-main .table tbody td {
    color: #e5e7eb;
    border-color: #343a44;
}

body.dark-mode .table-responsive {
    border-color: #343a44;
}


/* =====================================================
   INPUTS Y SELECT
===================================================== */

body.dark-mode .admin-main .form-control,
body.dark-mode .admin-main .form-select {
    background-color: #252a32;
    color: #ffffff;

    border-color: #414854;
}

body.dark-mode .admin-main .form-control::placeholder {
    color: #9299a5;
}

body.dark-mode .admin-main .form-control:focus,
body.dark-mode .admin-main .form-select:focus {
    background-color: #252a32;
    color: #ffffff;

    border-color: #ff7a1a;

    box-shadow:
        0 0 0 0.2rem
        rgba(255, 102, 0, 0.12);
}

body.dark-mode .admin-main .form-select option {
    background: #252a32;
    color: #ffffff;
}


/* =====================================================
   MODALES DEL DUEÑO
===================================================== */

body.dark-mode .modal-content {
    background: #181c22;
    color: #ffffff;

    border: 1px solid #ff8a33;
}

body.dark-mode .modal-header,
body.dark-mode .modal-footer {
    border-color: #343a44;
}

body.dark-mode .modal-title {
    color: #ffffff;
}

body.dark-mode .modal-content .form-label,
body.dark-mode .modal-content .form-check-label {
    color: #ffffff;
}

body.dark-mode .modal-content .form-control,
body.dark-mode .modal-content .form-select {
    background-color: #252a32;
    color: #ffffff;

    border-color: #414854;
}

body.dark-mode .modal-content .form-control::placeholder {
    color: #9299a5;
}

body.dark-mode .modal-content .form-select option {
    background: #252a32;
    color: #ffffff;
}

body.dark-mode .modal-content .form-text,
body.dark-mode .modal-content .text-muted {
    color: #aeb4be !important;
}


/* X de los modales */
body.dark-mode .modal-content .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}


/* =====================================================
   BOTONES
===================================================== */

body.dark-mode .admin-main .btn-primary,
body.dark-mode .modal-content .btn-primary {
    background: #ff6600;
    border-color: #ff6600;
}

body.dark-mode .admin-main .btn-primary:hover,
body.dark-mode .modal-content .btn-primary:hover {
    background: #e85d00;
    border-color: #e85d00;
}

body.dark-mode .admin-main .btn-outline-primary {
    color: #ff8a33;
    border-color: #ff8a33;
}

body.dark-mode .admin-main .btn-outline-primary:hover {
    background: #ff6600;
    border-color: #ff6600;
    color: #ffffff;
}


/* =====================================================
   CONFIGURACIÓN / LOGO
===================================================== */

body.dark-mode .logo-admin-preview {
    background: #252a32;
    border-color: #414854;
}

body.dark-mode .logo-admin-placeholder {
    color: #b9bec7;
}
/* =====================================================
   CORRECCIÓN GENERAL DE TODAS LAS SECCIONES DEL DUEÑO
===================================================== */

/* Contenedor principal */
body.dark-mode .admin-main {
    background: #101318 !important;
}


/* TODAS las secciones:
   Dashboard
   Productos
   Categorías
   Pedidos
   Vendedores
   Comisiones
   Configuración
*/
body.dark-mode .admin-main .admin-section {
    background: #181c22 !important;
    color: #ffffff !important;

    border: 1px solid #ff8a33;
    border-radius: 16px;
}


/* Encabezados de cada sección */

body.dark-mode .admin-section .section-header,
body.dark-mode .admin-section > .d-flex {
    background: transparent !important;
    color: #ffffff;
}


/* Títulos */

body.dark-mode .admin-section h1,
body.dark-mode .admin-section h2,
body.dark-mode .admin-section h3,
body.dark-mode .admin-section h4,
body.dark-mode .admin-section h5 {
    color: #ffffff !important;
}


/* Textos secundarios */

body.dark-mode .admin-section .text-muted {
    color: #aeb4be !important;
}


/* =====================================================
   TARJETAS INTERNAS
===================================================== */

body.dark-mode .admin-section .card,
body.dark-mode .admin-section-card {
    background: #20252d !important;
    color: #ffffff !important;

    border: 1px solid #343b46 !important;
}


/* Dashboard */

body.dark-mode .dashboard-card {
    background: #20252d !important;
}

body.dark-mode .dashboard-card h2,
body.dark-mode .dashboard-card .dashboard-label {
    color: #ffffff !important;
}


/* =====================================================
   TABLAS
===================================================== */

body.dark-mode .admin-section .table-responsive {
    background: #181c22 !important;
}

body.dark-mode .admin-section .table {
    --bs-table-bg: #181c22;
    --bs-table-color: #ffffff;

    --bs-table-hover-bg: #242a33;
    --bs-table-hover-color: #ffffff;

    border-color: #343b46 !important;
}

body.dark-mode .admin-section .table thead th {
    background: #20252d !important;
    color: #ffffff !important;

    border-bottom:
        1px solid #ff7a1a !important;
}

body.dark-mode .admin-section .table tbody td {
    background: #181c22 !important;
    color: #ffffff !important;

    border-color: #343b46 !important;
}


/* =====================================================
   FORMULARIOS
===================================================== */

body.dark-mode .admin-section .form-control,
body.dark-mode .admin-section .form-select {
    background-color: #252a32 !important;
    color: #ffffff !important;

    border-color: #414854 !important;
}

body.dark-mode .admin-section .form-control::placeholder {
    color: #9ca3af !important;
}

body.dark-mode .admin-section .form-select option {
    background: #252a32;
    color: #ffffff;
}


/* =====================================================
   CONFIGURACIÓN
===================================================== */

body.dark-mode #seccionConfiguracion .admin-section-card {
    background: #181c22 !important;
}


/* =====================================================
   CATEGORÍAS
===================================================== */

body.dark-mode #seccionCategorias .card {
    background: #181c22 !important;
}


/* =====================================================
   PRODUCTOS
===================================================== */

body.dark-mode #seccionProductos {
    background: #181c22 !important;
}


/* =====================================================
   PEDIDOS
===================================================== */

body.dark-mode #seccionPedidos {
    background: #181c22 !important;
}


/* Tarjetas de estadísticas de pedidos */

body.dark-mode #seccionPedidos .card {
    background: #20252d !important;
    color: #ffffff !important;
}


/* =====================================================
   VENDEDORES
===================================================== */

body.dark-mode #seccionVendedores,
body.dark-mode #seccionVendedores .admin-section-card {
    background: #181c22 !important;
}


/* =====================================================
   COMISIONES
===================================================== */

body.dark-mode #seccionComisiones {
    background: #181c22 !important;
}

body.dark-mode #seccionComisiones .card {
    background: #20252d !important;
    color: #ffffff !important;
}
/* =====================================================
   🌙 PANEL VENDEDOR - NUEVA VENTA
===================================================== */

body.dark-mode #seccionNuevaVenta {
    background: #181c22 !important;
    color: #ffffff !important;

    border: 1px solid #ff8a33;
    border-radius: 16px;
}


/* Tarjetas */

body.dark-mode #seccionNuevaVenta .card {
    background: #20252d !important;
    color: #ffffff !important;

    border: 1px solid #343b46 !important;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.25) !important;
}


/* Títulos */

body.dark-mode #seccionNuevaVenta h2,
body.dark-mode #seccionNuevaVenta h3,
body.dark-mode #seccionNuevaVenta h4,
body.dark-mode #seccionNuevaVenta h5 {
    color: #ffffff !important;
}


/* Texto secundario */

body.dark-mode #seccionNuevaVenta .text-muted {
    color: #aeb4be !important;
}


/* Separadores */

body.dark-mode #seccionNuevaVenta hr {
    border-color: #414854;
    opacity: 1;
}


/* Inputs */

body.dark-mode #seccionNuevaVenta .form-control,
body.dark-mode #seccionNuevaVenta .form-select {

    background: #252a32 !important;
    color: #ffffff !important;

    border-color: #414854 !important;
}


body.dark-mode #seccionNuevaVenta .form-control::placeholder {
    color: #9ca3af !important;
}


body.dark-mode #seccionNuevaVenta .form-control:focus,
body.dark-mode #seccionNuevaVenta .form-select:focus {

    background: #252a32 !important;
    color: #ffffff !important;

    border-color: #ff7a1a !important;

    box-shadow:
        0 0 0 0.2rem
        rgba(255, 102, 0, 0.12);
}


body.dark-mode #seccionNuevaVenta .form-select option {
    background: #252a32;
    color: #ffffff;
}


/* Labels */

body.dark-mode #seccionNuevaVenta .form-label {
    color: #ffffff;
}


/* Total */

body.dark-mode #totalNuevaVenta {
    color: #ff8a33;
}


/* Botón registrar venta */

body.dark-mode #btnRegistrarVenta {
    background: #ff6600;
    border-color: #ff6600;
}


body.dark-mode #btnRegistrarVenta:hover {
    background: #e85d00;
    border-color: #e85d00;
}
/* =====================================================
   🌙 CARRITO - MODO OSCURO
===================================================== */

body.dark-mode .cart-modal-content {
    background: #101318;
    color: #ffffff;
    border-color: #343b46;
}

body.dark-mode .cart-summary {
    background: #181c22;
    color: #ffffff;
    box-shadow: none;
}

body.dark-mode .checkout-card {
    background: #181c22;
    color: #ffffff;

    border-color: #343b46;

    box-shadow: none;
}

body.dark-mode .checkout-section-title,
body.dark-mode .checkout-payment {
    border-color: #343b46;
}

body.dark-mode .checkout-section-title h3,
body.dark-mode .checkout-payment-title h3 {
    color: #ff8a33;
}

body.dark-mode .checkout-section-title p,
body.dark-mode .checkout-payment-title p {
    color: #aeb4be;
}

body.dark-mode .checkout-field label {
    color: #ffffff;
}

body.dark-mode .checkout-field input,
body.dark-mode .checkout-field select {

    background: #252a32;
    color: #ffffff;

    border-color: #414854;
}

body.dark-mode .checkout-field input::placeholder {
    color: #8f96a3;
}

body.dark-mode .checkout-field input:focus,
body.dark-mode .checkout-field select:focus {

    background: #252a32;

    border-color: #ff7a1a;

    box-shadow:
        0 0 0 3px
        rgba(255,102,0,.12);
}

body.dark-mode .checkout-field select option {
    background: #252a32;
    color: #ffffff;
}

body.dark-mode #cartTotal {
    color: #20c9b0;
}
/* =====================================================
   🌙 CORRECCIÓN FINAL CARRITO
===================================================== */

/* Fondo general del carrito */
body.dark-mode #cartModal .cart-modal-content {
    background: #101318 !important;
}


/* =========================================
   TOTAL
========================================= */

body.dark-mode #cartModal .cart-summary {
    background: #181c22 !important;
    color: #ffffff !important;

    border: 1px solid #343b46 !important;
    border-left: 4px solid #00a896 !important;

    box-shadow: none !important;
}

body.dark-mode #cartModal .cart-summary-row {
    color: #ffffff !important;
}

body.dark-mode #cartModal #cartTotal {
    color: #20c9b0 !important;
}


/* =========================================
   DATOS DE DESPACHO
========================================= */

body.dark-mode #cartModal .checkout-card,
body.dark-mode #cartModal .checkout-data {
    background: #181c22 !important;
    color: #ffffff !important;

    border-color: #343b46 !important;

    box-shadow: none !important;
}


/* Títulos */

body.dark-mode #cartModal .checkout-section-title h3,
body.dark-mode #cartModal .checkout-payment-title h3 {
    color: #ff7a1a !important;
}


/* Descripciones */

body.dark-mode #cartModal .checkout-section-title p,
body.dark-mode #cartModal .checkout-payment-title p {
    color: #aeb4be !important;
}


/* Líneas divisorias */

body.dark-mode #cartModal .checkout-section-title,
body.dark-mode #cartModal .checkout-payment {
    border-color: #343b46 !important;
}


/* Labels */

body.dark-mode #cartModal .checkout-field label {
    color: #f5f5f5 !important;
}


/* =========================================
   INPUTS
========================================= */

body.dark-mode #cartModal .checkout-field input,
body.dark-mode #cartModal .checkout-field select {

    background: #252a32 !important;

    color: #ffffff !important;

    border: 1px solid #414854 !important;
}


body.dark-mode #cartModal .checkout-field input::placeholder {
    color: #9299a5 !important;
}


body.dark-mode #cartModal .checkout-field input:focus,
body.dark-mode #cartModal .checkout-field select:focus {

    border-color: #ff7a1a !important;

    box-shadow:
        0 0 0 3px
        rgba(255, 107, 0, .12) !important;
}


/* Opciones del select */

body.dark-mode #cartModal .checkout-field select option {
    background: #252a32 !important;
    color: #ffffff !important;
}
/* =====================================================
   🌙 PRODUCTOS DEL CARRITO
===================================================== */

body.dark-mode #cartModal .cart-modal-item {
    background: #181c22 !important;

    border-color: #343b46 !important;

    box-shadow: none !important;
}


body.dark-mode #cartModal .cart-item-info strong {
    color: #ffffff !important;
}


body.dark-mode #cartModal .cart-subtotal {
    color: #aeb4be !important;
}


body.dark-mode #cartModal .cart-item-controls button {
    background: #292f38 !important;

    color: #ffffff !important;
}


body.dark-mode #cartModal .cart-item-controls button:hover {
    background: #363d48 !important;
}


body.dark-mode #cartModal
.cart-item-controls
.cart-delete-btn {

    background: #44282a !important;

    color: #ff7b7b !important;
}


body.dark-mode #cartModal
.cart-item-controls
.cart-delete-btn:hover {

    background: #573033 !important;
}