/* ============================================================
   ANCER Core360 - POS (Point of Sale) Stylesheet
   Modern, touch-optimized interface for retail/POS operations
   ============================================================ */

/* ---- CSS Variables (Core360 brand) ---- */
:root {
    --pos-primary:       #0068E7;
    --pos-primary-dark:  #004AAD;
    --pos-primary-light: #E8F0FE;
    --pos-danger:        #E74C3C;
    --pos-warning:       #F39C12;
    --pos-success:       #0068E7;
    --pos-text:          #1a1a2e;
    --pos-text-secondary:#6b7280;
    --pos-bg:            #f0f2f5;
    --pos-card-bg:       #FFFFFF;
    --pos-border:        #e5e7eb;
    --pos-topbar-height: 56px;
    --pos-panel-bg:      #FFFFFF;
    --pos-shadow:        0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --pos-shadow-hover:  0 4px 12px rgba(0,0,0,.1);
    --pos-radius:        12px;
    --pos-radius-sm:     8px;
    --pos-radius-lg:     16px;
    --pos-min-tap:       44px; /* WCAG minimum tap target */
}

/* ============================================================
   LAYOUT - Full-screen POS
   ============================================================ */

.pos-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: var(--pos-bg);
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

.pos-topbar {
    height: var(--pos-topbar-height);
    min-height: var(--pos-topbar-height);
    background: linear-gradient(135deg, #004AAD 0%, #0068E7 60%, #0080ff 100%);
    border-bottom: none;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 0.75rem;
    box-shadow: 0 2px 12px rgba(0,74,173,.2);
    z-index: 100;
    flex-shrink: 0;
}

.pos-topbar-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--pos-min-tap);
    height: var(--pos-min-tap);
    border-radius: var(--pos-radius-sm);
    color: rgba(255,255,255,.85);
    text-decoration: none;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}

.pos-topbar-back:hover {
    background: rgba(255,255,255,.15);
    color: #FFFFFF;
}

.pos-topbar-title {
    font-size: 1rem;
    font-weight: 600;
    color: #FFFFFF;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-topbar-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,.75);
    flex-shrink: 0;
}

.pos-topbar-meta .badge-shift {
    background: rgba(255,255,255,.2);
    color: #FFFFFF;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    backdrop-filter: blur(4px);
}

.pos-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* ============================================================
   SALE SCREEN - Two-panel layout
   ============================================================ */

.pos-catalog-panel {
    flex: 0 0 62%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--pos-bg);
}

.pos-cart-panel {
    flex: 0 0 38%;
    display: flex;
    flex-direction: column;
    background: var(--pos-panel-bg);
    overflow: hidden;
    border-left: 1px solid var(--pos-border);
}

/* ---- Search Bar ---- */
.pos-search-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #FFFFFF;
    border-bottom: 1px solid var(--pos-border);
    flex-shrink: 0;
}

.pos-search-bar .search-icon {
    color: var(--pos-primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.pos-search-input {
    flex: 1;
    border: 2px solid var(--pos-border);
    border-radius: var(--pos-radius);
    padding: 10px 14px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    height: var(--pos-min-tap);
    color: var(--pos-text);
    background: var(--pos-bg);
}

.pos-search-input:focus {
    border-color: var(--pos-primary);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(0,104,231,.12);
}

/* ---- Category Tabs ---- */
.pos-category-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    overflow-x: auto;
    background: #FFFFFF;
    border-bottom: 1px solid var(--pos-border);
    flex-shrink: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pos-category-tabs::-webkit-scrollbar {
    display: none;
}

.pos-category-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--pos-radius);
    border: 2px solid var(--pos-border);
    background: #FFFFFF;
    color: var(--pos-text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    min-height: var(--pos-min-tap);
    transition: all .2s ease;
    user-select: none;
}

.pos-category-tab:hover {
    border-color: var(--pos-primary);
    color: var(--pos-primary);
    background: var(--pos-primary-light);
}

.pos-category-tab.active {
    background: var(--pos-primary);
    border-color: var(--pos-primary);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0,104,231,.3);
}

/* ---- Product Grid ---- */
.pos-products-area {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 1rem;
}

