/* ============================================
   TrivexaPOS - Light Mode (Dreams POS Style)
   ============================================ */

:root {
    /* Primary Colors - Orange Theme */
    --pos-primary: #FF9F43;
    --pos-primary-dark: #E68A38;
    --pos-primary-light: #FFF4E5;
    --pos-primary-hover: #E68A38;
    
    /* Secondary Colors */
    --pos-success: #28C76F;
    --pos-success-light: #E5F8ED;
    --pos-info: #00CFE8;
    --pos-info-light: #E5FAFC;
    --pos-warning: #FF9F43;
    --pos-warning-light: #FFF4E5;
    --pos-danger: #EA5455;
    --pos-danger-light: #FCE4E4;
    
    /* Neutrals - Ensure readable dark text */
    --pos-dark: #2D3748;
    --pos-text: #4A5568;
    --pos-text-light: #718096;
    --pos-border: #E2E8F0;
    --pos-bg: #F7FAFC;
    --pos-bg-card: #FFFFFF;
    
    /* Shadows */
    --pos-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --pos-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Base Styles */
html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--pos-bg);
    color: var(--pos-text);
}

#app {
    height: 100%;
}

/* Blazor Error UI */
#blazor-error-ui {
    background: var(--pos-danger);
    color: white;
}

/* ============================================
   Main Container Fix
   ============================================ */
.pos-main-container {
    background-color: var(--pos-bg);
    color: var(--pos-text);
}

/* Ensure all text inputs have dark text */
.pos-main-container input,
.pos-main-container select,
.pos-main-container textarea {
    color: var(--pos-dark) !important;
    background-color: white;
}

.pos-main-container input::placeholder {
    color: var(--pos-text-light) !important;
}

/* Fix Tailwind utility text color classes */
.pos-main-container .text-gray-500 {
    color: #6b7280 !important;
}

.pos-main-container .text-gray-600 {
    color: #4b5563 !important;
}

.pos-main-container .text-gray-700 {
    color: #374151 !important;
}

.pos-main-container .text-gray-800 {
    color: #1f2937 !important;
}

.pos-main-container .text-gray-400 {
    color: #9ca3af !important;
}

.pos-main-container .text-gray-300 {
    color: #d1d5db !important;
}

/* Ensure headings are dark */
.pos-main-container h1,
.pos-main-container h2,
.pos-main-container h3,
.pos-main-container h4,
.pos-main-container h5,
.pos-main-container h6 {
    color: var(--pos-dark);
}

/* Ensure paragraphs are readable */
.pos-main-container p {
    color: var(--pos-text);
}

/* ============================================
   Header Styles
   ============================================ */
.pos-header {
    background: var(--pos-bg-card);
    border-bottom: 1px solid var(--pos-border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.pos-header-bar {
    background: var(--pos-bg-card);
    border-color: var(--pos-border);
}

.pos-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pos-logo img {
    height: 40px;
}

.pos-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pos-primary);
}

/* Shift Status Badge */
.shift-status-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid;
}

.shift-status-badge.active {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
}

.shift-status-badge.active .status-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.shift-status-badge.active .status-text {
    color: #166534;
}

.shift-status-badge.warning {
    background-color: #fffbeb;
    border-color: #fde68a;
}

.shift-status-badge.warning .status-dot {
    width: 8px;
    height: 8px;
    background-color: #f59e0b;
    border-radius: 50%;
}

.shift-status-badge.warning .status-text {
    color: #92400e;
}

.shift-status-badge.clickable {
    cursor: pointer;
    transition: all 0.2s;
}

.shift-status-badge.clickable:hover {
    background-color: #fef3c7;
}

/* Table Info Badge */
.table-info-badge {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fbbf24;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #92400e;
}

.table-info-badge svg {
    color: #d97706;
}

/* Close Shift Button */
.btn-close-shift {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background-color: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 0.5rem;
    color: #c2410c;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-close-shift:hover {
    background-color: #ffedd5;
}

