:root {
    --primary: #3b82f6;
    /* Soft Blue SS BERKAH BANGKIT SEJAHTERA */
    --primary-light: #eff6ff;
    --secondary: #e0f2fe;
    /* Soft blue background */
    --background: #f7f9fa;
    /* Very soft gray */
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --accent: #ff9800;
    --success: #10b981;
    --border: #eaedf2;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

/* Minimal Crescent Moon Spinner */
.spinner-moon {
    width: 44px;
    height: 44px;
    border: 3.5px solid #e2e8f0;
    border-top-color: var(--primary);
    border-right-color: var(--primary);
    border-radius: 50%;
    animation: moonSpin 0.75s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes moonSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header/Top Bar */
header {
    background-color: var(--primary);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);

    /* Full-bleed hack but keep rounded corners */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-top: -1.5rem;
    margin-bottom: 2rem;
}

.brand {
    font-size: 1.5rem;
    letter-spacing: 1px;
    font-weight: 800;
}

.user-profile {
    display: flex;
    align-items: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Main Content Wrapper */
main {
    flex: 1;
    padding: 1.5rem;
    padding-bottom: 5rem;
    /* Space for bottom nav */
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.2rem;
    margin-top: 0;
}

.feature-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid var(--primary-light);
    background: var(--secondary);
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

/* Feature Cards with specific colors */
.feature-card[data-feature="pos"] i {
    color: #ff5722;
}

.feature-card[data-feature="products"] i {
    color: #4caf50;
}

.feature-card[data-feature="customers"] i {
    color: #2196f3;
}

.feature-card[data-feature="future"] i {
    color: #ff9800;
}

.feature-card[data-feature="debt"] i {
    color: #2563eb;
}

.feature-card[data-feature="history"] i {
    color: #673ab7;
}

.feature-card[data-feature="expenses"] i {
    color: #795548;
}

.feature-card[data-feature="stock"] i {
    color: #00bcd4;
}

.feature-card[data-feature="reports"] i {
    color: #8bc34a;
}

.feature-card[data-feature="security"] i {
    color: #607d8b;
}

.feature-card[data-feature="settings"] i {
    color: #9c27b0;
}

.feature-card i {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    /* transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); */
}

.feature-card span {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
}

/* Statistics Bar */
.stats-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}

.stats-card {
    background: var(--secondary);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.store-card {
    background: #f1f3f9;
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

/* Bottom Nav */
#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 0.8rem 1rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    transition: color 0.2s;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item i {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    width: 95%;
    max-width: 450px;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* POS Styles */
.cat-chip {
    padding: 0.5rem 1.2rem;
    background: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.cat-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-product-card {
    cursor: pointer;
    transition: transform 0.1s;
}

.pos-product-card:active {
    transform: scale(0.98);
}

/* Form Styles */
.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
}

.pay-method-btn {
    padding: 0.8rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: white;
    font-weight: 600;
    cursor: pointer;
}

.pay-method-btn.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* Quick Access */
.quick-access-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.quick-access-btn:hover .quick-icon {
    background: var(--primary-light);
}

/* Toast */
#toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    z-index: 10000;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Login Page */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 2rem;
    color: white;
}

.login-card {
    background: white;
    color: var(--text-main);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.login-card h2 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.login-card p {
    color: #888;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.login-input-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.login-input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    padding-left: 3rem;
}

.input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #94a3b8;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.4);
}

/* Modal Enhancements */
.hidden {
    display: none !important;
}

/* Receipt Printing */
@media print {
    body {
        margin: 0;
        padding: 0;
        background: transparent !important;
    }

    /* Hide UI */
    #app,
    .modal-overlay,
    #bottom-nav,
    .toast,
    .btn,
    .nav-item {
        display: none !important;
    }

    #printable-receipt {
        display: block !important;
        visibility: visible !important;
        margin: 0;
        padding: 0;
        width: 100%;
        position: absolute;
        top: 0;
        left: 0;
    }

    .receipt {
        width: 48mm !important;
        max-width: 48mm !important;
        margin: 0;
        padding: 0;
        font-family: monospace !important;
        font-size: 12px !important;
        line-height: normal !important;
        color: #000 !important;
        white-space: pre !important;
        transform: none !important;
        -webkit-font-smoothing: none !important;
        font-weight: normal !important;
    }

    @page {
        size: 58mm auto;
        margin: 0;
    }
}

.receipt-preview {
    font-family: 'Courier New', Courier, monospace;
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #333;
    border: 1px dashed #ccc;
    max-width: 300px;
    margin: 0 auto;
}

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

.receipt-sep {
    border-top: 1px dashed #ccc;
    margin: 0.5rem 0;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
}

.receipt-total-row {
    font-weight: bold;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.receipt-footer {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.75rem;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

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

.btn-full {
    width: 100%;
}

/* Modal Cart List */
.checkout-item-list {
    max-height: 40vh;
    overflow-y: auto;
    margin: 1rem 0;
    padding: 0.8rem;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: var(--radius-md);
}

.checkout-item-list::-webkit-scrollbar {
    width: 6px;
}

.checkout-item-list::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: white;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.checkout-item:last-child {
    margin-bottom: 0;
}

.modal-qty-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: #f1f3f9;
    padding: 0.3rem 0.5rem;
    border-radius: 30px;
}

.modal-qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.modal-qty-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Landscape Modal Layout */
.modal-content.modal-lg {
    max-width: 1000px;
    width: 95vw;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
    margin-top: 1.5rem;
}

.checkout-left {
    border-right: 2px solid #f1f3f9;
    padding-right: 2.5rem;
}

.checkout-right {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

@media (max-width: 1024px) {
    .modal-content.modal-lg {
        max-width: 90%;
    }

    .checkout-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .modal-content.modal-lg {
        max-width: 450px;
        height: auto;
        overflow-y: auto;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        overflow: visible;
    }

    .checkout-left {
        border-right: none;
        padding-right: 0;
        border-bottom: 2px solid #f1f3f9;
        padding-bottom: 1rem;
        overflow: visible;
    }

    .checkout-item-list {
        max-height: 250px;
    }
}

/* --- Mobile Responsiveness Form Grids --- */
@media (max-width: 768px) {

    .responsive-grid-2,
    .responsive-grid-barcode {
        grid-template-columns: 1fr !important;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    header {
        padding: 1rem;
    }
}

/* Custom PIN Modal */
.pin-display {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.pin-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid #d1d5db;
    background: transparent;
    transition: all 0.2s ease;
}

.pin-dot.filled {
    background: #4b5563;
    border-color: #4b5563;
    transform: scale(1.1);
}

.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 0 1.5rem;
    justify-items: center;
}

.num-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    padding: 0;
    line-height: 1;
}

.num-btn:active {
    background: #f3f4f6;
    transform: scale(0.95);
    border-color: #d1d5db;
}

.num-main {
    font-size: 1.75rem;
    font-weight: 300;
    color: #111827;
    margin-bottom: 2px;
}

.num-sub {
    font-size: 0.6rem;
    font-weight: 600;
    color: #9ca3af;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.num-btn-del {
    color: #6b7280;
    border: none;
    background: transparent;
}

.num-btn-del:active {
    background: transparent;
    color: #111827;
}

.pin-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Custom Override for Member Card */
#member-card-capture {
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%) !important;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4) !important;
}