@media (max-width: 768px) {
    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }
}

/* ---- Product Card ---- */
.pos-product-card {
    background: var(--pos-card-bg);
    border-radius: var(--pos-radius-lg);
    box-shadow: var(--pos-shadow);
    cursor: pointer;
    overflow: hidden;
    transition: box-shadow .2s, transform .15s;
    display: flex;
    flex-direction: column;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    border: 2px solid transparent;
    position: relative;
}

.pos-product-card:hover {
    box-shadow: var(--pos-shadow-hover);
    transform: translateY(-3px);
    border-color: var(--pos-primary);
}

.pos-product-card:active {
    transform: scale(0.97);
    box-shadow: var(--pos-shadow);
}

.pos-product-card.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

.pos-product-card.out-of-stock:hover {
    transform: none;
    border-color: transparent;
}

.pos-product-img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    background: linear-gradient(135deg, var(--pos-bg) 0%, #e8edf2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pos-border);
    font-size: 2.5rem;
    flex-shrink: 0;
    max-height: 110px;
    overflow: hidden;
}

.pos-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pos-product-info {
    padding: 10px 10px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pos-product-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pos-text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pos-product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-top: auto;
}

.pos-product-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--pos-primary-dark);
}

.pos-product-badge {
    font-size: 0.65rem;
    color: var(--pos-text-secondary);
    background: var(--pos-bg);
    padding: 1px 6px;
    border-radius: 4px;
}

/* ---- Add to cart button overlay ---- */
.pos-add-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--pos-primary);
    color: #FFFFFF;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, transform .15s;
    box-shadow: 0 2px 8px rgba(0,104,231,.35);
    z-index: 2;
}

.pos-add-btn:hover {
    background: var(--pos-primary-dark);
    transform: scale(1.15);
}

.pos-add-btn:active {
    transform: scale(0.9);
}

/* ---- Empty state ---- */
.pos-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--pos-text-secondary);
    gap: 0.75rem;
}

.pos-empty-state i {
    font-size: 3rem;
    opacity: 0.25;
}

/* ============================================================
   CART / INVOICE PANEL
   ============================================================ */

/* ---- Tab Bar (Multi-Invoice / Mesas) ---- */
.pos-tab-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #003580 0%, #004AAD 100%);
    overflow-x: auto;
    flex-shrink: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pos-tab-bar::-webkit-scrollbar {
    display: none;
}

.pos-tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.8);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(4px);
    position: relative;
}

.pos-tab-btn:hover {
    background: rgba(255,255,255,.2);
    color: #FFFFFF;
    border-color: rgba(255,255,255,.4);
}

.pos-tab-btn.active {
    background: #FFFFFF;
    color: var(--pos-primary-dark);
    border-color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    font-weight: 700;
}

.pos-tab-label {
    pointer-events: none;
}

.pos-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 10px;
    background: var(--pos-primary);
    color: #FFFFFF;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0 5px;
    pointer-events: none;
}

.pos-tab-btn.active .pos-tab-badge {
    background: var(--pos-primary);
    color: #FFFFFF;
}

.pos-tab-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.2);
    color: rgba(255,255,255,.7);
    font-size: 0.55rem;
    cursor: pointer;
    transition: background .15s, color .15s;
    padding: 0;
    margin-left: 2px;
}

.pos-tab-close:hover {
    background: var(--pos-danger);
    color: #FFFFFF;
}

.pos-tab-btn.active .pos-tab-close {
    background: rgba(0,74,173,.1);
    color: var(--pos-primary);
}

.pos-tab-btn.active .pos-tab-close:hover {
    background: var(--pos-danger);
    color: #FFFFFF;
}

.pos-tab-add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px dashed rgba(255,255,255,.4);
    background: transparent;
    color: rgba(255,255,255,.6);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all .2s ease;
    flex-shrink: 0;
}

.pos-tab-add:hover {
    border-color: #FFFFFF;
    color: #FFFFFF;
    background: rgba(255,255,255,.15);
}

