/* ============================================================
   KASIR UNIVERSAL — Design System v3.0
   Mobile-First | Clean | Modern POS
   ============================================================ */

/* ---- Google Font Import ---- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Custom Properties ---- */
:root {
    --primary:        #4f46e5;
    --primary-light:  #6366f1;
    --primary-subtle: rgba(79,70,229,0.08);
    --primary-glow:   rgba(79,70,229,0.25);

    --success:        #10b981;
    --success-subtle: #ecfdf5;
    --warning:        #f59e0b;
    --warning-subtle: #fffbeb;
    --danger:         #ef4444;
    --danger-subtle:  #fef2f2;
    --info:           #06b6d4;
    --info-subtle:    #ecfeff;

    --surface:        #f4f6fb;
    --card-bg:        #ffffff;
    --border:         #e5e7eb;
    --border-subtle:  #f3f4f6;

    --text-1:         #111827;
    --text-2:         #4b5563;
    --text-3:         #9ca3af;

    --sidebar-w:      260px;
    --navbar-h:       60px;
    --bottom-nav-h:   64px;

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 20px;
    --r-2xl: 24px;

    --shadow-xs: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 40px rgba(0,0,0,0.10);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--surface);
    color: var(--text-1);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ============================================================
   LAYOUT SHELL
   ============================================================ */
#wrapper {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   SIDEBAR — Desktop
   ============================================================ */
#sidebar {
    width: var(--sidebar-w);
    background: #0f172a;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1030;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    flex-shrink: 0;
}

/* Brand */
.sidebar-brand {
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    min-height: 70px;
    flex-shrink: 0;
}
.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--primary-glow);
}
.sidebar-brand .brand-text h6 {
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.3;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-brand .brand-text small {
    color: rgba(255,255,255,0.5);
    font-size: 0.72rem;
    display: block;
}

/* Sidebar scroll area */
.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 10px 20px;
    scrollbar-width: none;
}
.sidebar-scroll::-webkit-scrollbar { display: none; }

/* Menu label */
.sidebar-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
    padding: 16px 10px 6px;
    display: block;
}

/* Menu item */
.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: var(--r-md);
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.18s, color 0.18s;
    margin-bottom: 2px;
    position: relative;
}
.sidebar-menu li a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
    opacity: 0.75;
    transition: opacity 0.18s;
}
.sidebar-menu li a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.sidebar-menu li a:hover i { opacity: 1; }

.sidebar-menu li.active a {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 14px var(--primary-glow);
}
.sidebar-menu li.active a i { opacity: 1; }

/* Sidebar footer user */
.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}
.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    border-radius: var(--r-md);
    font-size: 0.87rem;
    font-weight: 500;
    transition: background 0.18s, color 0.18s;
}
.sidebar-footer a:hover {
    background: rgba(239,68,68,0.15);
    color: #f87171;
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1025;
    opacity: 0;
    transition: opacity 0.28s;
}
.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ============================================================
   CONTENT WRAPPER
   ============================================================ */
#page-wrapper {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    transition: margin-left 0.28s;
}

/* ============================================================
   TOP NAVBAR
   ============================================================ */
.top-navbar {
    height: var(--navbar-h);
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1020;
    gap: 12px;
    flex-shrink: 0;
}
.top-navbar .nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.top-navbar .nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.navbar-toggler {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-2);
    transition: background 0.15s;
    flex-shrink: 0;
}
.navbar-toggler:hover { background: var(--surface); }

.navbar-store-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-1);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Live dot */
.live-dot {
    width: 7px;
    height: 7px;
    background: var(--success);
    border-radius: 50%;
    display: inline-block;
    animation: pulseDot 2s infinite;
    flex-shrink: 0;
}
@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.6); }
    50% { box-shadow: 0 0 0 5px rgba(16,185,129,0); }
}

/* Clock pill */
.clock-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-2);
    white-space: nowrap;
}

/* User avatar */
.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Icon buttons */
.icon-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-2);
    transition: background 0.15s, border-color 0.15s;
    text-decoration: none;
    flex-shrink: 0;
}
.icon-btn:hover {
    background: var(--surface);
    border-color: var(--primary-light);
    color: var(--primary);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    flex: 1;
    padding: 24px 20px;
}

/* Page header */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.page-header-title h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-1);
    margin: 0 0 2px;
}
.page-header-title p {
    font-size: 0.84rem;
    color: var(--text-3);
    margin: 0;
}

