﻿/* ============================================================
   COMBINABLES V4 — CSS FINAL DEFINITIVO (cliente + admin)
   ============================================================ */

/* -----------------------------------------------------------
   BADGE "Combinable" sobre la tarjeta de la cartilla
   ----------------------------------------------------------- */
.badge-combinable {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: #fff !important;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border: 1.5px solid rgba(255,255,255,0.85);
    box-shadow: 0 2px 6px rgba(99,102,241,0.35);
    margin-left: 6px;
    cursor: pointer;
    user-select: none;
    transition: transform .12s ease, box-shadow .15s ease;
    white-space: nowrap;
}

    .badge-combinable:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(99,102,241,0.45);
    }

    .badge-combinable i {
        font-size: 0.8rem;
        line-height: 1;
    }


/* ============================================================
   POPUP PEDIDO ENVIADO (.dtpc-success-popup)
   ============================================================ */
.dtpc-success-popup.swal2-popup {
    border-radius: 20px !important;
    overflow: hidden !important;
}
.dtpc-success-popup .swal2-close {
    color: rgba(255,255,255,.7) !important;
    font-size: 1.4rem !important;
}
.dtpc-success-popup .swal2-close:hover {
    color: #fff !important;
}

/* ============================================================
   POPUP CLIENTE — .dtpc-*
   ============================================================ */

.dtpc-popup .swal2-popup {
    max-width: 760px !important;
    width: 95vw !important;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
    color: #fff !important;
    border-radius: 16px !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.dtpc-popup .swal2-html-container {
    padding: 0 !important;
    margin: 0 !important;
    max-height: 90vh !important;
    overflow: hidden !important;
}

.dtpc-root {
    display: flex;
    flex-direction: column;
    height: 90vh;
    max-height: 90vh;
    color: #fff;
}

/* HEADER */
.dtpc-header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: linear-gradient(135deg, rgba(0,0,0,0.45), rgba(0,0,0,0.25));
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.dtpc-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

/* BLOQUE EXPLICATIVO */
.dtpc-explain {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dtpc-explain-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    line-height: 1.35;
}

.dtpc-explain-icon {
    font-size: 1rem;
    flex-shrink: 0;
    line-height: 1.2;
}

.dtpc-explain-text {
    flex: 1;
}

    .dtpc-explain-text strong {
        color: #fde68a;
        font-weight: 800;
    }

/* PROGRESO */
.dtpc-progress {
    height: 8px;
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 4px;
}

.dtpc-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    transition: width .25s ease;
}

.dtpc-counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 6px;
}

    .dtpc-counter .ok {
        color: #4ade80;
    }

    .dtpc-counter .pending {
        color: #fbbf24;
    }

/* SELECCIONADOS STICKY */
.dtpc-selected {
    background: rgba(0,0,0,0.42);
    border-top: 2px solid rgba(251,191,36,0.45);
    border-bottom: 1px solid rgba(251,191,36,0.2);
    padding: 6px 10px 0 10px;
    position: relative;
}

    .dtpc-selected::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 14px;
        background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.45));
        pointer-events: none;
        border-radius: 0;
    }
.dtpc-selected-title {
    font-size: 0.75rem;
    font-weight: 900;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.dtpc-selected-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fbbf24;
    flex-shrink: 0;
}

.dtpc-selected-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 96px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(251,191,36,0.4) transparent;
}
.dtpc-selected-list::-webkit-scrollbar { width: 4px; }
.dtpc-selected-list::-webkit-scrollbar-track { background: transparent; }
.dtpc-selected-list::-webkit-scrollbar-thumb { background: rgba(251,191,36,0.4); border-radius: 2px; }

.dtpc-sel-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 5px 8px;
    min-height: 32px;
}

.dtpc-sel-nom {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem;
}

.dtpc-sel-qty {
    font-weight: 800;
    color: #4ade80;
    font-size: 0.85rem;
}

.dtpc-sel-warn {
    font-size: 0.7rem;
    color: #fde68a;
    background: rgba(251,191,36,0.18);
    padding: 2px 6px;
    border-radius: 999px;
    white-space: nowrap;
}

.dtpc-sel-remove {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 0;
    background: rgba(239,68,68,0.85);
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
}

/* BÚSQUEDA */
.dtpc-search {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.15);
}

    .dtpc-search input {
        width: 100%;
        padding: 10px 12px;
        border-radius: 10px;
        border: 1.5px solid rgba(255,255,255,0.2);
        background: rgba(0,0,0,0.25);
        color: #fff;
        font-size: 0.95rem;
        outline: none;
        box-sizing: border-box;
    }

        .dtpc-search input::placeholder {
            color: rgba(255,255,255,0.5);
        }

/* LISTA (con grupos por categoría) */
.dtpc-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 8px 12px 16px 12px;
    -webkit-overflow-scrolling: touch;
}

/* GRUPO DE CATEGORÍA */
.dtpc-cat-group {
    margin-bottom: 14px;
}

.dtpc-cat-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(135deg, rgba(99,102,241,0.95), rgba(79,70,229,0.95));
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.dtpc-cat-name {
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.dtpc-cat-count {
    background: rgba(255,255,255,0.25);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.75rem;
}

.dtpc-cat-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ITEM */
.dtpc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    transition: background .15s;
}

    .dtpc-item:hover {
        background: rgba(255,255,255,0.12);
    }

    .dtpc-item.origen {
        border-color: rgba(34,197,94,0.5);
        background: rgba(34,197,94,0.1);
    }

    .dtpc-item.dtpc-active {
        background: rgba(34,197,94,0.18);
        border-color: rgba(34,197,94,0.55);
        box-shadow: 0 0 0 1px rgba(34,197,94,0.25) inset;
    }

    .dtpc-item.dtpc-active .dtpc-qty {
        background: rgba(34,197,94,0.25);
        border-color: rgba(34,197,94,0.5);
        color: #fff;
        font-weight: 900;
    }

.dtpc-thumb-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

img.dtpc-thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    background: #faf6fb;
    display: block;
}

.dtpc-thumb-fallback {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg,#667eea,#764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
}

.dtpc-info {
    flex: 1 1 auto;
    min-width: 0;
}

.dtpc-name {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.dtpc-meta {
    font-size: 0.75rem;
    opacity: 0.88;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.dtpc-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.dtpc-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1.5px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

    .dtpc-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

    .dtpc-btn:active:not(:disabled) {
        transform: scale(0.95);
    }

.dtpc-qty {
    width: 44px;
    text-align: center;
    font-weight: 800;
    padding: 6px 4px;
    border-radius: 8px;
    border: 1.5px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.3);
    color: #fff;
}

    .dtpc-qty::-webkit-inner-spin-button,
    .dtpc-qty::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

.dtpc-loadmore {
    padding: 14px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}

/* FOOTER STICKY */
.dtpc-footer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: linear-gradient(0deg, rgba(0,0,0,0.55), rgba(0,0,0,0.35));
    padding: 12px 14px;
    border-top: 1px solid rgba(255,255,255,0.12);
}

