@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #005813;
    /* Dark Green Kasgo */
    --primary-light: #00871d;
    --accent-color: #10b981;
    /* Emerald */
    --accent-hover: #059669;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-dark: #0f172a;
    --text-light: #64748b;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 16px;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 5%;
    background-color: #005813;
    color: var(--text-dark);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid #e2e8f0;
}

.logo {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 90px;
    max-width: 100%;
    object-fit: contain;
}

.table-info {
    font-size: 0.9rem;
    background: #f1f5f9;
    color: var(--text-dark);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}


/* Hero Section */
.hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
    padding: 2rem 5%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: white;
}

.hero-content {
    flex: 1;
    min-width: 200px;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1rem;
    opacity: 0.9;
}

.hero-image {
    flex: 1;
    min-width: 150px;
    display: flex;
    justify-content: center;
}

.hero-image img {
    width: 100%;
    max-width: 300px;
    border-radius: var(--radius);
    object-fit: cover;
}

/* Sticky Category Nav */
.category-nav-wrapper {
    position: sticky;
    top: 0;
    background: var(--bg-color);
    z-index: 90;
    border-bottom: 1px solid #eee;
    padding: 0.5rem 5%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.category-nav {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    list-style: none;
    scrollbar-width: none;
    /* Firefox */
}

.category-nav::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari */
}

.category-nav li {
    white-space: nowrap;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.category-nav li.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Menu Section */
.menu-section {
    padding: 1rem 5%;
}

.category-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin: 1.5rem 0 1rem 0;
    scroll-margin-top: 80px;
    /* Offset for sticky nav */
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

.menu-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.menu-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background-color: #eee;
}

.menu-card-content {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.menu-info h3 {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-info p {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-action {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-price {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
}

.add-btn {
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 0.4rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    width: 100%;
}

.add-btn:active {
    background-color: var(--accent-color);
    color: white;
}

/* Floating Cart Bar */
.floating-cart {
    position: fixed;
    bottom: 20px;
    left: 5%;
    right: 5%;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 20px rgba(30, 63, 32, 0.3);
    z-index: 95;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-cart:active {
    transform: scale(0.98);
}

.cart-summary-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
}

.cart-total-items {
    background: white;
    color: var(--primary-color);
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.8rem;
}

.cart-summary-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Bottom Sheet Modal */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.bottom-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bottom-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 20px 20px 0 0;
    z-index: 101;
    transition: bottom 0.4s cubic-bezier(0.1, 0.82, 0.25, 1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.bottom-sheet.open {
    bottom: 0;
}

.sheet-drag-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 12px auto;
}

.sheet-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    overflow-y: auto;
}

.sheet-item-img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.bottom-sheet h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.sheet-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.sheet-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.sheet-notes-wrapper {
    margin-bottom: 1rem;
}

.sheet-notes-wrapper label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sheet-notes-wrapper textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    resize: none;
    height: 80px;
    outline: none;
    font-family: 'Outfit', sans-serif;
}

.sheet-notes-wrapper textarea:focus {
    border-color: var(--accent-color);
}

.sheet-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#sheet-qty {
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 20px;
    text-align: center;
}

.sheet-add-btn {
    flex: 1;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}

/* Checkout Modal */
.checkout-modal {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: #fbfaf8;
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .checkout-modal {
        width: 400px;
    }
}

.checkout-modal.open {
    right: 0;
}

.checkout-header {
    padding: 1.5rem;
    background-color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #eee;
}

.close-checkout {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-dark);
}

.checkout-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    background: white;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cart-item-title {
    font-weight: 600;
    font-size: 1rem;
}

.cart-item-price {
    font-weight: 700;
    color: var(--text-dark);
}

.cart-item-notes {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.8rem;
}

.cart-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-remove {
    color: #ff4757;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
}

.checkout-footer {
    background: white;
    padding: 1.5rem;
    border-top: 1px solid #eee;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
}

.checkout-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.customer-name-input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    outline: none;
    font-family: 'Outfit', sans-serif;
}

.customer-name-input:focus {
    border-color: var(--accent-color);
}

.checkout-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
}

/* =========================
   Kasir Dashboard Styles
   ========================= */