/* ---- Branded Banner ---- */
.pos-cart-banner {
    background: linear-gradient(135deg, #004AAD 0%, #0068E7 100%);
    color: #FFFFFF;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.pos-cart-banner i {
    font-size: 1.1rem;
    opacity: 0.85;
}

.pos-banner-action-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.8rem;
}

.pos-banner-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.pos-banner-action-btn i {
    opacity: 1;
    font-size: 0.8rem;
}

.pos-cart-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--pos-border);
    flex-shrink: 0;
    background: #fafbfc;
}

.pos-customer-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pos-customer-row .dx-combobox {
    flex: 1;
}

/* ---- Cart Items ---- */
.pos-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.pos-cart-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--pos-border);
    transition: background .1s;
}

.pos-cart-item:hover {
    background: var(--pos-primary-light);
}

.pos-cart-item-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--pos-radius-sm);
    background: var(--pos-primary-light);
    color: var(--pos-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.pos-cart-item-info {
    flex: 1;
    min-width: 0;
}

.pos-cart-item-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pos-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-cart-item-price {
    font-size: 0.72rem;
    color: var(--pos-text-secondary);
}

.pos-editable-price {
    cursor: pointer;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.2s;
}
.pos-editable-price:hover {
    border-bottom-color: var(--pos-primary);
    color: var(--pos-primary);
}

.pos-inline-price-input {
    width: 80px;
    padding: 1px 4px;
    border: 1px solid var(--pos-primary);
    border-radius: 4px;
    font-size: 0.78rem;
    text-align: right;
    outline: none;
    background: var(--pos-primary-light);
}
.pos-inline-price-input:focus {
    box-shadow: 0 0 0 2px rgba(0,104,231,0.2);
}

.pos-cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.pos-cart-item-total {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--pos-text);
}

.pos-cart-item-controls {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* ---- Compact Quantity Buttons (cart) ---- */
.pos-qty-btn-sm {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1.5px solid var(--pos-border);
    background: #FFFFFF;
    color: var(--pos-text-secondary);
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .12s, border-color .12s, color .12s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.pos-qty-btn-sm:hover {
    background: var(--pos-primary-light);
    border-color: var(--pos-primary);
    color: var(--pos-primary);
}

.pos-qty-btn-sm:active {
    transform: scale(0.9);
}

.pos-qty-value-sm {
    font-size: 0.78rem;
    font-weight: 700;
    min-width: 22px;
    text-align: center;
    color: var(--pos-text);
}

/* ---- Large Quantity Buttons (payment popup) ---- */
.pos-qty-btn {
    width: var(--pos-min-tap);
    height: var(--pos-min-tap);
    min-width: var(--pos-min-tap);
    border-radius: var(--pos-radius-sm);
    border: 1.5px solid var(--pos-border);
    background: #FFFFFF;
    color: var(--pos-text);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .12s, border-color .12s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.pos-qty-btn:hover {
    background: var(--pos-primary-light);
    border-color: var(--pos-primary);
    color: var(--pos-primary-dark);
}

.pos-qty-btn:active {
    transform: scale(0.93);
}

.pos-qty-btn.danger:hover {
    background: #FEE2E2;
    border-color: var(--pos-danger);
    color: var(--pos-danger);
}

.pos-qty-value {
    font-size: 0.95rem;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
    color: var(--pos-text);
}

.pos-remove-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--pos-danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity .15s, background .15s;
    flex-shrink: 0;
    font-size: 0.75rem;
}

.pos-remove-btn:hover {
    opacity: 1;
    background: #FEE2E2;
}

/* ---- Cart Footer / Totals ---- */
.pos-cart-footer {
    border-top: 2px solid var(--pos-border);
    padding: 0.75rem 1rem;
    flex-shrink: 0;
    background: #fafbfc;
}

.pos-totals {
    margin-bottom: 0.75rem;
}

.pos-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    font-size: 0.85rem;
    color: var(--pos-text-secondary);
}

.pos-total-row.grand {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--pos-text);
    padding-top: 8px;
    margin-top: 8px;
    border-top: 2px solid var(--pos-border);
}

.pos-total-row .label {
    font-weight: 500;
}

.pos-total-row .amount {
    font-weight: 700;
}

