/* =====================================================
   POS Toko Material SR - Cashier Specialized Styles
   ===================================================== */

/* --- Viewport Lock: Satu Layar Penuh Tanpa Outer Scrollbar --- */
html.pos-locked-screen,
body.pos-locked-screen {
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    background-color: #f1f5f9 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pos-locked-screen .main-content.pos-mode-content {
    height: 100vh !important;
    max-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    margin-left: 0 !important;
    width: 100% !important;
    background-color: #f1f5f9 !important;
}

.pos-locked-screen .top-navbar {
    flex-shrink: 0 !important;
    height: 52px !important;
    min-height: 52px !important;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important; /* Warna Dark Slate Navy Modern & Elegan */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 0 0.85rem !important; /* Presisi sejajar dengan padding content-wrapper (0.85rem) */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22) !important;
    color: #f8fafc !important;
}

.pos-brand-title {
    color: #ffffff !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.03em;
}

/* Jam & Tanggal Bertingkat (Atas Bawah, Font Kecil) */
.topbar-clock {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.15;
    color: #cbd5e1;
}

.topbar-clock .clock-date {
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 500;
}

.topbar-clock .clock-time {
    font-size: 0.78rem;
    color: #f8fafc;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Kasir & Nama Kasir Bertingkat (Tanpa Kotak Pembungkus / Borderless) */
.topbar-cashier-pill {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.1rem 0.25rem;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    line-height: 1.15;
    color: #f8fafc;
}

.topbar-cashier-icon {
    font-size: 1.15rem;
    color: #38bdf8;
}

.topbar-cashier-details {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.cashier-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    font-weight: 600;
}

.cashier-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =====================================================
   3 Kotak Toggle Topbar: Sejajar Panjang Kotak Keranjang (410px)
   ===================================================== */
.pos-topbar-actions-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem !important;
    width: 410px !important; /* Presisi persis 410px sejajar dengan kotak keranjang belanja */
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

/* Tombol Aksi Topbar: Border Tebal, Monokrom Profesional, Kapsul Elegan */
.topbar-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.42rem !important;
    height: 33px !important;
    padding: 0 0.45rem !important;
    border-radius: 9999px !important; /* Lengkungan halus di keempat sisinya */
    border: 1.8px solid rgba(255, 255, 255, 0.32) !important; /* Garis lebih tebal & seragam tidak warna-warni */
    background: rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
    font-size: 0.77rem !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    transition: all 0.18s ease-in-out !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18) !important;
    user-select: none !important;
    outline: none !important;
}

.topbar-action-btn i {
    font-size: 0.85rem !important;
    color: #e2e8f0 !important;
    transition: color 0.18s ease-in-out !important;
    flex-shrink: 0 !important;
}

.topbar-action-btn span {
    color: #f8fafc !important;
    letter-spacing: 0.01em !important;
    transition: color 0.18s ease-in-out !important;
}

/* Saat Kursor Diarahkan (Hover): Warna berubah profesional & seluruh elemen 100% kontras/terlihat */
.topbar-action-btn:hover {
    background: #0284c7 !important; /* Biru solid profesional */
    border-color: #38bdf8 !important; /* Garis aksen biru terang */
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.38) !important;
}

.topbar-action-btn:hover i,
.topbar-action-btn:hover span {
    color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.topbar-action-btn:active {
    transform: translateY(0);
    background: #0369a1 !important;
    border-color: #0284c7 !important;
}

.topbar-action-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.45) !important;
}

/* Alias kompatibilitas */
.topbar-pill-btn {
    border-radius: 9999px !important;
    padding: 0.32rem 0.85rem !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    transition: all 0.15s ease !important;
}

.pos-locked-screen .content-wrapper {
    flex: 1 !important;
    height: calc(100vh - 52px) !important;
    max-height: calc(100vh - 52px) !important;
    padding: 0.65rem 0.85rem !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    background-color: #f1f5f9 !important;
}

.pos-container {
    display: grid;
    grid-template-columns: 1fr 410px;
    gap: 0.75rem;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .pos-container {
        grid-template-columns: 1fr;
        height: 100%;
    }
}

/* --- Left Column: Products Area --- */
.pos-products-area {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    height: 100%;
    max-height: 100%;
    min-height: 0;
}

/* =====================================================
   Header Toolbar: Kategori & Search Bar Sejajar 1 Baris
   ===================================================== */