.kasir-container {
    padding: 2rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.kasir-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.kasir-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.kasir-header button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.kasir-header button:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.orders-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .orders-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .orders-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.order-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    border-left: 5px solid var(--accent-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.order-card.completed {
    border-left-color: #ccc;
    opacity: 0.7;
}

.order-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.8rem;
}

.order-id {
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(30, 63, 32, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.order-time {
    font-size: 0.85rem;
    color: var(--text-light);
}

.order-customer {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-customer::before {
    content: '👤';
    font-size: 1rem;
}

.order-items-list {
    list-style: none;
    margin-bottom: 1.5rem;
    flex: 1;
}

.order-items-list li {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
    color: var(--text-dark);
}

.order-items-list li span {
    background: #f0f7f4;
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    width: 100%;
    display: inline-block;
    border: 1px solid rgba(64, 145, 108, 0.2);
}

.order-total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: right;
    margin-bottom: 1.2rem;
    padding-top: 1rem;
    border-top: 1px dashed #ddd;
}

.status-actions {
    display: flex;
    justify-content: center;
}

.btn-complete {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-complete:hover {
    background-color: var(--accent-hover);
    transform: scale(1.02);
}

.completed-badge {
    background-color: #f0f0f0;
    color: #666;
    padding: 0.8rem;
    border-radius: 30px;
    text-align: center;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.completed-badge::before {
    content: '✓';
    color: #4CAF50;
    font-weight: bold;
}

/* =========================
   POS System Styles
   ========================= */

.pos-body {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    background-color: var(--bg-color);
}

/* Sidebar POS Premium */
.pos-sidebar {
    width: 90px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-light) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05);
    z-index: 100;
    flex-shrink: 0;
}

.sidebar-logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    margin-bottom: 2.5rem;
    position: relative;
    letter-spacing: 0.5px;
}

.sidebar-logo::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 10px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
    padding: 0 0.5rem;
    flex: 1;
}

.sidebar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 72px;
    border-radius: 14px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    gap: 0.4rem;
}

.sidebar-btn i {
    font-size: 1.3rem;
}

.sidebar-btn span {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.sidebar-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-btn.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 3px solid var(--accent-color);
}

.sidebar-footer {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-btn-exit {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.sidebar-btn-exit:hover {
    color: #ef4444;
}

.mobile-pos-nav {
    display: none;
}

.pos-screen-area {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    flex: 1;
}

/* POS Layout */
.pos-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: auto;
    min-height: 0;
}

/* Catalog Middle Side */
.pos-catalog {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    overflow: hidden;
}

.catalog-header {
    background: white;
    padding: 1.2rem 1.8rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.catalog-title h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
}

.catalog-title p {
    font-size: 0.8rem;
    color: var(--text-light);
}

.search-bar-wrapper {
    position: relative;
    width: 320px;
    max-width: 100%;
}

.search-bar-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 0.9rem;
}

.pos-search-input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 0.88rem;
    outline: none;
    transition: all 0.3s;
    background: #f8fafc;
}

.pos-search-input:focus {
    border-color: var(--accent-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Category Kapsul */
.category-tabs {
    display: flex;
    gap: 0.6rem;
    padding: 0.8rem 1.8rem;
    background: white;
    border-bottom: 1px solid #f1f5f9;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    padding: 0.6rem 1.3rem;
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    background: white;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-btn:hover {
    border-color: var(--accent-color);
    color: var(--primary-color);
    background: rgba(16, 185, 129, 0.02);
}

.cat-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 88, 19, 0.2);
}

/* Product Grid */
.pos-product-grid {
    padding: 1.8rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    overflow-y: auto;
    flex: 1;
    align-content: start;
}

.pos-product-card {
    background: white;
    border-radius: 18px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    position: relative;
}

.pos-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.06);
    border-color: var(--accent-color);
}

.pos-product-card img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    background: #f1f5f9;
    transition: transform 0.5s ease;
}

@media (max-width: 768px) {
    .pos-product-card img {
        height: 100px;
    }
}

.pos-product-card:hover img {
    transform: scale(1.05);
}

.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    z-index: 10;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.stock-badge.warning {
    color: #d97706;
    background: rgba(254, 243, 199, 0.95);
}