/* ============================================================
   CARDS
   ============================================================ */
.card-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-xs);
    margin-bottom: 20px;
    overflow: hidden;
}
.card-box-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.card-box-header h6 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-1);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-box-body {
    padding: 20px;
}
/* alias untuk backward compat */
.card-custom { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-xs); margin-bottom: 20px; overflow: hidden; }
.card-header-custom { padding: 16px 20px; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-body-custom { padding: 20px; }

/* ============================================================
   STAT CARDS (Dashboard)
   ============================================================ */
.stat-card {
    border-radius: var(--r-xl);
    padding: 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px -4px rgba(0,0,0,0.18);
    height: 100%;
}
.stat-card .stat-icon {
    position: absolute;
    right: 16px;
    bottom: 10px;
    font-size: 3.5rem;
    opacity: 0.15;
}
.stat-card .stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    opacity: 0.75;
    margin-bottom: 6px;
}
.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 8px;
}
.stat-card .stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

.stat-blue   { background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%); }
.stat-green  { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.stat-purple { background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%); }
.stat-orange { background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%); }

/* Alias backward compat */
.bg-stat-blue   { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); }
.bg-stat-green  { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.bg-stat-purple { background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%); }
.bg-stat-orange { background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%); }

/* ============================================================
   FORM CONTROLS
   ============================================================ */
.form-control, .form-select {
    border-radius: var(--r-md);
    border: 1.5px solid var(--border);
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: border-color 0.18s, box-shadow 0.18s;
    background: #fff;
    color: var(--text-1);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-subtle);
    outline: none;
}
.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 6px;
}
.input-group .form-control { border-radius: var(--r-md) 0 0 var(--r-md); }
.input-group .btn { border-radius: 0 var(--r-md) var(--r-md) 0; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--r-md);
    padding: 9px 18px;
    transition: all 0.18s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-glow);
}
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; border-radius: var(--r-sm); }
.btn-lg { padding: 12px 24px; font-size: 0.98rem; border-radius: var(--r-lg); }

/* ============================================================
   TABLES
   ============================================================ */
.table {
    font-size: 0.87rem;
    color: var(--text-1);
}
.table thead th {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-2);
    background: #f9fafb;
    border-bottom: 1px solid var(--border);
    padding: 10px 14px;
    white-space: nowrap;
}
.table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}
.table tbody tr:hover td { background: #fafbff; }
.table tbody tr:last-child td { border-bottom: none; }

/* ============================================================
   BADGES
   ============================================================ */
.badge-pill {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-content {
    border: none;
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
}
.modal-header {
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 20px;
}
.modal-body { padding: 20px; }
.modal-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 14px 20px;
    border-radius: 0 0 var(--r-xl) var(--r-xl);
}

/* ============================================================
   POS (Point of Sale) LAYOUT
   ============================================================ */
.pos-wrapper {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 16px;
    height: calc(100vh - var(--navbar-h) - 48px);
}
.pos-catalog {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}
.pos-toolbar-card {
    flex-shrink: 0 !important;
}
.pos-products-scroll-area,
.pos-products-grid {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding-right: 4px;
}

/* Category chips */
.category-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 12px;
    scrollbar-width: none;
}
.category-chips::-webkit-scrollbar { display: none; }
.chip {
    padding: 7px 16px;
    border-radius: 999px;
    background: #fff;
    border: 1.5px solid var(--border);
    color: var(--text-2);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s;
    flex-shrink: 0;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 3px 10px var(--primary-glow);
}
/* alias */
.category-chip-container { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.category-chip-container::-webkit-scrollbar { display: none; }
.category-chip { padding: 7px 16px; border-radius: 999px; background: #fff; border: 1.5px solid var(--border); color: var(--text-2); font-size: 0.82rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all 0.18s; flex-shrink: 0; }
.category-chip:hover { border-color: var(--primary); color: var(--primary); }
.category-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Product cards */
.pos-product-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--r-lg);
    padding: 14px;
    cursor: pointer;
    transition: all 0.18s;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.pos-product-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}