.pos-toolbar-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.85rem;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.pos-toolbar-categories-left {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.pos-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.pos-search-icon {
    position: absolute;
    left: 0.85rem;
    color: #64748b;
    font-size: 0.95rem;
    pointer-events: none;
    z-index: 2;
}

.pos-search-input {
    height: 38px;
    font-size: 0.9rem;
    padding: 0.4rem 2.25rem 0.4rem 2.35rem;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    background-color: #f8fafc;
    color: #1e293b;
    width: 100%;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.pos-search-input:focus {
    background-color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
    outline: none;
}

.pos-search-input::placeholder {
    color: #94a3b8;
    font-size: 0.86rem;
}

.pos-search-clear-btn {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0.2rem 0.45rem;
    color: #94a3b8;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    z-index: 2;
    transition: color 0.15s ease, transform 0.15s ease;
    display: none;
}

.pos-search-clear-btn:hover {
    color: #ef4444;
    transform: translateY(-50%) scale(1.1);
}

/* Tombol Kategori Pill (Semua Kategori & Kategori Tambahan) */
.pos-cat-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    border: 1.5px solid #cbd5e1;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    line-height: 1;
    white-space: nowrap;
    outline: none;
}

.pos-cat-pill:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}

.pos-cat-pill.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 1px 4px rgba(2, 132, 199, 0.25);
}

/* Tombol Utama: Tampilkan Semua Kategori (dengan icon grid dan arrow chevron) */
.pos-cat-main-btn {
    gap: 0.35rem;
    padding: 0 0.95rem;
}

.pos-cat-main-btn .toggle-icon {
    font-size: 0.72rem;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pos-cat-main-btn.is-open .toggle-icon {
    transform: rotate(180deg);
}

/* =====================================================
   Panel Dropdown Kategori: Muncul di Bawah Kotak Search
   ===================================================== */
.pos-categories-panel {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.55rem 0.85rem;
    flex-shrink: 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.pos-categories-panel.is-expanded {
    display: block !important;
    animation: panelSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.pos-categories-panel.is-collapsing {
    animation: panelSlideUp 0.16s ease-in forwards !important;
}

.pos-categories-panel-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
    max-height: 140px;
    overflow-y: auto;
    padding-right: 2px;
}

.pos-categories-panel-inner::-webkit-scrollbar {
    width: 5px;
}

.pos-categories-panel-inner::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* Kategori Ekstra di dalam Panel */
.pos-cat-pill-extra {
    height: 32px !important;
    padding: 0 0.75rem !important;
    font-size: 0.78rem !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
}

.pos-cat-pill-extra:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

.pos-cat-pill-extra.active {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 1px 4px rgba(2, 132, 199, 0.25) !important;
}

/* Animasi Smooth Zoom In Pop saat Expand */
.pos-categories-panel.is-expanded .pos-cat-pill-extra {
    animation: catZoomIn 0.26s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: calc(var(--cat-index, 0) * 16ms);
}

/* Animasi Smooth Zoom Out saat Collapse */
.pos-categories-panel.is-collapsing .pos-cat-pill-extra {
    animation: catZoomOut 0.15s ease-in forwards !important;
}

@keyframes panelSlideDown {
    0% {
        opacity: 0;
        transform: translateY(-6px);
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
        padding-top: 0.55rem;
        padding-bottom: 0.55rem;
    }
}

@keyframes panelSlideUp {
    0% {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
        padding-top: 0.55rem;
        padding-bottom: 0.55rem;
    }
    100% {
        opacity: 0;
        transform: translateY(-6px);
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

@keyframes catZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.65) translateY(3px);
    }
    70% {
        opacity: 1;
        transform: scale(1.06) translateY(-1px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes catZoomOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.65);
    }
}

/* Grid Produk: Latar belakang kontras Slate-100 dengan scrolling vertikal internal */
.pos-products-grid {
    flex: 1;
    height: 0;
    min-height: 0;
    overflow-y: auto;
    padding: 0.85rem;
    background: #f1f5f9;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 0.75rem;
    align-content: start;
}

/* Kartu Barang: Putih Bersih dengan Border Halus, Shadow Nyata & Kontras Jelas */
.pos-product-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.85rem 0.95rem;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 112px;
    position: relative;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}

.pos-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -2px rgba(59, 130, 246, 0.14), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-color: #3b82f6;
}

.pos-product-card.out-of-stock {
    opacity: 0.6;
    background: #f8fafc;
    cursor: not-allowed;
    border-style: dashed;
    border-color: #cbd5e1;
}

