/* ==============================================================================
   OMNISTORE ERP / CRM / POS - DASHBOARD STYLES (Modern Executive Theme)
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-sidebar: #0f172a;
    --bg-sidebar-hover: #1e293b;
    --bg-sidebar-active: #312e81;
    
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-sidebar: #cbd5e1;
    --text-sidebar-active: #ffffff;

    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    
    --secondary: #06b6d4;
    --secondary-light: #ecfeff;

    --success: #10b981;
    --success-light: #d1fae5;

    --warning: #f59e0b;
    --warning-light: #fef3c7;

    --danger: #ef4444;
    --danger-light: #fee2e2;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --sidebar-width: 270px;
    --header-height: 70px;
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables & Legibility Overrides */
[data-bs-theme="dark"] {
    --bg-body: #0b0f19;
    --bg-surface: #151c2c;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #222d42;
    --border-light: #1b2438;
    --primary-light: rgba(79, 70, 229, 0.2);
    --success-light: rgba(16, 185, 129, 0.2);
    --warning-light: rgba(245, 158, 11, 0.2);
    --danger-light: rgba(239, 68, 68, 0.2);
}

[data-bs-theme="dark"] body {
    background-color: #0b0f19 !important;
    color: #f8fafc !important;
}

/* Corregir texto negro u oscuro para que sea totalmente legible en modo oscuro */
[data-bs-theme="dark"] .text-dark,
[data-bs-theme="dark"] .text-black,
[data-bs-theme="dark"] h1.text-dark,
[data-bs-theme="dark"] h2.text-dark,
[data-bs-theme="dark"] h3.text-dark,
[data-bs-theme="dark"] h4.text-dark,
[data-bs-theme="dark"] h5.text-dark,
[data-bs-theme="dark"] h6.text-dark,
[data-bs-theme="dark"] div.text-dark,
[data-bs-theme="dark"] span.text-dark,
[data-bs-theme="dark"] p.text-dark,
[data-bs-theme="dark"] td.text-dark,
[data-bs-theme="dark"] th.text-dark,
[data-bs-theme="dark"] label.text-dark,
[data-bs-theme="dark"] .fw-bold.text-dark,
[data-bs-theme="dark"] .fw-semibold.text-dark,
[data-bs-theme="dark"] .fw-extrabold.text-dark {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] .text-secondary {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .card-custom,
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #151c2c !important;
    color: #f8fafc !important;
    border-color: #222d42 !important;
}

[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] .table-custom {
    color: #e2e8f0 !important;
    --bs-table-bg: transparent;
    --bs-table-color: #e2e8f0;
}

[data-bs-theme="dark"] .table th,
[data-bs-theme="dark"] .table td,
[data-bs-theme="dark"] .table-custom th,
[data-bs-theme="dark"] .table-custom td {
    color: #e2e8f0 !important;
    border-color: #222d42 !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .input-group-text {
    background-color: #1b2438 !important;
    color: #f8fafc !important;
    border-color: #2e3d5a !important;
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: #64748b !important;
}