/* ============================================================
   KASIR KANTIN & CATERING CUSTOM STYLES
   ============================================================ */

/* Top Right Mode Switcher on Login Page */
.login-header-top {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 2010;
}

.btn-switch-mode {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    color: #1e293b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-switch-mode:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    background: #ffffff;
}

.btn-switch-mode.mode-kantin {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    border: none;
}

.btn-switch-mode.mode-retail {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: #ffffff;
    border: none;
}

/* App Mode Badges */
.app-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.app-mode-badge.kantin {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.app-mode-badge.retail {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* Catering Status Badges */
.badge-catering {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-catering-pending {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.badge-catering-proses {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-catering-selesai {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-catering-batal {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Catering Calculation Box */
.catering-calc-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1rem;
}

.catering-calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    font-size: 0.9rem;
}

.catering-calc-row.highlight-profit {
    border-top: 1.5px dashed #cbd5e1;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #047857;
}

/* Mode Kantin Theme Overrides when Kantin mode is active */
body.mode-kantin-active {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --background: #f8fafc;
}

body.mode-kantin-active main#main-content {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ============================================================
   NOSVA POS STYLE LAYOUT FOR KANTIN & CATERING
   ============================================================ */
.kantin-app-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: #f8fafc;
    font-family: 'Inter', sans-serif;
}

.kantin-sidebar {
    width: 250px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    overflow-y: auto;
    padding-bottom: 1.5rem;
}

.kantin-sidebar-brand {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid #f1f5f9;
}

.kantin-sidebar-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.kantin-sidebar-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: #0f172a;
    line-height: 1.2;
}

.kantin-sidebar-subtitle {
    font-size: 0.68rem;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.kantin-sidebar-nav {
    padding: 1rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.kantin-nav-group-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.8rem 0.8rem 0.3rem 0.8rem;
}

.kantin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.kantin-nav-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.kantin-nav-item.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.kantin-nav-item i {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
}

.kantin-main-area {
    margin-left: 250px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.kantin-topbar {
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

.kantin-search-bar {
    position: relative;
    width: 320px;
}

.kantin-search-bar input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.4rem;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}

.kantin-search-bar input:focus {
    border-color: #2563eb;
    background: white;
}

.kantin-search-bar i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #94a3b8;
}

.kantin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Category Cards (Reference Image 1) */
.kantin-cat-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.cat-card-nosva {
    background: white;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid #2563eb;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.cat-card-nosva:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.cat-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.cat-card-info {
    flex: 1;
}

.cat-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
}

.cat-card-count {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.15rem;
}

/* NOSVA POS Cards & Layout (Reference Image 3) */
.nosva-pos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.2rem;
}

.product-card-nosva {
    background: white;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    position: relative;
}

.product-card-nosva:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.product-card-nosva .img-container {
    height: 120px;
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-nosva img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge-tag-best {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #f59e0b;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    text-transform: uppercase;
}

.nosva-card-body {
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.nosva-card-cat {
    font-size: 0.68rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
}

.nosva-card-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #0f172a;
    line-height: 1.25;
    height: 2.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nosva-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.4rem;
}

.nosva-card-price {
    font-weight: 800;
    font-size: 0.95rem;
    color: #2563eb;
}

.btn-add-plus {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #2563eb;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
    transition: background 0.2s;
}

.btn-add-plus:hover {
    background: #1d4ed8;
}

/* Right Cart Sidebar (Reference Image 3) */
.kantin-cart-panel {
    background: white;
    border-left: 1px solid #e2e8f0;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: calc(100vh - 64px);
    position: sticky;
    top: 64px;
}

.btn-pay-blue, .btn-pay-green {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    transition: all 0.2s ease;
}

.btn-pay-blue:hover, .btn-pay-green:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.45);
}

/* ============================================================
   RESPONSIVE & SIDEBAR TOGGLE (STRIP 3 HAMBURGER MENU)
   ============================================================ */

.btn-toggle-kantin-sidebar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.btn-toggle-kantin-sidebar:hover {
    background: #f1f5f9;
    color: #2563eb;
}

.kantin-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 995;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kantin-sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Transition for smooth sidebar toggle */
.kantin-sidebar {
    transition: width 0.3s ease, transform 0.3s ease;
}

.kantin-main-area {
    transition: margin-left 0.3s ease;
}

/* Desktop Collapsed Sidebar State */
.kantin-app-wrapper.sidebar-collapsed .kantin-sidebar {
    width: 72px;
}

.kantin-app-wrapper.sidebar-collapsed .kantin-sidebar-brand {
    padding: 1.25rem 0.8rem !important;
    justify-content: center !important;
}

.kantin-app-wrapper.sidebar-collapsed .kantin-sidebar .brand-text-container,
.kantin-app-wrapper.sidebar-collapsed .kantin-sidebar .kantin-nav-group-title,
.kantin-app-wrapper.sidebar-collapsed .kantin-sidebar .kantin-nav-item span {
    display: none !important;
}

.kantin-app-wrapper.sidebar-collapsed .kantin-sidebar .kantin-nav-item {
    justify-content: center;
    padding: 0.75rem 0;
}

.kantin-app-wrapper.sidebar-collapsed .kantin-main-area {
    margin-left: 72px;
    width: calc(100% - 72px);
    max-width: calc(100vw - 72px);
}

.kantin-main-area {
    margin-left: 250px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100% - 250px);
    max-width: calc(100vw - 250px);
    box-sizing: border-box;
}