.pos-product-card.out-of-stock:hover {
    transform: none;
    box-shadow: none;
    border-color: #cbd5e1;
}

.pos-prod-name {
    font-weight: 600; /* Font seimbang dan tidak kaku */
    font-size: 0.86rem;
    color: #1e293b;
    line-height: 1.32;
    margin-bottom: 0.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pos-prod-meta {
    font-size: 0.72rem;
    color: #64748b;
    margin-bottom: 0.45rem;
    font-weight: 500;
}

.pos-prod-footer {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: auto;
    padding-top: 0.25rem;
}

.pos-prod-price {
    font-weight: 600; /* Seimbang, jelas & elegan tanpa terlalu tebal */
    font-size: 0.92rem;
    color: #0284c7;
    letter-spacing: -0.01em;
}

/* Kuantitas Stok: Tanpa Kotak Hijau, Teks Bersih & Proporsional */
.pos-prod-stock {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 0.76rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
    white-space: nowrap !important;
    line-height: 1 !important;
}

.pos-prod-stock.stock-normal {
    color: #64748b !important;
}

.pos-prod-stock.stock-low {
    color: #d97706 !important;
    font-weight: 600 !important;
}

.pos-prod-stock.stock-empty {
    color: #ef4444 !important;
    font-weight: 600 !important;
}

/* Override jika ada badge bawaan */
.pos-prod-stock.badge,
.pos-prod-stock.bg-success,
.pos-prod-stock.bg-warning,
.pos-prod-stock.bg-danger {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}
.pos-prod-stock.badge.bg-success {
    color: #64748b !important;
}

/* --- Right Column: Cart Panel --- */
.pos-cart-panel {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    max-height: 100%;
    min-height: 0;
}

.pos-cart-header {
    padding: 0.75rem 1rem;
    background: #1e293b;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.pos-cart-customer {
    padding: 0.55rem 0.85rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.pos-cart-customer .input-group {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
}

.pos-cart-customer .input-group:focus-within {
    border-color: #0284c7;
    box-shadow: 0 0 0 1px rgba(2, 132, 199, 0.25);
}

.pos-cart-customer .input-group-text {
    background: transparent !important;
    border: none !important;
    color: #64748b;
    padding: 0.35rem 0.4rem 0.35rem 0.65rem;
    font-size: 0.95rem;
}

.pos-cart-customer .form-select,
#customer-select {
    border: none !important;
    outline: none !important;
    box-shadow: none !important; /* Hapus garis biru tebal Bootstrap */
    background-color: transparent !important;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e293b;
    padding-left: 0.2rem;
    cursor: pointer;
}

.pos-cart-customer .form-select:focus,
#customer-select:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important; /* Hapus garis biru tebal saat fokus */
}

.pos-cart-panel .form-control:focus,
.pos-cart-panel .form-select:focus {
    box-shadow: none !important;
    outline: none !important;
}

.pos-cart-items {
    flex: 1;
    height: 0;
    min-height: 0;
    overflow-y: auto;
    padding: 0.5rem 0;
    background: #ffffff;
}

.pos-cart-items::-webkit-scrollbar {
    width: 5px;
}

.pos-cart-items::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.pos-cart-item {
    display: grid;
    grid-template-columns: 1fr 92px 105px;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid var(--gray-100);
    align-items: center;
    border-radius: 0;
    transition: background 0.1s;
}

.pos-cart-item:hover {
    background: var(--gray-50);
}

.pos-item-details {
    overflow: hidden;
}

.pos-item-title {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-item-sub {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.pos-qty-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 92px;
    min-width: 92px;
    max-width: 92px;
}

.pos-qty-btn {
    width: 25px;
    height: 25px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid var(--gray-300);
    background: #fff;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.15s ease;
}

.pos-qty-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

/* Hilangkan panah spinner bawaan browser pada input qty */
.pos-qty-input::-webkit-outer-spin-button,
.pos-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.pos-qty-input {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
    width: 38px;
    height: 25px;
    text-align: center !important;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    padding: 0 !important;
    background: #fff;
    color: #1e293b;
}

.pos-qty-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.pos-item-total {
    font-weight: 700;
    font-size: 0.85rem;
    text-align: right;
    width: 105px;
    min-width: 105px;
    max-width: 105px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
}

.pos-item-line-total {
    padding-right: 8px; /* Lurus rata kanan dengan ekor subtotal & diskon */
    color: #0f172a;
    line-height: 1.2;
}

.pos-item-total .btn-remove-item {
    margin-right: 8px;
}

/* --- Cart Summary --- */
.pos-cart-summary {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 0.65rem 0.85rem;
    flex-shrink: 0;
}

.pos-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    color: var(--gray-700);
}