.stock-badge.danger {
    color: #dc2626;
    background: rgba(254, 226, 226, 0.95);
}

.pos-product-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
}

.pos-product-info h4 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pos-product-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pos-product-price .add-icon {
    width: 26px;
    height: 26px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.pos-product-card:hover .add-icon {
    background: var(--accent-color);
    color: white;
}

.out-of-stock {
    opacity: 0.55;
    pointer-events: none;
}

.out-of-stock .stock-badge {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.2);
}

/* Cart Panel (Right Side) */
.pos-cart {
    width: 400px;
    background: white;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #f1f5f9;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.02);
    z-index: 10;
    flex-shrink: 0;
    overflow-y: auto;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.cart-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
}

.active-shift-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-color);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.clear-cart-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0.4rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.clear-cart-btn:hover {
    background: #fef2f2;
}

.cart-meta-info {
    padding: 0.8rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-light);
}

.cart-meta-info span {
    font-weight: 600;
    color: var(--text-dark);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.empty-cart {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    gap: 0.8rem;
    font-size: 0.9rem;
}

.empty-cart i {
    font-size: 2.2rem;
    color: #cbd5e1;
}

.pos-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f8fafc;
}

.pos-cart-item:last-child {
    border-bottom: none;
}

.cart-item-details {
    flex: 1;
    padding-right: 1rem;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.cart-item-notes {
    font-size: 0.75rem;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 0.3rem;
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.cart-qty-control {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #f1f5f9;
    border-radius: 20px;
    padding: 0.25rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cart-qty-control button {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.cart-qty-control button:active {
    transform: scale(0.9);
}

.cart-qty-control span {
    font-weight: 700;
    font-size: 0.88rem;
    min-width: 20px;
    text-align: center;
}

/* Cart Summary & Discount */
.cart-summary {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid #f1f5f9;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.discount-section {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.discount-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
}

.discount-capsules {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.2rem;
}

.discount-capsules::-webkit-scrollbar {
    display: none;
}

.discount-btn {
    padding: 0.35rem 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    color: var(--text-light);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.discount-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 0.9rem;
}

.summary-row.total-row {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1.15rem;
    border-top: 1px dashed #e2e8f0;
    padding-top: 0.8rem;
    margin-top: 0.2rem;
}

.cart-total-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 1.2rem;
    border-radius: 18px;
    box-shadow: 0 10px 15px -3px rgba(0, 88, 19, 0.15);
    margin-bottom: 0.5rem;
}

.cart-total-box .total-label {
    font-size: 0.82rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cart-total-box .total-amount {
    font-size: 1.8rem;
    font-weight: 800;
    margin-top: 0.2rem;
}

.btn-checkout {
    width: 100%;
    padding: 1.1rem;
    border: none;
    border-radius: 30px;
    background: var(--accent-color);
    color: white;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.2);
}

.btn-checkout:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-checkout:not(:disabled):hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(16, 185, 129, 0.25);
}

/* MODALS PREMIUM */
.pos-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pos-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pos-modal {
    background: white;
    width: 90%;
    max-width: 440px;
    border-radius: 20px;
    overflow: hidden;
    transform: translateY(20px) scale(0.96);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.pos-modal-overlay.active .pos-modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.3rem 1.8rem;
    border-bottom: 1px solid #f1f5f9;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
}

.close-modal {
    cursor: pointer;
    font-size: 1.15rem;
    color: var(--text-light);
    transition: color 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    color: #ef4444;
    background: #fef2f2;
}

.modal-body {
    padding: 1.8rem;
    max-height: 75vh;
    overflow-y: auto;
}

.modal-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    background: #f0fdf4;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    display: inline-block;
}

.notes-wrapper label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-dark);
}

.notes-wrapper textarea {
    width: 100%;
    height: 90px;
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    resize: none;
    margin-bottom: 1.8rem;
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s;
}

.notes-wrapper textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.08);
}

.qty-control-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
}

.qty-control-modal button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-control-modal button:active {
    transform: scale(0.9);
}

.qty-control-modal span {
    font-size: 1.6rem;
    font-weight: 800;
    min-width: 40px;
    text-align: center;
}

