/* ===== LAYOUT DASAR ===== */
body {
    background-color: #f8fafc;
}

.container-fluid,
.container-fluid>.row {
    height: calc(100vh - 56px);
    /* tinggi layar dikurangi navbar */
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 80px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1rem;
    transition: width 0.25s ease;
    overflow: hidden;
}

.sidebar:hover {
    width: 200px;
}

/* item sidebar */
.sidebar-item {
    width: 100%;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: #4b5563;
    white-space: nowrap;
    transition: background 0.2s;
    margin-bottom: 5px;
    border-radius: 12px;
    text-decoration: none;
}


.sidebar-item:hover,
.sidebar-item.active {
    background: #eef2ff;
    color: #4338ca;
}

/* icon */
.sidebar-item::before {
    font-size: 18px;
}

/* teks menu (disembunyikan default) */
.sidebar-item span {
    opacity: 0;
    transition: opacity 0.15s ease;
}

/* saat hover sidebar, teks muncul */
.sidebar:hover .sidebar-item span {
    opacity: 1;
}

/* ===== CONTENT AREA ===== */
.content-area {
    padding: 1.5rem;
    overflow-y: auto;
}

/* ===== PRODUCT CARD ===== */

@media (max-width: 1300px) {
    .product-card-header .badge {
        max-width: 90px;
        /* atur sesuai desain card */
        display: inline-block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: middle;
    }
}

.product-card-body {
    margin-top: 10px;
    margin-bottom: 10px;
}


.product-card {
    position: relative;
    background: #ffffff;
    border-radius: 18px;
    padding: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.product-title {
    margin-bottom: .2rem !important;
}

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

/* ===== BADGE TERSEDIA ===== */
.product-card .badge {
    position: absolute;
    top: 14px;
    left: 14px;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 999px;
}

/* ===== STOK (ANGKA KANAN ATAS) ===== */
.product-card-header {
    padding: 15px 10px;
    border-radius: 10px;
}

.product-card .stock {
    content: "63";
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 6px 10px;
    border-radius: 10px;
}

/* ===== NAMA PRODUK ===== */
.product-card h6 {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

/* ===== KATEGORI ===== */
.product-card small {
    font-size: 13px;
    color: #94a3b8;
}

/* ===== HARGA ===== */
.product-card .price {
    margin-top: 12px;
    font-size: 16px;
    font-weight: bold;
    color: #94a3b8;
}

.product-card .price::before {
    content: "HARGA";
    display: block;
    font-size: 11px;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

/* ===== BUTTON PLUS ===== */
.product-card button {
    position: absolute;
    bottom: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    padding: 0;
    font-size: 23px;
    font-weight: 600;
    border: none;
    background: #eef2ff;
    color: #4f46e5;
}

.product-card button:hover {
    background: #4f46e5;
    color: #ffffff;
}


/* ===============================
   ORDER PANEL FULL HEIGHT
================================ */
.order-panel {
    background: #fff;
    height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e5e7eb;
    padding-right: 0px !important;
    padding-left: 0px !important;
}

/* ===============================
   ORDER HEADER
================================ */

.order-header {
    padding: 16px;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.order-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    border: none;
    background: #f1f3f9;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 14px;
    cursor: pointer;
}

.order-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.order-header-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}


.order-actions button {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.order-header h6 {
    margin: 0;
    font-weight: 600;
}

.order-header small {
    color: #6c757d;
}

/* ===============================
   ORDER BODY (SCROLL)
================================ */
.order-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* ITEM ORDER */
.order-item {
    background: #f4f6fb;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;

    position: relative;
    /* untuk menjadi acuan posisi absolute anaknya */
}

.order-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.order-item-title {
    font-size: 14px;
    font-weight: 600;

    white-space: nowrap;
    /* mencegah wrap ke baris baru */
    overflow: hidden;
    /* sembunyikan overflow */
    text-overflow: ellipsis;
    /* tampilkan ... */
    max-width: 70%;
    /* sesuaikan lebar maksimal sesuai layout */
    display: block;
}

.order-item-category {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
}

.order-item-remove {
    cursor: pointer;
    color: #9ca3af;
}


/* Qty + Satuan */
.qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-control button {
    width: 30px;
    height: 30px;
    border: none;
    background-color: #f0f0f0;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qty-control button:hover {
    background-color: #e0e0e0;
}

.qty-value {
    min-width: 28px;
    text-align: center;
    font-weight: 500;
}

.qty-unit {
    padding: 6px 8px;
    border-radius: 12px;
    border: 1px solid #f4f6fb;
    font-size: 14px;
    background-color: #f4f6fb;
    transition: all 0.2s ease;
}

.qty-unit:hover {
    border-color: #888;
}

/* Discount Input Group */
.discount-input-group {
    display: flex;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    width: 110px;
    margin-top: -6px;
    margin-bottom: 1px;
}

.discount-input-group:hover {
    border-color: #888;
}

.order-item-discount-value {
    flex: 1;
    padding: 8px 12px;
    border: none;
    font-size: 14px;
    outline: none;
    width: 82px;
}

.order-item-discount-type {
    padding: 3px 3px;
    border: none;
    background-color: #f7f7f7;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s ease;
    width: 50px;
}

.order-item-discount-type:hover {
    background-color: #e0e0e0;
}

/* Harga */
.order-item-price {
    font-weight: 600;
    font-size: 16px;
    margin-top: 6px;
    color: #4f46e5;
    position: absolute;
    bottom: 77px;
    right: 50px;

    /* jarak dari kanan container */
}

/* ===============================
   QTY CONTROL
================================ */
.qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 20px;
    padding: 4px 10px;
    width: fit-content;
}

.qty-control button {
    border: none;
    background: none;
    font-weight: bold;
    font-size: 14px;
    color: #4f46e5;
}

.qty-control span {
    min-width: 16px;
    text-align: center;
}

/* ===============================
   PRICE RIGHT
================================ */
/* ===============================
   ORDER FOOTER
================================ */
.order-footer {
    padding: 16px;
    background: #fff;
    border-top: 1px solid #eee;
}

.discount-btn {
    width: 100%;
    border: none;
    background: #f4f6fb;
    padding: 10px 12px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 12px;
}

.summary {
    background: #f9fafc;
    border-radius: 14px;
    padding: 14px;
}

.row-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
    color: #6b7280;
}

.row-item.total {
    font-size: 15px;
    color: #4f46e5;
    font-weight: 600;
}

.pay-btn {
    margin-top: 14px;
    border-radius: 14px;
    padding: 14px;
    font-size: 15px;
}

.dropdown {
    margin-bottom: 12px;
}


/* ================================
 Button Custome
 ================================= */

.badge-danger {
    background-color: rgb(230, 87, 87) !important;
    color: #fff !important;
}

.badge-available {
    background-color: #eef2ff !important;
    color: #4f46e5 !important;
}

/* ================================
 Payment pop up
 ================================= */


.payment-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.payment-modal {
    background: #fff;
    width: 360px;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .2);
}

