
 /* Custom styles for a more polished look */
body {
    font-family: 'Inter', sans-serif;
    overscroll-behavior: none; /* Prevents 'pull-to-refresh' */
}

/* Animation for page transitions */
.page {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Animation for PIN/Activation input shake on error */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
.shake {
    animation: shake 0.3s ease-in-out;
}

/* Custom scrollbar for a cleaner look */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #a0aec0; /* gray-400 */
    border-radius: 3px;
}
.modal-content {
    animation: zoomIn 0.3s ease-out;
}
@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: 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: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* PENAMBAHAN: Styling untuk item daftar produk */
.product-list-item {
    transition: background-color 0.2s ease;
}
.product-list-item:hover {
    background-color: #f9fafb;
}

/* Cart item styling */
.cart-item {
    transition: background-color 0.2s ease;
}

.cart-item:hover {
    background-color: #f9fafb;
}

/* 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: #4f46e5;
    background-color: #f0f4ff;
}

/* Styling untuk summary variasi yang dipilih */
.selected-variations-summary {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
}

.selected-variations-summary h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.selected-variations-summary p {
    font-size: 13px;
    margin-bottom: 4px;
    color: #4b5563;
}

.selected-variations-summary .total-price {
    font-weight: 600;
    color: #059669;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

/* Styling untuk logo di struk */
.receipt-logo {
    max-width: 120px;
    max-height: 80px;
    margin: 0 auto 10px;
    display: block;
}