.dtpc-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.dtpc-actions {
    display: flex;
    gap: 8px;
}

    .dtpc-actions button {
        flex: 1;
        padding: 12px;
        border-radius: 12px;
        border: none;
        font-weight: 800;
        font-size: 0.95rem;
        cursor: pointer;
    }

.dtpc-cancel {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

.dtpc-confirm {
    background: linear-gradient(135deg,#22c55e,#16a34a);
    color: #fff;
    box-shadow: 0 4px 14px rgba(34,197,94,0.4);
}

    .dtpc-confirm:disabled {
        background: #6b7280;
        box-shadow: none;
        cursor: not-allowed;
        opacity: 0.7;
    }

.dtpc-warning {
    background: rgba(251,191,36,0.18);
    border: 1px solid rgba(251,191,36,0.4);
    color: #fde68a;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

@media (max-width: 480px) {
    .dtpc-root {
        height: 94vh;
    }

    .dtpc-title {
        font-size: 1.05rem;
    }

    .dtpc-explain {
        padding: 8px 10px;
    }

    .dtpc-explain-row {
        font-size: 0.8rem;
    }

    img.dtpc-thumb, .dtpc-thumb-fallback, .dtpc-thumb-wrap {
        width: 42px;
        height: 42px;
    }

    .dtpc-name {
        font-size: 0.9rem;
    }

    .dtpc-btn {
        width: 36px;
        height: 36px;
    }

    .dtpc-qty {
        width: 40px;
    }

    .dtpc-selected-list {
        max-height: 82px;
    }
}


/* ============================================================
   POPUP ADMIN — .dtpac-*
   ============================================================ */

.dtpac-popup .swal2-popup {
    max-width: 880px !important;
    width: 96vw !important;
    border-radius: 16px !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.dtpac-popup .swal2-html-container {
    padding: 0 !important;
    margin: 0 !important;
    max-height: 88vh !important;
    overflow: hidden !important;
}

.dtpac-root {
    display: flex;
    flex-direction: column;
    height: 88vh;
    max-height: 88vh;
    background: #f8fafc;
    color: #1f2937;
}

/* HEADER */
.dtpac-header {
    padding: 14px 18px 10px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
}

.dtpac-title {
    margin: 0 0 4px 0;
    font-size: 1.15rem;
    font-weight: 800;
}

.dtpac-subtitle {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.92;
}

/* CONFIG */
.dtpac-config {
    background: #fff;
    padding: 10px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dtpac-config-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #374151;
}

.dtpac-config-input {
    width: 90px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1.5px solid #d1d5db;
    font-weight: 700;
    text-align: center;
}

.dtpac-config-help {
    font-size: 0.78rem;
    color: #6b7280;
}

/* BÚSQUEDA */
.dtpac-search {
    position: relative;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.dtpac-search-icon {
    position: absolute;
    left: 26px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    font-size: 0.95rem;
}

.dtpac-search input {
    width: 100%;
    padding: 9px 12px 9px 34px;
    border-radius: 10px;
    border: 1.5px solid #d1d5db;
    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
}

    .dtpac-search input:focus {
        border-color: #6366f1;
        box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
    }

/* CARRUSEL DE CATEGORÍAS (circular) */
.dtpac-cats-wrap {
    position: relative;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 10px;
}

.dtpac-cats {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 4px 6px;
}

    .dtpac-cats::-webkit-scrollbar {
        display: none;
    }

.dtpac-cat-chip {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    width: 78px;
}

.dtpac-cat-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2.5px solid #e5e7eb;
    background: #f3f4f6;
    position: relative;
    transition: border-color .15s, transform .12s;
}

.dtpac-cat-chip.active .dtpac-cat-circle {
    border-color: #6366f1;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99,102,241,0.35);
}

.dtpac-cat-circle .dtpac-cat-img,
.dtpac-cat-circle .dtpac-cat-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,#667eea,#764ba2);
    color: #fff;
    font-size: 1.4rem;
}

.dtpac-cat-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #4b5563;
    text-align: center;
    max-width: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.2;
}

.dtpac-cat-chip.active .dtpac-cat-label {
    color: #4f46e5;
}

.dtpac-cat-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    color: #4b5563;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 2;
}

.dtpac-cat-arrow-left {
    left: 2px;
}

.dtpac-cat-arrow-right {
    right: 2px;
}

/* TOOLBAR */
.dtpac-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 8px;
}

.dtpac-counters {
    display: flex;
    gap: 14px;
    font-size: 0.85rem;
    color: #4b5563;
}

    .dtpac-counters strong {
        color: #1f2937;
    }

.dtpac-counter-sel strong {
    color: #16a34a;
}

.dtpac-btn-smart {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1.5px solid #6366f1;
    background: #fff;
    color: #4f46e5;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background .15s;
}

    .dtpac-btn-smart:hover {
        background: #eef2ff;
    }

    .dtpac-btn-smart.active {
        background: linear-gradient(135deg,#ef4444,#dc2626);
        color: #fff;
        border-color: #dc2626;
    }

/* GRID */
.dtpac-grid-wrap {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 12px 14px;
    -webkit-overflow-scrolling: touch;
}

.dtpac-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.dtpac-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 8px 12px;
    cursor: pointer;
    transition: border-color .15s, transform .12s, box-shadow .15s;
    overflow: hidden;
}

    .dtpac-card:hover {
        border-color: #c7d2fe;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

    .dtpac-card.selected {
        border-color: #16a34a;
        background: #f0fdf4;
    }

.dtpac-card-check {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.dtpac-card-thumb {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f4f6;
    margin-bottom: 8px;
    position: relative;
}

.dtpac-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dtpac-card-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,#667eea,#764ba2);
    color: #fff;
    font-weight: 800;
    font-size: 1.5rem;
}

.dtpac-card-body {
    width: 100%;
    text-align: center;
}

.dtpac-card-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 3px;
}

.dtpac-card-desc {
    font-size: 0.72rem;
    color: #6b7280;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.dtpac-card-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 900;
    box-shadow: 0 2px 6px rgba(22,163,74,0.4);
}

.dtpac-loadmore, .dtpac-empty {
    padding: 16px;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}

/* PAGINACIÓN */
.dtpac-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 16px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

.dtpac-pag-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1.5px solid #d1d5db;
    background: #fff;
    color: #4b5563;
    font-size: 1.1rem;
    cursor: pointer;
}

    .dtpac-pag-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.dtpac-pag-info {
    font-size: 0.85rem;
    color: #4b5563;
    font-weight: 600;
}

@media (max-width: 540px) {
    .dtpac-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .dtpac-card-thumb {
        width: 64px;
        height: 64px;
    }

    .dtpac-cat-circle {
        width: 54px;
        height: 54px;
    }

    .dtpac-cat-chip {
        width: 70px;
    }
}