.btn-close-shift svg {
    color: #ea580c;
}

/* User Info Box */
.user-info-box {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.875rem;
    background-color: var(--pos-bg);
    border-radius: 0.5rem;
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--pos-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar svg {
    color: var(--pos-primary);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--pos-dark);
}

.terminal-name {
    font-size: 0.75rem;
    color: var(--pos-text-light);
}

/* Button Text */
.btn-text {
    color: inherit;
}

/* Table Button Active */
.btn-table-active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

/* ============================================
   Compact Header Buttons & Dropdowns
   ============================================ */
.hdr-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    white-space: nowrap;
    line-height: 1;
}
.hdr-btn:hover { transform: translateY(-1px); }

.hdr-icon { width: 15px; height: 15px; flex-shrink: 0; }
.hdr-caret { width: 12px; height: 12px; flex-shrink: 0; opacity: 0.7; }

.hdr-btn-primary { background: var(--pos-primary); color: #fff; }
.hdr-btn-primary:hover { box-shadow: 0 3px 8px rgba(255,159,67,0.3); }

.hdr-btn-secondary { background: #82868B; color: #fff; }
.hdr-btn-secondary:hover { background: #6E6B7B; }

.hdr-btn-info { background: var(--pos-info, #00cfe8); color: #fff; }
.hdr-btn-info:hover { box-shadow: 0 3px 8px rgba(0,207,232,0.3); }

.hdr-btn-kitchen { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: #fff; }
.hdr-btn-kitchen:hover { box-shadow: 0 3px 8px rgba(239,68,68,0.35); }
.hdr-btn-kitchen.hdr-phone-active { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }

.hdr-btn-outline {
    background: transparent;
    color: var(--pos-text, #333);
    border: 1px solid var(--pos-border, #ddd);
}
.hdr-btn-outline:hover { background: var(--pos-bg-hover, #f5f5f5); }

.hdr-btn-danger { background: #ef4444; color: #fff; }
.hdr-btn-danger:hover { box-shadow: 0 3px 8px rgba(239,68,68,0.3); }

.hdr-btn-disabled, .hdr-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed !important;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

/* Badge pill inside header buttons */
.hdr-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    background: rgba(255,255,255,0.25);
    color: #fff;
}
.hdr-badge-danger { background: #ef4444; }
.hdr-badge-success { background: #10b981; }
.hdr-badge-warn { background: #f59e0b; color: #fff; }

/* Dropdown container */
.hdr-dropdown { position: relative; display: inline-flex; }

.hdr-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 200px;
    background: var(--pos-bg-card, #fff);
    border: 1px solid var(--pos-border, #e2e8f0);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1000;
    padding: 4px;
    animation: hdr-dd-open 0.12s ease-out;
}

@keyframes hdr-dd-open {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.hdr-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: none;
    background: none;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--pos-text, #333);
    cursor: pointer;
    transition: background 0.1s;
    white-space: nowrap;
}
.hdr-dropdown-item:hover { background: var(--pos-bg-hover, #f1f5f9); }
.hdr-dropdown-item.hdr-item-active {
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
}

/* Phone order badge in center */
.hdr-phone-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
}

/* ============================================
   Button Styles
   ============================================ */
.btn-pos-primary {
    background-color: var(--pos-primary);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-pos-primary:hover {
    background-color: var(--pos-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 159, 67, 0.35);
}

.btn-pos-secondary {
    background-color: #82868B;
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-pos-secondary:hover {
    background-color: #6E6B7B;
}

.btn-pos-info {
    background-color: var(--pos-info);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-pos-kitchen {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-pos-kitchen:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-pos-settings {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-pos-settings:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-pos-success {
    background-color: var(--pos-success);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-pos-danger {
    background-color: var(--pos-danger);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-pos-outline {
    background-color: transparent;
    color: var(--pos-text);
    border: 1px solid var(--pos-border);
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-pos-outline:hover {
    background-color: var(--pos-bg);
    border-color: var(--pos-text-light);
}

/* ============================================
   Products Area Container
   ============================================ */
.pos-products-area {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
}

/* ============================================
   Category Carousel - Compact
   ============================================ */
.pos-categories {
    background: var(--pos-bg-card);
    padding: 0.5rem 0.625rem;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.pos-categories h5 {
    display: none;
}

.pos-categories p {
    display: none;
}

.category-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-scroll::-webkit-scrollbar {
    height: 0;
    display: none;
}

.category-item {
    flex: 0 0 auto;
    width: 72px;
    text-align: center;
    padding: 0.4rem 0.3rem;
    background: var(--pos-bg);
    border: 1.5px solid var(--pos-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.category-item:hover {
    border-color: var(--pos-primary);
    transform: translateY(-1px);
}

.category-item.active {
    border-color: var(--pos-primary);
    background: var(--pos-primary-light);
}

.category-item img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.2rem;
}

.category-item .cat-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--pos-primary-light), #fff);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.2rem;
    font-size: 1rem;
}

.category-item .cat-icon.cat-icon-img {
    background: none;
    overflow: hidden;
    padding: 0;
}

.category-item .cat-icon.cat-icon-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.category-item h6 {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--pos-dark);
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.category-item span {
    font-size: 0.55rem;
    color: var(--pos-text-light);
    line-height: 1;
}

/* ============================================
   Quick Keys - Compact Scrollable Strip
   ============================================ */
.quick-keys-section {
    background: var(--pos-bg-card);
    padding: 0.4rem 0.625rem;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.quick-keys-scroll {
    display: flex;
    gap: 0.375rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.quick-keys-scroll::-webkit-scrollbar {
    display: none;
}

.quick-key-btn {
    flex: 0 0 auto;
    min-width: 80px;
    max-width: 120px;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.quick-key-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.quick-key-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quick-key-text {
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.quick-key-price {
    font-size: 0.58rem;
    opacity: 0.85;
    line-height: 1;
}

/* ============================================
   Products Header
   ============================================ */
.pos-products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.pos-products-header h5 {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pos-dark);
    margin: 0;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.pos-products-header .product-count {
    background: var(--pos-primary);
    color: #fff;
    font-size: 0.62rem;
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    font-weight: 700;
}

/* ============================================
   Product Grid - Compact
   ============================================ */
.pos-products {
    background: var(--pos-bg-card);
    padding: 0.625rem;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}

.product-card {
    background: var(--pos-bg-card);
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    padding: 0.4rem;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}

.product-card:hover {
    border-color: var(--pos-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.product-card.selected {
    border-color: var(--pos-success);
    background: var(--pos-success-light);
}

.product-card .img-bg {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 6px;
    padding: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.35rem;
    aspect-ratio: 4/3;
    position: relative;
    overflow: hidden;
}

.product-card .img-bg img {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
}

.product-card .img-bg img.product-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.product-card .img-bg .check-icon {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: var(--pos-success);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.6rem;
}

.product-card.selected .check-icon {
    display: flex;
}

.product-card .cat-name {
    font-size: 0.58rem;
    color: var(--pos-info);
    font-weight: 500;
    margin-bottom: 0.1rem;
    text-transform: uppercase;
    line-height: 1;
}

.product-card .product-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--pos-dark);
    margin-bottom: 0.2rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.62rem;
}

.product-card .price span {
    color: var(--pos-text-light);
    font-size: 0.58rem;
}

.product-card .price p {
    color: var(--pos-primary);
    font-weight: 700;
    font-size: 0.78rem;
    margin: 0;
}

/* ============================================
   Resize Handle
   ============================================ */
.pos-resize-handle {
    width: 6px;
    cursor: col-resize;
    background: transparent;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.pos-resize-handle:hover,
.pos-resize-handle.active {
    background: var(--pos-primary, #1B9C85);
}

.pos-resize-handle-line {
    width: 2px;
    height: 40px;
    border-radius: 2px;
    background: var(--pos-border, #e5e7eb);
    transition: background 0.2s, height 0.2s;
}

.pos-resize-handle:hover .pos-resize-handle-line,
.pos-resize-handle.active .pos-resize-handle-line {
    background: white;
    height: 60px;
}

/* ============================================
   Order List Sidebar
   ============================================ */
.pos-order-list {
    background: var(--pos-bg-card);
    border-left: 1px solid var(--pos-border);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: none;
    width: 340px;
    overflow-x: hidden;
}

.order-list-head {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--pos-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.order-list-head h5 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pos-dark);
    margin: 0;
}

.order-list-head span {
    font-size: 0.75rem;
    color: var(--pos-text-light);
}

.btn-clear-cart {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--pos-danger);
    cursor: pointer;
    transition: background 0.15s;
}

.btn-clear-cart:hover {
    background: var(--pos-danger-light);
}

/* Customer Info Block */
.customer-info-block {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid var(--pos-border);
}

.customer-info-block label {
    display: none;
}

.customer-select {
    display: flex;
    gap: 0.35rem;
}

.customer-select select {
    flex: 1;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--pos-border);
    border-radius: 6px;
    font-size: 0.78rem;
    color: var(--pos-text);
    background: white;
}

.customer-select .btn-add-customer {
    width: 32px;
    height: 32px;
    background: var(--pos-primary);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Payment Chips */
.payment-chips-wrap {
    padding: 0.35rem 0.75rem;
}

.payment-chip {
    font-size: 0.72rem;
    padding: 0.3rem 0.6rem;
}

/* Product List in Cart */
.product-added-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
}

.product-added-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.product-added-head h6 {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--pos-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.product-added-head .count {
    background: var(--pos-primary);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    font-size: 0.62rem;
}

.product-added-head .clear-all {
    color: var(--pos-danger);
    font-size: 0.72rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

/* Cart Item */
.cart-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--pos-bg);
    border-radius: 8px;
    margin-bottom: 0.4rem;
}

.cart-item .item-img {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item .item-img img {
    max-width: 28px;
    max-height: 28px;
}

.cart-item .item-img img.cart-item-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.cart-item .item-info {
    flex: 1;
    min-width: 0;
}

.cart-item .item-info span {
    font-size: 0.65rem;
    color: var(--pos-text-light);
}

.cart-item .item-info h6 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pos-dark);
    margin: 0.125rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item .item-info p {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pos-primary) !important;
    margin: 0;
}

/* Quantity Control */
.qty-control {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.qty-control button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--pos-border);
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--pos-text);
    transition: all 0.2s;
}

.qty-control button:hover {
    background: var(--pos-primary);
    border-color: var(--pos-primary);
    color: white;
}

.qty-control input {
    width: 40px;
    height: 28px;
    border: 1px solid var(--pos-border);
    border-radius: 6px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pos-dark) !important;
    background: white;
}

.cart-item .item-actions {
    display: flex;
    gap: 0.25rem;
}

.cart-item .item-actions button {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--pos-bg);
    border-radius: 6px;
    cursor: pointer;
    color: var(--pos-text-light);
    transition: all 0.2s;
}

.cart-item .item-actions button:hover {
    background: var(--pos-danger-light);
    color: var(--pos-danger);
}

/* Order Summary */
.order-summary {
    padding: 0.4rem 0.75rem;
    border-top: 1px solid var(--pos-border);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.2rem 0;
    font-size: 0.78rem;
    color: var(--pos-text);
}

.summary-row span {
    color: var(--pos-text);
}

.summary-row.discount {
    color: var(--pos-danger);
}

.summary-row.discount span {
    color: var(--pos-danger);
}

.summary-row.total {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pos-dark);
    border-top: 1px solid var(--pos-border);
    padding-top: 0.4rem;
    margin-top: 0.25rem;
}

.summary-row.total span {
    color: var(--pos-dark);
}

/* Order Controls Section (VAT, Service, Discount, Shipping) */
.pos-order-list label {
    color: var(--pos-dark) !important;
}

.pos-order-list select,
.pos-order-list input[type="number"],
.pos-order-list input[type="text"] {
    color: var(--pos-dark) !important;
    background-color: white !important;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--pos-border);
}

.payment-method {
    flex: 1;
    padding: 1rem;
    background: var(--pos-bg);
    border: 2px solid var(--pos-border);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-method:hover {
    border-color: var(--pos-primary);
}

.payment-method.selected {
    border-color: var(--pos-primary);
    background: var(--pos-primary-light);
}

.payment-method img {
    width: 30px;
    height: 30px;
    margin-bottom: 0.5rem;
}

.payment-method span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--pos-text);
}

/* Grand Total Button */
.grand-total-btn {
    margin: 0 0.75rem 0.4rem;
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    color: white !important;
    border: none;
    border-radius: 8px;
    padding: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    width: calc(100% - 1.5rem);
    cursor: pointer;
    transition: all 0.2s;
}

.grand-total-btn:hover {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

.grand-total-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Action Buttons Row */
.order-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    padding: 0 0.75rem 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
    max-width: 100%;
    min-width: 0;
}

.order-actions::-webkit-scrollbar {
    display: none;
}

.order-actions button {
    flex: 0 0 auto;
    min-width: 70px;
    padding: 0.45rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.order-actions .btn-hold {
    background: var(--pos-info);
    border: none;
    color: white;
}

.order-actions .btn-void {
    background: var(--pos-danger);
    border: none;
    color: white;
}

.order-actions .btn-pay {
    background: var(--pos-success);
    border: none;
    color: white;
}

/* ============================================
   Search Input
   ============================================ */
.pos-search {
    position: relative;
    flex: 1;
    max-width: 280px;
}

.pos-search input {
    width: 100%;
    padding: 0.4rem 0.75rem 0.4rem 2rem;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    font-size: 0.78rem;
    background: white;
    color: var(--pos-text);
}

.pos-search input:focus {
    outline: none;
    border-color: var(--pos-primary);
    box-shadow: 0 0 0 2px rgba(255, 159, 67, 0.12);
}

.pos-search input::placeholder {
    color: var(--pos-text-light);
}

.pos-search .search-icon {
    position: absolute;
    left: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pos-text-light);
    width: 14px;
    height: 14px;
}

/* ============================================
   Status Badges
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-success {
    background: var(--pos-success-light);
    color: var(--pos-success);
}

.badge-warning {
    background: var(--pos-warning-light);
    color: #B54708;
}

.badge-danger {
    background: var(--pos-danger-light);
    color: var(--pos-danger);
}

.badge-info {
    background: var(--pos-info-light);
    color: #0369A1;
}

/* ============================================
   Online/Offline Status
   ============================================ */
.online-status {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
}

.online-status.online {
    background: var(--pos-success-light);
}

.online-status.online .status-label {
    color: #166534;
}

.online-status.offline {
    background: var(--pos-warning-light);
}

.online-status.offline .status-label {
    color: #B54708;
}

.online-status.offline-active {
    background: #FEF3C7;
}

.online-status.offline-active .status-label {
    color: #92400E;
    font-weight: 600;
}

.online-status.offline-active .status-dot {
    background: #F59E0B;
}

/* ============================================
   Offline Notification Banner
   ============================================ */
.offline-banner {
    background: #FEF3C7;
    border-bottom: 2px solid #F59E0B;
    padding: 0.5rem 1rem;
    z-index: 50;
    animation: slideDown 0.3s ease-out;
}

.offline-banner-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #92400E;
    max-width: 100%;
}

.offline-banner-content strong {
    font-weight: 700;
}

.offline-banner-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: #D97706;
}

.offline-banner-icon.online {
    stroke: #059669;
}

.offline-banner-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #92400E;
    font-size: 1rem;
    cursor: pointer;
    padding: 0 0.25rem;
    flex-shrink: 0;
}

.offline-banner-close:hover {
    color: #78350F;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.online-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.online-status.online .status-dot {
    background: var(--pos-success);
}

.online-status.offline .status-dot {
    background: var(--pos-warning);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   Modal Styles
   ============================================ */
.pos-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    animation: modal-in 0.2s ease-out;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.pos-modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--pos-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pos-modal-header h5 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--pos-dark);
    margin: 0;
}

.pos-modal-header .close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--pos-bg);
    border-radius: 8px;
    cursor: pointer;
    color: var(--pos-text);
}

.pos-modal-body {
    padding: 1.25rem;
}

.pos-modal-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--pos-border);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: toast-in 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-success {
    background: var(--pos-success);
}

.toast-error {
    background: var(--pos-danger);
}

.toast-warning {
    background: var(--pos-warning);
}

.toast-info {
    background: var(--pos-info);
}

/* ============================================
   Customer Search Modal Styles
   ============================================ */
.customer-search-input {
    margin-bottom: 1rem;
}

.customer-search-input .search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.customer-search-input .search-icon {
    position: absolute;
    left: 1rem;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--pos-text-light);
}

.customer-search-input input {
    width: 100%;
    padding: 0.875rem 2.5rem 0.875rem 3rem;
    border: 2px solid var(--pos-border);
    border-radius: 0.75rem;
    font-size: 1rem;
    color: var(--pos-dark);
    background: white;
    transition: border-color 0.2s;
}

.customer-search-input input:focus {
    outline: none;
    border-color: var(--pos-primary);
}

.customer-search-input input::placeholder {
    color: var(--pos-text-light);
}

.customer-search-input .clear-search {
    position: absolute;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--pos-bg);
    border-radius: 0.5rem;
    color: var(--pos-text-light);
    cursor: pointer;
}

.customer-search-input .clear-search:hover {
    background: var(--pos-danger-light);
    color: var(--pos-danger);
}

/* Customer List */
.customer-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--pos-border);
    border-radius: 0.75rem;
}

.customer-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--pos-border);
    cursor: pointer;
    transition: background-color 0.2s;
}

.customer-item:last-child {
    border-bottom: none;
}

.customer-item:hover {
    background-color: var(--pos-bg);
}

.customer-item.selected {
    background-color: var(--pos-primary-light);
    border-left: 3px solid var(--pos-primary);
}

.customer-avatar {
    width: 3rem;
    height: 3rem;
    background: var(--pos-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.customer-avatar svg {
    color: var(--pos-text-light);
}

.customer-item.selected .customer-avatar {
    background: var(--pos-primary);
}

.customer-item.selected .customer-avatar svg {
    color: white;
}

.customer-details {
    flex: 1;
    min-width: 0;
}

.customer-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.customer-name-row .name {
    font-weight: 600;
    color: var(--pos-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-name-row .code {
    font-size: 0.75rem;
    color: var(--pos-text-light);
    background: var(--pos-bg);
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
}

.customer-info-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--pos-text);
}

.customer-info-row .vat {
    color: var(--pos-info);
}

.customer-info-row .phone {
    color: var(--pos-text-light);
}

.customer-info-row .balance {
    font-weight: 500;
}

.customer-info-row .balance.positive {
    color: var(--pos-danger);
}

.customer-info-row .balance.negative {
    color: var(--pos-success);
}

.select-indicator {
    color: var(--pos-text-light);
    flex-shrink: 0;
}

.customer-item:hover .select-indicator {
    color: var(--pos-primary);
}

/* Selected Customer Info in Order List */
.selected-customer-info {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--pos-primary-light);
    border-radius: 0.5rem;
    border-left: 3px solid var(--pos-primary);
}

.selected-customer-info .customer-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pos-dark);
}

.selected-customer-info .customer-vat {
    display: block;
    font-size: 0.75rem;
    color: var(--pos-text);
    margin-top: 0.125rem;
}

/* ============================================
   Tables Page Styles
   ============================================ */
.tables-page {
    background: var(--pos-bg);
    color: var(--pos-text);
}

.tables-page h1,
.tables-page h2,
.tables-page h3,
.tables-page h4,
.tables-page h5,
.tables-page h6 {
    color: var(--pos-dark);
}

.tables-page p {
    color: var(--pos-text);
}

/* Sidebar Items */
.sidebar-item {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    color: #6b7280;
    transition: all 0.2s;
    cursor: pointer;
    background: transparent;
    border: none;
}

.sidebar-item:hover {
    background: #f3f4f6;
    color: var(--pos-primary);
}

.sidebar-item.active {
    background: var(--pos-primary-light);
    color: var(--pos-primary);
}

/* Table Page Buttons */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--pos-border);
    background: white;
    color: var(--pos-text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ghost:hover {
    background: var(--pos-bg);
    border-color: var(--pos-text-light);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    border: none;
    background: var(--pos-primary);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--pos-primary-dark);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    border: none;
    background: var(--pos-danger);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Modal Overlay (Tables Page) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    body {
        background: white !important;
    }
    
    .no-print {
        display: none !important;
    }
}

/* ============================================
   Restaurant Mode - Table Selector
   ============================================ */
.modal-content.modal-xl {
    max-width: 900px;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--pos-dark);
}

/* Floor Tabs */
.floor-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--pos-border);
}

.floor-tab {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--pos-border);
    background: white;
    color: var(--pos-text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.floor-tab:hover {
    border-color: var(--pos-primary);
    color: var(--pos-primary);
}

.floor-tab.active {
    background: var(--pos-primary);
    border-color: var(--pos-primary);
    color: white;
}

/* Table Grid */
.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.table-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.table-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.table-card.selected {
    border-color: var(--pos-primary) !important;
    box-shadow: 0 0 0 3px rgba(255, 159, 67, 0.2);
}

.table-card.table-available {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.table-card.table-available .table-icon {
    color: #16a34a;
}

.table-card.table-available .table-status-badge {
    background: #22c55e;
    color: white;
}

.table-card.table-occupied {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.table-card.table-occupied .table-icon {
    color: #dc2626;
}

.table-card.table-occupied .table-status-badge {
    background: #ef4444;
    color: white;
}

.table-card.table-reserved {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.table-card.table-reserved .table-icon {
    color: #d97706;
}

.table-card.table-reserved .table-status-badge {
    background: #f59e0b;
    color: white;
}

.table-card.table-cleaning {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

.table-card.table-cleaning .table-icon {
    color: #6b7280;
}

.table-card.table-cleaning .table-status-badge {
    background: #9ca3af;
    color: white;
}

.table-card.table-blocked {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    opacity: 0.6;
    cursor: not-allowed;
}

.table-card.table-blocked .table-icon,
.table-card.table-blocked .table-name,
.table-card.table-blocked .table-capacity {
    color: white;
}

.table-icon {
    margin-bottom: 0.5rem;
}

.table-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pos-dark);
    margin-bottom: 0.25rem;
}

.table-capacity {
    font-size: 0.75rem;
    color: var(--pos-text-light);
    margin-bottom: 0.5rem;
}

.table-status-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    text-transform: uppercase;
}

.table-amount {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--pos-primary);
    margin-top: 0.375rem;
}

/* Table Legend */
.table-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--pos-bg);
    border-radius: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-dot.available {
    background: #22c55e;
}

.legend-dot.occupied {
    background: #ef4444;
}

.legend-dot.reserved {
    background: #f59e0b;
}

.legend-dot.cleaning {
    background: #9ca3af;
}

.legend-label {
    font-size: 0.8rem;
    color: var(--pos-text);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
}

.empty-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    color: #d1d5db;
}

