
/* Add these dashboard menu styles near the top of your CSS file (or append) */
.dijpos-dashboard-nav {
    background: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 1px 6px #0001;
    margin-bottom: 12px;
}
.dijpos-dashboard-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
    align-items: center;
}
.dijpos-dashboard-nav .dijpos-nav-item {
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    background: #f1f6fb;
    color: #0b3b73;
    font-weight: 600;
}
.dijpos-dashboard-nav .dijpos-nav-active {
    background: var(--dijpos-primary, #007cba);
    color: #fff;
    box-shadow: 0 1px 6px #0002;
}

/* small content spacing for dashboard pages */
.dijpos-dashboard-pages .dijpos-page {
    background: #fff;
    padding: 14px;
    border-radius: 8px;
    box-shadow: 0 1px 6px #0001;
}




.dijpos-payamount {
  text-align: right;   /* push text to the far right */
  padding-right: 0px;  /* optional: add spacing from table border */
}

.dijpos-payment-summary-table td:nth-child(2) {
  text-align: right;
}


.dijpos-paylabel {
  font-size: 12px;
}


.dijpos-mpesa-custom-grid,
.dijpos-bank-custom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
    margin-bottom: 7px;
}
.dijpos-mpesa-custom-grid .dijpos-payform-cell,
.dijpos-bank-custom-grid .dijpos-payform-cell {
    display: flex;
    flex-direction: column;
}



@media (max-width: 600px) {
    .dijpos-mpesa-custom-grid,
    .dijpos-bank-custom-grid {
        grid-template-columns: 1fr;
    }
}
.receipt-mpesa-table,
.receipt-bank-table {
    width: 100%;
    margin-bottom: 8px;
}
.receipt-mpesa-table td,
.receipt-bank-table td {
    font-size: 11px;
    padding: 2px 9px 2px 0;
}




#dijpos-app {
    min-height: 400px;
    display: flex;
    gap: 16px;
    align-items: stretch;
}

/* --------- Payment Modal and Receipt Summary (Organized, Non-duplicate) --------- */

/* Payment Modal Section */
.dijpos-payform-row {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 7px;
}
.dijpos-payform-label {
    font-weight: bold;
    min-width: 130px;
    margin-right: 6px;
    font-size: 10px;
}
.dijpos-payform-row label {
    min-width: 110px;
    font-weight: normal;
}
.dijpos-payform-row input[type="number"], 
.dijpos-payform-row input[type="text"] {
    flex: 1 1 120px;
    padding: 5px 7px;
    font-size: 13px;
    border: 1px solid #d3d6db;
    border-radius: 4px;
    box-sizing: border-box;
}
.dijpos-payform-summary {
    display: flex;
    gap: 10px;
    align-items: baseline;
    margin-top: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: bold;
}
.dijpos-payform-summary .dijpos-amt-green {
    color: #0a0;
    font-weight: bold;
}

/* --------- NEW: Mpesa 2x2 grid for payment modal --------- */
.dijpos-payform-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
    margin-bottom: 7px;
}
.dijpos-payform-cell {
    display: flex;
    flex-direction: column;
}
.dijpos-payform-cell label {
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 13px;
}
.dijpos-payform-cell input[type="text"],
.dijpos-payform-cell input[type="number"] {
    padding: 6px 7px;
    font-size: 1em;
    border: 1px solid #d3d6db;
    border-radius: 4px;
    box-sizing: border-box;
    width: 100%;
}
/* End NEW */

/* Responsive */
@media (max-width: 600px) {
    .dijpos-payform-row { 
        flex-direction: column; 
        align-items: flex-start; 
    }
    .dijpos-payform-row label, .dijpos-payform-label { min-width: 0; }
    .dijpos-payform-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
  @page {
    size: 80mm auto; /* width: 80mm, height: auto */
    margin: 5mm;     /* adjust margin as needed */
  }
  body {
    background: #fff !important;
    margin: 0;
  }
}