.payment-header {
    text-align: center;
    position: relative;
}

.payment-header h2 {
    font-weight: 700;
}

.close-btn {
    position: absolute;
    right: 0;
    top: 0;
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
}

.payment-method {
    display: flex;
    gap: 8px;
    margin: 15px 0;
}

.payment-method button {
    flex: 1;
    border: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px;
}

.payment-method .active {
    background: #eef2ff;
    color: #4f46e5;
    border-color: #4f46e5;
}

/* .payment-input {
    text-align: center;
    font-weight: 600;
    margin-bottom: 10px;
} */

.payment-input-wrapper {
    position: relative;
}

.payment-input {
    text-align: center;
    padding-right: 40px;
    font-weight: 600;
    margin-bottom: 10px;
}

.clear-input {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #9ca3af;
    font-size: 18px;
}

.clear-input:hover {
    color: #ef4444;
}


.quick-amount {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.quick-amount button {
    flex: 1;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    padding: 6px;
}

.quick-amount .active {
    background: #eef2ff;
    border-color: #4f46e5;
    color: #4f46e5;
}

.exact-btn {
    width: 100%;
    border: none;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 10px;
}

.change {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.change strong {
    color: #16a34a;
}

.confirm-btn {
    width: 100%;
    background: #0f172a;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 12px;
}


/* ================================
 Button Custome
 ================================= */


.btn-outline-secondary {
    --bs-btn-border-color: #e2e7eb !important;
    border-radius: 10px;
    background: #fff
}

.btn-primary {
    border-radius: 10px;
}

@media (max-width: 576px) {
    .navbar input.form-control {
        font-size: 14px;
    }
}

.badge-resep {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: #e6f4ea;
    color: #137333;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #b7dfc4;
}

.badge-resep:hover {
    background: #bae6fd;
    cursor: pointer;
}