/* ==========================================================================
   REGOS STYLE PROFESSIONAL POS STYLESHEET
   Optimized for ultra-fast performance, zero lag, keyboard-first navigation
   ========================================================================== */

:root {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-card-light: #334155;
    --bg-input: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: rgba(37, 99, 235, 0.15);
    --success: #10b981;
    --success-hover: #059669;
    --warning: #f59e0b;
    --warning-hover: #d97706;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --purple: #8b5cf6;
    --border-color: #334155;
    --selected-row: #1d4ed8;
    --selected-text: #ffffff;
    --highlight: #38bdf8;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
}

input, button, select, textarea {
    font-family: inherit;
    user-select: text;
}

/* Disable spinner up/down arrows (strelkalar) on all number inputs across entire app */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
    display: none !important;
}
input[type="number"] {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

/* ==========================================================================
   TOP HEADER / STATUS BAR
   ========================================================================== */
.pos-header {
    background: #1e293b;
    border-bottom: 2px solid #334155;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 54px;
    flex-shrink: 0;
}

.brand-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
    color: #38bdf8;
}

.brand-badge .logo-icon {
    background: #0284c7;
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: bold;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #0f172a;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #334155;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-item b {
    color: var(--text-primary);
}

.badge-held {
    background: #d97706;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-held:hover {
    background: #b45309;
    transform: scale(1.05);
}

/* ==========================================================================
   HOTKEYS BAR (TOP ACTION BUTTONS)
   ========================================================================== */
.hotkeys-bar {
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
    padding: 6px 14px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    flex-shrink: 0;
}

.btn-hotkey {
    background: #1e293b;
    color: var(--text-primary);
    border: 1px solid #334155;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, transform 0.05s;
}

.btn-hotkey:hover {
    background: #334155;
    border-color: #475569;
}

.btn-hotkey:active {
    transform: translateY(1px);
}

.kbd {
    background: #0284c7;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.4);
    letter-spacing: 0.5px;
}