.dijpos-receipt-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2px 0;
}

.dijpos-receipt-summary-row span:first-child {
  font-weight: bold;
}

.dijpos-receipt-summary-row span:last-child {
  min-width: 120px; /* adjust as needed */
  text-align: right;
  display: inline-block;
  font-weight: bold;
}


.dijpos-receipt-summary-row2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2px 0;
}

.dijpos-receipt-summary-row2 td:nth-child(1),
.dijpos-receipt-summary-row2 th:nth-child(1) {
  text-align: left;
}

.dijpos-receipt-summary-row2 td:nth-child(2),
.dijpos-receipt-summary-row2 th:nth-child(2) {
  text-align: right;
   min-width: 120px; /* adjust as needed */
}



/* Optional: Loading spinner styling */
.dijpos-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    font-size: 20px;
    color: #007cba;
    gap: 16px;
    opacity: 0;
    transition: opacity 1.2s;  /* Fade-in duration */
    pointer-events: none;
}
.dijpos-loading.dijpos-loading-visible {
    opacity: 1;
    pointer-events: auto;
}
.dijpos-loading-logo {
    width: 400px;
    height: 400px;
    object-fit: contain;
    margin-bottom: 10px;
}

#dijpos-wrapper {
    --dijpos-primary: #007cba;
    --dijpos-font: 'Inter', Arial, Helvetica, sans-serif;
    font-family: var(--dijpos-font);
    box-sizing: border-box;
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    max-width: 1200px;
    margin: 40px auto;
    box-shadow: 0 2px 12px #0002;
}
#dijpos-app {
    min-height: 400px;
    display: flex;
    gap: 16px;
    align-items: stretch;
}
/* Left: Product List */
.dijpos-products {
    width: 55%;
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 4px #0001;
    overflow-y: auto;
    max-height: 80vh; /* Add this line for maximum height */
}
.dijpos-product-grid, .dijpos-product-list { margin: 0; padding: 0; list-style: none; }