/* ============================================================
   ABM productos — wrapper combinable en cada precio (sin cambios funcionales)
   ============================================================ */
.precio-combinable-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding: 8px 10px;
    background: #faf7ff;
    border: 1px dashed #c4b5fd;
    border-radius: 8px;
}

.switch-combinable {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #4f46e5;
}

    .switch-combinable input[type=checkbox] {
        width: 18px;
        height: 18px;
        cursor: pointer;
        accent-color: #6366f1;
    }

.input-combinable-desde {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #374151;
}

    .input-combinable-desde input[type=number] {
        width: 70px;
        padding: 4px 8px;
        border-radius: 6px;
        border: 1.5px solid #d1d5db;
        font-weight: 700;
    }

.btn-configurar-combinables {
    white-space: nowrap;
}

.precio-combinable-wrapper.combinable-disabled {
    opacity: 0.6;
    background: #f5f5f5;
    cursor: not-allowed;
}

    .precio-combinable-wrapper.combinable-disabled .btn-configurar-combinables {
        pointer-events: auto;
    }


/* ============================================================
   Reportes: hijos (sin cambios)
   ============================================================ */
.dtp-hijos-list {
    margin-top: 6px;
    padding: 8px 12px;
    background: rgba(99,102,241,0.06);
    border-left: 3px solid #6366f1;
    border-radius: 0 8px 8px 0;
    font-size: 0.85rem;
}

    .dtp-hijos-list .hijo-item {
        display: flex;
        justify-content: space-between;
        padding: 2px 0;
    }

        .dtp-hijos-list .hijo-item .nom {
            color: #1f2937;
        }

        .dtp-hijos-list .hijo-item .qty {
            font-weight: 700;
            color: #6366f1;
        }

.dtp-hijos-title {
    font-weight: 700;
    color: #4f46e5;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
/* ============================================================
   COMBINABLES V4 — POPUP ADMIN REDISEÑADO (.dtpac-*)
   ============================================================ */
.dtpac-popup.swal2-popup {
    max-width: 780px !important;
    width: 96vw !important;
    background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%) !important;
    color: #f1f5f9 !important;
    border-radius: 18px !important;
    padding: 10px 12px 8px !important;
    overflow: hidden !important;
}

.dtpac-popup .swal2-actions {
    margin-top: 8px !important;
}

.dtpac-root {
    display: flex;
    flex-direction: column;
    max-height: 86vh;
    color: #f1f5f9;
    text-align: left;
}

/* HEADER */
.dtpac-header {
    border-bottom: 1px solid rgba(255,255,255,.1);
    padding-bottom: 5px;
    margin-bottom: 5px;
}

.dtpac-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.dtpac-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dtpac-subtitle {
    margin: 2px 0 0 0;
    font-size: 0.75rem;
    color: rgba(255,255,255,.72);
    line-height: 1.3;
}

.dtpac-config {
    margin-top: 5px;
    padding: 5px 10px;
    background: rgba(99,102,241,.12);
    border: 1.5px solid rgba(99,102,241,.35);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dtpac-config-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #c7d2fe;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
}

.dtpac-config input[type=number] {
    width: 80px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1.5px solid rgba(255,255,255,.2);
    background: rgba(0,0,0,.3);
    color: #fff;
    font-weight: 700;
    text-align: center;
}

.dtpac-config-help {
    flex: 1 1 100%;
    font-size: 0.75rem;
    color: rgba(255,255,255,.88);
    line-height: 1.3;
}

/* TOOLBAR (buscador + contador) */
.dtpac-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

/* Toolbar search: higher-specificity override to fix icon positioning
   The light-theme .dtpac-search has padding:10px 16px which offsets
   the icon at left:12px (from dark-theme rule) outside the input area.
   Fix: reposition icon to account for parent padding. */
.dtpac-toolbar .dtpac-search {
    position: relative;
    flex: 1 1 auto;
    padding: 0;
    background: transparent;
    border-bottom: none;
}

.dtpac-toolbar .dtpac-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.95rem;
    pointer-events: none;
}

.dtpac-toolbar .dtpac-search input {
    width: 100%;
    padding: 9px 12px 9px 36px;
    border-radius: 10px;
    border: 1.5px solid #d1d5db;
    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
    background: #fff;
    color: #1f2937;
}

.dtpac-toolbar .dtpac-search input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

.dtpac-toolbar .dtpac-search input::placeholder {
    color: #9ca3af;
}

.dtpac-counter {
    flex-shrink: 0;
    font-size: 1rem;
    font-weight: 900;
    padding: 7px 16px;
    background: rgba(99,102,241,0.28);
    border: 1.5px solid rgba(99,102,241,0.5);
    border-radius: 999px;
    color: #fff;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}

/* CARRUSEL CATEGORÍAS */
.dtpac-cats-wrap {
    position: relative;
    margin-bottom: 5px;
}

.dtpac-cats {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 3px 4px 5px;
    scrollbar-width: none;
}

    .dtpac-cats::-webkit-scrollbar {
        display: none;
    }

.dtpac-cat-chip {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 58px;
    padding: 1px;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #f1f5f9;
}

.dtpac-cat-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    border: 2px solid rgba(255,255,255,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color .15s, transform .12s;
    color: #c7d2fe;
    font-size: 1.15rem;
}

    .dtpac-cat-circle img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.dtpac-cat-chip.active .dtpac-cat-circle {
    border-color: #4ade80;
    box-shadow: 0 0 0 3px rgba(34,197,94,.25);
    transform: scale(1.05);
}

.dtpac-cat-name {
    font-size: 0.7rem;
    line-height: 1.15;
    text-align: center;
    color: #cbd5e1;
    max-width: 58px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dtpac-cat-chip.active .dtpac-cat-name {
    color: #4ade80;
    font-weight: 700;
}

.dtpac-cats-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0;
    background: rgba(0,0,0,.55);
    color: #fff;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dtpac-cats-left {
    left: -4px;
}

.dtpac-cats-right {
    right: -4px;
}

.dtpac-cats-arrow:hover {
    background: rgba(0,0,0,.75);
}

/* ACCIONES */
.dtpac-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.dtpac-toggle-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1.5px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

    .dtpac-toggle-all:hover {
        background: rgba(255,255,255,.15);
    }

    .dtpac-toggle-all.on {
        background: rgba(239,68,68,.18);
        border-color: rgba(239,68,68,.45);
        color: #fecaca;
    }

.dtpac-actions-sep {
    flex: 1 1 auto;
}

.dtpac-seleccionados {
    font-size: 0.88rem;
    color: #4f46e5;
    font-weight: 800;
    background: #eef2ff;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #c7d2fe;
}

/* LISTA */
.dtpac-list {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 120px;
    max-height: 70vh;
    padding: 4px 0 8px;
    border-top: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
}

.dtpac-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    margin: 4px 4px;
    cursor: pointer;
    transition: background .12s, border-color .12s;
}

    .dtpac-row:hover {
        background: #f5f3ff;
        border-color: #c4b5fd;
    }

    .dtpac-row.selected {
        background: #f0fdf4;
        border-color: #86efac;
    }

    .dtpac-row input[type=checkbox] {
        display: none;
    }