/* ---- Sell Button ---- */
.pos-sell-btn {
    width: 100%;
    height: 54px;
    border-radius: var(--pos-radius);
    background: linear-gradient(135deg, #004AAD 0%, #0068E7 100%);
    color: #FFFFFF;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: opacity .15s, transform .1s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 4px 14px rgba(0,104,231,.35);
}

.pos-sell-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.pos-sell-btn:active {
    transform: scale(0.98);
}

.pos-sell-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pos-cart-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.78rem;
    color: var(--pos-text-secondary);
}

.pos-cancel-link {
    color: var(--pos-danger);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.pos-cancel-link:hover {
    text-decoration: underline;
}

/* ============================================================
   PAYMENT POPUP
   ============================================================ */

.pos-payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 480px) {
    .pos-payment-methods-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.pos-payment-method-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: var(--pos-radius);
    border: 2px solid var(--pos-border);
    background: #FFFFFF;
    color: var(--pos-text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 70px;
    transition: all .2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.pos-payment-method-btn i {
    font-size: 1.4rem;
}

.pos-payment-method-btn:hover {
    border-color: var(--pos-primary);
    color: var(--pos-primary);
    background: var(--pos-primary-light);
}

.pos-payment-method-btn.selected {
    border-color: var(--pos-primary);
    background: var(--pos-primary);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0,104,231,.3);
}

.pos-payment-method-btn:active {
    transform: scale(0.96);
}

/* ---- Tip Options ---- */
.pos-tip-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.pos-tip-btn {
    padding: 8px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--pos-border);
    background: #FFFFFF;
    color: var(--pos-text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 36px;
    display: flex;
    align-items: center;
    transition: all .2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.pos-tip-btn:hover {
    border-color: var(--pos-primary);
    color: var(--pos-primary);
    background: var(--pos-primary-light);
}

.pos-tip-btn.selected {
    border-color: var(--pos-primary);
    background: var(--pos-primary);
    color: #FFFFFF;
    box-shadow: 0 2px 6px rgba(0,104,231,.25);
}

.pos-tip-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: var(--pos-radius-sm);
    background: rgba(0,104,231,.06);
    border: 1px solid rgba(0,104,231,.12);
    font-size: 0.9rem;
    color: var(--pos-text);
}

.pos-tip-summary strong {
    color: var(--pos-primary-dark);
    font-size: 1rem;
}

/* ---- Payment Popup Body ---- */
.pos-payment-popup-body {
    padding: 0 4px;
}

/* ---- Total Display (compact) ---- */
.pos-payment-total-display {
    background: var(--pos-primary-light);
    border-radius: var(--pos-radius);
    padding: 0.75rem;
    text-align: center;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(0,104,231,.1);
}

.pos-payment-total-display .label {
    font-size: 0.78rem;
    color: var(--pos-text-secondary);
    font-weight: 500;
}

.pos-payment-total-display .amount {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--pos-primary-dark);
    line-height: 1.1;
}

/* ---- Denomination Buttons ---- */
.pos-denom-row {
    display: grid;
    gap: 6px;
}

.pos-denom-row.coins {
    grid-template-columns: repeat(5, 1fr);
}

.pos-denom-row.bills {
    grid-template-columns: repeat(6, 1fr);
}

.pos-denom-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 2px;
    border-radius: 8px;
    border: 1.5px solid;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s;
    user-select: none;
    min-height: 52px;
}

.pos-denom-btn:active {
    transform: scale(0.92);
}