.pos-subtotal-val {
    padding-right: 8px; /* Lurus rata kanan dengan ekor item line total & diskon */
    color: #0f172a;
}

/* --- Compact Discount Input Box --- */
.pos-discount-group {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    width: 125px;
    height: 25px; /* Ramping & compact */
    overflow: hidden;
    transition: all 0.15s ease;
}

.pos-discount-group:focus-within {
    border-color: #0284c7;
    box-shadow: 0 0 0 1px rgba(2, 132, 199, 0.25);
}

.pos-discount-prefix {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    padding-left: 0.45rem;
    padding-right: 0.15rem;
    line-height: 1;
    user-select: none;
}

.pos-discount-input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    width: 100%;
    height: 100%;
    padding: 0 7px 0 0.15rem !important; /* 7px padding + 1px border = 8px offset, lurus persis dengan ekor angka di atasnya */
    text-align: right !important;
    font-size: 0.85rem;
    font-weight: 700; /* Tebal & selaras dengan subtotal */
    color: #0f172a;
    font-family: inherit;
    line-height: 25px;
}

.pos-grand-total-card {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: #fff;
    border-radius: 8px;
    padding: 0.6rem 0.95rem;
    margin-top: 0.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pos-grand-total-val {
    font-size: 1.85rem; /* Nominal total lebih besar & jelas */
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.pos-cart-actions {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.5rem;
    margin-top: 0.45rem;
}

.pos-btn-clear {
    padding: 0.4rem 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-btn-pay {
    padding: 0.4rem 0.75rem; /* Lebih ramping & tidak terlalu tinggi */
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.25);
}

/* --- Compact Payment Modal Styles --- */
#paymentModal .modal-dialog {
    max-width: 520px;
    margin: 1.25rem auto;
}

#paymentModal .modal-content {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.payment-total-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.4rem 0.85rem;
}

.payment-total-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.payment-total-val {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0284c7;
    line-height: 1.1;
}

.payment-method-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.payment-method-btn {
    padding: 0.35rem 0.3rem;
    border-radius: 6px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.payment-method-btn i {
    font-size: 1.1rem;
}

.payment-method-btn:hover {
    border-color: #0284c7;
    background: #f0f9ff;
}

.payment-method-btn.active {
    border-color: #0284c7;
    background: rgba(2, 132, 199, 0.08);
    color: #0284c7;
}

.payment-method-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.quick-pay-btn {
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    border-radius: 6px;
    transition: all 0.15s;
}

.quick-pay-btn:hover {
    background: #e2e8f0;
}

.change-display-card {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    padding: 0.35rem 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.change-display-amount {
    font-size: 1.15rem;
    font-weight: 800;
    color: #047857;
    line-height: 1.1;
}

/* =====================================================
   POS QUICK PIN LOCK SCREEN (Opsi A) - Compact & Elegant
   ===================================================== */
.pos-pin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 30%, #1e293b 0%, #0f172a 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1035; /* Di atas POS & Topbar (1030), tetapi di bawah Modal Bootstrap (1055) */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    color: #fff;
    overflow-y: auto;
}

/* Dukungan Gambar Cover Latar Belakang (pin.webp / pin.jpg) dengan Dark Overlay Sinematik */
.pos-pin-overlay.has-cover-bg {
    background-color: #0f172a;
}

.pos-pin-overlay.has-cover-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.72) 0%, rgba(30, 41, 59, 0.65) 100%); /* Dikurangi 10% agar background cover lebih terlihat */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 0;
    pointer-events: none;
}

.pos-pin-overlay > * {
    position: relative;
    z-index: 1;
}

/* Pastikan Modal Admin Login dan Backdrop selalu tampil di lapisan paling depan */
#adminLoginModal {
    z-index: 1065 !important;
}

#adminLoginModal .modal-dialog {
    z-index: 1066 !important;
}