.modal-footer {
    padding: 1.3rem 1.8rem;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    border-radius: 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 88, 19, 0.15);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

/* PAYMENT MODAL PREMIUM */
.payment-modal {
    max-width: 680px;
    width: 95%;
}

.payment-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.8rem;
}

@media (max-width: 640px) {
    .payment-grid {
        grid-template-columns: 1fr;
    }
}

.payment-left-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}

.order-types,
.payment-methods {
    display: flex;
    gap: 0.6rem;
}

.order-type-btn,
.pay-method-btn {
    flex: 1;
    padding: 0.8rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    transition: all 0.2s;
}

.order-type-btn i,
.pay-method-btn i {
    font-size: 1.2rem;
}

.order-type-btn.active,
.pay-method-btn.active {
    border-color: var(--primary-color);
    background: #f0fdf4;
    color: var(--primary-color);
    box-shadow: 0 4px 6px rgba(0, 88, 19, 0.05);
}

.payment-field-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s;
}

.payment-field-wrapper input:focus {
    border-color: var(--accent-color);
}

/* Payment Right Col */
.payment-right-col {
    background: #f8fafc;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid #f1f5f9;
}

.payment-total-box {
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 1.3rem;
    border-radius: 14px;
    box-shadow: 0 6px 12px rgba(0, 88, 19, 0.1);
}

.payment-total-box span {
    font-size: 0.78rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payment-total-box h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-top: 0.2rem;
}

#cash-input-section input {
    width: 100%;
    padding: 0.9rem;
    font-size: 1.4rem;
    font-weight: 800;
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    text-align: center;
    outline: none;
    color: var(--text-dark);
    background: white;
    transition: all 0.2s;
}

.quick-cash {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
}

.quick-cash button {
    padding: 0.6rem 0;
    border: 1px solid #cbd5e1;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-dark);
    transition: all 0.15s;
}

.quick-cash button:hover {
    border-color: var(--primary-color);
    background: rgba(0, 88, 19, 0.02);
}

.change-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 800;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
}

.change-box span:first-child {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-light);
}

.change-amount {
    color: var(--accent-color);
}

/* REALISTIC SIMULATED RECEIPT */
.receipt-modal {
    max-width: 440px;
}

.receipt-paper {
    background: #fff;
    padding: 2.2rem 1.8rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.88rem;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    position: relative;
}

/* Zigzag Effect on Thermal Paper */
.receipt-paper::before,
.receipt-paper::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 6px;
    background-size: 12px 6px;
    background-repeat: repeat-x;
}

.receipt-paper::before {
    top: -6px;
    background-image: linear-gradient(45deg, transparent 33.333%, #cbd5e1 33.333%, #cbd5e1 66.667%, transparent 66.667%), linear-gradient(-45deg, transparent 33.333%, #cbd5e1 33.333%, #cbd5e1 66.667%, transparent 66.667%);
}

.receipt-paper::after {
    bottom: -6px;
    background-image: linear-gradient(45deg, #cbd5e1 33.333%, transparent 33.333%, transparent 66.667%, #cbd5e1 66.667%), linear-gradient(-45deg, #cbd5e1 33.333%, transparent 33.333%, transparent 66.667%, #cbd5e1 66.667%);
}

.receipt-header {
    text-align: center;
    margin-bottom: 1.2rem;
}

.receipt-header h3 {
    margin: 0 0 0.3rem 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: black;
}

.receipt-header p {
    margin: 0.1rem 0;
    font-size: 0.78rem;
    color: #64748b;
}

.receipt-divider {
    border-top: 1px dashed #0f172a;
    margin: 0.8rem 0;
}

.receipt-table {
    width: 100%;
    margin: 0.8rem 0;
    border-collapse: collapse;
}

.receipt-table th,
.receipt-table td {
    padding: 0.3rem 0;
    text-align: left;
    font-size: 0.82rem;
}

.receipt-table .right {
    text-align: right;
}

.receipt-footer {
    text-align: center;
    margin-top: 1.2rem;
    font-size: 0.78rem;
    color: #64748b;
}

/* SHIFT DETAILS MODAL */
.shift-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.shift-stat-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #f1f5f9;
}

.shift-stat-card span {
    font-size: 0.75rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 0.2rem;
}

.shift-stat-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.shift-info-box {
    background: #f0fdf4;
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 1rem;
    border-radius: 14px;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 0.85rem;
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}

.shift-info-box i {
    font-size: 1rem;
    margin-top: 0.1rem;
}

/* =========================
   KITCHEN DISPLAY SYSTEM (KDS)
   ========================= */

.kasir-container {
    padding: 2.2rem 5%;
    max-width: 1280px;
    margin: 0 auto;
}

.kasir-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.kasir-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 800;
}