/* Coins: gold/bronze theme */
.pos-denom-btn.coin {
    background: linear-gradient(145deg, #FFF8E1, #FFE082);
    border-color: #FFB300;
    color: #795548;
}

.pos-denom-btn.coin:hover {
    box-shadow: 0 2px 8px rgba(255, 179, 0, .35);
    border-color: #FF8F00;
}

/* Bills: green theme */
.pos-denom-btn.bill {
    background: linear-gradient(145deg, #E8F5E9, #A5D6A7);
    border-color: #43A047;
    color: #1B5E20;
}

.pos-denom-btn.bill:hover {
    box-shadow: 0 2px 8px rgba(67, 160, 71, .35);
    border-color: #2E7D32;
}

.denom-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.denom-label {
    font-size: 0.72rem;
    font-weight: 700;
    margin-top: 1px;
}

/* Exacto / Limpiar action buttons */
.pos-denom-action-btn {
    padding: 7px 12px;
    border-radius: 6px;
    border: 1.5px solid var(--pos-primary);
    background: var(--pos-primary-light);
    color: var(--pos-primary-dark);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s, color .12s;
    text-align: center;
}

.pos-denom-action-btn:hover {
    background: var(--pos-primary);
    color: #fff;
}

/* ---- Change Display ---- */
.pos-change-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    border-radius: var(--pos-radius-sm);
    background: rgba(0,104,231,.08);
    border: 1px solid rgba(0,104,231,.25);
    margin-bottom: 0.5rem;
}

.pos-change-display .label {
    font-size: 0.85rem;
    color: var(--pos-success);
    font-weight: 600;
}

.pos-change-display .amount {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--pos-success);
}

.pos-change-display.negative {
    background: #FEF2F2;
    border-color: #FECACA;
}

.pos-change-display.negative .label,
.pos-change-display.negative .amount {
    color: var(--pos-danger);
}

/* ============================================================
   SALE CONFIRMATION POPUP
   ============================================================ */

.pos-confirmation-popup {
    text-align: center;
    padding: 1rem 0;
}

.pos-confirmation-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0,104,231,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.pos-confirmation-icon i {
    font-size: 2.2rem;
    color: var(--pos-success);
}

.pos-confirmation-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--pos-text);
    margin-bottom: 0.25rem;
}

.pos-confirmation-total {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--pos-primary-dark);
    margin-bottom: 0.5rem;
}

.pos-confirmation-tip {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pos-primary-dark);
    background: var(--pos-primary-light);
    border-radius: 20px;
    padding: 4px 16px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.pos-confirmation-change {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pos-success);
    background: rgba(0,104,231,.1);
    border-radius: 20px;
    padding: 4px 16px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.pos-confirmation-message {
    font-size: 0.82rem;
    color: var(--pos-text-secondary);
    margin-bottom: 1.25rem;
}

.pos-confirmation-actions {
    display: flex;
    gap: 0.75rem;
}

.pos-confirmation-actions > * {
    flex: 1;
}

/* ============================================================
   TERMINALS PAGE
   ============================================================ */

.pos-terminal-card {
    background: var(--pos-card-bg);
    border-radius: var(--pos-radius-lg);
    box-shadow: var(--pos-shadow);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow .2s, transform .15s;
    border: 2px solid transparent;
}

.pos-terminal-card:hover {
    box-shadow: var(--pos-shadow-hover);
    transform: translateY(-2px);
    border-color: var(--pos-primary-light);
}

.pos-terminal-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--pos-radius);
    background: var(--pos-primary-light);
    color: var(--pos-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* ============================================================
   SHIFT OPEN / CLOSE PAGES
   ============================================================ */

.pos-shift-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pos-bg);
    padding: 2rem 1rem;
}

.pos-shift-card {
    background: var(--pos-card-bg);
    border-radius: var(--pos-radius-lg);
    box-shadow: var(--pos-shadow-hover);
    padding: 2rem;
    width: 100%;
    max-width: 480px;
}

.pos-shift-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.pos-shift-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--pos-primary-light);
    color: var(--pos-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1rem;
}

.pos-shift-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.pos-shift-table td {
    padding: 8px 12px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--pos-border);
}

.pos-shift-table td:first-child {
    color: var(--pos-text-secondary);
    font-weight: 500;
    width: 55%;
}

.pos-shift-table td:last-child {
    font-weight: 700;
    color: var(--pos-text);
    text-align: right;
}

.pos-shift-table tr.total-row td {
    font-size: 1.05rem;
    font-weight: 800;
    background: var(--pos-primary-light);
    color: var(--pos-primary-dark);
    border-bottom: none;
    border-radius: var(--pos-radius-sm);
}

.pos-shift-table tr.negative-row td:last-child {
    color: var(--pos-danger);
}

/* ============================================================
   SCROLLBARS (POS-specific panels)
   ============================================================ */