.btn-hotkey.btn-search .kbd { background: #2563eb; }
.btn-hotkey.btn-edit .kbd { background: #0891b2; }
.btn-hotkey.btn-hold .kbd { background: #d97706; }
.btn-hotkey.btn-pay .kbd { background: #16a34a; }
.btn-hotkey.btn-clear .kbd { background: #dc2626; }

/* ==========================================================================
   MAIN POS CONTENT GRID
   ========================================================================== */
.pos-body {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 10px;
    padding: 10px 12px;
    overflow: hidden;
    background: #090d16;
}

/* LEFT SIDE: CART & SEARCH INPUT */
.cart-container {
    background: #1e293b;
    border-radius: 8px;
    border: 1px solid #334155;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.scanner-input-bar {
    background: #0f172a;
    padding: 10px 14px;
    border-bottom: 2px solid #334155;
    display: flex;
    align-items: center;
    gap: 12px;
}

.scanner-icon {
    color: #38bdf8;
    font-size: 1.3rem;
}

.barcode-input {
    flex: 1;
    background: #1e293b;
    border: 2px solid #3b82f6;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 10px 14px;
    border-radius: 6px;
    outline: none;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.barcode-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 12px rgba(96, 165, 250, 0.4);
}

.cart-table-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    background: #131d2e;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.cart-table-wrapper::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
}

.pos-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    text-align: left;
}

.pos-table thead {
    position: sticky;
    top: 0;
    background: #1e293b;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.pos-table th {
    padding: 12px 10px;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #334155;
}

.pos-table td {
    padding: 10px 10px;
    border-bottom: 1px solid #1e293b;
    color: #e2e8f0;
    vertical-align: middle;
}

.pos-table tbody tr {
    cursor: pointer;
    transition: background 0.1s;
}

.pos-table tbody tr:hover {
    background: #1e293b;
}

.pos-table tbody tr.selected {
    background: #2563eb !important;
    color: #ffffff !important;
}

.pos-table tbody tr.selected td {
    color: #ffffff !important;
    font-weight: 600;
    border-bottom: 1px solid #3b82f6;
}

.col-num { width: 45px; text-align: center; }
.col-code { width: 90px; }
.col-name { min-width: 200px; }
.col-qty { width: 110px; text-align: right; }
.col-price { width: 120px; text-align: right; }
.col-total { width: 140px; text-align: right; font-weight: bold; }
.col-actions { width: 60px; text-align: center; }

.btn-remove-row {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px 8px;
    border-radius: 4px;
}

.btn-remove-row:hover {
    background: rgba(239, 68, 68, 0.2);
}

.empty-cart-message {
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
}

.empty-cart-message i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* RIGHT SIDE: SUMMARY & NUMPAD */
.checkout-panel {
    background: #1e293b;
    border-radius: 8px;
    border: 1px solid #334155;
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    gap: 8px;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.receipt-totals {
    background: #0f172a;
    border-radius: 8px;
    padding: 10px 14px;
    border: 1px solid #334155;
    flex-shrink: 0;
}

.total-label {
    font-size: 0.82rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.total-amount-display {
    font-size: 1.95rem;
    font-weight: 900;
    color: #38bdf8;
    text-align: right;
    margin-top: 2px;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.total-currency {
    font-size: 1.05rem;
    font-weight: 600;
    color: #94a3b8;
    margin-left: 4px;
}

.subtotals-grid {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #334155;
    font-size: 0.82rem;
    color: #94a3b8;
}

.subtotals-grid span b {
    color: #f1f5f9;
}

/* NUMPAD ON SCREEN */
.numpad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 6px;
    flex: 1;
    min-height: 0;
}

.btn-num {
    background: #0f172a;
    border: 1px solid #334155;
    color: #f8fafc;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
    min-height: 0;
    height: 100%;
}

.btn-num:hover {
    background: #334155;
    border-color: #475569;
}

.btn-num:active {
    background: #2563eb;
    color: white;
    transform: scale(0.97);
}

.btn-num.btn-op {
    background: #1e293b;
    color: #38bdf8;
    font-size: 1.15rem;
}

/* ACTION BUTTONS (BOTTOM RIGHT) */
.action-buttons-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.btn-pay-main {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 10px 14px;
    font-size: 1.15rem;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
    transition: transform 0.1s, box-shadow 0.1s;
    min-height: 46px;
}

.btn-pay-main:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.6);
}

.btn-pay-main:active {
    transform: translateY(1px);
}

.side-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}

.btn-side {
    background: #0f172a;
    border: 1px solid #334155;
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 4px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 36px;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.btn-side:hover {
    background: #334155;
    color: white;
}

/* ==========================================================================
   MODAL DIALOGS (F3 SEARCH, F2 EDIT, HOLD, PAY)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.15s ease-out;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #1e293b;
    border: 2px solid #3b82f6;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 92vh;
    animation: slideDown 0.15s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-20px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
    background: #0f172a;
    padding: 14px 18px;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.modal-close-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* ==========================================================================
   F3 PRODUCT SEARCH MODAL (REGOS STYLE)
   ========================================================================== */
.modal-search {
    width: 90vw;
    max-width: 1100px;
    height: 82vh;
}

.search-bar-box {
    background: #0f172a;
    padding: 12px 16px;
    border-bottom: 1px solid #334155;
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input-field {
    flex: 1;
    background: #1e293b;
    border: 2px solid #2563eb;
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 8px;
    outline: none;
}

.search-input-field:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.4);
}

.search-results-table-container {
    flex: 1;
    overflow-y: auto;
    background: #111827;
}

.search-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.search-table thead {
    position: sticky;
    top: 0;
    background: #1e293b;
    z-index: 5;
}

.search-table th {
    padding: 10px 12px;
    color: #94a3b8;
    font-size: 0.8rem;
    text-transform: uppercase;
    border-bottom: 1px solid #334155;
    font-weight: 700;
    text-align: left;
}

.search-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #1f2937;
    color: #e5e7eb;
}

.search-table tbody tr {
    cursor: pointer;
}

.search-table tbody tr:hover {
    background: #1f2937;
}

.search-table tbody tr.active-row {
    background: #2563eb !important;
    color: #ffffff !important;
    font-weight: 600;
}

.search-table tbody tr.active-row td {
    color: #ffffff !important;
}

.search-modal-footer {
    background: #0f172a;
    padding: 10px 16px;
    border-top: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #94a3b8;
}

.search-shortcuts-hint {
    display: flex;
    gap: 16px;
}

.search-shortcuts-hint span b {
    color: #38bdf8;
}

/* ==========================================================================
   F2 EDIT QUANTITY & PRICE MODAL
   ========================================================================== */
.modal-edit-qty {
    width: 860px;
    max-width: 95vw;
    box-sizing: border-box;
}

.edit-qty-body {
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 16px;
    box-sizing: border-box;
    max-height: calc(88vh - 120px);
    overflow-y: auto;
    align-items: start;
}

@media (max-width: 840px) {
    .edit-qty-body {
        grid-template-columns: 1fr;
    }
}

.item-info-banner {
    background: #0f172a;
    border: 1px solid #334155;
    padding: 12px 14px;
    border-radius: 8px;
    box-sizing: border-box;
}

.item-info-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 4px;
    word-break: break-word;
}

.item-info-details {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: #94a3b8;
    flex-wrap: wrap;
}

.edit-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    box-sizing: border-box;
}

.edit-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    box-sizing: border-box;
}

.edit-field-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
}

.edit-input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background: #0f172a;
    border: 2px solid #3b82f6;
    color: #38bdf8;
    font-size: 1.45rem;
    font-weight: 800;
    padding: 10px 12px;
    border-radius: 8px;
    outline: none;
    text-align: right;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.edit-input::-webkit-outer-spin-button,
.edit-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.edit-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.4);
}

