/* Punto de Venta (POS) */
.pos-session-bar { margin-bottom: 18px; }
.pos-session {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
}
.pos-session.open { border-top: 3px solid #16a34a; }
.pos-session.closed { border-top: 3px solid #94a3b8; }
.pos-session > div:first-child {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    font-size: 13.5px;
    color: #475569;
}
.pos-session strong { color: #0f172a; display: inline-flex; align-items: center; gap: 6px; }
.pos-session-actions { display: flex; gap: 8px; }

.pos-layout {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 18px;
    align-items: start;
}
.pos-search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    align-items: center;
}
.pos-search { flex: 1; min-width: 180px; }
.pos-search input { width: 100%; min-width: 0; }
.pos-section-title {
    font-size: 14px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0 0 10px;
}

.pos-unpaid-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 65vh;
    overflow: auto;
}
.pos-unpaid-card {
    text-align: left;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: .2s;
}
.pos-unpaid-card:hover { border-color: #667eea; }
.pos-unpaid-card.active {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, .15);
}
.pos-unpaid-top {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 4px;
}
.pos-channel {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    background: #ede9fe;
    color: #6d28d9;
    padding: 2px 8px;
    border-radius: 6px;
}
.pos-unpaid-meta { font-size: 12.5px; color: #64748b; }
.pos-unpaid-total { font-weight: 800; color: #0f172a; margin-top: 4px; }

.pos-empty {
    text-align: center;
    padding: 40px 16px;
    color: #94a3b8;
}
.pos-empty i { margin-bottom: 10px; display: block; }

.pos-charge-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px;
    position: sticky;
    top: 12px;
}
.pos-charge-head {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}
.pos-charge-meta { font-size: 13px; color: #64748b; margin-bottom: 12px; }
.pos-items { border-top: 1px dashed #e2e8f0; padding-top: 10px; margin-bottom: 12px; }
.pos-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    font-size: 13.5px;
}
.pos-item small { display: block; color: #94a3b8; }
.pos-total {
    font-size: 1.25rem;
    margin: 10px 0 14px;
}
.pos-total strong { color: #16a34a; font-size: 1.45rem; }
.pos-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}
.pos-method-btn {
    border: 2px solid #e2e8f0;
    background: #fff;
    border-radius: 12px;
    padding: 12px 8px;
    font-weight: 700;
    cursor: pointer;
    color: #334155;
}
.pos-method-btn.active {
    border-color: #667eea;
    background: rgba(102, 126, 234, .08);
    color: #4338ca;
}
.pos-cash-fields { margin-bottom: 12px; }
.pos-cash-fields label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
}
.pos-cash-fields input { margin-top: 6px; }
.pos-change { margin-top: 8px; font-size: 14px; color: #475569; }
.pos-change strong { color: #0f172a; font-size: 1.1rem; }
.pos-paid-badge {
    background: #dcfce7;
    color: #166534;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    text-align: center;
}
.pos-warn { color: #b45309; font-size: 13px; margin-top: 8px; text-align: center; }
.pos-print-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 10px;
    cursor: pointer;
}
.pos-print-check input { width: 16px; height: 16px; accent-color: #667eea; }
.btn-block { width: 100%; }

/* ===== Pestañas Cobrar / Nueva venta ===== */
.pos-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.pos-tab {
    flex: 1;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    font-weight: 700;
    font-size: 14px;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: .2s;
}
.pos-tab:hover { border-color: #c7d2fe; }
.pos-tab.active {
    border-color: #667eea;
    background: rgba(102, 126, 234, .08);
    color: #4338ca;
}

/* ===== Catálogo de productos (nueva venta) ===== */
.pos-cat-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 10px;
}
.pos-cat {
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
}
.pos-cat.active { border-color: #667eea; background: #667eea; color: #fff; }

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    max-height: 62vh;
    overflow: auto;
}
.pos-prod-card {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 14px;
    padding: 8px;
    cursor: pointer;
    text-align: center;
    transition: .15s;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}
.pos-prod-card:hover { border-color: #667eea; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(15,23,42,.08); }
.pos-prod-card:active { transform: scale(.97); }
.pos-prod-img {
    width: 100%;
    height: 90px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    background-color: #f1f5f9;
}
.pos-prod-noimg { display: grid; place-items: center; color: #cbd5e1; font-size: 24px; }
.pos-prod-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(15, 23, 42, .78);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 11px;
}
.pos-prod-name { font-size: 12.5px; font-weight: 700; color: #1e293b; line-height: 1.25; }
.pos-prod-price { font-size: 13px; font-weight: 800; color: #16a34a; }
.pos-cart-opts {
    display: block;
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.3;
    margin: 2px 0;
}

/* Modal de variantes POS */
.pos-opt-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: none;
    align-items: flex-end;
    justify-content: center;
}
.pos-opt-modal.active { display: flex; }
.pos-opt-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .5);
}
.pos-opt-sheet {
    position: relative;
    width: min(480px, 100%);
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    border-radius: 20px 20px 0 0;
    z-index: 1;
}
.pos-opt-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    cursor: pointer;
    color: #334155;
}
.pos-opt-hero {
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: #e2e8f0;
}
.pos-opt-body { padding: 16px 18px 24px; }
.pos-opt-body h3 { margin: 0 0 4px; font-size: 1.2rem; color: #0f172a; }
.pos-opt-base { margin: 0 0 14px; color: #64748b; font-size: 14px; font-weight: 600; }
.pos-opt-group {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}
.pos-opt-group-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    align-items: baseline;
}
.pos-opt-group-head strong { color: #1e293b; font-size: 14px; }
.pos-opt-group-head span { font-size: 11.5px; color: #94a3b8; font-weight: 700; }
.pos-opt-list { display: flex; flex-direction: column; gap: 6px; }
.pos-opt-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
}
.pos-opt-item:has(input:checked) {
    background: rgba(102, 126, 234, .1);
    outline: 1.5px solid #667eea;
}
.pos-opt-item input { width: 16px; height: 16px; accent-color: #667eea; }
.pos-opt-qty {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin: 8px 0 14px;
}
.pos-opt-qty button {
    width: 36px; height: 36px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
}
.pos-opt-qty span { font-size: 1.15rem; font-weight: 800; min-width: 24px; text-align: center; }
@media (min-width: 768px) {
    .pos-opt-modal { align-items: center; }
    .pos-opt-sheet { border-radius: 20px; }
}

/* ===== Carrito de venta ===== */
.pos-cart-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px;
    position: sticky;
    top: 12px;
}
.pos-cart-clear {
    margin-left: auto;
    border: none;
    background: none;
    color: #ef4444;
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
}
.pos-cart-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px dashed #e2e8f0;
    padding-top: 10px;
    margin: 10px 0;
    max-height: 40vh;
    overflow: auto;
}
.pos-cart-item {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 8px;
    align-items: center;
}
.pos-cart-info { min-width: 0; }
.pos-cart-name { display: block; font-weight: 700; font-size: 13.5px; color: #1e293b; }
.pos-cart-line { font-size: 11.5px; color: #94a3b8; }
.pos-cart-qty {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.pos-cart-qty button {
    width: 26px; height: 26px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
    color: #334155;
}
.pos-cart-qty span { min-width: 18px; text-align: center; font-weight: 800; }
.pos-cart-sub { font-weight: 800; color: #0f172a; font-size: 13.5px; white-space: nowrap; }
.pos-cart-rm {
    border: none; background: none; color: #cbd5e1; cursor: pointer;
}
.pos-cart-rm:hover { color: #ef4444; }

@media (max-width: 900px) {
    .pos-layout { grid-template-columns: 1fr; }
    .pos-charge-card, .pos-cart-card { position: static; }
    .pos-product-grid { max-height: none; }
}