.pos-product-card:active { transform: scale(0.97); }
.pos-product-card .card-img-wrapper {
    height: 100px;
    background: var(--surface);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid var(--border-subtle);
    position: relative;
}
.pos-product-card .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}
.pos-product-card:hover .card-img-wrapper img {
    transform: scale(1.06);
}
.pos-product-card .card-img-placeholder {
    height: 100px;
    background: var(--surface);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-3);
    margin-bottom: 10px;
    border: 1px solid var(--border-subtle);
    transition: all 0.2s;
}
.pos-product-card:hover .card-img-placeholder {
    background: var(--primary-subtle);
    color: var(--primary);
}
.pos-product-card .product-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.2em;
}
.pos-product-card .product-price {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary);
}
.pos-product-card .product-stock {
    font-size: 0.7rem;
    color: var(--text-3);
    margin-top: 2px;
}

/* Shortcut Keys Bar POS (Lega & Jelas Terlihat) */
.pos-shortcut-bar {
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px dashed var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.pos-shortcut-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.pos-shortcut-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    font-size: 0.81rem;
    font-weight: 600;
    color: var(--text-1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    transition: all 0.15s ease;
}
.pos-shortcut-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}
.pos-kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
    background: #1e293b;
    border-radius: 5px;
    box-shadow: 0 2px 0 rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}
.pos-kbd.kbd-f8 {
    background: #059669;
    box-shadow: 0 2px 0 #047857;
}
.pos-kbd.kbd-esc {
    background: #dc2626;
    box-shadow: 0 2px 0 #b91c1c;
}
.cart-item-thumb {
    width: 38px;
    height: 38px;
    border-radius: var(--r-sm);
    object-fit: cover;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--text-3);
    font-size: 0.85rem;
}
.cart-item-row.item-scanned-glow {
    animation: scanHighlight 1.2s ease;
    border-radius: var(--r-sm);
}
@keyframes scanHighlight {
    0% { background-color: rgba(34, 197, 94, 0.28); }
    100% { background-color: transparent; }
}

/* Cart panel */
.pos-cart {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.cart-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.cart-items-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 14px;
}
.cart-item-row {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeSlide 0.2s ease;
}
.cart-item-row:last-child { border-bottom: none; }
@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cart-item-name { font-size: 0.82rem; font-weight: 600; color: var(--text-1); flex: 1; min-width: 0; }
.cart-item-price { font-size: 0.78rem; color: var(--text-2); }

/* Stepper */
.cart-stepper {
    display: inline-flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px;
    flex-shrink: 0;
}
.cart-stepper-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: var(--text-1);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: all 0.15s;
}
.cart-stepper-btn:hover { background: var(--primary); color: #fff; }
.cart-stepper-val { min-width: 26px; text-align: center; font-size: 0.85rem; font-weight: 700; }
.cart-stepper-input {
    width: 48px;
    height: 26px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-1);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    outline: none;
    padding: 0 2px;
    -moz-appearance: textfield;
    transition: all 0.15s ease;
    cursor: text;
}
.cart-stepper-input::-webkit-outer-spin-button,
.cart-stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.cart-stepper-input:hover {
    background: #fff;
    border-color: var(--border);
}
.cart-stepper-input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
    color: var(--primary);
}