[data-bs-theme="dark"] .form-select option {
    background-color: #1b2438 !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] thead.table-light,
[data-bs-theme="dark"] thead.table-light tr,
[data-bs-theme="dark"] .table-light > tr,
[data-bs-theme="dark"] .table-light > tr > th,
[data-bs-theme="dark"] .table-light > tr > td {
    background-color: #1e293b !important;
    color: #cbd5e1 !important;
    border-color: #334155 !important;
    --bs-table-bg: #1e293b !important;
    --bs-table-color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .table-light th,
[data-bs-theme="dark"] .table-light td,
[data-bs-theme="dark"] thead.table-light th,
[data-bs-theme="dark"] thead.table-light td {
    color: #cbd5e1 !important;
    background-color: #1e293b !important;
}

[data-bs-theme="dark"] .table-light .text-secondary,
[data-bs-theme="dark"] .table-light .text-muted {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .modal-header.bg-body-tertiary,
[data-bs-theme="dark"] .modal-header.bg-light {
    background-color: #1b2438 !important;
    border-color: #222d42 !important;
}

[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-body-tertiary,
[data-bs-theme="dark"] .bg-white {
    background-color: #1b2438 !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .bg-light.text-dark,
[data-bs-theme="dark"] .badge.bg-light.text-dark,
[data-bs-theme="dark"] .badge.bg-light,
[data-bs-theme="dark"] span.bg-light.text-dark {
    background-color: #1e293b !important;
    color: #f8fafc !important;
    border: 1px solid #334155 !important;
}

[data-bs-theme="dark"] .btn-light,
[data-bs-theme="dark"] .btn-outline-secondary {
    background-color: #1e293b !important;
    color: #cbd5e1 !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .btn-light:hover,
[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background-color: #334155 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .list-group-item {
    background-color: #151c2c !important;
    color: #f8fafc !important;
    border-color: #222d42 !important;
}

[data-bs-theme="dark"] .badge.bg-light {
    background-color: #1e293b !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .badge-secondary-subtle,
[data-bs-theme="dark"] .bg-secondary-subtle {
    background-color: rgba(148, 163, 184, 0.2) !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .badge-primary-subtle,
[data-bs-theme="dark"] .bg-primary-subtle {
    background-color: rgba(79, 70, 229, 0.25) !important;
    color: #818cf8 !important;
}

[data-bs-theme="dark"] .badge-success-subtle,
[data-bs-theme="dark"] .bg-success-subtle {
    background-color: rgba(16, 185, 129, 0.25) !important;
    color: #34d399 !important;
}

[data-bs-theme="dark"] .badge-danger-subtle,
[data-bs-theme="dark"] .bg-danger-subtle {
    background-color: rgba(239, 68, 68, 0.25) !important;
    color: #f87171 !important;
}

[data-bs-theme="dark"] .badge-warning-subtle,
[data-bs-theme="dark"] .bg-warning-subtle {
    background-color: rgba(245, 158, 11, 0.25) !important;
    color: #fbbf24 !important;
}

[data-bs-theme="dark"] .badge-info-subtle,
[data-bs-theme="dark"] .bg-info-subtle {
    background-color: rgba(6, 182, 212, 0.25) !important;
    color: #22d3ee !important;
}

/* Global Reset & Base Typography */
body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

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

/* Layout Container */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar Styles */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
}

/* Sidebar Overlay para Móvil */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1035;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

body.sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
}

/* Estado de Menú Colapsado Solo Iconos en Escritorio (>= 992px) */
@media (min-width: 992px) {
    body.sidebar-collapsed {
        --sidebar-width: 80px;
    }

    body.sidebar-collapsed .app-sidebar {
        width: 80px !important;
        transform: none !important;
    }

    body.sidebar-collapsed .app-header {
        left: 80px !important;
    }

    body.sidebar-collapsed .app-main {
        margin-left: 80px !important;
    }

    /* Ocultar texto de marca del logo */
    body.sidebar-collapsed #adminSidebarBrandName,
    body.sidebar-collapsed .sidebar-cream-brand-text {
        display: none !important;
    }

    /* Reducir recuadro del logo a insignia circular centrada */
    body.sidebar-collapsed .sidebar-cream-box-3d {
        width: 44px !important;
        height: 44px !important;
        border-radius: 50% !important;
        padding: 4px !important;
        justify-content: center !important;
        margin: 0 auto !important;
    }

    body.sidebar-collapsed .sidebar-header {
        padding: 0 0.5rem !important;
        justify-content: center !important;
    }

    /* Ocultar títulos de categorías (ej: Principal & CMS) */
    body.sidebar-collapsed .sidebar-menu-category {
        display: none !important;
    }

    /* Centrar ítems del menú e iconos */
    body.sidebar-collapsed .nav-link-item {
        justify-content: center !important;
        padding: 0.85rem 0.5rem !important;
        text-align: center !important;
    }

    body.sidebar-collapsed .nav-link-content {
        justify-content: center !important;
        gap: 0 !important;
        width: 100% !important;
    }

    /* Ocultar texto de las opciones y badges */
    body.sidebar-collapsed .nav-link-content span,
    body.sidebar-collapsed .nav-link-item > span,
    body.sidebar-collapsed .nav-link-item > i.fa-arrow-up-right-from-square {
        display: none !important;
    }

    /* Resaltar e incrementar tamaño de los iconos en menú colapsado */
    body.sidebar-collapsed .nav-link-content i {
        font-size: 1.4rem !important;
        width: auto !important;
        margin: 0 auto !important;
    }
}

/* Estado de Menú Desplegable en Celulares / Pantallas Pequeñas (< 992px) */
@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-header {
        left: 0 !important;
    }
    .app-main {
        margin-left: 0 !important;
        padding: 1.25rem 1rem;
    }
    body.sidebar-open .app-sidebar {
        transform: translateX(0) !important;
    }
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Sidebar Cream 3D Oval Logo Container */
.sidebar-cream-box-3d {
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #fde68a;
    border-radius: 50px;
    padding: 0.35rem 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    max-width: 100%;
    max-height: 46px;
    overflow: hidden;
    box-shadow: 0 4px 0 #d97706, 0 6px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    text-decoration: none !important;
}

.sidebar-cream-box-3d:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #d97706, 0 8px 22px rgba(0, 0, 0, 0.5);
    background: linear-gradient(180deg, #ffffff 0%, #fef3c7 100%);
}

.sidebar-cream-logo-img {
    height: 32px !important;
    max-height: 32px !important;
    width: auto !important;
    max-width: 40px !important;
    object-fit: contain !important;
    border-radius: 50px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
    flex-shrink: 0;
}

.sidebar-cream-brand-text {
    font-size: 1.05rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.2rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 140px !important;
}

.brand-red {
    color: #ef4444 !important;
    font-weight: 900 !important;
}

.brand-blue {
    color: #2563eb !important;
    font-weight: 800 !important;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar-menu-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #64748b;
    font-weight: 700;
    padding: 1rem 1rem 0.5rem 1rem;
}

.nav-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    color: var(--text-sidebar);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.925rem;
    transition: var(--transition-fast);
    margin-bottom: 0.25rem;
}

.nav-link-item:hover {
    background-color: var(--bg-sidebar-hover);
    color: #ffffff;
    transform: translateX(3px);
}

.nav-link-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.nav-link-content {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.nav-link-content i {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
}

/* Header Navbar */
.app-header {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    height: var(--header-height);
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    z-index: 1030;
    transition: var(--transition-fast);
    backdrop-filter: blur(10px);
}

/* 3D POS Quantity Buttons (Red minus & Green plus) */
.btn-3d-qty-minus {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    border: 1px solid #b91c1c !important;
    border-radius: 50px !important;
    width: 28px !important;
    height: 28px !important;
    font-size: 1.1rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 3px 0 #991b1b, 0 4px 10px rgba(239, 68, 68, 0.45) !important;
    transition: all 0.12s ease !important;
    cursor: pointer !important;
    user-select: none !important;
    padding: 0 !important;
}

.btn-3d-qty-minus:hover {
    background: linear-gradient(180deg, #f87171 0%, #b91c1c 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 0 #991b1b, 0 6px 14px rgba(239, 68, 68, 0.6) !important;
}

.btn-3d-qty-minus:active {
    transform: translateY(2px) !important;
    box-shadow: 0 1px 0 #991b1b !important;
}

.btn-3d-qty-plus {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: 1px solid #047857 !important;
    border-radius: 50px !important;
    width: 28px !important;
    height: 28px !important;
    font-size: 1.1rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 3px 0 #065f46, 0 4px 10px rgba(16, 185, 129, 0.45) !important;
    transition: all 0.12s ease !important;
    cursor: pointer !important;
    user-select: none !important;
    padding: 0 !important;
}

.btn-3d-qty-plus:hover {
    background: linear-gradient(180deg, #34d399 0%, #047857 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 0 #065f46, 0 6px 14px rgba(16, 185, 129, 0.6) !important;
}

.btn-3d-qty-plus:active {
    transform: translateY(2px) !important;
    box-shadow: 0 1px 0 #065f46 !important;
}

/* 3D Emerald Green POS Checkout Button */
.btn-3d-checkout {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: 1px solid #047857 !important;
    border-radius: 50px !important;
    padding: 0.85rem 1.5rem !important;
    width: 100% !important;
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 5px 0 #065f46, 0 8px 20px rgba(16, 185, 129, 0.45) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    user-select: none !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.btn-3d-checkout:hover:not(:disabled) {
    background: linear-gradient(180deg, #34d399 0%, #047857 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 7px 0 #065f46, 0 12px 25px rgba(16, 185, 129, 0.6) !important;
    color: #ffffff !important;
}

.btn-3d-checkout:active:not(:disabled) {
    transform: translateY(3px) !important;
    box-shadow: 0 2px 0 #065f46, 0 4px 10px rgba(16, 185, 129, 0.3) !important;
}

.btn-3d-checkout:disabled {
    background: #198754 !important;
    border: 1px solid #198754 !important;
    box-shadow: none !important;
    color: rgba(255, 255, 255, 0.75) !important;
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    transform: none !important;
    text-shadow: none !important;
}

.header-search {
    position: relative;
    max-width: 360px;
    width: 100%;
}

.header-search input {
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.55rem 1rem 0.55rem 2.6rem;
    font-size: 0.875rem;
    width: 100%;
    transition: var(--transition-fast);
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    background-color: var(--bg-surface);
}

.header-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Main Content Area */
.app-main {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    flex: 1;
    padding: 2rem 1.75rem;
    transition: var(--transition-fast);
    min-width: 0;
}

/* Cards & Widgets */
.card-custom {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.card-custom:hover {
    box-shadow: var(--shadow-md);
}

.stat-card {
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.stat-icon.primary {
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45) !important;
}

.stat-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45) !important;
}

.stat-icon.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45) !important;
}

.stat-icon.danger {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45) !important;
}

.stat-icon.info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(6, 182, 212, 0.45) !important;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(4deg);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0.5rem 0 0.25rem 0;
    letter-spacing: -0.5px;
}

.badge-trend {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-trend.up { background-color: var(--success-light); color: var(--success); }
.badge-trend.down { background-color: var(--danger-light); color: var(--danger); }

/* POS Touch Grid System */
.pos-product-card {
    cursor: pointer;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-surface);
    transition: var(--transition-fast);
    overflow: hidden;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pos-product-card:hover, .pos-product-card:active {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.pos-product-card .pos-img-container {
    background: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pos-product-card .pos-img-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain !important;
}

.pos-cart-panel {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height) - 4rem);
    position: sticky;
    top: calc(var(--header-height) + 1rem);
}

.pos-cart-items {
    flex: 1;
    overflow-y: auto;
}

.pos-cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-light);
}

/* Tables styling */
.table-custom {
    color: var(--text-primary);
    vertical-align: middle;
}

.table-custom th {
    background-color: var(--bg-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 1rem;
}

.table-custom td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}

/* Responsive Mobile Navigation */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1035;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-header {
        left: 0;
    }

    .app-main {
        margin-left: 0;
    }

    .sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-open .sidebar-overlay {
        opacity: 1;
        visibility: visible;
    }
}

/* ==============================================================================
   ESTILOS Y EFECTOS 3D REALISTAS PARA BOTONES DE ACCIÓN (CRM, POS, TABLAS)
   ============================================================================== */

/* Botón 3D Redactar Correo (Gmail Header) */
.btn-3d-gmail {
    background: linear-gradient(180deg, #ffffff 0%, #fef2f2 100%) !important;
    color: #dc2626 !important;
    border: 1.5px solid #fca5a5 !important;
    border-radius: 50px !important;
    padding: 0.6rem 1.4rem !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 0 #f87171, 0 6px 16px rgba(220, 38, 38, 0.25) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.btn-3d-gmail:hover {
    background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 0 #f87171, 0 10px 22px rgba(220, 38, 38, 0.38) !important;
    color: #b91c1c !important;
    border-color: #ef4444 !important;
}

.btn-3d-gmail:active {
    transform: translateY(2px) !important;
    box-shadow: 0 1px 0 #f87171 !important;
}

/* Botón 3D Primario Azul (e.g. Registrar Cliente) */
.btn-3d-primary {
    background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: 1px solid #1e40af !important;
    border-radius: 50px !important;
    padding: 0.6rem 1.4rem !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 0 #1e3a8a, 0 6px 16px rgba(59, 130, 246, 0.35) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.btn-3d-primary:hover {
    background: linear-gradient(180deg, #60a5fa 0%, #1e40af 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 0 #1e3a8a, 0 10px 22px rgba(59, 130, 246, 0.5) !important;
    color: #ffffff !important;
}

.btn-3d-primary:active {
    transform: translateY(2px) !important;
    box-shadow: 0 1px 0 #1e3a8a !important;
}

/* Botón 3D Secundario / Cancelar (Dark & Light Theme) */
.btn-3d-secondary, .btn-3d-cancel, .btn-3d-muted {
    background: linear-gradient(180deg, #475569 0%, #334155 100%) !important;
    color: #ffffff !important;
    border: 1px solid #1e293b !important;
    border-radius: 50px !important;
    padding: 0.6rem 1.4rem !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 0 #0f172a, 0 6px 14px rgba(0, 0, 0, 0.35) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
    text-decoration: none !important;
}

.btn-3d-secondary:hover, .btn-3d-cancel:hover, .btn-3d-muted:hover {
    background: linear-gradient(180deg, #64748b 0%, #334155 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 0 #0f172a, 0 10px 20px rgba(0, 0, 0, 0.45) !important;
    color: #ffffff !important;
}

.btn-3d-secondary:active, .btn-3d-cancel:active, .btn-3d-muted:active {
    transform: translateY(2px) !important;
    box-shadow: 0 1px 0 #0f172a !important;
}

/* Botón 3D Cyan / Info (e.g. Probar Conexión) */
.btn-3d-info, .btn-3d-cyan {
    background: linear-gradient(180deg, #06b6d4 0%, #0891b2 100%) !important;
    color: #ffffff !important;
    border: 1px solid #0e7490 !important;
    border-radius: 50px !important;
    padding: 0.6rem 1.4rem !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 0 #155e75, 0 6px 16px rgba(6, 182, 212, 0.35) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    text-decoration: none !important;
}

.btn-3d-info:hover, .btn-3d-cyan:hover {
    background: linear-gradient(180deg, #22d3ee 0%, #0e7490 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 0 #155e75, 0 10px 22px rgba(6, 182, 212, 0.5) !important;
    color: #ffffff !important;
}

.btn-3d-info:active, .btn-3d-cyan:active {
    transform: translateY(2px) !important;
    box-shadow: 0 1px 0 #155e75 !important;
}

/* Botón 3D Rojo Carmesí (e.g. Procesar Devolución) */
.btn-3d-danger, .btn-3d-red {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    border: 1px solid #b91c1c !important;
    border-radius: 50px !important;
    padding: 0.6rem 1.4rem !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 0 #991b1b, 0 6px 18px rgba(239, 68, 68, 0.4) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    text-decoration: none !important;
}

.btn-3d-danger:hover, .btn-3d-red:hover {
    background: linear-gradient(180deg, #f87171 0%, #b91c1c 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 0 #991b1b, 0 10px 22px rgba(239, 68, 68, 0.6) !important;
    color: #ffffff !important;
}

.btn-3d-danger:active, .btn-3d-red:active {
    transform: translateY(2px) !important;
    box-shadow: 0 1px 0 #991b1b !important;
}

/* Botón 3D Amarillo / Warning (e.g. Ir a la Tienda Pública) */
.btn-3d-warning, .btn-3d-yellow {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    border: 1px solid #b45309 !important;
    border-radius: 50px !important;
    padding: 0.6rem 1.4rem !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 0 #92400e, 0 6px 18px rgba(245, 158, 11, 0.4) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    text-decoration: none !important;
}

.btn-3d-warning:hover, .btn-3d-yellow:hover {
    background: linear-gradient(180deg, #fbbf24 0%, #b45309 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 0 #92400e, 0 10px 22px rgba(245, 158, 11, 0.6) !important;
    color: #ffffff !important;
}

.btn-3d-warning:active, .btn-3d-yellow:active {
    transform: translateY(2px) !important;
    box-shadow: 0 1px 0 #92400e !important;
}

/* Botón 3D Outline Cyan (e.g. Probar Conexión Outline 3D) */
.btn-3d-outline-info {
    background: linear-gradient(180deg, #ffffff 0%, #ecfeff 100%) !important;
    color: #0891b2 !important;
    border: 2px solid #06b6d4 !important;
    border-radius: 50px !important;
    padding: 0.6rem 1.4rem !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 0 #0891b2, 0 6px 16px rgba(6, 182, 212, 0.25) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.btn-3d-outline-info:hover {
    background: linear-gradient(180deg, #cffafe 0%, #a5f3fc 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 0 #0891b2, 0 10px 22px rgba(6, 182, 212, 0.4) !important;
    color: #0e7490 !important;
    border-color: #0891b2 !important;
}

.btn-3d-outline-info:active {
    transform: translateY(2px) !important;
    box-shadow: 0 1px 0 #0891b2 !important;
}

/* Botón 3D Verde Neón (e.g. Nueva Factura) */
.btn-3d-neon-success, .btn-3d-success {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: 1px solid #047857 !important;
    border-radius: 50px !important;
    padding: 0.6rem 1.4rem !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 0 #065f46, 0 6px 18px rgba(16, 185, 129, 0.4) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    text-decoration: none !important;
}

.btn-3d-neon-success:hover, .btn-3d-success:hover {
    background: linear-gradient(180deg, #34d399 0%, #047857 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 0 #065f46, 0 10px 22px rgba(16, 185, 129, 0.6) !important;
    color: #ffffff !important;
}

.btn-3d-neon-success:active, .btn-3d-success:active {
    transform: translateY(2px) !important;
    box-shadow: 0 1px 0 #065f46 !important;
}

/* Botón 3D Indigo (e.g. Cotizar) */
.btn-3d-indigo {
    background: linear-gradient(180deg, #6366f1 0%, #4338ca 100%) !important;
    color: #ffffff !important;
    border: 1px solid #3730a3 !important;
    border-radius: 50px !important;
    padding: 0.6rem 1.4rem !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 0 #312e81, 0 6px 16px rgba(99, 102, 241, 0.35) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    text-decoration: none !important;
}

.btn-3d-indigo:hover {
    background: linear-gradient(180deg, #818cf8 0%, #3730a3 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 0 #312e81, 0 10px 22px rgba(99, 102, 241, 0.5) !important;
    color: #ffffff !important;
}

.btn-3d-indigo:active {
    transform: translateY(2px) !important;
    box-shadow: 0 1px 0 #312e81 !important;
}

/* Botones Circulares 3D de Acciones de Filas de Tabla */
.btn-action-gmail, .btn-action-gmail-3d {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    border: 1px solid #b91c1c !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 0 #991b1b, 0 5px 12px rgba(239, 68, 68, 0.4) !important;
    transition: all 0.15s ease !important;
    padding: 0 !important;
}

.btn-action-gmail:hover, .btn-action-gmail-3d:hover {
    background: linear-gradient(180deg, #f87171 0%, #b91c1c 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 0 #991b1b, 0 8px 16px rgba(239, 68, 68, 0.6) !important;
    color: #ffffff !important;
}

.btn-action-gmail:active, .btn-action-gmail-3d:active {
    transform: translateY(2px) !important;
    box-shadow: 0 1px 0 #991b1b !important;
}

.btn-action-edit, .btn-action-edit-3d {
    background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: 1px solid #1e40af !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 0 #1e3a8a, 0 5px 12px rgba(59, 130, 246, 0.4) !important;
    transition: all 0.15s ease !important;
    padding: 0 !important;
}

.btn-action-edit:hover, .btn-action-edit-3d:hover {
    background: linear-gradient(180deg, #60a5fa 0%, #1e40af 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 0 #1e3a8a, 0 8px 16px rgba(59, 130, 246, 0.6) !important;
    color: #ffffff !important;
}

.btn-action-edit:active, .btn-action-edit-3d:active {
    transform: translateY(2px) !important;
    box-shadow: 0 1px 0 #1e3a8a !important;
}

/* Botón Circular 3D Imprimir (Verde Esmeralda 3D) */
.btn-action-print, .btn-action-print-3d {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: 1px solid #047857 !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 0 #065f46, 0 5px 12px rgba(16, 185, 129, 0.4) !important;
    transition: all 0.15s ease !important;
    padding: 0 !important;
}

.btn-action-print:hover, .btn-action-print-3d:hover {
    background: linear-gradient(180deg, #34d399 0%, #047857 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 0 #065f46, 0 8px 16px rgba(16, 185, 129, 0.6) !important;
    color: #ffffff !important;
}

.btn-action-print:active, .btn-action-print-3d:active {
    transform: translateY(2px) !important;
    box-shadow: 0 1px 0 #065f46 !important;
}

/* Botón Circular 3D Eliminar (Rojo Carmesí 3D) */
.btn-action-delete, .btn-action-delete-3d {
    background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    border: 1px solid #991b1b !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 0 #7f1d1d, 0 5px 12px rgba(239, 68, 68, 0.4) !important;
    transition: all 0.15s ease !important;
    padding: 0 !important;
}

.btn-action-delete:hover, .btn-action-delete-3d:hover {
    background: linear-gradient(180deg, #f87171 0%, #991b1b 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 0 #7f1d1d, 0 8px 16px rgba(239, 68, 68, 0.6) !important;
    color: #ffffff !important;
}

.btn-action-delete:active, .btn-action-delete-3d:active {
    transform: translateY(2px) !important;
    box-shadow: 0 1px 0 #7f1d1d !important;
}

/* Botón 3D Convertir a Factura (Pill Button con Texto e Icono) */
.btn-3d-convert, .btn-action-convert, .btn-action-convert-3d {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: 1px solid #047857 !important;
    border-radius: 50px !important;
    padding: 0.35rem 0.85rem !important;
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    box-shadow: 0 3px 0 #065f46, 0 4px 10px rgba(16, 185, 129, 0.35) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.btn-3d-convert:hover, .btn-action-convert:hover, .btn-action-convert-3d:hover {
    background: linear-gradient(180deg, #34d399 0%, #047857 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 0 #065f46, 0 6px 14px rgba(16, 185, 129, 0.5) !important;
    color: #ffffff !important;
}

.btn-3d-convert:active, .btn-action-convert:active, .btn-action-convert-3d:active {
    transform: translateY(2px) !important;
    box-shadow: 0 1px 0 #065f46 !important;
}

/* Custom Web Studio CMS Tab Pills */
.custom-studio-tabs .nav-link {
    color: var(--text-secondary);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.custom-studio-tabs .nav-link:hover {
    color: var(--primary);
    background-color: var(--primary-light);
}

.custom-studio-tabs .nav-link.active {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35) !important;
}

/* Floating WhatsApp Contact Button (Estilo Original Limpio) */
.whatsapp-float-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: #ffffff !important;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
    z-index: 1050;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-float-btn:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.6);
    color: #ffffff !important;
}

/* 3D Elevation Effect for active Checkout button while preserving exact original shape & size */
.btn-3d-active-checkout {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%) !important;
    border: 1px solid #047857 !important;
    box-shadow: 0 5px 0 #065f46, 0 8px 20px rgba(16, 185, 129, 0.4) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.btn-3d-active-checkout:hover {
    background: linear-gradient(180deg, #34d399 0%, #059669 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 7px 0 #065f46, 0 10px 24px rgba(16, 185, 129, 0.5) !important;
}

.btn-3d-active-checkout:active {
    transform: translateY(3px) !important;
    box-shadow: 0 2px 0 #065f46 !important;
}

/* 3D Quantity Controls for Cart Drawer (Red Circle Minus / Blue Square Badge / Green Circle Plus) */
button.btn-3d-qty-minus,
.btn-3d-qty-minus {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    border: none !important;
    outline: none !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 900 !important;
    font-size: 1.2rem !important;
    line-height: 1 !important;
    box-shadow: 0 4px 0 #991b1b, 0 5px 12px rgba(239, 68, 68, 0.4) !important;
    transition: all 0.15s ease !important;
    padding: 0 !important;
    cursor: pointer !important;
    user-select: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    margin: 0 !important;
}

button.btn-3d-qty-minus:hover,
.btn-3d-qty-minus:hover {
    background: linear-gradient(180deg, #f87171 0%, #b91c1c 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 0 #991b1b, 0 7px 16px rgba(239, 68, 68, 0.6) !important;
    color: #ffffff !important;
}

button.btn-3d-qty-minus:active,
.btn-3d-qty-minus:active {
    transform: translateY(2px) !important;
    box-shadow: 0 1px 0 #991b1b !important;
}

button.btn-3d-qty-plus,
.btn-3d-qty-plus {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: none !important;
    outline: none !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 900 !important;
    font-size: 1.2rem !important;
    line-height: 1 !important;
    box-shadow: 0 4px 0 #065f46, 0 5px 12px rgba(16, 185, 129, 0.4) !important;
    transition: all 0.15s ease !important;
    padding: 0 !important;
    cursor: pointer !important;
    user-select: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    margin: 0 !important;
}

button.btn-3d-qty-plus:hover,
.btn-3d-qty-plus:hover {
    background: linear-gradient(180deg, #34d399 0%, #047857 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 0 #065f46, 0 7px 16px rgba(16, 185, 129, 0.6) !important;
    color: #ffffff !important;
}

button.btn-3d-qty-plus:active,
.btn-3d-qty-plus:active {
    transform: translateY(2px) !important;
    box-shadow: 0 1px 0 #065f46 !important;
}

.badge-3d-qty {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: 1px solid #1e40af !important;
    border-radius: 10px !important;
    min-width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 800 !important;
    font-size: 1rem !important;
    box-shadow: 0 3px 0 #1e3a8a, 0 4px 10px rgba(37, 99, 235, 0.35) !important;
    padding: 0 8px !important;
    line-height: 1 !important;
    user-select: none !important;
}

/* Floating WhatsApp Contact Button con Efecto Pulso / Sonar Radar */
.whatsapp-float-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: #ffffff !important;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
    z-index: 1050;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    animation: whatsappSonarHeartbeat 3s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-float-btn::before,
.whatsapp-float-btn::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50px;
    border: 2px solid #25d366;
    opacity: 0;
    animation: whatsappSonarPulse 2.6s infinite cubic-bezier(0, 0, 0.2, 1);
    pointer-events: none;
}

.whatsapp-float-btn::after {
    animation-delay: 1.3s;
}

@keyframes whatsappSonarPulse {
    0% {
        transform: scale(0.9);
        opacity: 0.85;
        border-width: 3px;
    }
    50% {
        opacity: 0.4;
    }
    100% {
        transform: scale(1.75);
        opacity: 0;
        border-width: 1px;
    }
}

@keyframes whatsappSonarHeartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.08); }
    28% { transform: scale(1); }
    42% { transform: scale(1.08); }
    70% { transform: scale(1); }
}

.whatsapp-float-btn:hover {
    transform: scale(1.15) translateY(-3px) !important;
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.65);
    color: #ffffff !important;
}

/* ==============================================================================
   PRINT DOCUMENTS & PREVIEW SHEETS (Facturas, Cotizaciones, Conduces, Tickets POS)
   ============================================================================== */

/* Modal Preview Sheet en pantalla (Garantiza papel blanco con texto oscuro impecable incluso en Modo Oscuro) */
.print-document-sheet {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

.print-document-sheet .text-dark,
.print-document-sheet .fw-bold.text-dark,
.print-document-sheet .fw-extrabold.text-dark,
.print-document-sheet h1, 
.print-document-sheet h2, 
.print-document-sheet h3, 
.print-document-sheet h4, 
.print-document-sheet h5, 
.print-document-sheet h6,
.print-document-sheet td, 
.print-document-sheet th,
.print-document-sheet span,
.print-document-sheet div {
    color: #0f172a !important;
}

.print-document-sheet .text-muted,
.print-document-sheet .text-secondary {
    color: #475569 !important;
}

.print-document-sheet .bg-light,
.print-document-sheet .bg-body-tertiary {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

.print-document-sheet .table {
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

.print-document-sheet .table th,
.print-document-sheet .table td {
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
}

.print-document-sheet .table-light {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

/* Reglas Oficiales de Impresión Físicas & PDF (@media print) */
@media print {
    /* Forzar fondo blanco y texto negro puro en la impresora */
    body, html, [data-bs-theme="dark"] body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    /* Ocultar elementos de UI que no deben imprimirse */
    .app-sidebar,
    .app-header,
    .btn:not(.btn-print-keep),
    .modal-header,
    .modal-footer,
    .no-print,
    #sidebarOverlay,
    .whatsapp-float-btn {
        display: none !important;
    }

    /* Ajustar el modal de impresión para abarcar toda la hoja */
    .modal {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #ffffff !important;
    }

    .modal-dialog {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .modal-content {
        border: none !important;
        box-shadow: none !important;
        background: #ffffff !important;
        color: #000000 !important;
    }

    .modal-body {
        padding: 0 !important;
    }

    .print-document-sheet {
        background: #ffffff !important;
        color: #000000 !important;
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    .print-document-sheet * {
        color: #000000 !important;
    }

    .print-document-sheet .table th,
    .print-document-sheet .table td {
        border-color: #cccccc !important;
        color: #000000 !important;
    }
}

/* ==============================================================================
   DOCUMENT PRINT PREVIEW - NATURAL PAPER ISOLATION (LIGHT & DARK MODE)
   Garantiza que la hoja impresa/documento permanezca como papel natural (#ffffff,
   texto oscuro nítido), mientras que la ventana modal exterior se mantiene en modo oscuro.
   ============================================================================== */

.print-document-sheet,
.printable-paper-sheet,
#ticketPrintArea,
#previewDGII,
#previewEstandar,
#previewTicket80,
#previewTicket58,
#quotePreviewDGII,
#quotePreviewEstandar,
#conducePreviewSheet,
#returnPreviewSheet {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

/* Forzar que todos los elementos internos del documento usen colores de papel impreso real */
.print-document-sheet *,
.printable-paper-sheet *,
#ticketPrintArea *,
#previewDGII *,
#previewEstandar *,
#previewTicket80 *,
#previewTicket58 *,
#quotePreviewDGII *,
#quotePreviewEstandar *,
#conducePreviewSheet *,
#returnPreviewSheet * {
    color: #1e293b;
}

/* Reglas de ALTA ESPECIFICIDAD para vencer anulaciones de Modo Oscuro [data-bs-theme="dark"] */
[data-bs-theme="dark"] .print-document-sheet,
[data-bs-theme="dark"] .printable-paper-sheet,
[data-bs-theme="dark"] #ticketPrintArea,
[data-bs-theme="dark"] #previewDGII,
[data-bs-theme="dark"] #previewEstandar,
[data-bs-theme="dark"] #previewTicket80,
[data-bs-theme="dark"] #previewTicket58,
[data-bs-theme="dark"] #quotePreviewDGII,
[data-bs-theme="dark"] #quotePreviewEstandar,
[data-bs-theme="dark"] #conducePreviewSheet,
[data-bs-theme="dark"] #returnPreviewSheet {
    background-color: #ffffff !important;
    color: #1e293b !important;
}

[data-bs-theme="dark"] .print-document-sheet *,
[data-bs-theme="dark"] .printable-paper-sheet *,
[data-bs-theme="dark"] #ticketPrintArea *,
[data-bs-theme="dark"] #previewDGII *,
[data-bs-theme="dark"] #previewEstandar *,
[data-bs-theme="dark"] #previewTicket80 *,
[data-bs-theme="dark"] #previewTicket58 *,
[data-bs-theme="dark"] #quotePreviewDGII *,
[data-bs-theme="dark"] #quotePreviewEstandar *,
[data-bs-theme="dark"] #conducePreviewSheet *,
[data-bs-theme="dark"] #returnPreviewSheet * {
    color: #1e293b !important;
}

/* Clases de texto y contraste dentro del papel natural */
.print-document-sheet .text-dark,
.print-document-sheet .text-black,
.print-document-sheet .text-body,
[data-bs-theme="dark"] .print-document-sheet .text-dark,
[data-bs-theme="dark"] .print-document-sheet .text-black,
[data-bs-theme="dark"] .print-document-sheet .text-body,
[data-bs-theme="dark"] #ticketPrintArea .text-dark,
[data-bs-theme="dark"] #ticketPrintArea .text-black {
    color: #0f172a !important;
}

.print-document-sheet .text-secondary,
.print-document-sheet .text-muted,
[data-bs-theme="dark"] .print-document-sheet .text-secondary,
[data-bs-theme="dark"] .print-document-sheet .text-muted,
[data-bs-theme="dark"] #ticketPrintArea .text-muted {
    color: #475569 !important;
}

/* Recuadros internos, tarjetas y paneles dentro del papel impreso */
.print-document-sheet .bg-light,
.print-document-sheet .bg-body-tertiary,
.print-document-sheet .bg-white,
[data-bs-theme="dark"] .print-document-sheet .bg-light,
[data-bs-theme="dark"] .print-document-sheet .bg-body-tertiary,
[data-bs-theme="dark"] .print-document-sheet .bg-white,
[data-bs-theme="dark"] #ticketPrintArea.bg-light {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

.print-document-sheet .border,
.print-document-sheet .border-top,
.print-document-sheet .border-bottom,
.print-document-sheet .border-start,
.print-document-sheet .border-end,
[data-bs-theme="dark"] .print-document-sheet .border,
[data-bs-theme="dark"] .print-document-sheet .border-top,
[data-bs-theme="dark"] .print-document-sheet .border-bottom,
[data-bs-theme="dark"] .print-document-sheet .border-start,
[data-bs-theme="dark"] .print-document-sheet .border-end {
    border-color: #cbd5e1 !important;
}

/* Recuadro de Comprobante / NCF (Azul Claro) */
.print-document-sheet .bg-primary-subtle,
[data-bs-theme="dark"] .print-document-sheet .bg-primary-subtle {
    background-color: #eff6ff !important;
    border-color: #3b82f6 !important;
}
.print-document-sheet .bg-primary-subtle *,
[data-bs-theme="dark"] .print-document-sheet .bg-primary-subtle * {
    color: #1d4ed8 !important;
}

/* Tablas dentro de los documentos */
.print-document-sheet table,
[data-bs-theme="dark"] .print-document-sheet table {
    background-color: #ffffff !important;
    color: #0f172a !important;
}
.print-document-sheet thead,
.print-document-sheet thead tr,
.print-document-sheet thead th,
[data-bs-theme="dark"] .print-document-sheet thead,
[data-bs-theme="dark"] .print-document-sheet thead tr,
[data-bs-theme="dark"] .print-document-sheet thead th {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    border-bottom: 2px solid #cbd5e1 !important;
}
.print-document-sheet tbody tr,
.print-document-sheet tbody td,
[data-bs-theme="dark"] .print-document-sheet tbody tr,
[data-bs-theme="dark"] .print-document-sheet tbody td {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

/* Estilo para Producto Compartido Activo / Destacado */
.product-card-shared-active {
    outline: 3px solid #0d6efd !important;
    box-shadow: 0 0 30px rgba(13, 110, 253, 0.45) !important;
    border-radius: 16px !important;
    animation: pulseSharedCard 1.8s ease-in-out infinite alternate !important;
}
@keyframes pulseSharedCard {
    0% { transform: translateY(-3px) scale(1.02); }
    100% { transform: translateY(-5px) scale(1.035); }
}