.kasir-header button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.6rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 88, 19, 0.15);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kasir-header button:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 88, 19, 0.2);
}

.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.8rem;
}

.order-card {
    background: white;
    border-radius: 20px;
    padding: 1.6rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.03), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-left: 6px solid var(--accent-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.order-card.takeaway {
    border-left-color: #3b82f6;
}

.order-card.delivery {
    border-left-color: #8b5cf6;
}

.order-card.completed {
    border-left-color: #cbd5e1;
    opacity: 0.65;
}

.order-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.07);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.8rem;
}

.order-id {
    font-weight: 800;
    color: var(--primary-color);
    background: rgba(0, 88, 19, 0.06);
    padding: 0.35rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
}

.order-time {
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.order-customer {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.order-type-badge {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-type-badge.dine-in {
    background: #ecfdf5;
    color: var(--accent-color);
}

.order-type-badge.takeaway {
    background: #eff6ff;
    color: #2563eb;
}

.order-type-badge.delivery {
    background: #f5f3ff;
    color: #7c3aed;
}

.order-items-list {
    list-style: none;
    margin-bottom: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.order-items-list li {
    display: flex;
    flex-direction: column;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.order-items-list li .item-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 0.5rem 0.8rem;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
}

.order-items-list li .item-qty {
    background: var(--primary-color);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    margin-right: 0.5rem;
}

.order-items-list li .item-name {
    font-weight: 600;
}

.order-items-list li .kds-notes {
    font-size: 0.78rem;
    color: #dc2626;
    margin-left: 2rem;
    margin-top: 0.2rem;
    font-style: italic;
}

.order-total {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    text-align: right;
    margin-bottom: 1.2rem;
    padding-top: 1rem;
    border-top: 1px dashed #e2e8f0;
}

.btn-complete {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.9rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.15);
}

.btn-complete:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.2);
}

.completed-badge {
    background-color: #f1f5f9;
    color: #64748b;
    padding: 0.9rem;
    border-radius: 14px;
    text-align: center;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid #e2e8f0;
}

/* =========================
   Payment Selector & QRIS Overlay
   ========================= */
.payment-method-selector {
    margin-top: 0.5rem;
    margin-bottom: 1.2rem;
}

.payment-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.payment-options {
    display: flex;
    gap: 0.8rem;
}

.payment-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.payment-option:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.payment-option.active {
    border-color: var(--primary-color);
    background-color: rgba(0, 88, 19, 0.05);
}

.payment-option i {
    font-size: 1.3rem;
    color: var(--text-light);
    transition: color 0.25s;
}

.payment-option.active i {
    color: var(--primary-color);
}

.option-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.option-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-dark);
}

.option-desc {
    font-size: 0.7rem;
    color: var(--text-light);
}

/* QRIS Modal Overlay */
.qris-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.qris-overlay.active {
    opacity: 1;
    visibility: visible;
}

.qris-modal {
    background: white;
    width: 90%;
    max-width: 380px;
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    color: var(--text-dark);
}

.qris-overlay.active .qris-modal {
    transform: scale(1) translateY(0);
}

.qris-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.8rem;
}

.qris-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.qris-logo-text {
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #0099ff, #ff3366, #ffcc00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.qris-merchant {
    font-size: 0.9rem;
    font-weight: 700;
    color: #475569;
    border-left: 2px solid #cbd5e1;
    padding-left: 0.6rem;
}

.close-qris {
    cursor: pointer;
    font-size: 1.2rem;
    color: #94a3b8;
    transition: color 0.2s;
    padding: 0.2rem;
}