/* Cart summary */
.cart-summary {
    border-top: 1px solid var(--border);
    padding: 16px;
    flex-shrink: 0;
    background: #fafbff;
}
.cart-total-box {
    background: var(--text-1);
    border-radius: var(--r-lg);
    padding: 14px 16px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.cart-total-label { font-size: 0.78rem; opacity: 0.65; }
.cart-total-value { font-size: 1.25rem; font-weight: 800; }
.btn-checkout {
    width: 100%;
    padding: 13px;
    border-radius: var(--r-lg);
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
    box-shadow: 0 4px 16px var(--primary-glow);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-checkout:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
    color: #fff;
}
/* alias */
.btn-checkout-glow { width: 100%; padding: 13px; border-radius: var(--r-lg); border: none; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; font-weight: 700; font-size: 0.98rem; cursor: pointer; box-shadow: 0 4px 16px var(--primary-glow); transition: all 0.2s; }

/* ============================================================
   DASHBOARD WELCOME BANNER
   ============================================================ */
.welcome-banner {
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
    border-radius: var(--r-xl);
    padding: 24px 28px;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.welcome-banner h3 { font-size: 1.25rem; font-weight: 800; margin: 0 0 4px; }
.welcome-banner p  { font-size: 0.85rem; opacity: 0.6; margin: 0; }

/* ============================================================
   ALERTS / FLASH (replaced by SweetAlert2, keep for fallback)
   ============================================================ */
.alert {
    border-radius: var(--r-lg);
    border: none;
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================================
   BOTTOM NAV (Mobile only)
   ============================================================ */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-h);
    background: #fff;
    border-top: 1px solid var(--border);
    z-index: 1020;
    padding: 0 8px;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 12px;
    border-radius: var(--r-md);
    text-decoration: none;
    color: var(--text-3);
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: color 0.18s;
    flex: 1;
    max-width: 72px;
}
.bottom-nav-item i { font-size: 1.15rem; }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item.active i { color: var(--primary); }
.bottom-nav-item.pos-shortcut {
    background: var(--primary);
    color: #fff;
    border-radius: var(--r-xl);
    padding: 10px;
    width: 52px;
    height: 52px;
    max-width: 52px;
    box-shadow: 0 4px 16px var(--primary-glow);
    flex: none;
}
.bottom-nav-item.pos-shortcut i { font-size: 1.3rem; }

/* Bottom Nav Menu App Button (Premium Icon Badge) */
.bottom-nav-item.bottom-nav-menu-btn {
    padding: 3px 6px;
    gap: 2px;
}
.bottom-nav-menu-icon {
    width: 34px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(99, 102, 241, 0.08));
    border: 1px solid rgba(79, 70, 229, 0.18);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.bottom-nav-menu-icon i {
    font-size: 1.15rem !important;
    color: var(--primary) !important;
    transition: transform 0.25s ease;
}
.bottom-nav-item.bottom-nav-menu-btn:hover .bottom-nav-menu-icon,
.bottom-nav-item.bottom-nav-menu-btn.active .bottom-nav-menu-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
    border-color: transparent !important;
    box-shadow: 0 4px 12px var(--primary-glow) !important;
    transform: translateY(-2px);
}
.bottom-nav-item.bottom-nav-menu-btn:hover .bottom-nav-menu-icon i,
.bottom-nav-item.bottom-nav-menu-btn.active .bottom-nav-menu-icon i {
    color: #ffffff !important;
}

/* ============================================================
   UTILITY
   ============================================================ */
.text-primary { color: var(--primary) !important; }
.bg-primary   { background-color: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }
.rounded-xl { border-radius: var(--r-xl) !important; }
.rounded-2xl { border-radius: var(--r-2xl) !important; }
.fw-800 { font-weight: 800; }

/* Divider with text */
.divider-text {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-3);
    font-size: 0.78rem;
    margin: 16px 0;
}
.divider-text::before, .divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ============================================================
   FOOTER
   ============================================================ */
.app-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 14px 20px;
    font-size: 0.8rem;
    color: var(--text-3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79,70,229,0.2) 0%, transparent 70%);
    top: -100px;
    right: -100px;
}
.login-page::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6,182,212,0.15) 0%, transparent 70%);
    bottom: -50px;
    left: -50px;
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--r-2xl);
    padding: 40px 36px;
    position: relative;
    z-index: 1;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* --- Tablet (768px - 1024px) --- */
@media (max-width: 1024px) {
    :root {
        --sidebar-w: 240px;
    }
    .pos-wrapper {
        grid-template-columns: 1fr 340px;
    }
    .main-content {
        padding: 20px 16px;
    }
    .clock-pill { display: none; }
}

/* --- Medium Tablet & Mobile Landscape (<992px) --- */
@media (max-width: 991.98px) {
    .pos-wrapper {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        gap: 16px !important;
    }
    .pos-catalog {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
        flex: none !important;
    }
    .pos-products-scroll-area,
    .pos-products-grid {
        display: block !important;
        flex: none !important;
        height: auto !important;
        min-height: 280px !important;
        max-height: none !important;
        overflow: visible !important;
        padding-right: 0 !important;
    }
    .pos-cart {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }
}