/* Kotak Numpad PIN: Ukuran Compact, Border Tebal & Menyala (Shining Glow) */
.pin-box {
    background: rgba(15, 23, 42, 0.86) !important;
    border: 2.5px solid #38bdf8 !important; /* Garis lebih tebal & terang menyala (shining) */
    box-shadow: 
        0 0 16px rgba(56, 189, 248, 0.65), 
        0 0 35px rgba(14, 165, 233, 0.4), 
        0 0 60px rgba(2, 132, 199, 0.22), 
        inset 0 0 18px rgba(56, 189, 248, 0.18),
        0 25px 60px rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-radius: 22px !important;
    padding: 1.35rem 1.4rem 1.1rem !important;
    width: 100% !important;
    max-width: 330px !important;
    text-align: center !important;
    animation: fadeInScale 0.25s ease-out;
    position: relative !important;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* Logo Bebas Tanpa Kotak (Diperbesar Bersih & Berwibawa) */
.pin-logo-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 0.65rem !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.pin-logo-img {
    width: 76px !important;
    height: 76px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    object-fit: contain !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 10px rgba(212, 175, 55, 0.35)) !important;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    user-select: none !important;
}

.pin-logo-img:hover {
    transform: scale(1.06);
}

.pin-store-badge {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
}

.pin-store-name {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.03em !important;
    margin: 0 !important;
    color: #f8fafc !important;
}

.pin-store-sub {
    font-size: 0.68rem !important;
    color: #94a3b8 !important;
    margin: 0.1rem 0 0.45rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
}

.pin-instruction {
    font-size: 0.8rem !important;
    color: #cbd5e1 !important;
    font-weight: 500 !important;
}

/* Dots Indicator (Ukuran Compact 12px) */
.pin-dots-container {
    display: flex !important;
    justify-content: center !important;
    gap: 9px !important;
    margin-bottom: 0.85rem !important;
}

.pin-dot {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    border: 1.8px solid rgba(148, 163, 184, 0.5) !important;
    background: transparent !important;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.pin-dot.filled {
    background: #38bdf8 !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.8) !important;
    transform: scale(1.15) !important;
}

.pin-dots-container.shake {
    animation: shakeAnim 0.4s ease-in-out;
}

@keyframes shakeAnim {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* Numpad Grid (Compact height 44px) */
.pin-numpad {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 0.65rem !important;
}

.numpad-btn {
    height: 44px !important; /* Compact button: pas di genggaman dan layar */
    background: rgba(30, 41, 59, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 10px !important;
    color: #f8fafc !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: all 0.12s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.numpad-btn:hover {
    background: rgba(51, 65, 85, 0.95) !important;
    border-color: rgba(56, 189, 248, 0.45) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
}

.numpad-btn:active {
    background: #0284c7 !important;
    border-color: #38bdf8 !important;
    transform: translateY(1px) scale(0.97);
}

.numpad-btn.btn-clear {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #f87171 !important;
}

.numpad-btn.btn-backspace {
    font-size: 1.05rem !important;
    color: #fbbf24 !important;
}

.pin-feedback-msg {
    min-height: 18px !important;
    font-size: 0.74rem !important;
}

.pin-hint {
    font-size: 0.7rem !important;
    color: #94a3b8 !important;
}

/* Logo di Topbar Kasir POS */
.pos-topbar-logo {
    height: 24px !important;
    width: 24px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
}

/* =====================================================
   MODAL LOGIN ADMIN: Form Input Bersih, Rapi & Elegan
   ===================================================== */
.admin-input-group {
    display: flex !important;
    align-items: center !important;
    background-color: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    width: 100% !important;
}

/* Hilangkan garis biru tebal terpisah bawaan Bootstrap saat kursor fokus */
.admin-input-group:focus-within {
    border-color: #0284c7 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.16) !important;
}

.admin-input-group .input-group-text {
    background: transparent !important;
    border: none !important;
    padding: 0.6rem 0.5rem 0.6rem 0.85rem !important;
    color: #64748b !important;
    font-size: 1.05rem !important;
    display: flex !important;
    align-items: center !important;
}

.admin-input-group .form-control {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0.6rem 0.6rem !important;
    color: #0f172a !important;
    font-size: 0.92rem !important;
    width: 100% !important;
    outline: none !important;
}

.admin-input-group .form-control:focus {
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
}

/* Tombol Icon Mata (Lihat / Sembunyikan Password) */
.btn-toggle-password {
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    transition: color 0.15s ease !important;
    text-decoration: none !important;
    font-size: 1.1rem !important;
}

.btn-toggle-password:hover {
    color: #0284c7 !important;
}

.btn-toggle-password:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* =====================================================
   KOTAK KONFIRMASI & ALERT CENTER PROFESIONAL
   ===================================================== */
.app-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10050;
    padding: 1.25rem;
    box-sizing: border-box;
    animation: appDialogFadeIn 0.18s ease-out forwards;
}

.app-dialog-card {
    position: relative;
    width: 100%;
    max-width: 390px;
    background: #ffffff;
    border-radius: 18px;
    padding: 1.85rem 1.65rem 1.45rem 1.65rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(226, 232, 240, 0.85);
    text-align: center;
    box-sizing: border-box;
    animation: appDialogScaleUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.app-dialog-icon-wrapper {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.1rem auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: transform 0.2s ease;
}

.app-dialog-icon-wrapper.theme-danger {
    background: #fef2f2;
    color: #ef4444;
    border: 3px solid #fee2e2;
}

.app-dialog-icon-wrapper.theme-warning {
    background: #fffbeb;
    color: #f59e0b;
    border: 3px solid #fef3c7;
}

.app-dialog-icon-wrapper.theme-primary,
.app-dialog-icon-wrapper.theme-info {
    background: #f0f9ff;
    color: #0284c7;
    border: 3px solid #e0f2fe;
}

.app-dialog-icon-wrapper.theme-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 3px solid #dcfce7;
}

.app-dialog-title {
    font-size: 1.22rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.app-dialog-message {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 1.6rem 0;
    line-height: 1.5;
    word-break: break-word;
}

.app-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.btn-dialog-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 1rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    border: 1.5px solid #cbd5e1;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    outline: none;
}

.btn-dialog-cancel:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}

.btn-dialog-confirm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 1rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    outline: none;
    color: #ffffff;
}

