/* ==========================================================================
   SC Marketplace — Gaya tambahan Dashboard Pembeli (keranjang, checkout, pembayaran,
   pesanan, pelacakan, ulasan, retur, chat, notifikasi, pengaturan)
   Hak cipta (c) 2026 sharecode.id — https://sharecode.id · Lisensi: LICENSE.md
   Dimuat setelah dashboard.css dan sebelum responsive.css.
   ========================================================================== */

/* ---------- Umum ---------- */
.sticky-side { position: sticky; top: calc(var(--dash-top) + 1rem); }
.sec-label { font-family: var(--mp-font-head); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--mp-muted); margin-bottom: .5rem; }
.info-box { display: flex; gap: .75rem; align-items: flex-start; background: #f0f9ff; border: 1px solid #bae6fd; color: #075985; border-radius: var(--mp-radius-sm); padding: .75rem .9rem; font-size: 13px; }
.info-box > i { font-size: 18px; line-height: 1.2; }
.info-box.escrow { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.thumb-sm { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; border: 1px solid var(--mp-border); flex-shrink: 0; background: var(--mp-bg); }
.store-logo-xs { width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0; }
.choice-card { display: flex; align-items: flex-start; gap: .65rem; border: 1px solid var(--mp-border); border-radius: var(--mp-radius-sm); padding: .7rem .85rem; cursor: pointer; transition: border-color var(--mp-ease), background var(--mp-ease); margin: 0; font-weight: 500; color: var(--mp-text); font-size: 13.5px; }
.choice-card:hover { border-color: var(--mp-primary-2); }
.choice-card input { margin-top: .25rem; accent-color: var(--mp-primary); flex-shrink: 0; }
.choice-card.active, .choice-card:has(input:checked) { border-color: var(--mp-primary); background: var(--mp-primary-soft); }
.choice-card small { color: var(--mp-muted); display: block; font-weight: 400; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .5rem; }

/* ---------- Profil ---------- */
.avatar-edit { position: relative; display: inline-block; }
.avatar-edit .avatar-xl { border: 4px solid #fff; box-shadow: var(--mp-shadow); }
.avatar-edit label { position: absolute; right: 0; bottom: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--mp-primary); color: #fff; display: grid; place-items: center; cursor: pointer; margin: 0; border: 3px solid #fff; }
.member-card { border-radius: var(--mp-radius); padding: 1.25rem; color: #fff; background: linear-gradient(135deg, #b45309, #f59e0b 60%, #fcd34d); position: relative; overflow: hidden; }
.member-card::after { content: ''; position: absolute; right: -30px; bottom: -50px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .15); }
.member-card .mc-tier { font-family: var(--mp-font-head); font-weight: 800; font-size: 22px; }
.member-card .mini-progress { background: rgba(255, 255, 255, .35); }
.member-card .mini-progress span { background: #fff; }

/* ---------- Alamat ---------- */
.addr-card { border: 1px solid var(--mp-border); border-radius: var(--mp-radius); background: #fff; padding: 1rem 1.1rem; height: 100%; display: flex; flex-direction: column; }
.addr-card.is-default { border-color: var(--mp-primary); box-shadow: 0 0 0 3px var(--mp-primary-soft); }
.addr-card .addr-actions { margin-top: auto; padding-top: .75rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.map-ph { position: relative; border-radius: var(--mp-radius-sm); overflow: hidden; min-height: 150px; background-color: #e8f0e9; background-image: linear-gradient(rgba(255, 255, 255, .7) 2px, transparent 2px), linear-gradient(90deg, rgba(255, 255, 255, .7) 2px, transparent 2px), linear-gradient(rgba(255, 255, 255, .35) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .35) 1px, transparent 1px); background-size: 80px 80px, 80px 80px, 20px 20px, 20px 20px; border: 1px solid var(--mp-border); }
.map-ph::before { content: ''; position: absolute; left: 10%; right: 25%; top: 58%; height: 10px; background: #fde68a; transform: rotate(-12deg); border-radius: 5px; }
.map-ph::after { content: ''; position: absolute; top: 0; bottom: 0; left: 62%; width: 22px; background: #bfdbfe; transform: skewX(-8deg); }
.map-ph .map-pin { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -100%); font-size: 34px; color: var(--mp-danger); z-index: 2; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .25)); }
.map-ph .map-note { position: absolute; left: .6rem; bottom: .6rem; z-index: 2; background: rgba(255, 255, 255, .92); border-radius: 6px; padding: .2rem .55rem; font-size: 12px; color: var(--mp-navy); font-weight: 600; }
.map-ph .map-btn { position: absolute; right: .6rem; bottom: .6rem; z-index: 2; }
.map-ph.lg { min-height: 280px; }
.map-ph .map-route { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }

/* ---------- Keranjang ---------- */
.cart-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; background: #fff; border: 1px solid var(--mp-border); border-radius: var(--mp-radius); padding: .75rem 1rem; margin-bottom: 1rem; }
.cart-store { background: #fff; border: 1px solid var(--mp-border); border-radius: var(--mp-radius); margin-bottom: 1rem; overflow: hidden; }
.cart-store .cs-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .75rem 1rem; border-bottom: 1px solid var(--mp-border); background: #fcfcfd; }
.cart-store .cs-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: .65rem 1rem; border-top: 1px dashed var(--mp-border); font-size: 13px; }
.cart-item { display: flex; gap: .85rem; padding: .9rem 1rem; align-items: flex-start; }
.cart-item + .cart-item { border-top: 1px solid #f3f4f6; }
.cart-item .ci-img { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; border: 1px solid var(--mp-border); flex-shrink: 0; }
.cart-item .ci-body { flex: 1; min-width: 0; }
.cart-item .ci-name { color: var(--mp-text); font-weight: 600; font-size: 14px; }
.cart-item .ci-name:hover { color: var(--mp-primary); }
.cart-item .ci-variant { display: inline-block; background: var(--mp-bg); border-radius: 6px; padding: .05rem .5rem; font-size: 12px; color: var(--mp-muted); margin: .2rem 0; }
.cart-item .ci-actions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.cart-item .ci-note { margin-top: .5rem; }
.mp-check { width: 18px; height: 18px; accent-color: var(--mp-primary); cursor: pointer; flex-shrink: 0; margin-top: .2rem; }
.summary-card .card-body { padding: 1.1rem 1.25rem; }
.mbar { display: none; }
@media (max-width: 991.98px) {
  .mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1020; background: #fff; border-top: 1px solid var(--mp-border); box-shadow: 0 -6px 18px rgba(23, 43, 77, .08); padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom)); align-items: center; justify-content: space-between; gap: .75rem; }
  body.has-mbar .dash-footer { padding-bottom: 5rem; }
  .sticky-side { position: static; }
}

/* ---------- Checkout ---------- */
.co-store { background: #fff; border: 1px solid var(--mp-border); border-radius: var(--mp-radius); margin-bottom: 1rem; overflow: hidden; }
.co-store .co-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .75rem 1rem; border-bottom: 1px solid var(--mp-border); background: #fcfcfd; }
.co-store .co-body { padding: .75rem 1rem; }
.co-store .co-ship { background: var(--mp-bg); border-radius: var(--mp-radius-sm); padding: .75rem; }
.co-store .co-sub { display: flex; justify-content: space-between; padding: .65rem 1rem; border-top: 1px dashed var(--mp-border); font-size: 13.5px; }
.co-step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--mp-primary); color: #fff; font-size: 12px; font-weight: 700; margin-right: .4rem; }
.pay-group + .pay-group { margin-top: .9rem; }
.pay-opt { display: flex; align-items: center; gap: .65rem; border: 1px solid var(--mp-border); border-radius: var(--mp-radius-sm); padding: .6rem .8rem; cursor: pointer; margin-bottom: .4rem; font-weight: 500; font-size: 13.5px; color: var(--mp-text); }
.pay-opt:hover { border-color: var(--mp-primary-2); }
.pay-opt:has(input:checked) { border-color: var(--mp-primary); background: var(--mp-primary-soft); }
.pay-opt input { accent-color: var(--mp-primary); }
.pay-logo { width: 46px; height: 28px; border-radius: 6px; display: grid; place-items: center; font-size: 10px; font-weight: 800; font-family: var(--mp-font-head); color: #fff; background: var(--mp-navy); flex-shrink: 0; letter-spacing: .02em; }
.voucher-chip { display: inline-flex; align-items: center; gap: .35rem; border: 1px dashed var(--mp-primary); color: var(--mp-primary); background: #fff; border-radius: 6px; padding: .15rem .55rem; font-size: 12px; font-weight: 700; cursor: pointer; }
.voucher-chip:hover { background: var(--mp-primary-soft); }
.voucher-applied { display: flex; align-items: center; gap: .5rem; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; border-radius: var(--mp-radius-sm); padding: .5rem .75rem; font-size: 13px; }

/* ---------- Pembayaran ---------- */
.sim-banner { background: repeating-linear-gradient(-45deg, #fef3c7, #fef3c7 12px, #fde68a 12px, #fde68a 24px); color: #78350f; border-radius: var(--mp-radius-sm); padding: .6rem 1rem; font-weight: 700; font-size: 13px; text-align: center; margin-bottom: 1rem; }
.pay-hero { text-align: center; padding: 1.5rem 1rem; }
.pay-hero .pay-total { font-family: var(--mp-font-head); font-weight: 800; font-size: 30px; color: var(--mp-navy); }
.pay-cd { display: inline-flex; align-items: center; gap: .3rem; font-family: var(--mp-font-head); font-weight: 800; }
.pay-cd span[data-cd] { background: var(--mp-danger); color: #fff; min-width: 38px; text-align: center; padding: .3rem .35rem; border-radius: 8px; font-size: 17px; }
.va-box { display: flex; align-items: center; justify-content: space-between; gap: .75rem; background: var(--mp-bg); border-radius: var(--mp-radius-sm); padding: .85rem 1rem; }
.va-box .va-num { font-family: var(--mp-font-head); font-weight: 800; font-size: 22px; letter-spacing: .06em; color: var(--mp-navy); word-break: break-all; }
.qr-box { display: inline-block; padding: 14px; background: #fff; border: 1px solid var(--mp-border); border-radius: var(--mp-radius); box-shadow: var(--mp-shadow-sm); position: relative; }
.qr-box svg { display: block; }
.qr-box .qr-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #fff; border-radius: 8px; padding: 3px 6px; font-family: var(--mp-font-head); font-weight: 800; font-size: 11px; color: var(--mp-primary); border: 1px solid var(--mp-border); }
.pay-success { text-align: center; padding: 2rem 1rem; }
.pay-success .ps-icon { width: 84px; height: 84px; border-radius: 50%; background: #dcfce7; color: var(--mp-success); display: grid; place-items: center; font-size: 44px; margin: 0 auto 1rem; }
.accordion .card-header .btn-link { color: var(--mp-navy); font-weight: 700; text-decoration: none; width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; padding: 0; }
.accordion .card-header .btn-link.collapsed i.bi-chevron-down { transform: none; }
.accordion .card-header .btn-link i.bi-chevron-down { transition: transform .2s; transform: rotate(180deg); }
.steps-ol { padding-left: 1.2rem; margin: 0; font-size: 13.5px; }
.steps-ol li { margin-bottom: .35rem; }

/* ---------- Pesanan ---------- */
.order-card .oc-store { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--mp-navy); }
.order-card .oc-item + .oc-item { border-top: 1px solid #f3f4f6; }
.order-card .oc-escrow { font-size: 12px; }
.order-card .oc-total b { font-family: var(--mp-font-head); font-size: 16px; color: var(--mp-navy); }
.order-tabs { background: #fff; border: 1px solid var(--mp-border); border-radius: var(--mp-radius); margin-bottom: 1rem; }
.order-tabs .nav-tabs { border-bottom: 0; padding: 0 .5rem; }
.escrow-box { border-radius: var(--mp-radius-sm); padding: .9rem 1rem; display: flex; gap: .75rem; align-items: flex-start; }
.escrow-box > i { font-size: 24px; }
.escrow-box.held { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.escrow-box.released { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.escrow-box.disputed { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.escrow-box.none { background: var(--mp-bg); border: 1px solid var(--mp-border); color: var(--mp-muted); }
.resi-box { display: inline-flex; align-items: center; gap: .4rem; background: var(--mp-bg); border-radius: 6px; padding: .15rem .25rem .15rem .6rem; font-family: var(--mp-font-head); font-weight: 700; }

/* ---------- Pelacakan ---------- */
.track-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.track-head .th-icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--mp-primary-soft); color: var(--mp-primary); font-size: 26px; }
.track-route { display: flex; align-items: center; gap: .75rem; font-size: 13px; }
.track-route .tr-line { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--mp-primary) 0 8px, transparent 8px 14px); }

/* ---------- Ulasan ---------- */
.review-block { border: 1px solid var(--mp-border); border-radius: var(--mp-radius-sm); padding: .9rem; margin-bottom: .75rem; }
.review-block .rating-input label { font-size: 28px; }
.rating-text { font-size: 12.5px; font-weight: 600; color: var(--mp-primary); min-height: 18px; }
.photo-add { width: 72px; height: 72px; border-radius: 10px; border: 2px dashed #d1d5db; display: grid; place-items: center; color: var(--mp-muted); cursor: pointer; margin: 0; font-size: 20px; background: #fafafa; }
.photo-add:hover { border-color: var(--mp-primary); color: var(--mp-primary); }
.img-tiles.sm .img-tile { width: 72px; height: 72px; }
.my-review { padding: 1rem 0; border-bottom: 1px solid var(--mp-border); }
.my-review:last-child { border-bottom: 0; }
.seller-reply { background: var(--mp-bg); border-left: 3px solid var(--mp-primary); border-radius: 6px; padding: .5rem .75rem; font-size: 13px; margin-top: .5rem; }

/* ---------- Retur & refund ---------- */
.convo-item { display: flex; gap: .75rem; padding: .85rem 0; border-bottom: 1px solid #f3f4f6; }
.convo-item:last-child { border-bottom: 0; }
.convo-item .cv-body { flex: 1; min-width: 0; background: var(--mp-bg); border-radius: 10px; padding: .6rem .8rem; font-size: 13.5px; }
.convo-item.buyer .cv-body { background: var(--mp-primary-soft); }
.convo-item.admin .cv-body { background: #eef2ff; }
.convo-item.system .cv-body { background: #fff; border: 1px dashed var(--mp-border); color: var(--mp-muted); }
.convo-item .cv-photos img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; margin: .4rem .35rem 0 0; border: 1px solid var(--mp-border); }
.role-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex-shrink: 0; font-size: 16px; }
.dz-mp.dropzone .dz-preview .dz-image { border-radius: 10px; }

/* ---------- Chat ---------- */
.chat-list .cl-search { padding: .75rem; border-bottom: 1px solid var(--mp-border); }
.chat-list .cl-items { flex: 1; overflow-y: auto; }
.chat-list .cl-item img { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
.chat-list .cl-meta { flex: 1; min-width: 0; }
.chat-list .cl-unread { background: var(--mp-primary); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 10px; padding: 0 .4rem; line-height: 18px; }
.chat-room .cr-head { display: flex; align-items: center; gap: .65rem; padding: .7rem 1rem; border-bottom: 1px solid var(--mp-border); }
.chat-room .cr-head img { width: 40px; height: 40px; border-radius: 12px; }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mp-success); margin-right: .25rem; }
.online-dot.off { background: #cbd5e1; }
.chat-product { display: flex; align-items: center; gap: .65rem; margin: 0 1rem; margin-top: .75rem; padding: .55rem .7rem; border: 1px solid var(--mp-border); border-radius: 10px; background: #fff; }
.chat-product img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; }
.chat-day { text-align: center; font-size: 11.5px; color: var(--mp-muted); margin: .25rem 0 .75rem; }
.chat-day span { background: #fff; border: 1px solid var(--mp-border); border-radius: 20px; padding: .1rem .7rem; }
.typing { display: inline-flex; gap: 4px; padding: .7rem .9rem; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: #9ca3af; animation: typing 1s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-attach-preview { display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem 0; }
.chat-attach-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--mp-border); }
.chat-empty { flex: 1; display: grid; place-items: center; background: #fafafa; }

/* ---------- Notifikasi ---------- */
.notif-item { display: flex; gap: .85rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--mp-border); align-items: flex-start; }
.notif-item:last-child { border-bottom: 0; }
.notif-item.unread { background: #fffaf7; }
.notif-item .ni-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.notif-item .ni-body { flex: 1; min-width: 0; }
.notif-item .ni-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mp-primary); display: inline-block; margin-left: .35rem; vertical-align: 2px; }
.notif-item .ni-actions { display: flex; gap: .25rem; flex-shrink: 0; }

/* ---------- Pengaturan ---------- */
.set-nav .nav-link { border-radius: 9px; color: var(--mp-text); font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: .6rem; padding: .6rem .85rem; }
.set-nav .nav-link i { color: var(--mp-muted); }
.set-nav .nav-link.active { background: var(--mp-primary-soft); color: var(--mp-primary); }
.set-nav .nav-link.active i { color: var(--mp-primary); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid #f3f4f6; }
.set-row:last-child { border-bottom: 0; }
.device-item { display: flex; align-items: center; gap: .85rem; padding: .8rem 0; border-bottom: 1px solid #f3f4f6; }
.device-item:last-child { border-bottom: 0; }
.device-item > i { font-size: 24px; color: var(--mp-navy); width: 32px; text-align: center; }
.danger-zone { border: 1px solid #fecaca; background: #fff7f7; }

/* ---------- Invoice (modal + cetak) ---------- */
.invoice-doc { font-size: 13px; color: #1f2937; }
.invoice-doc .inv-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-bottom: 3px solid var(--mp-primary); padding-bottom: .75rem; margin-bottom: 1rem; }
.invoice-doc .inv-brand { display: flex; align-items: center; gap: .6rem; }
.invoice-doc .inv-brand img { width: 40px; height: 40px; }
.invoice-doc table { width: 100%; }
.invoice-doc .inv-stamp { display: inline-block; border: 2px solid var(--mp-success); color: var(--mp-success); font-weight: 800; padding: .1rem .6rem; border-radius: 6px; transform: rotate(-4deg); font-family: var(--mp-font-head); }
.invoice-doc .inv-stamp.unpaid { border-color: var(--mp-danger); color: var(--mp-danger); }
@media print {
  body.print-invoice .dash-layout, body.print-invoice .mp-toast-wrap, body.print-invoice .modal-backdrop, body.print-invoice .mbar { display: none !important; }
  body.print-invoice .modal { position: static !important; display: block !important; overflow: visible !important; }
  body.print-invoice .modal-dialog { max-width: none !important; margin: 0 !important; transform: none !important; }
  body.print-invoice .modal-content { box-shadow: none !important; border: 0 !important; }
  body.print-invoice .modal-header, body.print-invoice .modal-footer { display: none !important; }
}

/* ---------- Responsif area pembeli ---------- */
@media (max-width: 575.98px) {
  .cart-item .ci-img { width: 68px; height: 68px; }
  .cart-item { padding: .8rem .75rem; gap: .6rem; }
  .order-card .oc-item img { width: 56px; height: 56px; }
  .va-box { flex-direction: column; align-items: flex-start; }
  .va-box .va-num { font-size: 19px; }
  .pay-hero .pay-total { font-size: 25px; }
  .notif-item { padding: .8rem .75rem; }
  .chat-app { height: calc(100vh - 170px); }
}
.pay-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .4rem; }
.pay-items .pay-opt { margin-bottom: 0; }