.close-qris:hover {
    color: #ef4444;
}

.qris-instruction {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.qris-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.qris-qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.2rem;
    background: #f8fafc;
    border-radius: var(--radius);
    border: 1px solid #e2e8f0;
}

.qris-qr-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    background: #fff;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.qr-svg-mockup {
    width: 100%;
    height: 100%;
}

.scanner-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, transparent, var(--accent-color), transparent);
    opacity: 0.8;
    animation: scan-loop 2s linear infinite;
}

@keyframes scan-loop {
    0% {
        top: 0%;
    }

    50% {
        top: 100%;
    }

    100% {
        top: 0%;
    }
}

.qris-timer {
    font-size: 0.82rem;
    font-weight: 600;
    color: #ef4444;
    background: #fef2f2;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    align-self: center;
}

.qris-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.qris-btn:hover {
    background-color: var(--primary-light);
}

.qris-status-checking {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.6rem;
}

/* ==========================================================================
   Premium Responsive Styling Overrides
   ========================================================================== */

/* 1. Large Devices & Desktops (Modals & Float Bar Alignment) */
@media (min-width: 768px) {
    .bottom-sheet {
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 450px !important;
        border-radius: 20px !important;
        bottom: -100% !important;
        max-height: 80vh !important;
    }

    .bottom-sheet.open {
        bottom: 10% !important;
    }

    .floating-cart {
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 450px !important;
        right: auto !important;
    }

    .floating-cart:hover {
        transform: translate(-50%, -3px) !important;
    }

    .floating-cart:active {
        transform: translate(-50%, 0) scale(0.98) !important;
    }
}



/* 2. Tablets & Small Desktops (POS Adjustments) */
@media (max-width: 1024px) {
    .pos-sidebar {
        width: 70px !important;
    }

    .sidebar-logo {
        margin-bottom: 1.5rem !important;
        font-size: 1.3rem !important;
    }

    .sidebar-btn {
        height: 60px !important;
        border-radius: 8px !important;
    }

    .sidebar-btn i {
        font-size: 1.15rem !important;
    }

    .sidebar-btn span {
        font-size: 0.6rem !important;
    }

    .pos-cart {
        width: 300px !important;
    }

    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        padding: 1rem !important;
        gap: 1rem !important;
    }

    .catalog-header {
        padding: 1rem 1.2rem !important;
    }
}

/* Zona tanggung: 769px - 1023px yang tidak tertangkap */
@media (min-width: 769px) and (max-width: 1023px) {
    .pos-cart {
        width: 260px !important;
    }

    .pos-sidebar {
        width: 70px !important;
    }

    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
        padding: 0.8rem !important;
        gap: 0.8rem !important;
    }

    .catalog-header {
        flex-wrap: wrap !important;
        gap: 0.8rem !important;
    }

    .search-bar-wrapper {
        width: 100% !important;
    }
}

/* Pastikan konten tetap scroll jika viewport terlalu kecil */
@media (max-width: 1023px) and (min-width: 769px) {
    .pos-body {
        overflow: auto !important;
    }

    .pos-layout {
        min-width: 0 !important;
    }
}