.empty-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--pos-text);
    margin-bottom: 0.25rem;
}

.empty-subtitle {
    font-size: 0.875rem;
    color: var(--pos-text-light);
}

/* ============================================
   Responsive Adjustments
   ============================================ */

/* Large desktops (1400px+) */
@media (min-width: 1400px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .pos-order-list {
        width: 380px;
    }
    .pos-products-area {
        padding: 0.75rem 1rem;
    }
}

/* Standard desktop/laptop (1024px - 1399px) */
@media (max-width: 1399px) {
    .pos-order-list {
        width: 320px;
    }
}

/* iPad landscape / small laptops (900px - 1024px) */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.375rem;
    }

    .product-card .img-bg {
        aspect-ratio: 5/3;
        padding: 0.25rem;
    }

    .product-card .product-name {
        font-size: 0.65rem;
        -webkit-line-clamp: 1;
    }

    .product-card .price p {
        font-size: 0.7rem;
    }

    .pos-order-list {
        width: 280px;
    }

    .order-summary {
        padding: 0.35rem 0.625rem;
    }

    .summary-row {
        font-size: 0.72rem;
        padding: 0.15rem 0;
    }

    .grand-total-btn {
        padding: 0.5rem;
        font-size: 0.78rem;
    }

    .order-actions button {
        padding: 0.4rem 0.45rem;
        font-size: 0.65rem;
        gap: 0.2rem;
        min-width: 62px;
    }

    .order-actions button svg {
        width: 12px;
        height: 12px;
    }

    .table-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }

    .hdr-btn span {
        display: none;
    }

    .hdr-btn {
        padding: 0.35rem;
    }

    .hdr-badge {
        position: absolute;
        top: -4px;
        right: -4px;
        min-width: 16px;
        height: 16px;
        font-size: 0.58rem;
    }

    .hdr-dropdown {
        position: relative;
    }

    .hdr-caret {
        display: none;
    }

    .shift-status-badge .status-text {
        font-size: 0.68rem;
    }

    .category-item {
        width: 60px;
    }

    .category-item .cat-icon {
        width: 26px;
        height: 26px;
        font-size: 0.85rem;
    }

    .category-item h6 {
        font-size: 0.55rem;
    }

    .category-item span {
        display: none;
    }
}