.quick-qty-buttons {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.btn-quick-qty {
    flex: 1;
    background: #334155;
    border: 1px solid #475569;
    color: #f8fafc;
    padding: 8px 6px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-quick-qty:hover {
    background: #475569;
}

.modal-actions-footer {
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    background: #0f172a;
    border-top: 1px solid #334155;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 20;
    align-items: center;
}

/* RECEIPT PRINT TOGGLE CHECKBOX */
.receipt-print-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.receipt-print-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.print-toggle-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.15s ease;
    min-height: 46px;
    white-space: nowrap;
}

.print-toggle-box i {
    font-size: 1.15rem;
    color: #64748b;
    transition: color 0.15s ease;
}

.receipt-print-toggle input[type="checkbox"]:checked + .print-toggle-box {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #34d399;
}

.receipt-print-toggle input[type="checkbox"]:checked + .print-toggle-box i {
    color: #10b981;
}

.receipt-print-toggle:hover .print-toggle-box {
    border-color: #475569;
}

.receipt-print-toggle input[type="checkbox"]:checked:hover + .print-toggle-box {
    border-color: #059669;
}

.btn-modal-save {
    flex: 1;
    background: #2563eb;
    border: none;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-modal-save:hover {
    background: #1d4ed8;
}

.btn-modal-cancel {
    background: #334155;
    border: none;
    color: #cbd5e1;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-modal-cancel:hover {
    background: #475569;
}

/* ==========================================================================
   HELD RECEIPTS MODAL (ОТЛОЖЕННЫЕ ЧЕКИ)
   ========================================================================== */
.modal-held {
    width: 650px;
}

.held-list {
    max-height: 450px;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.held-item-card {
    background: #0f172a;
    border: 1px solid #334155;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s;
}

.held-item-card:hover {
    border-color: #3b82f6;
    background: #172236;
}

.held-card-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.held-card-title {
    font-weight: 700;
    color: #38bdf8;
    font-size: 1rem;
}

.held-card-meta {
    font-size: 0.85rem;
    color: #94a3b8;
}

.held-card-amount {
    font-size: 1.15rem;
    font-weight: 800;
    color: #10b981;
}

.held-card-actions {
    display: flex;
    gap: 8px;
}

.btn-restore-held {
    background: #2563eb;
    border: none;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-restore-held:hover {
    background: #1d4ed8;
}

.btn-delete-held {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-delete-held:hover {
    background: #ef4444;
    color: white;
}

/* ==========================================================================
   CHECKOUT PAYMENT MODAL (F4)
   ========================================================================== */
.modal-payment {
    width: 900px;
    max-width: 96vw;
}

.payment-modal-body {
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 16px;
    max-height: calc(88vh - 120px);
    overflow-y: auto;
    align-items: start;
}

@media (max-width: 860px) {
    .payment-modal-body {
        grid-template-columns: 1fr;
    }
}

.payment-types-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.pay-tab-btn {
    background: #0f172a;
    border: 2px solid #334155;
    color: #cbd5e1;
    padding: 10px 8px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.pay-tab-btn i { font-size: 1.3rem; }

.pay-tab-btn:hover {
    border-color: #64748b;
    color: #ffffff;
}

.pay-tab-btn.active {
    background: #1e3a8a;
    border-color: #3b82f6;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

.pay-tab-btn[data-method="cash"].active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.15) 100%);
    border-color: #10b981;
    color: #34d399;
}

.pay-tab-btn[data-method="card"].active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.25) 0%, rgba(2, 132, 199, 0.15) 100%);
    border-color: #38bdf8;
    color: #7dd3fc;
}

.pay-tab-btn[data-method="click"].active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25) 0%, rgba(126, 34, 206, 0.15) 100%);
    border-color: #a855f7;
    color: #d8b4fe;
}

.pay-tab-btn[data-method="mixed"].active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(180, 83, 9, 0.15) 100%);
    border-color: #f59e0b;
    color: #fcd34d;
}

.pay-calc-box {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pay-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pay-row-label {
    font-size: 1rem;
    color: #94a3b8;
    font-weight: 600;
}

.pay-input-large {
    background: #1e293b;
    border: 2px solid #10b981;
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 800;
    padding: 8px 14px;
    border-radius: 8px;
    text-align: right;
    width: 240px;
    outline: none;
}

.quick-cash-notes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-cash-note {
    background: #1e293b;
    border: 1px solid #334155;
    color: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-cash-note:hover {
    background: #334155;
    border-color: #60a5fa;
}

.change-display {
    font-size: 1.8rem;
    font-weight: 900;
    color: #10b981;
}

/* ==========================================================================
   TOUCH NUMPAD COMPONENT (SENSORLI MONITOR UCHUN)
   ========================================================================== */
.touch-numpad-panel {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.touch-numpad-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    padding-bottom: 6px;
    border-bottom: 1px solid #1e293b;
}

.touch-numpad-header b {
    color: #38bdf8;
    font-weight: 800;
}

.touch-numpad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.btn-touch-num {
    background: #1e293b;
    border: 1px solid #334155;
    color: #f8fafc;
    font-size: 1.35rem;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-touch-num:hover {
    background: #334155;
    border-color: #64748b;
    color: #38bdf8;
}

.btn-touch-num:active {
    background: #2563eb;
    color: #ffffff;
    transform: scale(0.96);
}

.btn-touch-clear {
    color: #f87171 !important;
    font-weight: 900;
}
.btn-touch-clear:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
}

.btn-touch-back {
    color: #fbbf24 !important;
}
.btn-touch-back:hover {
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: #f59e0b !important;
}

.btn-touch-exact {
    background: #1e3a8a !important;
    color: #38bdf8 !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    border-color: #2563eb !important;
}
.btn-touch-exact:hover {
    background: #2563eb !important;
    color: #ffffff !important;
}

.touch-numpad-presets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 2px;
}

.btn-touch-preset {
    background: #1e293b;
    border: 1px solid #334155;
    color: #34d399;
    padding: 7px 4px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
    transition: all 0.1s;
}

.btn-touch-preset:hover {
    background: #065f46;
    border-color: #10b981;
    color: #ffffff;
}

.btn-touch-preset:active {
    transform: scale(0.96);
}

.touch-field-active {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.45) !important;
    background: #0f172a !important;
}