.dijpos-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dijpos-product-list .dijpos-product, .dijpos-product-grid .dijpos-product {
    display: flex; align-items: center; gap: 16px;
    border-bottom: 1px solid #f1f1f1; padding: 12px 0;
}
.dijpos-product-grid .dijpos-product { flex-direction: column; align-items: flex-start; }
.dijpos-product .dijpos-thumb { width: 100px; height: 100px; object-fit: contain; border-radius: 6px; }
.dijpos-product .dijpos-title { font-weight: bold; font-size: 15px; }
.dijpos-product .dijpos-category { font-size: 12px; color: #2767b6; background: #e3f1ff; border-radius: 12px; padding: 0 8px; margin-right: 6px;}
.dijpos-product .dijpos-price { font-weight: 600; margin-left: auto;}
.dijpos-product .dijpos-add { background: var(--dijpos-primary); color: #fff; border: none; border-radius: 50%; width: 36px; height: 36px; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s;}
.dijpos-product .dijpos-add:hover { background: #095a8b; }
.dijpos-product-grid .dijpos-product { width: 160px; margin: 10px; border: 1px solid #f1f1f1; flex-direction: column; }

/* Right: Cart */
.dijpos-cart {
    width: 45%;
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 4px #0001;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}
.dijpos-cart-header { display: flex; align-items: center; gap: 8px; font-weight: 500; }
/* New: Scrollable table wrapper for big carts */
.dijpos-cart-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 40vh;
    overflow-y: auto;
    margin: 12px 0;
}
.dijpos-cart-table { width: 100%; border-collapse: collapse;}
.dijpos-cart-table th, .dijpos-cart-table td { text-align:left; padding: 4px 8px;}
.dijpos-cart-table th { font-size: 14px; color: #555; }
.dijpos-cart-table td input[type="number"] { width: 48px;}
.dijpos-cart-table td {font-size: 12px;   /* <-- Change this value as desired */}
.dijpos-cart-table td input[type="number"] {
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 4px;
    border: 1px solid #ccc;
    width: 48px; /* already present in your CSS */
}

.dijpos-cart-remove { color: #e00; font-size: 10px; cursor: pointer; background: none; border: none;}
.dijpos-cart-summary { margin: 12px 0; font-size: 11px;}
.dijpos-cart-summary span { display: inline-block; min-width: 90px;}
.dijpos-cart-actions { display: flex; gap: 8px; margin-bottom: 10px;}
.dijpos-btn { background: var(--dijpos-primary); color: #fff; border: none; border-radius: 6px; padding: 8px 18px; font-size: 1em; cursor: pointer;}
.dijpos-btn.void { background: #e05959;}
.dijpos-btn.checkout { background: #1a9c5b;}
.dijpos-btn:disabled { opacity: 0.6;}
/* Filters/Search */
.dijpos-filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap;}
.dijpos-filter-btn { border: none; background: #e7edf6; color: #1a3d6b; border-radius: 16px; padding: 6px 14px; cursor: pointer;}
.dijpos-filter-btn.active { background: var(--dijpos-primary); color: #fff;}
/* Modal */
.dijpos-modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: #0007; display: flex; align-items: center; justify-content: center; z-index: 9999;}
.dijpos-modal-content { background: #fff; border-radius: 10px; max-width: 440px; width: 98vw; max-height: 96vh; overflow-y: auto; padding: 24px 20px; box-shadow: 0 2px 32px #0001;}
/* Receipt */
.dijpos-receipt { font-size: 10px; color: #222; width: 300px; background: #fff; border-radius: 6px; padding: 18px; margin: auto; font-family: 'Khand', monospace;}
.dijpos-receipt-header { font-size: 14px; font-weight: 600; text-align: center;}
.dijpos-receipt-header2 { font-size: 12px; font-weight: 600; text-align: left;}
.dijpos-receipt-logo { display: block; margin: 0 auto 12px;}
.dijpos-receipt-table { width: 100%; margin: 12px 0; border-collapse: collapse;}
.dijpos-receipt-table th, .dijpos-receipt-table td { padding: 3px 4px; font-family: 'Khand', monospace; font-size: 12px; text-align: left;}
.dijpos-receipt-table td {
    font-family: 'Khand', monospace;
    font-size: 10px; /* Change this value for desired size */

}
.dijpos-receipt-footer { text-align: left; margin-top: 18px;}

/* ----------- INTEGRATED/NEW CODE FOR MODAL & RECEIPT BUTTONS ----------- */
.dijpos-modal-content .dijpos-btn,
.dijpos-receipt-footer .dijpos-btn,
.dijpos-modal-content #dijpos-processpay,
.dijpos-modal-content #dijpos-cancelmodal,
.dijpos-receipt-footer #dijpos-email-receipt,
.dijpos-receipt-footer #dijpos-print-receipt,
.dijpos-receipt-footer #dijpos-close-receipt {
    background: #000 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 5px 12px !important;
    font-size: 9px !important;
    cursor: pointer !important;
    margin: 5px 4px !important;
    font-family: 'Inter', Arial, Helvetica, sans-serif !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 4px #0001 !important;
    transition: background 0.2s, filter 0.2s !important;
    outline: none !important;
    display: inline-block !important;
}
.dijpos-modal-content .dijpos-btn:hover,
.dijpos-receipt-footer .dijpos-btn:hover {
    background: #095a8b !important;
    filter: brightness(1.08) !important;
}
#dijpos-cancelmodal,
#dijpos-close-receipt {
    background: #888 !important;
    color: #fff !important;
}
#dijpos-cancelmodal:hover,
#dijpos-close-receipt:hover {
    background: #555 !important;
}
/* End Integrated Code */

@media (max-width: 900px) {
    #dijpos-app { flex-direction: column; }
    .dijpos-products, .dijpos-cart { width: 100%; max-height: unset;}
}