:root {
  --color-primary-50: #fdf5f3;
  --color-primary-100: #fbe6e1;
  --color-primary-200: #f6c8bd;
  --color-primary-300: #f0a291;
  --color-primary-400: #ea7a61;
  --color-primary-500: #e9552d;
  --color-primary-600: #d64219;
  --color-primary-700: #b23311;
  --color-primary-800: #932c12;
  --color-primary-900: #7a2712;
}

 /* Custom styles for Neobrutalism Elegant Tech look */
body {
    font-family: 'Inter', sans-serif;
    overscroll-behavior: none; /* Prevents 'pull-to-refresh' */
    background-color: #f8fafc; /* Material 3 surface color */
    color: #1e293b; /* Softer dark text */
}
/* --- MATERIAL 3 EXPRESSIVE UTILITIES --- */
body.dark {
    background-color: #0f172a !important; /* slate-900 */
    color: #f8fafc !important; /* slate-50 */
}
.neo-border {
    border: 1px solid #e2e8f0;
    border-radius: 24px;
}

.neo-shadow {
    border-radius: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.neo-shadow:hover {
    box-shadow: 0 12px 24px -8px rgba(233, 85, 45, 0.15), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    transform: translateY(-3px) scale(1.005);
}

.neo-shadow-sm {
    border-radius: 16px;
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.03), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.neo-shadow-sm:hover {
    box-shadow: 0 6px 12px -4px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.neo-btn {
    border: none;
    border-radius: 100px; /* Pill shape */
    box-shadow: 0 2px 6px 0 rgba(233, 85, 45, 0.2);
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow;
}

.neo-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.neo-btn:hover {
    box-shadow: 0 4px 12px 0 rgba(233, 85, 45, 0.3);
    transform: translateY(-1px);
}

.neo-btn:hover::after {
    opacity: 0.15;
}

.neo-btn:active {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
    transform: scale(0.96) translateY(0);
}

.neo-btn:active::after {
    opacity: 0.25;
}

.neo-input {
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background-color: #f8fafc;
}

.neo-input:focus {
    box-shadow: 0 0 0 4px rgba(233, 85, 45, 0.15);
    border-color: #E9552D;
    background-color: #ffffff;
    outline: none;
    transform: translateY(-1px);
}

/* Animation for page transitions */
.page {
    animation: pageFadeScale 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pageFadeScale {
    from { 
        opacity: 0; 
        transform: translateY(10px) scale(0.99); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

/* Animation for PIN/Activation input shake on error */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
.shake {
    animation: shake 0.3s ease-in-out;
    border-color: #ef4444 !important;
}

/* Mencegah Zoom di iOS (iPhone) saat tap PIN berulang kali */
.pin-key, #pin-backspace {
    touch-action: manipulation;
}

/* Custom scrollbar for a cleaner look */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Modal backdrop styling */
#modal-container {
    z-index: 50;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background-color: rgba(15, 23, 42, 0.4);
    transition: all 0.3s ease;
}

.modal-content {
    animation: modalBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes modalBounce {
    0% { opacity: 0; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1); }
}

/* For modals positioned absolute/fixed center */
.modal-content.fixed-center {
    animation: modalBounceCenter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes modalBounceCenter {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Styling untuk variasi produk */
.variation-item {
    transition: all 0.2s ease;
}
.variation-item:hover {
    transform: translateY(-2px);
}
.variation-item.selected {
    border-color: #4f46e5;
    background-color: #f0f4ff;
}
.out-of-stock {
    opacity: 0.6;
    filter: grayscale(0.7);
}
.low-stock {
    border-left: 4px solid #f59e0b;
}
.out-of-stock-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Styling untuk variasi produk di mobile */
@media (max-width: 640px) {
    .variation-option {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 12px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        background-color: white;
        margin-bottom: 12px;
    }
    
    .variation-option .option-name {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .variation-option .option-price,
    .variation-option .option-stock {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .variation-option .btn-remove-option {
        align-self: flex-end;
        margin-top: 8px;
    }
    
    /* Grid untuk harga dan stok di mobile */
    .price-stock-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }
}

/* Styling untuk desktop dan tablet */
@media (min-width: 641px) {
    .variation-option {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        background-color: white;
        margin-bottom: 8px;
    }
    
    .variation-option .option-name {
        flex: 1;
    }
    
    .variation-option .option-price {
        width: 100px;
    }
    
    .variation-option .option-stock {
        width: 80px;
    }
    
    .variation-option .btn-remove-option {
        color: #ef4444;
    }
    
    .variation-option .btn-remove-option:hover {
        color: #dc2626;
    }
}

/* Styling umum untuk tombol hapus variasi */
.btn-remove-option {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-remove-option:hover {
    background-color: #fef2f2;
}

/* Styling untuk input dalam variasi */
.variation-option input {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.variation-option input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Styling untuk container variasi */
.variation-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    background-color: #f9fafb;
}

.variation-item h4 {
    color: #374151;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Styling untuk tombol tambah opsi */
.btn-add-option {
    background: none;
    border: 1px dashed #d1d5db;
    color: #4f46e5;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.btn-add-option:hover {
    background-color: #f0f4ff;
    border-color: #4f46e5;
}

/* Styling untuk tombol hapus variasi */
.btn-remove-variation {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-remove-variation:hover {
    background-color: #fef2f2;
}

/* Toast notification styling */
#toast {
    z-index: 100;
    transition: transform 0.3s ease-in-out;
}

/* Modal backdrop styling */
#modal-container {
    z-index: 40;
}

/* Product card hover effects */
.product-card {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center;
}

.product-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.12), 0 4px 8px -4px rgba(0, 0, 0, 0.08);
}

.product-card img {
    transition: transform 0.5s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

/* PENAMBAHAN: Styling untuk item daftar produk */
.product-list-item {
    transition: all 0.2s ease;
    border-radius: 12px;
}
.product-list-item:hover {
    background-color: #ffffff;
    transform: translateX(4px);
}

/* Cart item styling */
.cart-item {
    transition: all 0.2s ease;
    border-radius: 12px;
}

.cart-item:hover {
    background-color: #f1f5f9;
    transform: scale(1.01);
}

/* Glassmorphism Bottom Nav */
#bottom-nav {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.nav-btn {
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.nav-btn:active::before {
    width: 150px;
    height: 150px;
}

/* Button styling consistency */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form input styling */
input, select, textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Table styling */
table {
    border-collapse: collapse;
    width: 100%;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

/* Chart container styling */
canvas {
    max-width: 100%;
    height: auto;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 8px 12px;
    }
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Success and error states */
.text-success {
    color: #10b981;
}

.text-error {
    color: #ef4444;
}

.bg-success {
    background-color: #10b981;
}

.bg-error {
    background-color: #ef4444;
}

/* Custom utility classes */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Print styles for receipts */
@media print {
    body * {
        visibility: hidden;
    }
    #receipt-content,
    #receipt-content * {
        visibility: visible;
    }
    #receipt-content {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}

/* Styling untuk variasi yang dipilih */
.selected-variation {
    border-color: #6366f1;
    background-color: #eef2ff;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Styling untuk summary variasi yang dipilih */
.selected-variations-summary {
    background-color: #f1f5f9;
    border-radius: 16px;
    padding: 16px;
    margin-top: 16px;
}

.selected-variations-summary h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
}

.selected-variations-summary p {
    font-size: 13px;
    margin-bottom: 4px;
    color: #475569;
}

.selected-variations-summary .total-price {
    font-weight: 700;
    color: #059669;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #cbd5e1;
}

/* Styling untuk logo di struk */
.receipt-logo {
    max-width: 120px;
    max-height: 80px;
    margin: 0 auto 10px;
    display: block;
    border-radius: 16px;
}

/* --- DARK MODE OVERRIDES --- */
body.dark {
    background-color: #0f172a !important; /* slate-900 */
    color: #f8fafc !important; /* slate-50 */
}
.dark .neo-border {
    border-color: #334155; /* slate-700 */
}
.dark .neo-shadow, .dark .neo-shadow-sm, .dark .modal-content, .dark .page, .dark .bg-white {
    background-color: #1e293b !important; /* slate-800 */
    color: #f1f5f9;
}
.dark .neo-btn:not(.bg-indigo-500):not(.bg-\[\#a3e635\]):not(.bg-\[\#60a5fa\]):not(.bg-\[\#fde047\]):not(.bg-\[\#f87171\]) {
    background-color: #334155;
    color: #f8fafc;
}
.dark .bg-gray-50, .dark .bg-slate-50, .dark .bg-gray-100 {
    background-color: #0f172a !important;
}
.dark .text-gray-900, .dark .text-gray-800 {
    color: #f8fafc !important;
}
.dark .text-gray-700 {
    color: #e2e8f0 !important;
}
.dark .text-gray-500 {
    color: #94a3b8 !important;
}
.dark .border-slate-200, .dark .border-gray-200 {
    border-color: #334155 !important;
}
.dark .neo-input {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}
.dark .neo-input:focus {
    background-color: #1e293b !important;
}
.dark #bottom-nav {
    background-color: #1e293b;
    border-top-color: #334155;
}
.dark .product-card, .dark .cart-item, .dark table th {
    background-color: #1e293b !important;
}
.dark table th {
    border-bottom: 1px solid #334155;
}
.dark .nav-btn:not(.text-indigo-500) {
    color: #94a3b8;
}
.dark .nav-btn:not(.text-indigo-500):hover {
    color: #f8fafc;
}
.dark #cart-total, .dark #payment-total {
    color: #818cf8 !important;
}
.dark .category-filter-btn.bg-white {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}
.dark .category-filter-btn.bg-indigo-500 {
    color: #ffffff !important;
}

/* ========================================== */
/* STARTUP-GRADE BOTTOM NAVIGATION BAR        */
/* ========================================== */
.nav-btn {
    position: relative;
    padding: 0.5rem;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
}

.nav-icon-container {
    position: relative;
    width: 3.2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    margin: 0 auto;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* KASIR / ACTIVE STATE */
.nav-btn.active .nav-icon-container {
    background-color: var(--color-primary-100);
    transform: translateY(-4px) scale(1.1);
}
.nav-btn.active i {
    transform: scale(1.1);
    color: var(--color-primary-600);
}
.nav-btn.active span {
    font-weight: 800;
    color: var(--color-primary-700);
    transform: translateY(-2px);
}

/* INACTIVE STATE */
.nav-btn:not(.active) .nav-icon-container {
    background-color: transparent;
    transform: translateY(0) scale(1);
}
.nav-btn:not(.active) i {
    color: #94a3b8; /* slate-400 */
    transition: all 0.3s ease;
}
.nav-btn:not(.active) span {
    font-weight: 600;
    color: #94a3b8;
}

.nav-btn:not(.active):hover i {
    color: var(--color-primary-400);
    transform: scale(1.1);
}

/* Dark mode overrides for Nav */
.dark .nav-btn.active .nav-icon-container {
    background-color: var(--color-primary-900);
}
.dark .nav-btn.active i {
    color: var(--color-primary-300);
}
.dark .nav-btn.active span {
    color: var(--color-primary-300);
}
/* Drawer Icon */
.drawer-icon.open { transform: rotate(180deg); }