/* Multi-method / Split Payment Styles */
.split-pay-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e293b;
    border: 1px solid #334155;
    padding: 10px 14px;
    border-radius: 8px;
    gap: 12px;
}

.split-pay-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #cbd5e1;
    min-width: 140px;
}

.split-pay-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}

.split-pay-input {
    background: #0f172a;
    border: 2px solid #334155;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 6px;
    text-align: right;
    width: 180px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.split-pay-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.btn-split-quick {
    background: #1e293b;
    color: #38bdf8;
    border: 1px solid #0284c7;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.btn-split-quick:hover {
    background: #0284c7;
    color: #ffffff;
}

.split-summary-box {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    background: #131d2e;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 6px;
}

.split-sum-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.8rem;
    color: #94a3b8;
}

.split-sum-item b {
    font-size: 1.15rem;
}

.pay-card-info-box {
    text-align: center;
    padding: 28px 16px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .payment-types-tabs {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }
    .pay-tab-btn {
        padding: 8px 6px;
        font-size: 0.82rem;
    }
    .split-pay-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .split-pay-input-group {
        justify-content: stretch;
    }
    .split-pay-input {
        width: 100%;
    }
    .split-summary-box {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* ==========================================================================
   PRINT RECEIPT STYLES (@media print)
   ========================================================================== */
#receipt-print-area {
    display: none;
}

@media print {
    body * {
        visibility: hidden;
    }
    #receipt-print-area, #receipt-print-area * {
        visibility: visible;
    }
    #receipt-print-area {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 80mm;
        margin: 0;
        padding: 5mm;
        background: #fff;
        color: #000;
        font-family: 'Courier New', Courier, monospace;
        font-size: 12px;
    }
    .slip-header {
        text-align: center;
        margin-bottom: 8px;
    }
    .slip-title {
        font-size: 16px;
        font-weight: bold;
    }
    .slip-table {
        width: 100%;
        border-collapse: collapse;
        margin: 8px 0;
    }
    .slip-table th, .slip-table td {
        padding: 3px 0;
        text-align: left;
    }
    .slip-divider {
        border-top: 1px dashed #000;
        margin: 6px 0;
    }
    .slip-footer {
        text-align: center;
        margin-top: 10px;
        font-size: 11px;
    }
}

/* ==========================================================================
   RESPONSIVE & MOBILE POS STYLES (< 992px & < 640px)
   Optimized for smartphones, tablets and touch-screen terminals
   ========================================================================== */