.mobile-only-block, .mobile-only-flex {
    display: none !important;
}

/* Topbar Header Override - 100% Full Width Screen Edge to Edge */
header.kantin-topbar {
    height: 64px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 90 !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

/* POS View Base Desktop Layout */
.pos-view {
    display: grid;
    grid-template-columns: 1fr 390px;
    height: calc(100vh - 64px);
    overflow: hidden;
}

.btn-toggle-kantin-sidebar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.btn-toggle-kantin-sidebar:hover {
    background: #f1f5f9;
    color: #2563eb;
    border-color: #cbd5e1;
}

.kantin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-shrink: 0;
    margin-right: 0 !important;
}

.user-profile {
    white-space: nowrap;
    flex-shrink: 0;
}

.user-profile span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Kantin Filter Controls Card Base Styles */
.kantin-filter-controls-card {
    background: #ffffff;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.kantin-filter-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    max-width: 100%;
}

.kantin-filter-tabs-wrapper {
    display: inline-flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    gap: 4px;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.kantin-filter-tabs-wrapper::-webkit-scrollbar {
    display: none;
}

.kantin-filter-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

/* Responsive Grid & Containers for Kantin Modules */
.kantin-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    width: 100%;
}

.kantin-dashboard-charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
    width: 100%;
}

.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
}

.table-responsive-wrapper table {
    min-width: 650px;
}

