/* POS Main Styles */
.rr-pos-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* POS Header */
.rr-pos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.rr-pos-header .rr-shift-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.rr-pos-header .rr-shift-info span {
    font-size: 14px;
}

.rr-pos-header .rr-pos-actions button {
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #2ecc71;
    color: #fff;
}

.btn-success:hover {
    background: #27ae60;
}

.btn-warning {
    background: #f39c12;
    color: #fff;
}

.btn-warning:hover {
    background: #d68910;
}

.btn-info {
    background: #3498db;
    color: #fff;
}

.btn-info:hover {
    background: #2980b9;
}

/* POS Main Layout */
.rr-pos-main {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
}

.rr-pos-left {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px;
}

/* Categories */
.rr-category-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.rr-category-item {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
    color: #666;
}

.rr-category-item:hover {
    background: #e9ecef;
    color: #333;
}

.rr-category-item.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

/* Product Grid */
.rr-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    max-height: 600px;
    overflow-y: auto;
    padding: 5px;
}

.rr-product-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    position: relative;
}

.rr-product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.rr-product-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 auto 8px;
}

.rr-product-item .no-image {
    width: 70px;
    height: 70px;
    background: #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 8px;
}

.rr-product-item .product-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
    min-height: 34px;
}

.rr-product-item .product-price {
    font-size: 14px;
    color: #667eea;
    font-weight: 700;
}

.rr-product-item .low-stock {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #e74c3c;
    color: #fff;
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 10px;
}

.rr-product-item .inactive {
    opacity: 0.5;
    pointer-events: none;
}

/* POS Right - Order Cart */
.rr-pos-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rr-order-cart {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.rr-order-header {
    display: flex;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 14px;
    color: #666;
}

.rr-order-header span {
    font-weight: 600;
}

.rr-order-items {
    flex: 1;
    padding: 10px 0;
    max-height: 400px;
    overflow-y: auto;
}

.rr-order-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.rr-order-item:last-child {
    border-bottom: none;
}

.rr-order-item .item-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.rr-order-item .item-name {
    font-weight: 500;
    color: #333;
}

.rr-order-item .item-price {
    color: #666;
    font-size: 13px;
}

.rr-order-item .item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rr-order-item .item-controls .rr-item-qty {
    width: 50px;
    padding: 4px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
}

.rr-order-item .item-controls .rr-item-qty:focus {
    border-color: #667eea;
    outline: none;
}

.rr-order-item .item-controls .item-total {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    min-width: 70px;
}

.rr-order-item .item-controls .rr-item-remove {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 18px;
    padding: 0 5px;
}

.rr-order-item .item-controls .rr-item-remove:hover {
    color: #c0392b;
}

.empty-order {
    text-align: center;
    color: #999;
    padding: 40px 0;
    font-size: 14px;
}

/* Order Totals */
.rr-order-totals {
    border-top: 2px solid #f0f0f0;
    padding-top: 12px;
    margin-top: auto;
}

.rr-order-totals div {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
}

.rr-order-totals div:last-child {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    border-top: 2px solid #e0e0e0;
    padding-top: 10px;
    margin-top: 5px;
}

.rr-order-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.rr-order-actions button {
    padding: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.rr-order-actions button:hover {
    transform: translateY(-2px);
}

/* Table Selector */
.rr-table-selector {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px;
}

.rr-table-selector h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 15px;
}

.rr-table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
}

.rr-table-item {
    padding: 10px 5px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.rr-table-item:hover:not(.occupied):not(.reserved) {
    border-color: #667eea;
    transform: scale(1.05);
}

.rr-table-item .table-number {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.rr-table-item .table-status {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    color: #999;
    margin-top: 2px;
}

.rr-table-item .table-capacity {
    display: block;
    font-size: 10px;
    color: #999;
    margin-top: 2px;
}

.rr-table-item.available {
    border-color: #2ecc71;
    background: #f0fff4;
}

.rr-table-item.occupied {
    border-color: #e74c3c;
    background: #fff5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

.rr-table-item.reserved {
    border-color: #f39c12;
    background: #fffcf0;
    cursor: not-allowed;
    opacity: 0.7;
}

.rr-table-item.cleaning {
    border-color: #3498db;
    background: #f0f8ff;
    cursor: not-allowed;
    opacity: 0.7;
}

.rr-table-item.selected {
    border-color: #667eea;
    background: #e8ecff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
    .rr-pos-main {
        grid-template-columns: 1fr 320px;
    }
}

@media (max-width: 768px) {
    .rr-pos-main {
        grid-template-columns: 1fr;
    }
    
    .rr-pos-right {
        order: -1;
    }
    
    .rr-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        max-height: 400px;
    }
    
    .rr-pos-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .rr-pos-header .rr-shift-info {
        justify-content: center;
    }
    
    .rr-pos-header .rr-pos-actions {
        display: flex;
        justify-content: center;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .rr-pos-container {
        padding: 10px;
    }
    
    .rr-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .rr-order-actions {
        grid-template-columns: 1fr;
    }
    
    .rr-table-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }
}