.dtpac-row-thumb, .dtpac-row-thumb-fb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    flex-shrink: 0;
}

.dtpac-row-thumb {
    object-fit: cover;
    background: #1e293b;
}

.dtpac-row-thumb-fb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
}

.dtpac-row-body {
    flex: 1 1 auto;
    min-width: 0;
}

.dtpac-row-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dtpac-row-desc {
    font-size: 0.76rem;
    color: rgba(255,255,255,.6);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dtpac-row-check {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
}

.dtpac-check-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,.3);
    background: rgba(0,0,0,.3);
    color: transparent;
    transition: all .12s;
}

.dtpac-row.selected .dtpac-check-visual {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: #16a34a;
    color: #fff;
    box-shadow: 0 2px 8px rgba(34,197,94,.45);
}

.dtpac-loadmore {
    padding: 14px;
    text-align: center;
    color: rgba(255,255,255,.6);
    font-size: 0.85rem;
}

.dtpac-empty {
    text-align: center;
    padding: 30px 14px;
    color: rgba(255,255,255,.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

    .dtpac-empty i {
        font-size: 2rem;
        opacity: .5;
    }

/* Mobile */
@media (max-width: 540px) {
    .dtpac-popup.swal2-popup {
        padding: 8px 10px 6px !important;
    }

    .dtpac-title {
        font-size: 1rem;
    }

    .dtpac-cat-chip {
        width: 52px;
    }

    .dtpac-cat-circle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .dtpac-cat-name {
        max-width: 52px;
        font-size: 0.65rem;
    }

    .dtpac-row-thumb, .dtpac-row-thumb-fb {
        width: 38px;
        height: 38px;
    }

    .dtpac-row-name {
        font-size: 0.88rem;
    }

    .dtpac-list {
        max-height: 62vh;
    }
}
/* FIX ADMIN CATEGORÍAS COMBINABLES */
.dtpac-cats {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 4px 4px 6px !important;
    scrollbar-width: none !important;
}

    .dtpac-cats::-webkit-scrollbar {
        display: none !important;
    }

.dtpac-cat {
    flex: 0 0 62px !important;
    width: 62px !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 3px !important;
}

.dtpac-cat-img {
    width: 46px !important;
    height: 46px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    background: #eef2ff !important;
    border: 2px solid #dbeafe !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 6px rgba(15,23,42,.08) !important;
}

.dtpac-cat.active .dtpac-cat-img {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 4px rgba(34,197,94,.18), 0 8px 18px rgba(15,23,42,.16) !important;
}

.dtpac-cat-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.dtpac-cat-fallback {
    width: 100% !important;
    height: 100% !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg,#6366f1,#8b5cf6) !important;
    color: #fff !important;
    font-size: 1.25rem !important;
}

.dtpac-cat-name {
    width: 62px !important;
    max-width: 62px !important;
    color: #334155 !important;
    font-size: .72rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    text-shadow: none !important;
}

.dtpac-cat.active .dtpac-cat-name {
    color: #16a34a !important;
}

.dtpac-list {
    background: #f8fafc;
}

.dtpac-row-name {
    color: #111827 !important;
}

.dtpac-row-desc {
    color: #64748b !important;
}

.dtpac-toggle-all,
.dtpac-seleccionados {
    color: #111827 !important;
}

.dtpac-empty {
    color: #475569 !important;
}
.dtpac-cat-special {
    background: linear-gradient(135deg,#22c55e,#16a34a) !important;
    color: #fff !important;
    font-size: 1.35rem !important;
}
/* ============================================================
   V4.1 — Banner de reglas en el popup ADMIN
   ============================================================ */
.dtpac-rule-banner {
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dtpac-rule-line {
    font-size: 0.82rem;
    color: #d1fae5;
    line-height: 1.35;
}
.dtpac-rule-line b {
    font-weight: 900;
    color: #4ade80;
}

/* ============================================================
   V4.1 — CONTENEDOR PROPIO DEL POPUP CLIENTE (sin SweetAlert)
   ============================================================ */
.dtpc-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: rgba(2, 6, 23, 0.62);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    animation: dtpcOverlayIn 0.16s ease both;
    overscroll-behavior: contain;
}
@keyframes dtpcOverlayIn { from { opacity: 0; } to { opacity: 1; } }

.dtpc-modal {
    width: 95vw;
    max-width: 760px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    animation: dtpcModalIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;
    /* el .dtpc-root interno controla la altura (90vh) */
}
@keyframes dtpcModalIn {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Estado de carga / mensajes dentro del modal propio */
.dtpc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 30px;
}
.dtpc-spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    animation: dtpcSpin 0.8s linear infinite;
}
@keyframes dtpcSpin { to { transform: rotate(360deg); } }

.dtpc-msgbox {
    padding: 26px 22px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}
.dtpc-msgbox-icon { font-size: 2.2rem; line-height: 1; }
.dtpc-msgbox-text { font-size: 0.98rem; line-height: 1.45; color: #fff; }
.dtpc-msgbox-ok {
    appearance: none;
    border: none;
    cursor: pointer;
    padding: 11px 26px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.95rem;
    color: #1e293b;
    background: #fff;
    transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.dtpc-msgbox-ok:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.3); }

/* En pantallas chicas el modal usa casi todo el alto disponible */
@media (max-width: 480px) {
    .dtpc-overlay { padding: 0; align-items: stretch; }
    .dtpc-modal {
        width: 100vw;
        max-width: 100vw;
        border-radius: 0;
        height: 100dvh;
    }
    .dtpc-modal .dtpc-root {
        height: 100dvh;
        max-height: 100dvh;
    }
}

/* ============================================================
   V4.2 — Stock por ProductoPrecio: estados visuales
   ============================================================ */
/* Cliente: item sin stock */
.dtpc-item.dtpc-sin-stock { opacity: 0.62; }
.dtpc-item.dtpc-sin-stock .dtpc-inc { opacity: 0.4; cursor: not-allowed; }
.dtpc-badge-sinstock {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    color: #fff;
    background: #ef4444;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.3px;
}

/* Cliente: toast efímero de feedback (stock) */
.dtpc-toast {
    position: absolute;
    left: 50%;
    bottom: 92px;
    transform: translateX(-50%) translateY(10px);
    background: rgba(15, 23, 42, 0.96);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 12px;
    max-width: 86%;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 20;
}
.dtpc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 480px) { .dtpc-toast { bottom: 104px; } }

/* Admin: unidad y badges de stock por fila */
.dtpac-row-unidad { color: #64748b; font-weight: 600; font-size: 0.85em; }
.dtpac-row-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}
.dtpac-row-badge.stock { background: #dcfce7; color: #166534; }
.dtpac-row-badge.sinstock { background: #fee2e2; color: #b91c1c; }
.dtpac-row.dtpac-row-sinstock { opacity: 0.8; }

/* ============================================================
   V4.2 — Banner admin: chips numéricos + frase
   ============================================================ */
.dtpac-rule-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}
.dtpac-chip {
    flex: 1 1 0;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 10px;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    text-align: center;
}
.dtpac-chip-amber { background: #fffbeb; border-color: #fcd34d; }
.dtpac-chip-muted { background: #f1f5f9; border-color: #cbd5e1; }
.dtpac-chip-num {
    font-size: 1.3rem;
    font-weight: 900;
    line-height: 1;
    color: #065f46;
}
.dtpac-chip-amber .dtpac-chip-num { color: #92400e; }
.dtpac-chip-muted .dtpac-chip-num { color: #475569; }
.dtpac-chip-lbl {
    margin-top: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.dtpac-rule-frase {
    font-size: 0.84rem;
    line-height: 1.4;
    color: #1e293b;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 6px 10px;
}
.dtpac-rule-frase b { color: #065f46; font-weight: 900; }

/* ============================================================
   POPUP PEDIDO ENVIADO — DISEÑO PREMIUM (Punto 2)
   ============================================================ */

/* Ring de animación sobre el ícono de éxito */
.dtpc-success-ring {
    position: absolute;
    top: -10px; left: -10px; right: -10px; bottom: -10px;
    border-radius: 50%;
    border: 2.5px solid rgba(34,197,94,0.5);
    animation: dtpcRingPulse 2.4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes dtpcRingPulse {
    0%,100% { transform: scale(1); opacity: 0.65; }
    50%      { transform: scale(1.22); opacity: 0; }
}

/* Card del código de pedido */
.dtpc-code-card {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 12px 14px;
    margin: 0 0 10px;
    text-align: left;
}
.dtpc-code-label {
    font-size: 0.68rem;
    font-weight: 800;
    color: rgba(255,255,255,0.72);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 7px;
}
.dtpc-code-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.dtpc-code-value {
    font-size: 1.85rem;
    font-weight: 900;
    font-family: 'SF Mono','Fira Code','Courier New',monospace;
    letter-spacing: 4px;
    color: #fff;
    word-break: break-all;
    line-height: 1;
}
.dtpc-code-copy {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.95);
    color: #4f46e5;
    border: none;
    border-radius: 9px;
    padding: 8px 11px;
    font-weight: 800;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background .15s, transform .1s;
    white-space: nowrap;
}
.dtpc-code-copy:hover,
.dtpc-code-copy:active { background: #fff; transform: translateY(-1px); }

/* Bloque del mensaje preparado */
.dtpc-msg-block {
    background: rgba(0,0,0,0.28);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 9px 12px;
    margin-bottom: 10px;
    text-align: left;
}
.dtpc-msg-label {
    font-size: 0.67rem;
    font-weight: 800;
    color: rgba(255,255,255,0.72);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 5px;
}
.dtpc-msg-content {
    font-family: 'SF Mono','Fira Code','Courier New',monospace;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.85);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 68px;
    overflow-y: auto;
    line-height: 1.45;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

/* Firma digital sutil */
.dtpc-powered {
    margin-top: 14px;
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(255,255,255,0.18);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    user-select: none;
}

/* ============================================================
   BOTÓN WHATSAPP — ANIMACIÓN LÍQUIDA (Punto 3)
   ============================================================ */
.dtpc-wa-liquid {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 0%;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.04) 0%,
        rgba(255,255,255,0.24) 50%,
        rgba(255,255,255,0.04) 100%
    );
    border-radius: 14px;
    overflow: hidden;
    pointer-events: none;
}
.dtpc-wa-liquid::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -160%;
    width: 50%;
    height: 160%;
    background: rgba(255,255,255,0.22);
    transform: skewX(-18deg);
    will-change: transform;
    animation: dtpcLiquidWave 1.1s ease-in-out infinite;
}
.dtpc-wa-liquid::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.12) 0%,
        transparent 55%,
        rgba(0,0,0,0.06) 100%
    );
}
/* El brillo barre el botón en bucle infinito (1,1 s).
   ANTES animaba `left`, que dispara LAYOUT en cada frame — más caro
   todavía que animar una sombra. Mismo recorrido con `transform`, que se
   compone: el elemento arranca en `left:-160%` y se traslada 380 % del
   ancho del PADRE; como mide 50 % de ese ancho, son 760 % de sí mismo.
   El `skewX(-18deg)` se conserva y no altera el desplazamiento
   horizontal. */
@keyframes dtpcLiquidWave {
    0%   { transform: skewX(-18deg) translateX(0); }
    100% { transform: skewX(-18deg) translateX(760%); }
}

/* ============================================================
   ADMIN — fixes de contraste en dark mode (Punto 5)
   ============================================================ */
/* La rule-frase y rule-line en el admin oscuro */
.dtpac-root .dtpac-rule-frase {
    color: #d1fae5;
    background: rgba(34,197,94,0.08);
    border-color: rgba(34,197,94,0.25);
}
.dtpac-root .dtpac-rule-frase b { color: #4ade80; }


/* ════════════════════════════════════════════════════════════
   POPUP CLIENTE V5 — refactor UX 2026 (.dtpc-*)
   Diseño "app premium": header fijo + pestañas + footer fijo.
   Este bloque va al final del archivo y, por orden de cascada,
   prevalece sobre las reglas .dtpc-* heredadas más arriba.
   ════════════════════════════════════════════════════════════ */

.dtpc-root {
    display: flex;
    flex-direction: column;
    height: 88vh;
    max-height: 88vh;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    -webkit-text-size-adjust: 100%;
}

/* ░░ HEADER ░░ */
.dtpc-header {
    position: relative;
    flex: 0 0 auto;
    z-index: 5;
    background: linear-gradient(180deg, rgba(0,0,0,0.34), rgba(0,0,0,0.14));
    padding: 14px 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.dtpc-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.dtpc-title {
    font-size: 1.18rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    letter-spacing: 0.2px;
}

.dtpc-close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,0.14);
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, transform .1s;
    -webkit-tap-highlight-color: transparent;
}
.dtpc-close:hover { background: rgba(255,255,255,0.24); }
.dtpc-close:active { transform: scale(0.92); }

/* Instrucciones */
.dtpc-rules {
    margin-top: 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    padding: 9px 11px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.dtpc-rule {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.84rem;
    line-height: 1.32;
}
.dtpc-rule-ic { flex: 0 0 auto; font-size: 0.98rem; line-height: 1.25; }
.dtpc-rule-tx { flex: 1 1 auto; }
.dtpc-rule-tx strong { color: #fde68a; font-weight: 800; }

/* Progreso moderno */
.dtpc-prog { margin-top: 11px; }
.dtpc-prog-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.dtpc-prog-count {
    font-size: 1.02rem;
    font-weight: 900;
    letter-spacing: 0.4px;
    color: #fbbf24;
    flex: 0 0 auto;
}
.dtpc-prog.is-ok .dtpc-prog-count { color: #4ade80; }
.dtpc-prog.is-max .dtpc-prog-count { color: #fca5a5; }
.dtpc-prog-state {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: right;
    color: rgba(255,255,255,0.92);
    flex: 1 1 auto;
    min-width: 0;
}
.dtpc-prog-track {
    height: 9px;
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.25);
}
.dtpc-prog-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    transition: width .35s cubic-bezier(.4,0,.2,1), background .3s ease;
}
.dtpc-prog.is-ok .dtpc-prog-fill { background: linear-gradient(90deg, #22c55e, #16a34a); }
.dtpc-prog.is-max .dtpc-prog-fill { background: linear-gradient(90deg, #ef4444, #dc2626); }

/* Pestañas */
.dtpc-tabs {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    padding: 4px;
    background: rgba(0,0,0,0.28);
    border-radius: 12px;
    position: relative;
    bottom: -1px;
}
.dtpc-tab {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 8px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: rgba(255,255,255,0.78);
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: background .18s, color .18s;
    -webkit-tap-highlight-color: transparent;
}
.dtpc-tab.is-active {
    background: rgba(255,255,255,0.96);
    color: #1e3c72;
    box-shadow: 0 2px 8px rgba(0,0,0,0.22);
}
.dtpc-tab-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.22);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.dtpc-tab.is-active .dtpc-tab-badge { background: #1e3c72; color: #fff; }
.dtpc-tab.is-active .dtpc-tab-badge-sel { background: #16a34a; }
.dtpc-tab-badge-sel { background: rgba(34,197,94,0.5); }

/* ░░ PANELES ░░ */
.dtpc-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.dtpc-panel.is-active { display: flex; }

/* Buscador fijo */
.dtpc-search {
    position: relative;
    flex: 0 0 auto;
    padding: 10px 14px;
    background: rgba(0,0,0,0.18);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
}
.dtpc-search-ic {
    position: absolute;
    left: 24px;
    font-size: 0.9rem;
    opacity: 0.6;
    pointer-events: none;
}
.dtpc-search input {
    width: 100%;
    padding: 10px 34px 10px 34px;
    border-radius: 10px;
    border: 1.5px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.28);
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
}
.dtpc-search input::placeholder { color: rgba(255,255,255,0.5); }
.dtpc-search input:focus { border-color: rgba(255,255,255,0.5); }
.dtpc-search-clear {
    position: absolute;
    right: 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
}

/* Lista de productos */
.dtpc-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 12px 18px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.dtpc-cat-group { margin-bottom: 14px; }
.dtpc-cat-header {
    position: sticky;
    top: -2px;
    z-index: 2;
    background: linear-gradient(135deg, rgba(79,70,229,0.96), rgba(99,102,241,0.96));
    color: #fff;
    padding: 7px 12px;
    border-radius: 9px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 0.82rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.dtpc-cat-name { text-transform: uppercase; letter-spacing: 0.4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtpc-cat-count {
    flex: 0 0 auto;
    background: rgba(255,255,255,0.25);
    border-radius: 999px;
    padding: 1px 9px;
    font-size: 0.72rem;
    margin-left: 8px;
}
.dtpc-cat-items { display: flex; flex-direction: column; gap: 8px; }

/* Item */
.dtpc-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 10px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 13px;
    transition: background .15s, border-color .15s;
}
.dtpc-item.origen { border-color: rgba(34,197,94,0.45); background: rgba(34,197,94,0.1); }
.dtpc-item.dtpc-active {
    background: rgba(34,197,94,0.17);
    border-color: rgba(34,197,94,0.55);
    box-shadow: 0 0 0 1px rgba(34,197,94,0.22) inset;
}
.dtpc-item.dtpc-active .dtpc-qty { background: rgba(34,197,94,0.25); border-color: rgba(34,197,94,0.5); color: #fff; }

.dtpc-thumb-wrap { position: relative; width: 50px; height: 50px; flex: 0 0 auto; }
img.dtpc-thumb {
    width: 50px; height: 50px; border-radius: 11px; object-fit: cover;
    background: #faf6fb; display: block;
}
.dtpc-thumb-fallback {
    width: 50px; height: 50px; border-radius: 11px;
    background: linear-gradient(135deg,#667eea,#764ba2);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 1.05rem;
}
.dtpc-info { flex: 1 1 auto; min-width: 0; }
.dtpc-name { font-weight: 700; font-size: 0.94rem; line-height: 1.2; overflow-wrap: anywhere; }
.dtpc-meta {
    font-size: 0.74rem; opacity: 0.86; margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.dtpc-meta-principal { color: #4ade80; font-weight: 800; }

/* Stepper */
.dtpc-controls { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.dtpc-btn {
    width: 34px; height: 34px; border-radius: 9px;
    border: 1.5px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.12);
    color: #fff; font-weight: 800; font-size: 1.15rem;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
    transition: background .12s, transform .08s;
}
.dtpc-btn:hover:not(:disabled) { background: rgba(255,255,255,0.2); }
.dtpc-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.dtpc-btn:active:not(:disabled) { transform: scale(0.9); }
.dtpc-inc { background: rgba(34,197,94,0.28); border-color: rgba(34,197,94,0.45); }
.dtpc-inc:hover:not(:disabled) { background: rgba(34,197,94,0.42); }
.dtpc-qty {
    width: 42px; text-align: center; font-weight: 800; font-size: 0.95rem;
    padding: 7px 2px; border-radius: 9px;
    border: 1.5px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.3); color: #fff;
    -moz-appearance: textfield;
}
.dtpc-qty::-webkit-inner-spin-button, .dtpc-qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.dtpc-sin-stock { opacity: 0.6; }
.dtpc-sin-stock .dtpc-inc { opacity: 0.4; cursor: not-allowed; }
.dtpc-badge-sinstock {
    display: inline-block; font-size: 0.68rem; font-weight: 800; color: #fff;
    background: #ef4444; padding: 2px 8px; border-radius: 999px;
}

.dtpc-loadmore { padding: 14px; text-align: center; font-size: 0.85rem; color: rgba(255,255,255,0.7); }

/* ░░ PANEL SELECCIONADOS ░░ */
.dtpc-panel-sel { overflow: hidden; }
.dtpc-sel-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 12px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.dtpc-selrow {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    background: rgba(34,197,94,0.13);
    border: 1px solid rgba(34,197,94,0.32);
    border-radius: 13px;
}
.dtpc-selrow-thumb { width: 44px; height: 44px; }
.dtpc-selrow-thumb img.dtpc-thumb, .dtpc-selrow-thumb .dtpc-thumb-fallback { width: 44px; height: 44px; }
.dtpc-selrow-info { flex: 1 1 auto; min-width: 0; }
.dtpc-selrow-nom {
    font-weight: 700; font-size: 0.92rem; line-height: 1.2;
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.dtpc-selrow-warn {
    margin-top: 3px; font-size: 0.7rem; color: #fde68a;
    background: rgba(251,191,36,0.18); padding: 1px 7px; border-radius: 999px;
    display: inline-block;
}
.dtpc-selrow-remove {
    flex: 0 0 auto;
    width: 34px; height: 34px; border-radius: 9px; border: 0;
    background: rgba(239,68,68,0.85); color: #fff; font-size: 0.95rem;
    cursor: pointer; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.dtpc-selrow-remove:active { transform: scale(0.92); }

.dtpc-sel-empty {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px 24px;
    text-align: center;
    color: rgba(255,255,255,0.78);
}
.dtpc-sel-empty-ic { font-size: 2.6rem; opacity: 0.8; }
.dtpc-sel-empty-tx { font-size: 0.95rem; line-height: 1.4; max-width: 280px; }
.dtpc-sel-empty-btn {
    margin-top: 4px;
    padding: 10px 22px; border-radius: 999px; border: 0;
    background: rgba(255,255,255,0.95); color: #1e3c72;
    font-weight: 800; font-size: 0.88rem; cursor: pointer;
}

/* ░░ FOOTER ░░ */
.dtpc-footer {
    flex: 0 0 auto;
    z-index: 5;
    background: linear-gradient(0deg, rgba(0,0,0,0.5), rgba(0,0,0,0.3));
    padding: 11px 14px calc(11px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255,255,255,0.12);
}
.dtpc-warning {
    background: rgba(251,191,36,0.16);
    border: 1px solid rgba(251,191,36,0.4);
    color: #fde68a;
    padding: 7px 11px;
    border-radius: 10px;
    font-size: 0.82rem;
    margin-bottom: 9px;
}
.dtpc-foot-row { margin-bottom: 9px; }
.dtpc-subtotal {
    display: flex; justify-content: space-between; align-items: baseline;
    font-weight: 800;
}
.dtpc-subtotal-lbl { font-size: 0.88rem; opacity: 0.9; }
.dtpc-subtotal-val { font-size: 1.25rem; color: #fff; letter-spacing: 0.3px; }
.dtpc-actions { display: flex; gap: 9px; }
.dtpc-actions button { flex: 1 1 0; padding: 13px; border-radius: 12px; border: 0; font-weight: 800; font-size: 0.96rem; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dtpc-cancel { flex: 0 0 38% !important; background: rgba(255,255,255,0.16); color: #fff; }
.dtpc-cancel:active { transform: scale(0.98); }
.dtpc-confirm { background: linear-gradient(135deg,#22c55e,#16a34a); color: #fff; box-shadow: 0 6px 16px rgba(34,197,94,0.4); }
.dtpc-confirm:active:not(:disabled) { transform: scale(0.98); }
.dtpc-confirm:disabled { background: #6b7280; box-shadow: none; cursor: not-allowed; opacity: 0.65; }

/* ░░ MOBILE ░░ */
@media (max-width: 480px) {
    .dtpc-root { height: 100dvh; max-height: 100dvh; }
    .dtpc-title { font-size: 1.06rem; }
    .dtpc-rule { font-size: 0.8rem; }
    .dtpc-prog-count { font-size: 0.96rem; }
    .dtpc-prog-state { font-size: 0.75rem; }
    .dtpc-thumb-wrap, img.dtpc-thumb, .dtpc-thumb-fallback { width: 46px; height: 46px; }
    .dtpc-name { font-size: 0.9rem; }
    .dtpc-btn { width: 36px; height: 36px; }
    .dtpc-tab { font-size: 0.85rem; padding: 9px 6px; }
}
@media (max-width: 480px) {
    .dtpc-selrow-thumb, .dtpc-selrow-thumb img.dtpc-thumb, .dtpc-selrow-thumb .dtpc-thumb-fallback { width: 42px; height: 42px; }
}

/* Respeta usuarios con motion reducido */
@media (prefers-reduced-motion: reduce) {
    .dtpc-prog-fill { transition: none; }
    .dtpc-btn:active, .dtpc-confirm:active, .dtpc-cancel:active { transform: none; }
}


/* ════════════════════════════════════════════════════════════
   ADMIN — Switch "Es Combo" (toggle moderno prendido/apagado)
   ════════════════════════════════════════════════════════════ */
.es-combo-wrapper {
    margin: 6px auto 2px;
    max-width: 560px;
    padding: 10px 12px;
    background: #fff7ed;
    border: 1px dashed #fdba74;
    border-radius: 10px;
}
.switch-combo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin: 0;
}
.switch-combo-ui {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 26px;
}
.switch-combo-ui input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-combo-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background .2s ease;
}
.switch-combo-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: transform .2s ease;
}
.switch-combo-ui input:checked + .switch-combo-slider { background: linear-gradient(135deg,#f97316,#ea580c); }
.switch-combo-ui input:checked + .switch-combo-slider::before { transform: translateX(20px); }
.switch-combo-ui input:focus-visible + .switch-combo-slider { box-shadow: 0 0 0 3px rgba(249,115,22,0.35); }
.switch-combo-txt { display: flex; flex-direction: column; gap: 1px; text-align: left; line-height: 1.25; }
.switch-combo-txt b { color: #c2410c; font-size: 0.92rem; }
.switch-combo-txt small { color: #7c2d12; font-size: 0.74rem; opacity: 0.9; }


/* ════════════════════════════════════════════════════════════
   POPUP CLIENTE V5 — PULIDO PREMIUM (micro-UX)
   Reglas con color · progreso con vida · badge de estado focal.
   Todas las animaciones en loop usan SÓLO transform/opacity
   (compositor, sin repintados) → costo de CPU/GPU casi nulo.
   ════════════════════════════════════════════════════════════ */

/* ---- Instrucciones: color por regla + números resaltados ---- */
.dtpc-rule { padding-left: 2px; transition: transform .12s ease; }
.dtpc-num {
    display: inline-block;
    color: #fff;
    background: rgba(255,255,255,0.16);
    padding: 0 6px;
    border-radius: 6px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}
.dtpc-rule-min  .dtpc-rule-ic { filter: drop-shadow(0 0 4px rgba(96,165,250,.5)); }
.dtpc-rule-min  .dtpc-num    { background: rgba(96,165,250,0.30); color: #bfdbfe; }
.dtpc-rule-max  .dtpc-num    { background: rgba(248,113,113,0.28); color: #fecaca; }
.dtpc-rule-origen .dtpc-num  { background: rgba(251,191,36,0.30); color: #fde68a; }
.dtpc-rule-mix  .dtpc-num    { background: rgba(167,139,250,0.30); color: #ddd6fe; }
.dtpc-rule-precio .dtpc-num  { background: rgba(52,211,153,0.28); color: #bbf7d0; }

/* ---- Progreso premium ---- */
.dtpc-prog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.dtpc-prog-count { font-size: 1.08rem; font-weight: 900; letter-spacing: .4px; font-variant-numeric: tabular-nums; }
.dtpc-prog.is-pending .dtpc-prog-count { color: #fbbf24; }
.dtpc-prog.is-ok .dtpc-prog-count  { color: #4ade80; }
.dtpc-prog.is-max .dtpc-prog-count { color: #fca5a5; }

.dtpc-prog-origen {
    font-size: .76rem; font-weight: 800; padding: 3px 10px; border-radius: 999px;
    background: rgba(251,191,36,0.18); border: 1px solid rgba(251,191,36,0.4); color: #fde68a;
    white-space: nowrap;
}
.dtpc-prog-origen.ok { background: rgba(16,185,129,0.18); border-color: rgba(16,185,129,0.4); color: #bbf7d0; }
.dtpc-prog-origen b { color: #fff; font-variant-numeric: tabular-nums; }

.dtpc-prog-track {
    height: 10px; background: rgba(255,255,255,0.14); border-radius: 999px;
    overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.32);
    transform-origin: center;
}
.dtpc-prog-fill {
    position: relative; height: 100%; width: 0%; border-radius: 999px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    transition: width .42s cubic-bezier(.2,.8,.2,1), background-color .35s ease, box-shadow .35s ease;
    overflow: hidden;
    will-change: width;
}
/* Brillo que recorre la barra (sólo transform = compositor) */
.dtpc-prog-fill::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 38%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
    transform: translateX(-140%);
    animation: dtpcShine 2.8s ease-in-out infinite;
    pointer-events: none;
}
@keyframes dtpcShine { 0% { transform: translateX(-140%); } 55%, 100% { transform: translateX(340%); } }

.dtpc-prog.is-pending .dtpc-prog-fill { background: linear-gradient(90deg, #fcd34d, #f59e0b); }
.dtpc-prog.is-ok .dtpc-prog-fill {
    background: linear-gradient(90deg, #34d399, #10b981);
    box-shadow: 0 0 12px rgba(16,185,129,0.55);
}
.dtpc-prog.is-max .dtpc-prog-fill {
    background: linear-gradient(90deg, #fb7185, #ef4444);
    box-shadow: 0 0 12px rgba(239,68,68,0.55);
}
/* Al llegar al máximo, el brillo se detiene (sensación de "tope") */
.dtpc-prog.is-max .dtpc-prog-fill::after { animation: none; opacity: 0; }

/* Celebración única al completar el mínimo (una sola pasada) */
.dtpc-prog.dtpc-celebrate .dtpc-prog-track { animation: dtpcCelebratePop .85s cubic-bezier(.2,1.5,.4,1); }
@keyframes dtpcCelebratePop {
    0% { transform: scaleY(1); }
    30% { transform: scaleY(1.7); }
    100% { transform: scaleY(1); }
}
.dtpc-prog.dtpc-celebrate .dtpc-prog-fill::after {
    animation: dtpcShineOnce .7s ease-out;
}
@keyframes dtpcShineOnce { 0% { transform: translateX(-140%); } 100% { transform: translateX(340%); } }

/* ---- Badge de estado: el punto focal ---- */
.dtpc-state {
    margin-top: 10px;
    display: flex; align-items: center; gap: 9px;
    padding: 9px 13px; border-radius: 12px;
    font-weight: 800; font-size: .95rem; line-height: 1.25;
    border: 1px solid transparent;
    background: rgba(251,191,36,0.14); color: #fde68a;
}
.dtpc-state-ic { font-size: 1.18rem; flex: 0 0 auto; line-height: 1; }
.dtpc-state-tx { flex: 1 1 auto; min-width: 0; }
.dtpc-state[data-kind="pending"] { background: rgba(251,191,36,0.15); border-color: rgba(251,191,36,0.4); color: #fde68a; }
.dtpc-state[data-kind="ok"] {
    background: linear-gradient(135deg, rgba(16,185,129,0.22), rgba(5,150,105,0.16));
    border-color: rgba(16,185,129,0.5); color: #d1fae5;
}
.dtpc-state[data-kind="max"] {
    background: linear-gradient(135deg, rgba(239,68,68,0.22), rgba(220,38,38,0.16));
    border-color: rgba(239,68,68,0.5); color: #fee2e2;
}
.dtpc-state[data-kind="ok"] .dtpc-state-ic { animation: dtpcIcoPulse 1.8s ease-in-out infinite; }
@keyframes dtpcIcoPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.16); } }
.dtpc-state-in { animation: dtpcStateIn .34s ease both; }
@keyframes dtpcStateIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Stepper: micro-rebote del contador ---- */
.dtpc-qty.dtpc-pop { animation: dtpcQtyPop .26s ease; }
@keyframes dtpcQtyPop { 0% { transform: scale(1); } 42% { transform: scale(1.24); } 100% { transform: scale(1); } }
.dtpc-inc:active:not(:disabled) { transform: scale(0.88); }
.dtpc-dec:active:not(:disabled) { transform: scale(0.88); }

/* ---- Items: hover un poco más vivo ---- */
.dtpc-item { transition: background .15s, border-color .15s, transform .12s, box-shadow .15s; }
.dtpc-item:hover { transform: translateY(-1px); }
.dtpc-item.dtpc-active { box-shadow: 0 0 0 1px rgba(34,197,94,0.25) inset, 0 4px 14px rgba(16,185,129,0.18); }

/* ---- Menos aire entre buscador y primera categoría ---- */
.dtpc-search { padding-bottom: 7px; }
.dtpc-list { padding-top: 5px; }
.dtpc-cat-group:first-child { margin-top: 0; }

/* ---- Mientras el popup está abierto, ocultar FABs flotantes (asistente, etc.)
        para que no tapen el footer en mobile. Se restaura al cerrar. ---- */
body.dtpc-modal-open .dtpa-fab,
body.dtpc-modal-open .dtpt-fab { opacity: 0; pointer-events: none; transition: opacity .15s ease; }

/* ---- Respeto a "reduce motion": apaga TODO lo animado ---- */
@media (prefers-reduced-motion: reduce) {
    .dtpc-prog-fill::after { animation: none; opacity: 0; }
    .dtpc-prog.dtpc-celebrate .dtpc-prog-track { animation: none; }
    .dtpc-state-in, .dtpc-state[data-kind="ok"] .dtpc-state-ic,
    .dtpc-qty.dtpc-pop { animation: none; }
    .dtpc-item:hover { transform: none; }
}