.pos-products-area::-webkit-scrollbar,
.pos-cart-items::-webkit-scrollbar {
    width: 4px;
}

.pos-products-area::-webkit-scrollbar-track,
.pos-cart-items::-webkit-scrollbar-track {
    background: transparent;
}

.pos-products-area::-webkit-scrollbar-thumb,
.pos-cart-items::-webkit-scrollbar-thumb {
    background: var(--pos-border);
    border-radius: 4px;
}

/* ============================================================
   RESPONSIVE OVERRIDES
   ============================================================ */

@media (max-width: 992px) {
    .pos-catalog-panel {
        flex-basis: 55%;
    }
    .pos-cart-panel {
        flex-basis: 45%;
    }
}

@media (max-width: 640px) {
    /* Stack vertically on very small screens */
    .pos-body {
        flex-direction: column;
    }
    .pos-catalog-panel {
        flex: 0 0 55%;
        border-bottom: 2px solid var(--pos-border);
    }
    .pos-cart-panel {
        flex: 0 0 45%;
        border-left: none;
    }
    .pos-topbar-meta .user-name {
        display: none;
    }
}

/* ============================================================
   UTILITIES
   ============================================================ */

.pos-badge-active {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(0,104,231,.1);
    color: var(--pos-success);
}

.pos-badge-inactive {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    background: #FEF2F2;
    color: var(--pos-danger);
}

.pos-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    border-radius: var(--pos-radius);
}

.pos-divider {
    border: none;
    border-top: 1px solid var(--pos-border);
    margin: 0.75rem 0;
}

.pos-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--pos-text-secondary);
    margin-bottom: 0.5rem;
}

/* Payment method sub-table in terminal form */
.pos-pm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.pos-pm-table th {
    text-align: left;
    padding: 6px 8px;
    color: var(--pos-text-secondary);
    font-weight: 600;
    border-bottom: 2px solid var(--pos-border);
}

.pos-pm-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--pos-border);
    vertical-align: middle;
}

/* ============================================================
   CASH MOVEMENTS POPUP
   ============================================================ */

.pos-cash-move-type-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: var(--pos-radius);
    border: 2px solid var(--pos-border);
    background: #fff;
    color: var(--pos-text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    text-align: center;
}

.pos-cash-move-type-btn:hover {
    border-color: var(--pos-primary);
    color: var(--pos-primary);
}

.pos-cash-move-type-btn.selected.ingreso {
    border-color: var(--pos-success);
    background: rgba(16,185,129,.08);
    color: var(--pos-success);
}

.pos-cash-move-type-btn.selected.egreso {
    border-color: var(--pos-danger);
    background: #FEF2F2;
    color: var(--pos-danger);
}

.pos-cash-move-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
}

.pos-cash-move-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--pos-radius-sm);
    border: 1px solid var(--pos-border);
    background: #fff;
}

.pos-cash-move-item.ingreso {
    border-left: 3px solid var(--pos-success);
}

.pos-cash-move-item.egreso {
    border-left: 3px solid var(--pos-danger);
}

.pos-cash-move-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.pos-cash-move-item.ingreso .pos-cash-move-icon {
    background: rgba(16,185,129,.1);
    color: var(--pos-success);
}

.pos-cash-move-item.egreso .pos-cash-move-icon {
    background: #FEF2F2;
    color: var(--pos-danger);
}

.pos-cash-move-info {
    flex: 1;
    min-width: 0;
}

.pos-cash-move-info .fw-semibold {
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-cash-move-amount {
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
}

.pos-cash-move-summary {
    padding: 8px 10px;
    border-radius: var(--pos-radius-sm);
    background: var(--pos-bg);
    border: 1px solid var(--pos-border);
    font-size: 0.82rem;
}

.pos-cash-move-list::-webkit-scrollbar {
    width: 4px;
}

.pos-cash-move-list::-webkit-scrollbar-thumb {
    background: var(--pos-border);
    border-radius: 4px;
}

/* ---- Yappy verification pulse animation ---- */
.pos-yappy-pulse {
    animation: yappyPulse 1.5s ease-in-out infinite;
}

@keyframes yappyPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(1.1); }
}
