/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #8B5E3C;
    --primary-dark: #3B2416;
    --secondary: #C48A5A;
    --cream: #F8F5F1;
    --white: #FFFFFF;
    --gray: #F5F5F5;
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    
    /* Font & Radius Rules */
    --font-main: 'Inter', sans-serif;
    --radius-card: 20px;
    --radius-btn: 12px;
    --radius-input: 12px;
    --radius-sidebar: 24px;
    
    /* Modern Premium Soft Shadow */
    --shadow-premium: 0 10px 30px rgba(139, 94, 60, 0.05);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.03);
    --shadow-floating: 0 20px 40px rgba(0, 0, 0, 0.08);
}

body {
    font-family: var(--font-main);
    background-color: var(--cream);
    color: var(--primary-dark);
    overflow-x: hidden;
}

/* Custom Premium Utilities */
.card-premium {
    background: var(--white);
    border: none;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.card-premium:hover {
    box-shadow: var(--shadow-premium);
}

.btn-premium {
    border-radius: var(--radius-btn);
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-premium-primary {
    background-color: var(--primary);
    color: var(--white);
    border: none;
}

.btn-premium-primary:hover {
    background-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
}

.form-control-premium {
    border-radius: var(--radius-input);
    border: 1px solid #E5E7EB;
    padding: 12px 16px;
    transition: all 0.2s ease;
}

.form-control-premium:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(196, 138, 90, 0.15);
}

/* Sidebar Custom Styling */
.sidebar-premium {
    width: 260px;
    background-color: var(--primary-dark);
    border-radius: 0 var(--radius-sidebar) var(--radius-sidebar) 0;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding: 30px 20px;
    z-index: 1000;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 50px; /* Capsule shape */
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.sidebar-menu-item i {
    margin-right: 15px;
    font-size: 1.1rem;
}

.sidebar-menu-item:hover, .sidebar-menu-item.active {
    background-color: var(--secondary);
    color: var(--white);
    font-weight: 500;
}

/* Product Card POS - Ultra Compact */
.pos-product-card {
    width: 100%;
    min-height: 100px;
    height: auto;
    border-radius: 10px;
    background: var(--white);
    box-shadow: var(--shadow-card);
    border: none;
    overflow: hidden;
    transition: transform 0.15s ease;
    cursor: pointer;
}

.pos-product-card:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-premium);
}

/* Chip Categories */
.category-chip {
    background: var(--white);
    border: 1px solid rgba(139, 94, 60, 0.15);
    color: var(--primary-dark);
    padding: 8px 20px;
    border-radius: 50px;
    margin-right: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.category-chip.active, .category-chip:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Sub Menu POS Karyawan - Fixed Center Top */
.pos-submenu {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    display: flex;
    gap: 8px;
    background: var(--white);
    padding: 8px 15px;
    border-radius: 50px;
    box-shadow: var(--shadow-premium);
}

.pos-submenu-btn {
    background: transparent;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    color: var(--primary-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.pos-submenu-btn:hover {
    background: var(--cream);
    transform: scale(1.02);
}

.pos-submenu-btn.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(139, 94, 60, 0.3);
}

/* POS Full Screen Layout (Tanpa Sidebar) */
.pos-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

/* Tab Content */
.pos-tab-content {
    display: none;
    height: 100vh;
    overflow-y: auto;
}

.pos-tab-content.active {
    display: block;
}

/* Kitchen Display Style - Hitam dengan Card Dark Gray */
.kitchen-container {
    background: #000;
    min-height: 100vh;
    padding: 25px;
}

.kitchen-card {
    background: #1a1a1a;
    border-radius: 15px;
    padding: 20px;
    color: #fff;
}

/* Status colors sesuai referensi:
   - Baru (Pending) = Orange (#ff6b00)
   - Diproses (Process) = Blue (#0066ff)
   - Siap (Ready) = Green (#00cc66) */
.kitchen-new { border-left: 4px solid #ff6b00; }
.kitchen-process { border-left: 4px solid #0066ff; }
.kitchen-ready { border-left: 4px solid #00cc66; }

/* ========== ENHANCED POS STYLES ========== */

/* Glass Morphism Search Bar */
.search-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 94, 60, 0.1);
    transition: all 0.3s ease;
}

.search-glass:focus {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(139, 94, 60, 0.15);
}

/* Enhanced Product Card - Premium Elegant */
.pos-product-card-enhanced {
    height: 100%;
    border-radius: 16px;
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.pos-product-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pos-product-card-enhanced::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.pos-product-card-enhanced:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(139, 94, 60, 0.2);
    border-color: var(--secondary);
}

.pos-product-card-enhanced:hover::before {
    opacity: 1;
}

.pos-product-card-enhanced:hover::after {
    opacity: 1;
}

.pos-product-card-enhanced:active {
    transform: scale(0.97);
}

/* Product Image Container */
.pos-product-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pos-product-card-enhanced:hover .pos-product-image {
    transform: scale(1.08);
}

/* Product Card Badge */
.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 600;
}

/* Enhanced Cart Item */
.cart-item-enhanced {
    background: var(--white);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    animation: slideInCart 0.3s ease;
}

@keyframes slideInCart {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-item-enhanced:hover {
    background: var(--cream);
    border-color: var(--secondary);
}

/* Quantity Controller */
.qty-controller {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--cream);
    border-radius: 25px;
    padding: 4px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--white);
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.qty-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-value {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-dark);
}

/* Summary Card - Premium Sticky */
.cart-summary-sticky {
    background: linear-gradient(180deg, var(--white) 0%, var(--cream) 100%);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -8px 32px rgba(139, 94, 60, 0.1);
    border-top: 1px solid rgba(139, 94, 60, 0.08);
}

/* Total Display - Premium Large */
.total-display {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: -0.5px;
}

/* Subtotal/Promo Row */
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
}