/* iPad portrait (768px - 899px) */
@media (max-width: 899px) {
    .pos-products-area {
        padding: 0.375rem 0.5rem;
        gap: 0.375rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 0.3rem;
    }

    .product-card {
        padding: 0.3rem;
    }

    .product-card .cat-name {
        display: none;
    }

    .product-card .img-bg {
        aspect-ratio: 3/2;
    }

    .pos-order-list {
        width: 260px;
    }

    .cart-item .item-img {
        width: 30px;
        height: 30px;
    }

    .cart-item .item-info h6 {
        font-size: 0.7rem;
    }

    .cart-item .item-info p {
        font-size: 0.7rem;
    }

    .cart-item .item-info span {
        font-size: 0.58rem;
    }

    .qty-control button {
        width: 24px;
        height: 24px;
    }

    .qty-control input {
        width: 32px;
        height: 24px;
        font-size: 0.7rem;
    }

    .online-status {
        display: none;
    }

    .table-info-badge {
        display: none;
    }
}

/* Small tablets / large phones (below 768px) */
@media (max-width: 768px) {
    .pos-resize-handle {
        display: none;
    }

    .pos-order-list {
        position: fixed;
        right: 0;
        top: 0;
        bottom: 0;
        width: 100% !important;
        max-width: 360px;
        z-index: 100;
        transform: translateX(100%);
        transition: transform 0.3s;
    }
    
    .pos-order-list.open {
        transform: translateX(0);
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .pos-header-bar {
        padding: 0.25rem 0.5rem;
    }

    .category-item {
        width: 56px;
        padding: 0.3rem 0.2rem;
    }

    .table-legend {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
}

/* Phone (below 480px) */
@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.25rem;
    }

    .category-item {
        width: 52px;
    }

    .quick-key-btn {
        min-width: 64px;
    }

    .pos-header-bar {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
}