@media (max-width: 992px) {
    body {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }

    .pos-header {
        height: auto;
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .brand-badge {
        font-size: 1.1rem;
    }

    .header-status {
        gap: 8px;
        flex-wrap: wrap;
    }

    .status-item {
        padding: 4px 8px;
        font-size: 0.78rem;
    }

    .hotkeys-bar {
        padding: 8px 10px;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .btn-hotkey {
        padding: 8px 12px;
        font-size: 0.82rem;
    }

    .pos-body {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
        padding: 8px;
        gap: 10px;
    }

    .cart-container {
        min-height: 320px;
        max-height: 50vh;
    }

    .checkout-panel {
        width: 100%;
    }

    .modal-search {
        width: 98vw;
        max-width: 98vw;
        height: 94vh;
    }

    .modal-payment {
        width: 96vw;
        max-width: 500px;
    }

    .modal-held {
        width: 96vw;
        max-width: 550px;
    }
}

@media (max-width: 640px) {
    .edit-fields-row {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .modal-edit-qty {
        width: 96vw;
        max-width: 96vw;
    }

    .edit-qty-body {
        padding: 14px;
        gap: 12px;
    }

    .edit-input {
        font-size: 1.35rem;
        padding: 10px;
    }

    .total-amount-display {
        font-size: 1.8rem;
    }

    .btn-pay-main {
        padding: 12px;
        font-size: 1.1rem;
    }

    .pay-types-tabs {
        grid-template-columns: 1fr;
    }

    .pay-input-large {
        width: 100% !important;
        font-size: 1.4rem;
    }

    .search-shortcuts-hint {
        display: none;
    }

    .search-modal-footer {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }
}

/* ==========================================================================
   TOAST NOTIFICATIONS (NON-BLOCKING SUBTLE ALERTS)
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.pos-toast {
    pointer-events: auto;
    min-width: 260px;
    max-width: 380px;
    background: #1e293b;
    color: #f8fafc;
    border-radius: 8px;
    padding: 12px 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    border-left: 5px solid #3b82f6;
    animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.3s, transform 0.3s;
}

.pos-toast.toast-success {
    border-left-color: #10b981;
}

.pos-toast.toast-success i {
    color: #10b981;
    font-size: 1.25rem;
}

.pos-toast.toast-info {
    border-left-color: #38bdf8;
}

.pos-toast.toast-info i {
    color: #38bdf8;
    font-size: 1.25rem;
}

.pos-toast.toast-warning {
    border-left-color: #f59e0b;
}

.pos-toast.toast-warning i {
    color: #f59e0b;
    font-size: 1.25rem;
}

.pos-toast.toast-error {
    border-left-color: #ef4444;
}

.pos-toast.toast-error i {
    color: #ef4444;
    font-size: 1.25rem;
}

.pos-toast.hide {
    opacity: 0;
    transform: translateX(100%);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================================================
   DESKTOP & MOBILE VIEW MODES SWITCHER
   ========================================================================== */
.mode-toggle-group {
    display: inline-flex;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 20px;
    padding: 3px;
    gap: 3px;
}

.btn-mode-toggle {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-mode-toggle:hover {
    color: #ffffff;
}

.btn-mode-toggle.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

/* Visibility based on body class */
.desktop-pos-view {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

body.view-mode-desktop {
    overflow: hidden !important;
}

body.view-mode-desktop #desktop-pos-container {
    display: flex !important;
}

body.view-mode-desktop #mobile-pos-container {
    display: none !important;
}

body.view-mode-mobile {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100vh !important;
}

body.view-mode-mobile #desktop-pos-container {
    display: none !important;
}

body.view-mode-mobile #mobile-pos-container {
    display: flex !important;
}

/* ==========================================================================
   MODERN MOBILE POS UI (SQUARE / LOYVERSE / POSTER STYLE)
   ========================================================================== */
.mobile-pos-view {
    display: none;
    flex-direction: column;
    width: 100vw;
    min-height: 100vh;
    background: #0b1120;
    color: #f8fafc;
    position: relative;
    box-sizing: border-box;
}

.m-content-area {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 75px;
}

.m-tab-page {
    display: none;
    flex-direction: column;
    width: 100%;
}

.m-tab-page.active {
    display: flex;
}

/* Mobile Header */
.m-header {
    background: #1e293b;
    border-bottom: 1px solid #334155;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

.m-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.05rem;
    color: #38bdf8;
}

.m-brand i {
    font-size: 1.15rem;
}

.m-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Sticky top section for mobile catalog (Search + Categories + Info) */
.m-catalog-sticky-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: #0b1120;
    border-bottom: 1px solid rgba(51, 65, 85, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

/* Mobile Search Bar */
.m-search-wrapper {
    padding: 10px 14px 6px 14px;
    background: transparent;
}

.m-search-box {
    background: #1e293b;
    border: 1px solid #3b82f6;
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.m-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
}

.m-search-clear {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 2px;
}

/* Horizontal Category Pills */
.m-categories-bar {
    padding: 4px 14px 8px 14px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    background: transparent;
}

.m-categories-bar::-webkit-scrollbar {
    display: none;
}

.m-cat-pill {
    background: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.m-cat-pill.active {
    background: #2563eb;
    border-color: #3b82f6;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.m-catalog-info-row {
    padding: 2px 14px 8px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: #94a3b8;
    background: transparent;
}

/* Product Catalog List (Single column: 1 item per row) */
.m-catalog-container {
    padding: 14px 14px 30px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.m-catalog-container .m-product-card:first-child {
    margin-top: 6px;
}

.m-product-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    position: relative;
    transition: transform 0.1s, border-color 0.15s, background 0.15s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.m-product-card:active {
    transform: scale(0.985);
    background: #23334d;
    border-color: #3b82f6;
}

.m-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.m-card-name {
    font-size: 0.94rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.m-card-meta {
    font-size: 0.76rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.m-card-meta .meta-code {
    color: #94a3b8;
    font-weight: 600;
}

.m-card-meta .meta-stock {
    font-weight: 700;
}

.m-card-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.m-card-price-box {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.m-card-price {
    font-size: 1.05rem;
    font-weight: 900;
    color: #38bdf8;
    white-space: nowrap;
}

.m-card-add-btn {
    width: 38px;
    height: 38px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
    transition: transform 0.1s, background 0.15s;
}

.m-card-add-btn:active {
    transform: scale(0.9);
    background: #1d4ed8;
}

.m-card-qty-badge {
    position: absolute;
    top: -6px;
    left: 12px;
    background: #10b981;
    color: white;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
    z-index: 2;
}

/* Mobile Cart Tab */
.m-cart-view {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.m-cart-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #334155;
}

.m-cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.m-cart-item-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.m-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.m-item-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #f8fafc;
}

.m-item-delete {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
}

.m-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.m-stepper {
    display: flex;
    align-items: center;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    overflow: hidden;
}

.m-stepper-btn {
    background: transparent;
    border: none;
    color: #38bdf8;
    font-size: 1.1rem;
    font-weight: bold;
    width: 34px;
    height: 34px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.m-stepper-btn:active {
    background: #334155;
}

.m-stepper-val {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    min-width: 32px;
    text-align: center;
    cursor: pointer;
}

.m-item-price-sum {
    text-align: right;
}

.m-item-sum {
    font-size: 1.05rem;
    font-weight: 800;
    color: #10b981;
}

.m-item-unit-price {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Mobile Checkout / Cart Summary Box */
.m-cart-summary {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.m-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #94a3b8;
}

.m-summary-total {
    font-size: 1.4rem;
    font-weight: 900;
    color: #38bdf8;
}

.m-btn-pay {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 14px;
    border-radius: 10px;
    font-size: 1.15rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.m-cart-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* Mobile Payment Tab */
.m-payment-view {
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.m-pay-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Floating Bottom Bar (appears when items in cart while viewing catalog) */
.m-floating-bar {
    position: fixed;
    bottom: 64px;
    left: 12px;
    right: 12px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 12px 18px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
    z-index: 95;
    cursor: pointer;
    animation: slideUpFloat 0.2s ease-out;
}

@keyframes slideUpFloat {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.m-float-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
}

.m-float-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.82rem;
}

.m-float-right {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    font-weight: 800;
}

/* Mobile Bottom Navigation Bar */
.m-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #0f172a;
    border-top: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
}

.m-nav-item {
    background: transparent;
    border: none;
    color: #64748b;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    padding: 6px 12px;
    transition: color 0.15s;
}

.m-nav-item i {
    font-size: 1.25rem;
}

.m-nav-item.active {
    color: #38bdf8;
}

.m-nav-badge {
    position: absolute;
    top: 2px;
    right: 14px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 1px 5px;
    border-radius: 10px;
}

/* ==========================================================================
   MARKUP (USTAMA %) WIDGET & DIALOG STYLES (DESKTOP & MOBILE)
   ========================================================================== */
.modal-markup {
    width: 580px;
    max-width: 95vw;
}

.markup-modal-body {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #111827;
}

.markup-info-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 8px;
    padding: 12px 14px;
}

.markup-section-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.markup-dialog-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.btn-dialog-preset {
    background: #1e293b;
    border: 2px solid #334155;
    color: #f8fafc;
    padding: 10px 6px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    transition: all 0.15s ease;
}

.btn-dialog-preset b {
    font-size: 1.15rem;
    color: #38bdf8;
}

.btn-dialog-preset span {
    font-size: 0.72rem;
    color: #94a3b8;
}

.btn-dialog-preset:hover {
    border-color: #38bdf8;
    background: #0f172a;
}

.btn-dialog-preset.active {
    background: rgba(37, 99, 235, 0.2);
    border-color: #2563eb;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

.btn-dialog-preset.active b {
    color: #60a5fa;
}

.markup-custom-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.markup-custom-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.markup-dialog-input {
    width: 100%;
    background: #0f172a;
    border: 2px solid #38bdf8;
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 800;
    padding: 8px 36px 8px 14px;
    border-radius: 8px;
    outline: none;
}

.markup-percent-sign {
    position: absolute;
    right: 14px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #38bdf8;
    pointer-events: none;
}

.markup-quick-steppers {
    display: flex;
    gap: 6px;
}

.btn-markup-step {
    background: #1e293b;
    border: 1px solid #334155;
    color: #f8fafc;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-markup-step:hover {
    background: #334155;
    border-color: #60a5fa;
    color: #38bdf8;
}

.markup-live-calc-box {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.markup-live-calc-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.markup-live-calc-row.total-row {
    border-top: 1px dashed #334155;
    padding-top: 8px;
    margin-top: 4px;
    font-weight: 700;
}

.pos-markup-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1e293b;
    border: 1px solid #334155;
    padding: 3px 10px;
    border-radius: 6px;
    flex-shrink: 0;
}

.markup-widget-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #38bdf8;
    white-space: nowrap;
}

.markup-presets {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-markup-chip {
    background: #0f172a;
    color: #cbd5e1;
    border: 1px solid #334155;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-markup-chip:hover {
    background: #334155;
    color: #ffffff;
    border-color: #475569;
}

.btn-markup-chip.active {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.markup-custom-box {
    display: flex;
    align-items: center;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 5px;
    padding: 2px 6px;
}

.markup-number-input {
    width: 44px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.82rem;
    text-align: center;
    outline: none;
}

.markup-number-input::-webkit-inner-spin-button,
.markup-number-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.markup-symbol {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 800;
}

/* Mobile Markup Bar */
.m-markup-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.m-markup-bar::-webkit-scrollbar {
    display: none;
}

.m-markup-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #38bdf8;
    white-space: nowrap;
}

.m-markup-scroll {
    display: flex;
    align-items: center;
    gap: 6px;
}

.m-markup-chip {
    background: #1e293b;
    color: #cbd5e1;
    border: 1px solid #334155;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.m-markup-chip.active {
    background: #0284c7;
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.m-markup-custom {
    border-style: dashed;
}

/* Cart Item Markup Tag */
.badge-markup {
    display: inline-block;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    font-size: 0.68rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.badge-cost-info {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
    margin-top: 2px;
}

/* Quick Markup Buttons in F2 Edit Modal */
.quick-markup-buttons {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.btn-quick-markup {
    flex: 1;
    background: #0f172a;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 4px 0;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.btn-quick-markup:hover {
    background: #334155;
    color: #ffffff;
}

/* ==========================================================================
   RETURN MODE (QAYTARISH REJIMI) STYLES
   ========================================================================== */
.return-mode-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.22) 0%, rgba(185, 28, 28, 0.3) 100%);
    border: 1.5px solid #ef4444;
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 10px;
    animation: returnPulse 2s infinite alternate;
}

@keyframes returnPulse {
    0% { box-shadow: 0 0 8px rgba(239, 68, 68, 0.2); }
    100% { box-shadow: 0 0 18px rgba(239, 68, 68, 0.45); }
}

.return-mode-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.return-mode-tag {
    background: #ef4444;
    color: #ffffff;
    font-weight: 900;
    font-size: 0.88rem;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.return-mode-desc {
    color: #fca5a5;
    font-size: 0.9rem;
    font-weight: 600;
}

.return-mode-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-return-action-find {
    background: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

.btn-return-action-find:hover {
    background: #dc2626;
}

.btn-return-action-exit {
    background: rgba(15, 23, 42, 0.6);
    color: #cbd5e1;
    border: 1px solid #475569;
    border-radius: 8px;
    padding: 7px 14px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-return-action-exit:hover {
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
    border-color: #94a3b8;
}

.btn-pay-return-mode {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
    border-color: #ef4444 !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4) !important;
}

.btn-return-toggle-active {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}

/* ==========================================================================
   MOBILE POS ENHANCEMENTS & DIALOG MODALS RESPONSIVE ADAPTATION
   ========================================================================== */

/* Mobile Return Mode Banner */
.m-return-mode-banner {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.22) 0%, rgba(185, 28, 28, 0.32) 100%);
    border-bottom: 1.5px solid #ef4444;
    padding: 8px 12px;
}

.m-return-banner-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

/* Mobile Cart Item Edit Button */
.m-item-edit {
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.m-item-edit:active {
    background: #0284c7;
    color: #ffffff;
}

/* Markup Modal Body Scrollable Support */
.markup-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

/* Receipt Search Modal (F7) */
.modal-receipt-search {
    width: 680px;
    max-width: 95vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}

.rs-search-bar {
    padding: 16px 20px;
    background: #0f172a;
    border-bottom: 1px solid #334155;
    flex-shrink: 0;
}

.rs-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.rs-search-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: #1e293b;
    border: 2px solid #ef4444;
    border-radius: 10px;
    color: #f8fafc;
    font-size: 1.05rem;
    font-weight: 600;
    outline: none;
    box-sizing: border-box;
}

.rs-submit-btn {
    padding: 12px 22px;
    background: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.rs-hint-row {
    margin-top: 8px;
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rs-recent-body {
    padding: 14px 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.rs-recent-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    transition: border-color 0.15s;
    cursor: pointer;
}

.rs-recent-card:hover {
    border-color: #ef4444;
}

.rs-recent-card-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Receipt History Modal */
.modal-receipt-history {
    max-width: 960px;
    width: 96vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.rh-filter-bar {
    padding: 12px 16px;
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}

.rh-filter-search {
    position: relative;
    flex: 1;
    min-width: 180px;
}

.rh-filter-dates {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rh-filter-date {
    padding: 8px 10px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #f8fafc;
    font-size: 0.85rem;
    box-sizing: border-box;
}

.rh-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rh-btn-search {
    padding: 8px 14px;
    background: #0284c7;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.rh-btn-returns {
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid #ef4444;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.rh-table-wrap {
    overflow: auto;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.rh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

/* Order Detail Modal */
.modal-order-detail {
    max-width: 680px;
    width: 96vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.od-modal-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding: 16px;
}

.od-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.od-meta-card {
    background: #0f172a;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #1e293b;
}

.od-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Return Modal */
.modal-return {
    max-width: 720px;
    width: 96vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.rm-modal-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding: 16px;
}

.rm-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
}

.rm-refund-methods {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ==========================================================================
   COMPREHENSIVE MOBILE & TABLET MEDIA QUERIES FOR POS & ALL DIALOGS
   ========================================================================== */
@media (max-width: 768px) {
    /* Modal Overlay & Base Content */
    .modal-overlay {
        padding: 6px;
        align-items: center;
        justify-content: center;
    }

    .modal-content {
        width: 96vw !important;
        max-width: 96vw !important;
        max-height: 92vh !important;
        max-height: 92dvh !important;
        border-radius: 12px;
    }

    .modal-header {
        padding: 10px 14px;
        flex-shrink: 0;
    }

    .modal-title {
        font-size: 0.98rem;
        gap: 8px;
    }

    .btn-close-modal {
        font-size: 1.25rem;
        padding: 2px 6px;
    }

    .modal-actions-footer {
        padding: 10px 12px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .btn-modal-save,
    .btn-modal-cancel {
        padding: 10px 14px;
        font-size: 0.92rem;
    }

    /* Mobile Header & Navigation */
    .m-header {
        padding: 8px 10px;
        gap: 6px;
    }

    .m-brand {
        font-size: 0.95rem;
        gap: 6px;
    }

    .m-header-actions {
        gap: 5px !important;
    }

    .m-content-area {
        padding-bottom: 125px;
    }

    /* Toast Notifications on Mobile */
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        align-items: stretch;
    }

    .pos-toast {
        min-width: 0;
        max-width: 100%;
        padding: 10px 14px;
        font-size: 0.88rem;
    }

    /* 1. F3 Search Modal on Mobile */
    .modal-search {
        height: 92vh !important;
        height: 92dvh !important;
    }

    .search-modal-bar {
        padding: 10px 12px;
    }

    .search-modal-input {
        font-size: 1rem;
        padding: 10px 36px 10px 38px;
    }

    .search-input-icon {
        left: 12px;
        font-size: 1rem;
    }

    .col-search-barcode,
    .col-search-cat {
        display: none !important;
    }

    .search-table th,
    .search-table td {
        padding: 8px 6px !important;
        font-size: 0.78rem !important;
    }

    .col-search-code {
        width: 56px !important;
    }

    .col-search-stock {
        width: 68px !important;
    }

    .col-search-cost {
        width: 82px !important;
    }

    .col-search-price {
        width: 92px !important;
    }

    .search-item-detail-bar {
        padding: 8px 12px;
        gap: 8px;
        font-size: 0.78rem;
        flex-wrap: wrap;
    }

    .detail-group {
        gap: 4px;
    }

    .search-modal-footer {
        padding: 8px 12px;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    /* 2. F2 Edit Quantity & Price Modal on Mobile */
    .edit-qty-body {
        padding: 12px;
        gap: 10px;
        max-height: calc(92dvh - 115px);
        grid-template-columns: 1fr !important;
    }

    .item-info-banner {
        padding: 8px 10px;
    }

    .item-info-name {
        font-size: 0.95rem;
    }

    .item-info-details {
        font-size: 0.78rem;
        gap: 10px;
    }

    .edit-fields-row {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    .edit-field-group label {
        font-size: 0.75rem;
    }

    .edit-input {
        font-size: 1.15rem;
        padding: 8px 10px;
    }

    .quick-qty-buttons {
        gap: 4px;
    }

    .btn-quick-qty {
        padding: 6px 4px;
        font-size: 0.8rem;
    }

    .quick-markup-buttons {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }

    .btn-quick-markup {
        padding: 5px 2px;
        font-size: 0.72rem;
    }

    /* Touch Numpad inside Modals on Mobile */
    .touch-numpad-panel {
        padding: 8px 10px;
        gap: 6px;
    }

    .btn-touch-num {
        min-height: 38px;
        font-size: 1.15rem;
    }

    .btn-touch-preset {
        padding: 6px 4px;
        font-size: 0.75rem;
    }

    /* 3. F4 Payment Modal on Mobile */
    .payment-modal-body {
        padding: 12px;
        gap: 12px;
        max-height: calc(92dvh - 125px);
        grid-template-columns: 1fr !important;
    }

    .pay-calc-box {
        padding: 12px;
        gap: 10px;
    }

    .pay-row {
        flex-wrap: wrap;
        gap: 6px;
    }

    .pay-row-label {
        font-size: 0.9rem;
    }

    .total-amount-display,
    .change-display {
        font-size: 1.45rem !important;
    }

    .pay-input-large {
        width: 100% !important;
        font-size: 1.35rem;
        padding: 8px 12px;
    }

    .quick-cash-notes {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .btn-cash-note {
        padding: 7px 6px;
        font-size: 0.78rem;
        text-align: center;
    }

    #payment-modal .modal-actions-footer {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 8px;
    }

    #payment-modal .receipt-print-toggle {
        grid-column: 1 / -1;
    }

    #payment-modal .print-toggle-box {
        width: 100%;
        justify-content: center;
        min-height: 38px;
        padding: 6px 12px;
        font-size: 0.85rem;
        box-sizing: border-box;
    }

    /* 4. F9 Markup Modal on Mobile */
    .markup-modal-body {
        padding: 12px 14px;
        gap: 10px;
        max-height: calc(92dvh - 115px);
    }

    .markup-info-banner {
        padding: 8px 10px;
        gap: 8px;
    }

    .markup-dialog-presets {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .btn-dialog-preset {
        padding: 8px 4px;
    }

    .btn-dialog-preset b {
        font-size: 0.98rem;
    }

    .btn-dialog-preset span {
        font-size: 0.66rem;
    }

    .markup-custom-input-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .markup-quick-steppers {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .btn-markup-step {
        text-align: center;
        padding: 8px 4px;
    }

    .markup-live-calc-box {
        padding: 10px 12px;
    }

    .markup-live-calc-row {
        font-size: 0.82rem;
    }

    /* 5. Held Receipts Modal on Mobile */
    .held-list {
        padding: 12px;
        max-height: calc(92dvh - 120px);
    }

    .held-item-card {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }

    .held-card-actions {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .btn-restore-held {
        flex: 1;
        text-align: center;
    }

    /* 6. Receipt Search Modal (F7) on Mobile */
    .rs-search-bar {
        padding: 12px;
    }

    .rs-input-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .rs-submit-btn {
        width: 100%;
        padding: 10px;
    }

    .rs-recent-body {
        padding: 12px;
    }

    .rs-recent-card {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 12px;
    }

    .rs-recent-card-right {
        justify-content: space-between;
        border-top: 1px solid #334155;
        padding-top: 8px;
    }

    /* 7. Receipt History Modal on Mobile */
    .rh-filter-bar {
        padding: 10px 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .rh-filter-search {
        width: 100%;
    }

    .rh-filter-dates {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        width: 100%;
    }

    .rh-filter-date {
        width: 100%;
        min-width: 0;
        font-size: 0.78rem;
        padding: 7px 6px;
    }

    .rh-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .col-rh-items,
    .col-rh-pay {
        display: none !important;
    }

    .rh-table th,
    .rh-table td {
        padding: 8px 6px !important;
        font-size: 0.78rem !important;
    }

    /* 8. Order Detail Modal on Mobile */
    .od-modal-body {
        padding: 12px;
    }

    .od-meta-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .od-meta-card {
        padding: 8px 10px;
    }

    /* 9. Return Modal on Mobile */
    .rm-modal-body {
        padding: 12px;
    }

    .rm-refund-methods {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .rm-refund-methods .refund-method-btn {
        padding: 8px 4px !important;
        font-size: 0.78rem !important;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .markup-dialog-presets {
        grid-template-columns: repeat(2, 1fr);
    }

    .edit-fields-row {
        grid-template-columns: 1fr !important;
    }

    .col-search-cost {
        display: none !important;
    }

    .od-meta-grid {
        grid-template-columns: 1fr;
    }

    .m-card-price {
        font-size: 0.96rem;
    }

    .m-card-name {
        font-size: 0.88rem;
    }
}