/* Tablet Responsive (768px - 1024px) */
@media (max-width: 1024px) {
    .kantin-sidebar {
        width: 72px;
    }
    .kantin-sidebar .brand-text-container,
    .kantin-sidebar .kantin-nav-group-title,
    .kantin-sidebar .kantin-nav-item span {
        display: none !important;
    }
    .kantin-sidebar .kantin-nav-item {
        justify-content: center;
        padding: 0.75rem 0;
    }
    .kantin-main-area {
        margin-left: 72px;
        width: calc(100% - 72px) !important;
        max-width: calc(100vw - 72px) !important;
    }
    .pos-view {
        grid-template-columns: 1fr 320px !important;
    }
    .kantin-dashboard-charts-grid {
        grid-template-columns: 1fr !important;
    }
    .nosva-pos-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    }
}

/* Mobile Responsive (< 768px) */
@media (max-width: 768px) {
    .kantin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 260px !important;
        transform: translateX(-100%);
        z-index: 1000;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .kantin-app-wrapper.mobile-sidebar-open .kantin-sidebar {
        transform: translateX(0) !important;
    }

    .kantin-app-wrapper.mobile-sidebar-open .kantin-sidebar .brand-text-container,
    .kantin-app-wrapper.mobile-sidebar-open .kantin-sidebar .kantin-nav-group-title,
    .kantin-app-wrapper.mobile-sidebar-open .kantin-sidebar .kantin-nav-item span {
        display: block !important;
    }

    .kantin-app-wrapper.mobile-sidebar-open .kantin-sidebar .kantin-nav-item {
        justify-content: flex-start;
        padding: 0.65rem 0.9rem;
    }

    .kantin-main-area {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .kantin-main-area #kantin-content-view {
        padding: 0.85rem !important;
    }

    .kantin-topbar {
        padding: 0 0.6rem !important;
        height: 56px !important;
    }

    .kantin-search-bar {
        max-width: 120px;
    }

    .user-profile span {
        display: none;
    }

    .btn-switch-mode span {
        display: none;
    }

    /* Page Header Responsiveness */
    .kantin-page-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }

    .kantin-page-header > div:last-child {
        width: 100% !important;
        display: flex !important;
        gap: 0.5rem !important;
    }

    .kantin-page-header > div:last-child .btn {
        flex: 1 !important;
        justify-content: center !important;
        font-size: 0.8rem !important;
        padding: 0.6rem 0.8rem !important;
    }

    /* Filter Controls Responsiveness */
    .kantin-filter-controls-card {
        padding: 0.85rem !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .kantin-filter-left {
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
        gap: 0.4rem !important;
    }

    .kantin-filter-tabs-wrapper {
        display: flex !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding: 4px !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
    }

    .kantin-filter-tabs-wrapper .btn-period-tab {
        flex: 1 0 auto !important;
        white-space: nowrap !important;
        padding: 0.5rem 0.85rem !important;
        font-size: 0.78rem !important;
        justify-content: center !important;
    }

    .kantin-filter-right {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .kantin-date-picker-box,
    .kantin-period-badge {
        width: 100% !important;
        box-sizing: border-box !important;
        justify-content: center !important;
    }

    .pos-view {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column;
    }

    .pos-view > div:first-child {
        padding: 0.85rem !important;
        max-height: none !important;
    }

    .kantin-cart-panel {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        height: 85vh !important;
        border-radius: 24px 24px 0 0 !important;
        border-top: 1px solid #e2e8f0 !important;
        border-left: none !important;
        padding: 1.25rem !important;
        margin-top: 0 !important;
        z-index: 1050 !important;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.2) !important;
        transform: translateY(110%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex !important;
    }
    .kantin-cart-panel.mobile-cart-open {
        transform: translateY(0);
    }
    .mobile-only-block { display: block !important; }
    .mobile-only-flex { display: flex !important; }

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

    .kantin-stat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
        width: 100% !important;
    }

    .kantin-dashboard-charts-grid {
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }

    /* Modal Responsiveness */
    .modal-content {
        max-width: 95% !important;
        margin: 1rem auto !important;
        padding: 1.25rem !important;
        border-radius: 16px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
}

/* Extra Small Phones (< 480px) */
@media (max-width: 480px) {
    .kantin-search-bar {
        display: none;
    }

    .kantin-stat-grid {
        grid-template-columns: 1fr !important;
        gap: 0.65rem !important;
        width: 100% !important;
    }

    .nosva-pos-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.6rem !important;
    }

    .btn-period-tab {
        padding: 0.45rem 0.65rem !important;
        font-size: 0.75rem !important;
    }

    .btn-period-tab span {
        font-size: 0.75rem !important;
    }
}

/* Period Tab Switcher Styling */
.btn-period-tab:hover {
    background-color: rgba(255, 255, 255, 0.8) !important;
    color: #1e293b !important;
}
.btn-period-tab:active {
    transform: scale(0.98);
}