.btn-dialog-confirm.theme-danger {
    background: #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}
.btn-dialog-confirm.theme-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.45);
}

.btn-dialog-confirm.theme-warning {
    background: #f59e0b;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}
.btn-dialog-confirm.theme-warning:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45);
}

.btn-dialog-confirm.theme-primary,
.btn-dialog-confirm.theme-info {
    background: #0284c7;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}
.btn-dialog-confirm.theme-primary:hover,
.btn-dialog-confirm.theme-info:hover {
    background: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.45);
}

.btn-dialog-confirm.theme-success {
    background: #16a34a;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.35);
}
.btn-dialog-confirm.theme-success:hover {
    background: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.45);
}

@keyframes appDialogFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes appDialogScaleUp {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(12px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ========================================================= */
/* Modal Riwayat Penjualan Kasir - Fixed Height & Scrollable */
/* ========================================================= */
#kasirHistoryModal .modal-dialog {
    max-width: 960px;
    width: 92%;
    height: calc(100vh - 56px);
    margin: 28px auto;
    display: flex;
    flex-direction: column;
}

#kasirHistoryModal .modal-content {
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 14px;
    border: none;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
    overflow: hidden;
    background: #ffffff;
}

/* Topbar Header Compact - Tidak Terlalu Gelap */
#kasirHistoryModal .modal-header {
    flex-shrink: 0;
    padding: 0.55rem 1rem !important;
    background: linear-gradient(135deg, #334155 0%, #3e5068 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.modal-hdr-icon-btn {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 1.15rem;
    line-height: 1;
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-hdr-icon-btn:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.18) !important;
    transform: scale(1.08);
}
.modal-hdr-icon-btn:active {
    transform: scale(0.92);
}

/* Modal Body */
#kasirHistoryModal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0.65rem 0.85rem !important;
    background-color: #f8fafc;
    overflow: hidden;
}

/* 3 Elemen Sejajar Horizontal Compact */
.hist-summary-row {
    flex-shrink: 0;
    margin-bottom: 0.65rem;
}

.hist-card-compact {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.hist-card-icon {
    font-size: 1.35rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hist-card-content {
    display: inline-flex;
    align-items: baseline;
    gap: 0.45rem;
    white-space: nowrap;
}

.hist-card-label-inline {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    line-height: 1;
}

.hist-card-value-inline {
    display: inline-block;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1;
}

/* Legacy alias fallback */
.hist-card-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
    line-height: 1.1;
    margin-bottom: 2px;
}

.hist-card-value {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Container Tabel Riwayat Scrollable */
#kasirHistoryModal .history-table-container {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

#kasirHistoryModal .history-table-container thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background-color: #f1f5f9;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-bottom: 1px solid #cbd5e1;
    white-space: nowrap;
}

@media (max-width: 768px) {
    #kasirHistoryModal .modal-dialog {
        max-width: calc(100vw - 20px);
        width: calc(100vw - 20px);
        height: calc(100vh - 24px);
        margin: 12px auto;
    }
}