/* --- Mobile (<768px) --- */
@media (max-width: 767px) {
    :root {
        --sidebar-w: 280px;
    }

    /* Sidebar slide in dari kiri */
    #sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }
    #sidebar.sidebar-open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    /* Content tidak punya margin-left di mobile */
    #page-wrapper {
        margin-left: 0 !important;
    }

    /* Navbar */
    .top-navbar {
        padding: 0 14px;
    }
    .navbar-store-name { max-width: 240px; font-size: 0.95rem; font-weight: 700; }

    /* Main content punya padding bawah untuk bottom nav */
    .main-content {
        padding: 16px 14px;
        padding-bottom: calc(var(--bottom-nav-h) + 16px);
    }

    /* Tampilkan bottom nav */
    .bottom-nav { display: flex; }

    /* POS layout stacked di mobile */
    .pos-wrapper {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        gap: 14px !important;
    }
    .pos-catalog {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
        flex: none !important;
    }
    .pos-products-scroll-area,
    .pos-products-grid {
        display: block !important;
        flex: none !important;
        height: auto !important;
        min-height: 280px !important;
        max-height: none !important;
        overflow: visible !important;
        padding-right: 0 !important;
        padding-bottom: 8px !important;
    }
    .pos-cart {
        border-radius: var(--r-xl);
        margin-bottom: calc(var(--bottom-nav-h) + 76px) !important;
        height: auto !important;
    }
    .pos-cart .cart-items-container {
        max-height: 360px !important;
        overflow-y: auto !important;
    }
    .pos-shortcut-bar {
        display: none !important;
    }
    .category-chip-container {
        -webkit-overflow-scrolling: touch;
    }
    .pos-product-card {
        padding: 10px !important;
    }
    .pos-product-card .card-img-wrapper,
    .pos-product-card .card-img-placeholder {
        height: 85px !important;
        margin-bottom: 8px !important;
    }
    .pos-product-card .product-title {
        font-size: 0.8rem !important;
        line-height: 1.25 !important;
        min-height: 2.5em !important;
    }
    .pos-product-card .product-price {
        font-size: 0.88rem !important;
    }

    /* Stat cards 2 kolom di mobile */
    .stat-card .stat-value { font-size: 1.2rem; }

    /* Welcome banner compact */
    .welcome-banner {
        padding: 18px 20px;
        border-radius: var(--r-lg);
    }
    .welcome-banner h3 { font-size: 1.05rem; }

    /* Tables scrollable */
    .table-responsive {
        border-radius: 0;
        -webkit-overflow-scrolling: touch;
    }

    /* Modals full bottom sheet di mobile */
    .modal-dialog {
        margin: auto 0 0;
        max-width: 100%;
    }
    .modal-content {
        border-radius: var(--r-xl) var(--r-xl) 0 0;
    }
    .modal.fade .modal-dialog { transform: translateY(100%); }
    .modal.show .modal-dialog  { transform: translateY(0); }

    /* DataTables responsive */
    .dataTables_wrapper .dataTables_filter { text-align: left; }
    .dataTables_wrapper .dataTables_length { margin-bottom: 8px; }

    /* Login card */
    .login-card { padding: 28px 20px; }
}

/* --- Extra small (<480px) --- */
@media (max-width: 480px) {
    .page-header { flex-direction: column; align-items: flex-start; }
    .page-header .btn { width: 100%; justify-content: center; }
    .card-box-body { padding: 14px; }
    .card-body-custom { padding: 14px; }
}

/* ============================================================
   FLOATING MOBILE POS CART BAR
   ============================================================ */
.pos-mobile-cart-bar {
    position: fixed;
    bottom: calc(var(--bottom-nav-h) + 10px);
    left: 12px;
    right: 12px;
    background: #0f172a;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--r-xl);
    padding: 10px 16px;
    display: none;
    align-items: center;
    justify-content: space-between;
    z-index: 1019;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
    cursor: pointer;
    animation: slideUp 0.25s ease;
}
.pos-mobile-cart-bar.active {
    display: flex;
}
.pos-mobile-cart-bar .cart-pill-icon {
    position: relative;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.pos-mobile-cart-bar .cart-pill-icon .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 0.65rem;
    padding: 3px 6px;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   APP MODE / LAUNCHER GRID SYSTEM
   ============================================================ */
.mode-switch-container {
    display: inline-flex;
    background: #e2e8f0;
    padding: 4px;
    border-radius: 999px;
    gap: 4px;
    border: 1px solid var(--border);
}
.mode-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--text-2);
    font-size: 0.83rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.mode-switch-btn:hover {
    color: var(--text-1);
}
.mode-switch-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* App Grid Cards */
.app-menu-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-1);
    position: relative;
    overflow: hidden;
    height: 100%;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-xs);
}
.app-menu-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    color: var(--primary);
}
.app-menu-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--r-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 16px;
    transition: transform 0.22s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.app-menu-card:hover .app-menu-icon {
    transform: scale(1.1) rotate(-3deg);
}
.app-menu-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-1);
    margin-bottom: 4px;
    line-height: 1.3;
}
.app-menu-card:hover .app-menu-title {
    color: var(--primary);
}
.app-menu-desc {
    font-size: 0.8rem;
    color: var(--text-3);
    line-height: 1.4;
    margin-bottom: 14px;
    flex-grow: 1;
}
.app-menu-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.76rem;
    font-weight: 600;
}