/* 3. Mobile Devices & Small Screens (POS Navigation & Layout Stacking) */
@media (max-width: 768px) {

    /* POS Mobile Bottom Navigation */
    .pos-cart {
        width: 260px !important;
    }

    .pos-sidebar {
        width: 70px !important;
    }

    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
        padding: 0.8rem !important;
        gap: 0.8rem !important;
    }

    .catalog-header {
        flex-wrap: wrap !important;
        gap: 0.8rem !important;
    }

    .search-bar-wrapper {
        width: 100% !important;
    }

    .pos-body {
        flex-direction: column !important;
        height: auto !important;
        overflow: visible !important;
    }

    .pos-dashboard-view {
        min-height: 0 !important;
        height: 100% !important;
    }

    .pos-sidebar {
        width: 100% !important;
        height: 65px !important;
        flex-direction: row !important;
        padding: 0 1rem !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        z-index: 9999 !important;
        border-radius: 16px 16px 0 0 !important;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08) !important;
    }

    .sidebar-logo {
        display: none !important;
    }

    .sidebar-menu {
        flex-direction: row !important;
        justify-content: space-around !important;
        align-items: center !important;
        height: 100% !important;
        padding: 0 !important;
        gap: 0 !important;
    }

    .sidebar-btn {
        height: 100% !important;
        width: auto !important;
        border-radius: 0 !important;
        padding: 0.2rem 0.5rem !important;
        gap: 0.2rem !important;
    }

    .sidebar-btn.active {
        border-left: none !important;
        border-bottom: 3px solid var(--accent-color) !important;
        background: rgba(255, 255, 255, 0.08) !important;
    }

    .sidebar-footer {
        display: none !important;
        /* Exit icon integrated or hidden on main bottom nav */
    }

    .pos-screen-area {
        height: calc(100vh - 65px) !important;
        min-height: auto !important;
        overflow: hidden !important;
        padding-bottom: 0 !important;
    }

    .pos-layout {
        flex-direction: column !important;
        flex: 1 !important;
        height: auto !important;
        overflow: hidden !important;
    }

    /* Mobile POS Tab Navigation Style */
    .mobile-pos-nav {
        display: flex !important;
        width: 100%;
        background: white;
        border-bottom: 1px solid #e2e8f0;
        z-index: 95;
        flex-shrink: 0;
    }

    .mobile-nav-tab {
        flex: 1;
        padding: 0.85rem;
        border: none;
        background: transparent;
        font-weight: 700;
        font-size: 0.88rem;
        color: var(--text-light);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        border-bottom: 3px solid transparent;
        transition: all 0.2s ease;
    }

    .mobile-nav-tab.active {
        color: var(--primary-color);
        border-bottom-color: var(--primary-color);
    }

    .mobile-cart-count {
        background: var(--primary-color);
        color: white;
        font-size: 0.72rem;
        padding: 0.1rem 0.4rem;
        border-radius: 9999px;
        font-weight: 800;
        display: inline-block;
    }

    .mobile-nav-tab.active .mobile-cart-count {
        background: var(--accent-color);
    }

    .pos-catalog {
        flex: 1 !important;
        height: 100% !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .pos-cart {
        flex: 1 !important;
        width: 100% !important;
        height: 100% !important;
        overflow-y: auto !important;
        border-left: none !important;
        border-top: none !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Show/hide catalog and cart depending on tab class */
    .pos-layout:not(.mobile-cart-active) .pos-cart {
        display: none !important;
    }

    .pos-layout.mobile-cart-active .pos-catalog {
        display: none !important;
    }

    .pos-product-grid {
        padding: 1rem !important;
        gap: 1rem !important;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    }

    .pos-top-bar {
        padding: 0.8rem 1rem !important;
    }

    .kasgo-suite-nav {
        padding: 0.8rem 1rem !important;
        overflow-x: auto !important;
        display: flex !important;
        gap: 0.6rem !important;
        scrollbar-width: none !important;
    }

    .kasgo-suite-nav::-webkit-scrollbar {
        display: none !important;
    }

    .suite-nav-card {
        flex: 0 0 160px !important;
    }
}

/* 4. Small Mobile Screen Optimization (Starbucks App Card Styling) */
@media (max-width: 480px) {

    /* Customer Menu Hero Mobile optimization */
    .hero {
        padding: 1.5rem 5% !important;
        text-align: center !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .hero-image {
        display: none !important;
    }

    .hero h1 {
        font-size: 1.5rem !important;
    }

    .hero p {
        font-size: 0.85rem !important;
    }

    /* Horizontal Menu Card Layout for premium mobile order */
    .menu-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .menu-card {
        flex-direction: row !important;
        height: auto !important;
        min-height: 105px !important;
        align-items: center !important;
        border-radius: 14px !important;
        padding: 0.6rem !important;
        gap: 0.8rem !important;
    }

    .menu-img {
        width: 80px !important;
        height: 80px !important;
        border-radius: 10px !important;
        object-fit: cover !important;
    }

    .menu-card-content {
        padding: 0 !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        height: auto !important;
        min-height: 85px !important;
        gap: 0.4rem !important;
    }

    .menu-info h3 {
        font-size: 0.92rem !important;
        font-weight: 700 !important;
        margin-bottom: 0.1rem !important;
    }

    .menu-info p {
        font-size: 0.72rem !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        line-height: 1.2 !important;
    }

    .menu-action {
        margin-top: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }

    .menu-price {
        font-size: 0.85rem !important;
        font-weight: 700 !important;
    }

    .add-btn {
        width: auto !important;
        padding: 0.25rem 0.8rem !important;
        font-size: 0.75rem !important;
        border-radius: 15px !important;
        margin-top: 0 !important;
    }
}

/* ==========================================
   RIWAYAT TRANSAKSI MODAL RESPONSIVE STYLES
   ========================================== */
.riwayat-modal-body {
    display: flex;
    gap: 1.2rem;
    overflow: hidden;
    padding: 1.2rem;
    flex: 1;
}

.riwayat-list-panel {
    flex: 1.3;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    border-right: 1px solid #e2e8f0;
    padding-right: 1rem;
    height: 100%;
    overflow: hidden;
}

.riwayat-detail-panel {
    flex: 1.7;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

@media (max-width: 768px) {
    #pos-riwayat-modal .pos-modal {
        width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .riwayat-modal-body {
        flex-direction: column !important;
        gap: 0 !important;
        padding: 0.8rem !important;
        max-height: none !important;
        flex: 1 !important;
        overflow: hidden !important;
    }

    .riwayat-list-panel {
        display: flex !important;
        flex: 1 !important;
        width: 100% !important;
        border-right: none !important;
        padding-right: 0 !important;
        height: 100% !important;
        overflow-y: auto !important;
    }

    .riwayat-detail-panel {
        display: none !important;
        width: 100% !important;
        height: 100% !important;
        overflow-y: auto !important;
    }

    /* Active detail view on mobile */
    .riwayat-modal-body.detail-active .riwayat-list-panel {
        display: none !important;
    }

    .riwayat-modal-body.detail-active .riwayat-detail-panel {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
        height: 100% !important;
    }

    .riwayat-modal-body.detail-active .btn-back-riwayat {
        display: flex !important;
    }
}

/* Switch Toggle for Database Mode */
.switch-container input:checked+.slider-round {
    background-color: #10b981 !important;
}

.switch-container input:checked+.slider-round:before {
    transform: translateX(22px);
}

.slider-round:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Responsive incoming order action buttons */
.incoming-order-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.2rem;
    align-items: center;
}

@media (max-width: 600px) {
    .incoming-order-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.4rem !important;
    }

    .incoming-order-actions button {
        width: 100% !important;
        flex: none !important;
    }
}

/* =============================================
   CRITICAL FIX: Product card image height collapse
   Paste ini SETELAH semua rule .pos-product-card
   di CSS utama Anda (style.css / main.css)
   ============================================= */

/* Force gambar produk selalu muncul dengan tinggi tetap */
.pos-product-card {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.pos-product-card img,
.pos-product-card>img,
img.pos-product-img {
    display: block !important;
    width: 100% !important;
    height: 130px !important;
    min-height: 130px !important;
    max-height: 130px !important;
    object-fit: cover !important;
    object-position: center center !important;
    flex-shrink: 0 !important;
    background-color: #e2e8f0 !important;
    /* Paksa browser reservasi ruang gambar sebelum load */
    aspect-ratio: unset !important;
}

/* Grid produk: pastikan kolom tidak terlalu lebar/sempit */
.pos-product-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    gap: 1rem !important;
    align-content: start !important;
    overflow-y: auto !important;
}

/* Tablet landscape 768–1199px */
@media screen and (min-width: 768px) and (max-width: 1199px) {
    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
        gap: 1rem !important;
        padding: 1rem !important;
    }

    .pos-product-card img,
    .pos-product-card>img {
        height: 120px !important;
        min-height: 120px !important;
        max-height: 120px !important;
    }
}

/* Tablet landscape narrow 768–900px */
@media screen and (min-width: 768px) and (max-width: 900px) {
    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    }

    .pos-product-card img,
    .pos-product-card>img {
        height: 100px !important;
        min-height: 100px !important;
        max-height: 100px !important;
    }
}