/* Grand Total Section - Highlighted */
.grand-total-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    margin: 16px -15px -15px -15px;
    padding: 20px;
    border-radius: 0 0 20px 20px;
    color: white;
}

.grand-total-section .label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.grand-total-section .amount {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Payment Method Cards */
.payment-card {
    background: var(--white);
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.payment-card:hover {
    border-color: var(--secondary);
    background: var(--cream);
}

.payment-card.selected {
    border-color: var(--primary);
    background: rgba(139, 94, 60, 0.08);
}

.payment-card i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--primary);
}

/* Order Type Selection */
.order-type-card {
    background: var(--white);
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.order-type-card:hover {
    border-color: var(--secondary);
    transform: translateY(-2px);
}

.order-type-card.selected {
    border-color: var(--primary);
    background: rgba(139, 94, 60, 0.08);
    box-shadow: 0 4px 12px rgba(139, 94, 60, 0.15);
}

/* Table Selection Grid */
.table-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.table-item {
    aspect-ratio: 1;
    border-radius: 12px;
    border: 2px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--white);
}

.table-item:hover {
    border-color: var(--secondary);
}

.table-item.selected {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.table-item.occupied {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
    cursor: not-allowed;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast-notification {
    background: var(--white);
    border-radius: 12px;
    padding: 14px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
    margin-bottom: 10px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }

/* Empty Cart State */
.empty-cart-enhanced {
    text-align: center;
    padding: 40px 20px;
}

.empty-cart-enhanced i {
    font-size: 4rem;
    color: var(--secondary);
    opacity: 0.3;
    margin-bottom: 16px;
}

/* Enhanced Checkout Modal */
.checkout-modal-enhanced {
    border-radius: 20px;
    overflow: hidden;
}

.checkout-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 20px;
    margin: -20px -20px 20px -20px;
}

/* Receipt Styling */
.receipt-enhanced {
    font-family: 'Courier New', monospace;
    background: white;
    padding: 24px;
    max-width: 320px;
    margin: 0 auto;
    border: 1px dashed #ccc;
}

.receipt-header {
    text-align: center;
    border-bottom: 1px dashed #333;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.receipt-items {
    margin: 12px 0;
    padding-bottom: 12px;
    border-bottom: 1px dashed #333;
}

.receipt-total {
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 12px;
}

/* Keyboard Shortcuts Hint */
.shortcuts-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    display: flex;
    gap: 16px;
    z-index: 100;
}

.shortcuts-hint kbd {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 4px;
}

/* Scrollbar Custom */
.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: var(--cream);
    border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}