/* Gradients for App Icons */
.bg-gradient-indigo  { background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff; }
.bg-gradient-cyan    { background: linear-gradient(135deg, #0284c7, #38bdf8); color: #fff; }
.bg-gradient-emerald { background: linear-gradient(135deg, #059669, #34d399); color: #fff; }
.bg-gradient-violet  { background: linear-gradient(135deg, #7c3aed, #a78bfa); color: #fff; }
.bg-gradient-amber   { background: linear-gradient(135deg, #d97706, #fbbf24); color: #fff; }
.bg-gradient-rose    { background: linear-gradient(135deg, #e11d48, #fb7185); color: #fff; }
.bg-gradient-teal    { background: linear-gradient(135deg, #0d9488, #2dd4bf); color: #fff; }
.bg-gradient-pink    { background: linear-gradient(135deg, #db2777, #f472b6); color: #fff; }
.bg-gradient-blue    { background: linear-gradient(135deg, #2563eb, #60a5fa); color: #fff; }
.bg-gradient-dark    { background: linear-gradient(135deg, #0f172a, #334155); color: #fff; }
.bg-gradient-slate   { background: linear-gradient(135deg, #475569, #64748b); color: #fff; }
.bg-gradient-purple  { background: linear-gradient(135deg, #9333ea, #c084fc); color: #fff; }

/* Quick Menu Filter */
.app-quick-search {
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: var(--r-xl);
    padding: 10px 18px;
    font-size: 0.92rem;
    transition: all 0.2s;
}
.app-quick-search:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
    outline: none;
}

/* ============================================================
   GLOBAL DISPLAY MODES: MODE APLIKASI VS MODE WEB DESKTOP
   ============================================================ */

/* Selector Card di Menu Pengaturan */
.mode-select-card {
    background: #ffffff;
    border: 2px solid var(--border) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.mode-select-card:hover {
    border-color: var(--primary-light) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.mode-select-card.selected {
    border-color: var(--primary) !important;
    background: linear-gradient(180deg, #ffffff 0%, rgba(79, 70, 229, 0.04) 100%) !important;
    box-shadow: 0 4px 18px var(--primary-glow) !important;
}

/* ------------------------------------------------------------
   1. MODE APLIKASI (MOBILE APP STYLE: SIDEBAR KIRI HAPUS, PAKAI MENU MOBILE)
   ------------------------------------------------------------ */
body.layout-mode-aplikasi {
    --sidebar-w: 0px !important;
    background-color: #f1f5f9;
}

/* Sembunyikan dan hapus total sidebar di Mode Aplikasi (Menu ini hanya tampil di desktop) */
body.layout-mode-aplikasi #sidebar,
body.layout-mode-aplikasi .sidebar-overlay,
body.layout-mode-aplikasi #sidebarToggle {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Area konten full width tanpa margin sidebar desktop */
body.layout-mode-aplikasi #page-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    min-width: 0;
}

/* Berikan padding bawah agar konten tidak tertutup oleh Menu Mobile */
body.layout-mode-aplikasi .main-content {
    padding: 20px 24px;
    padding-bottom: calc(var(--bottom-nav-h) + 32px) !important;
}

body.layout-mode-aplikasi .top-navbar {
    height: 60px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

body.layout-mode-aplikasi .card-custom {
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

/* Aktifkan Menu Mobile (Bottom Nav) dengan Ikon di Mode Aplikasi untuk SEMUA ukuran layar */
body.layout-mode-aplikasi .bottom-nav {
    display: flex !important;
    z-index: 1030;
}

/* Tampilan Menu Mobile Floating Dock di Layar Lebar (Desktop/Tablet) */
@media (min-width: 768px) {
    body.layout-mode-aplikasi .bottom-nav {
        position: fixed !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        bottom: 18px !important;
        width: 100% !important;
        max-width: 540px !important;
        height: 68px !important;
        border-radius: 999px !important;
        padding: 0 16px !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.14) !important;
        background: rgba(255, 255, 255, 0.96) !important;
        backdrop-filter: blur(14px) !important;
        -webkit-backdrop-filter: blur(14px) !important;
    }
}

/* Tampilan Menu Mobile di Layar HP (Full Width) */
@media (max-width: 767.98px) {
    body.layout-mode-aplikasi .bottom-nav {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        border-radius: 0 !important;
        height: var(--bottom-nav-h) !important;
    }
}

/* Tombol Tutup Sidebar Mobile Drawer */
.btn-close-sidebar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}
.btn-close-sidebar:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* ------------------------------------------------------------
   2. MODE DESKTOP / WEB (CLASSIC ADMIN WEB PORTAL)
   ------------------------------------------------------------ */
@media (min-width: 992px) {
    body.layout-mode-web {
        --sidebar-w: 260px;
    }

    body.layout-mode-web #sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 260px !important;
        height: 100vh !important;
        transform: none !important;
        display: flex !important;
        box-shadow: none !important;
    }

    body.layout-mode-web #page-wrapper {
        margin-left: 260px !important;
    }

    body.layout-mode-web .sidebar-brand .brand-text {
        display: block !important;
    }

    body.layout-mode-web .sidebar-label {
        display: block !important;
    }

    /* Sembunyikan bottom nav di desktop saat mode web */
    body.layout-mode-web .bottom-nav {
        display: none !important;
    }
}

/* ============================================================
   GLOBAL PRINT STYLING (HANYA CETAK AREA KONTEN)
   ============================================================ */
@media print {
    @page {
        margin: 5mm;
        size: auto;
    }
    html, body {
        background: #fff !important;
        color: #000 !important;
        font-size: 12pt !important;
    }
    #sidebar,
    .sidebar-overlay,
    .top-navbar,
    .bottom-nav,
    #bottomNav,
    nav.bottom-nav,
    body.layout-mode-aplikasi .bottom-nav,
    body.layout-mode-web .bottom-nav,
    .app-footer,
    footer,
    .no-print,
    .btn,
    .navbar-toggler,
    .dropdown-menu,
    .modal,
    .alert {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    #wrapper,
    #page-wrapper,
    .main-content,
    .content-body {
        display: block !important;
        position: static !important;
        float: none !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border: none !important;
        box-shadow: none !important;
        overflow: visible !important;
    }
}

/* ============================================================
   SELECT2 SEARCHABLE DROPDOWN STYLING
   ============================================================ */
.select2-container--bootstrap-5 .select2-selection {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    border-radius: var(--r-md, 12px) !important;
    border-color: #cbd5e1 !important;
    min-height: 42px !important;
    padding: 4px 8px !important;
    font-size: 0.88rem !important;
}
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: #1e293b !important;
    font-weight: 600 !important;
    padding-left: 4px !important;
}
.select2-container--bootstrap-5 .select2-dropdown {
    border-radius: var(--r-md, 12px) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1) !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 0.88rem !important;
    overflow: hidden !important;
    z-index: 1060 !important;
}
.select2-container--bootstrap-5 .select2-search--dropdown {
    padding: 8px 10px !important;
}
.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    padding: 6px 12px !important;
    font-size: 0.88rem !important;
}
.select2-container--bootstrap-5 .select2-results__option {
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
}
.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: var(--primary, #4f46e5) !important;
    color: #fff !important;
}

/* ============================================================
   REDESIGNED POS PAYMENT MODAL (V3.5)
   ============================================================ */
.modal-pay-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #312e81 100%);
    color: #fff;
    padding: 24px 28px;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.modal-pay-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 18px;
    padding: 20px 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.4);
}
.modal-pay-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.28) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.modal-pay-hero .pay-total-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #94a3b8;
    text-transform: uppercase;
}
.modal-pay-hero .pay-total-amount {
    font-size: 2.35rem;
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* Payment Method Cards */
.pay-methods-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.pay-method-card {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}
.pay-method-card:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateY(-2px);
}
.pay-method-card.active {
    border-color: var(--primary, #4f46e5);
    background: rgba(79, 70, 229, 0.04);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.pay-method-card .method-icon-wrap {
    width: 44px;
    height: 44px;
    margin: 0 auto 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.2s;
}
.pay-method-card.method-tunai .method-icon-wrap { background: #dcfce7; color: #16a34a; }
.pay-method-card.method-qris .method-icon-wrap { background: #fee2e2; color: #dc2626; }
.pay-method-card.method-transfer .method-icon-wrap { background: #e0f2fe; color: #0284c7; }

.pay-method-card.active.method-tunai { border-color: #16a34a; background: #f0fdf4; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15); }
.pay-method-card.active.method-qris { border-color: #dc2626; background: #fef2f2; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15); }
.pay-method-card.active.method-transfer { border-color: #0284c7; background: #f0f9ff; box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15); }

.pay-method-card .method-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: #1e293b;
    margin-bottom: 2px;
}
.pay-method-card .method-sub {
    font-size: 0.72rem;
    color: #64748b;
}
.pay-method-card .method-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary, #4f46e5);
    color: #fff;
    font-size: 0.65rem;
    display: none;
    align-items: center;
    justify-content: center;
}
.pay-method-card.active .method-check { display: flex; }
.pay-method-card.active.method-tunai .method-check { background: #16a34a; }
.pay-method-card.active.method-qris .method-check { background: #dc2626; }
.pay-method-card.active.method-transfer .method-check { background: #0284c7; }

/* Banknote Chips */
.banknote-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}
@media (min-width: 576px) {
    .banknote-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}
.btn-banknote {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 9px 4px;
    text-align: center;
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.82rem;
    color: #1e293b;
    transition: all 0.15s ease-in-out;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.btn-banknote:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.btn-banknote.note-pas { background: linear-gradient(135deg, #10b981, #059669); color: #fff; border-color: #059669; }
.btn-banknote.note-10k { border-color: #d8b4fe; background: #faf5ff; color: #7e22ce; }
.btn-banknote.note-20k { border-color: #86efac; background: #f0fdf4; color: #15803d; }
.btn-banknote.note-50k { border-color: #7dd3fc; background: #f0f9ff; color: #0369a1; }
.btn-banknote.note-100k { border-color: #fca5a5; background: #fff1f2; color: #be123c; }
.btn-banknote.note-200k { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }

/* Quick add pills */
.quick-add-btn {
    border-radius: 50px;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 4px 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
}
.quick-add-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #0f172a;
}
.quick-add-btn.btn-clear-pay {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* Large Input Bayar */
.input-bayar-group {
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.input-bayar-group:focus-within {
    border-color: var(--primary, #4f46e5);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}
.input-bayar-group .input-group-text {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    font-weight: 800;
    color: #64748b;
    padding-left: 18px;
}
.input-bayar-group input {
    border: none;
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    padding: 10px 18px;
}
.input-bayar-group input:focus {
    box-shadow: none;
}

/* Kembalian Banner States */
.kembalian-card {
    border-radius: 16px;
    padding: 16px 20px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid transparent;
}
.kembalian-card.state-lebih {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #86efac;
    color: #065f46;
}
.kembalian-card.state-pas {
    background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
    border-color: #93c5fd;
    color: #0c4a6e;
}
.kembalian-card.state-kurang {
    background: linear-gradient(135deg, #fff1f2 0%, #fee2e2 100%);
    border-color: #fca5a5;
    color: #991b1b;
}

/* Digital Payment Helper Box */
.digital-pay-box {
    border: 2px dashed #cbd5e1;
    border-radius: 18px;
    padding: 24px 20px;
    background: #f8fafc;
    text-align: center;
}

/* ============================================================
   PWA INSTALL BANNER & PROMPTS
   ============================================================ */
.pwa-floating-banner {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1040;
    max-width: 380px;
    background: #0f172a;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--r-xl);
    padding: 14px 18px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.4);
    display: none;
    align-items: center;
    gap: 14px;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.pwa-floating-banner.show {
    display: flex;
}
.pwa-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, var(--primary), #818cf8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
}
.pwa-banner-info {
    flex: 1;
    min-width: 0;
}
.pwa-banner-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 2px;
}
.pwa-banner-sub {
    font-size: 0.74rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.25;
}
.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.btn-pwa-install {
    background: #fff;
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}
.btn-pwa-install:hover {
    background: var(--primary);
    color: #fff;
}
.btn-pwa-close {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.15s;
}
.btn-pwa-close:hover {
    color: #fff;
}

@media (max-width: 767px) {
    .pwa-floating-banner {
        bottom: calc(var(--bottom-nav-h) + 14px);
        left: 14px;
        right: 14px;
        max-width: none;
        padding: 12px 14px;
    }
}



