/* ========== พอร์ทัลลูกค้า: แท็บบัญชีผู้ใช้ / หน้าชำระเงิน-แจ้งโอน / ใบสั่งซื้อชั่วคราว / ตะกร้า ==========
   ใช้ร่วมกับ .ckx-* ใน confirm-form.css (stepper, การ์ด, ช่องกรอก) */

/* ---------- แท็บบัญชีผู้ใช้ (api/user/order.php case getBillAll) ---------- */
#tab-3 { background: #f4f6f4 !important; }
.acc { max-width: 860px; margin: 0 auto; padding: 14px 14px 28px; box-sizing: border-box; font-family: var(--sh-font, inherit); color: #0f172a; }
.acc *, .acc *::before { box-sizing: border-box; }
.acc-card { background: #fff; border: 1px solid #e3e8e4; border-radius: 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 14px rgba(15, 23, 42, .04); }
.acc-profile { display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 12px; }
.acc-avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #14532d, #2ca652); color: #fff; font-size: 24px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px rgba(44, 166, 82, .28); }
.acc-who { flex: 1; min-width: 0; }
.acc-who h3 { margin: 0 0 4px; font-size: 17px; font-weight: 700; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: #64748b; }
.acc-meta span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.acc-meta svg { width: 14px; height: 14px; flex: none; stroke: #94a3b8; }
.acc-badge { flex: none; font-size: 11px; font-weight: 700; color: #15803d; background: #dcfce7; border-radius: 999px; padding: 4px 10px; }
.acc-line { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px; border-radius: 14px; background: #fff; border: 1px solid #c6f0d4; }
.acc-line i { flex: none; width: 38px; height: 38px; border-radius: 10px; background: #06c755; color: #fff; font-style: normal; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.acc-line div { flex: 1; min-width: 0; }
.acc-line b { display: block; font-size: 14px; color: #0f172a; }
.acc-line small { display: block; font-size: 12px; color: #64748b; }
.acc-line a { flex: none; font-size: 13px; font-weight: 700; color: #fff !important; background: #06c755; border-radius: 999px; padding: 8px 14px; text-decoration: none; white-space: nowrap; }
.acc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.acc-stat { background: #fff; border: 1px solid #e3e8e4; border-radius: 12px; padding: 12px 10px; text-align: center; }
.acc-stat b { display: block; font-size: 22px; line-height: 1.1; color: #0f172a; }
.acc-stat span { display: block; margin-top: 3px; font-size: 11.5px; color: #64748b; }
.acc-stat.is-wait b { color: #b45309; }
.acc-stat.is-paid b { color: #1d4ed8; }
.acc-stat.is-done b { color: #15803d; }
.acc-sec { display: flex; align-items: center; gap: 8px; margin: 18px 2px 10px; font-size: 15px; font-weight: 700; color: #0f172a; }
.acc-sec::before { content: ''; width: 4px; height: 18px; border-radius: 2px; background: #2ca652; }
.acc-sec .acc-count { font-size: 12px; font-weight: 700; color: #475569; background: #e2e8f0; border-radius: 999px; padding: 2px 9px; }
.acc-order { background: #fff; border: 1px solid #e3e8e4; border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.acc-order.st-wait { border-left: 4px solid #f59e0b; }
.acc-order.st-paid { border-left: 4px solid #3b82f6; }
.acc-order.st-ship { border-left: 4px solid #0ea5e9; }
.acc-order.st-done { border-left: 4px solid #22c55e; }
.acc-order.st-cancel { border-left: 4px solid #cbd5e1; opacity: .8; }
.acc-order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.acc-ord { display: block; font-size: 16px; font-weight: 800; color: #0f172a; letter-spacing: .2px; }
.acc-date { display: block; margin-top: 2px; font-size: 12.5px; color: #64748b; }
.acc-chip { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.acc-chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-wait { background: #fff7ed; color: #c2410c; }
.chip-paid { background: #eff6ff; color: #1d4ed8; }
.chip-ship { background: #ecfeff; color: #0e7490; }
.chip-done { background: #ecfdf3; color: #15803d; }
.chip-cancel { background: #f1f5f9; color: #64748b; }
.acc-track { display: flex; list-style: none; margin: 12px 0 0; padding: 0; counter-reset: trk; }
.acc-track li { flex: 1; position: relative; text-align: center; font-size: 11px; color: #94a3b8; padding-top: 18px; }
.acc-track li::before { content: ''; position: absolute; top: 5px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #fff; border: 2px solid #cbd5e1; z-index: 1; box-sizing: border-box; }
.acc-track li::after { content: ''; position: absolute; top: 10px; left: -50%; width: 100%; height: 2px; background: #e2e8f0; }
.acc-track li:first-child::after { display: none; }
.acc-track li.done { color: #15803d; font-weight: 600; }
.acc-track li.done::before { background: #2ca652; border-color: #2ca652; }
.acc-track li.done::after { background: #2ca652; }
.acc-track li.now::before { box-shadow: 0 0 0 4px rgba(44, 166, 82, .18); }
.acc-order-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e3e8e4; }
.acc-total small { display: block; font-size: 11.5px; color: #64748b; }
.acc-total b { font-size: 18px; color: #0f172a; }
.acc-note { font-size: 12.5px; color: #64748b; margin-top: 6px; }
.acc-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.acc-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid #d5dedb; background: #fff; color: #334155 !important; font-size: 13px; font-weight: 700; text-decoration: none !important; white-space: nowrap; }
.acc-btn svg { width: 15px; height: 15px; }
.acc-btn:active { background: #f1f5f9; }
.acc-btn-primary { background: linear-gradient(135deg, #14532d, #2ca652); color: #fff !important; border-color: transparent; box-shadow: 0 4px 10px rgba(44, 166, 82, .28); }
.acc-btn-danger { color: #b91c1c !important; border-color: #fecaca; background: #fff; }
.acc-empty { text-align: center; padding: 28px 16px; color: #64748b; font-size: 14px; }
.acc-empty i { display: block; width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; background: #ecfdf3; font-style: normal; font-size: 26px; line-height: 56px; }
.acc-empty a { display: inline-block; margin-top: 12px; font-weight: 700; color: #fff !important; background: #2ca652; border-radius: 999px; padding: 9px 18px; text-decoration: none; }
.acc-signout { display: block; width: 100%; margin: 24px 0 0; height: 46px; line-height: 44px; text-align: center; border-radius: 12px; border: 1px solid #e3e8e4; background: #fff; color: #b91c1c !important; font-size: 14px; font-weight: 700; text-decoration: none !important; }
@media (max-width: 560px) {
    .acc { padding: 10px 10px 24px; }
    .acc-profile { padding: 14px; }
    .acc-avatar { width: 48px; height: 48px; font-size: 20px; }
    .acc-stats { gap: 8px; }
    .acc-stat b { font-size: 19px; }
    .acc-order { padding: 12px 12px 12px 14px; }
    .acc-order-foot { align-items: flex-start; }
    .acc-btns { width: 100%; justify-content: flex-start; }
    .acc-btn { flex: 1 1 auto; justify-content: center; padding: 0 8px; }
    .acc-btn-danger { flex: 0 0 auto; }
}

/* ---------- หน้าชำระเงิน / แจ้งโอน (popup-confirm-address · getTranferSlip) ---------- */
.popup-confirm-address .page-content { padding: 66px 0 0 !important; background: #f4f6f4 !important; }
.pay { max-width: 760px; margin: 0 auto; padding: 14px 14px 28px; box-sizing: border-box; font-family: var(--sh-font, inherit); color: #0f172a; }
.pay *, .pay *::before { box-sizing: border-box; }
.pay-hero { position: relative; overflow: hidden; border-radius: 16px; padding: 18px 18px 16px; margin-bottom: 14px; color: #fff; background: linear-gradient(135deg, #14532d 0%, #1d7a46 55%, #2ca652 100%); box-shadow: 0 10px 24px rgba(20, 83, 45, .25); }
.pay-hero::after { content: ''; position: absolute; right: -40px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.pay-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pay-ord { font-size: 13px; font-weight: 600; opacity: .9; }
.pay-ord b { font-size: 15px; font-weight: 800; letter-spacing: .3px; opacity: 1; }
.pay-hero .acc-chip { background: rgba(255, 255, 255, .18); color: #fff; }
.pay-hero small { display: block; font-size: 12.5px; opacity: .85; }
.pay-amt { display: block; font-size: 34px; font-weight: 800; line-height: 1.15; margin: 2px 0 6px; letter-spacing: -.5px; }
.pay-hero-meta { font-size: 13px; opacity: .9; }
.pay-pdf { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); color: #fff !important; font-size: 13px; font-weight: 700; text-decoration: none !important; }
.pay-pdf svg { width: 15px; height: 15px; }
.pay .ckx-card { margin-bottom: 14px; }
.pay-banks { padding: 6px 10px; }
.pay-bank { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px solid #eef2ef; }
.pay-bank:last-child { border-bottom: 0; }
.pay-bank-logo { flex: none; width: 42px; height: 42px; border-radius: 12px; color: #fff; font-weight: 800; font-size: 17px; display: flex; align-items: center; justify-content: center; }
.pay-bank-info { flex: 1; min-width: 0; }
.pay-bank-info b { display: block; font-size: 14px; color: #0f172a; }
.pay-bank-no { display: block; font-size: 19px; font-weight: 800; letter-spacing: 1px; color: #0f172a; font-variant-numeric: tabular-nums; }
.pay-bank-info small { display: block; font-size: 12px; color: #64748b; }
.pay-copy { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid #bbf7d0; background: #ecfdf3; color: #15803d; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.pay-copy svg { width: 14px; height: 14px; }
.pay-copy:active { background: #dcfce7; }
.pay-qr { text-align: center; padding: 14px 16px 18px; }
.pay-qr #ppQR { display: inline-block; padding: 10px; background: #fff; border: 1px solid #e3e8e4; border-radius: 12px; }
.pay-qr #ppQR img, .pay-qr #ppQR canvas { display: block; max-width: 100%; }
.pay-qr b { display: block; margin-top: 8px; font-size: 17px; }
.pay-qr small { display: block; color: #64748b; font-size: 12.5px; margin-top: 2px; }
.pay-drop { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px dashed #b9c6c0; border-radius: 12px; background: #fafcfa; cursor: pointer; min-height: 72px; }
.pay-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.pay-drop i { flex: none; width: 40px; height: 40px; border-radius: 10px; background: #ecfdf3; color: #15803d; font-style: normal; display: flex; align-items: center; justify-content: center; }
.pay-drop i svg { width: 20px; height: 20px; }
.pay-drop div { flex: 1; min-width: 0; }
.pay-drop b { display: block; font-size: 14px; color: #0f172a; }
.pay-drop small { display: block; font-size: 12px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pay-drop.has-file { border-style: solid; border-color: #2ca652; background: #f0fdf4; }
#slipPreview { display: none; margin-top: 10px; }
#slipPreview img { display: block; max-width: 100%; max-height: 260px; margin: 0 auto; border-radius: 10px; border: 1px solid #e3e8e4; }
.pay-submit-wrap { padding: 6px 16px 16px; }
.pay .checkout-submit-btn.pay-submit { display: flex; width: 100%; margin: 0; height: 50px; line-height: 50px; padding: 0; border-radius: 12px; font-size: 16px; box-shadow: 0 6px 16px rgba(29, 122, 70, .28); align-items: center; justify-content: center; }
.pay-done { text-align: center; padding: 26px 18px 20px; }
.pay-done i { display: flex; width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: #dcfce7; color: #15803d; font-style: normal; align-items: center; justify-content: center; }
.pay-done i svg { width: 32px; height: 32px; }
.pay-done h3 { margin: 0 0 4px; font-size: 18px; color: #0f172a; }
.pay-done p { margin: 0; font-size: 13.5px; color: #64748b; line-height: 1.5; }
.pay-done-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 0; }
.pay-done-grid div { background: #f8fafc; border-radius: 10px; padding: 10px 8px; }
.pay-done-grid small { display: block; font-size: 11.5px; color: #64748b; }
.pay-done-grid b { display: block; font-size: 15px; color: #0f172a; margin-top: 2px; }
@media (max-width: 560px) {
    .pay { padding: 10px 10px 24px; }
    .pay-amt { font-size: 30px; }
    .pay-bank-no { font-size: 17px; }
    .pay-copy span { display: none; }
    .pay-copy { padding: 0 10px; }
}

/* ---------- ใบสั่งซื้อชั่วคราว (popup-order-summary) ---------- */
.popup-order-summary .page-content { padding: 66px 0 0 !important; background: #f4f6f4 !important; }
.os { max-width: 760px; margin: 0 auto; padding: 14px 14px 28px; box-sizing: border-box; font-family: var(--sh-font, inherit); }
.os .order-summary-card { border: 1px solid #e3e8e4; box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 14px rgba(15, 23, 42, .04); }
.os .order-summary-section-title { text-transform: none; font-size: 13px; color: #64748b; display: flex; align-items: center; gap: 8px; }
.os .order-summary-section-title::before { content: ''; width: 3px; height: 14px; border-radius: 2px; background: #2ca652; }
.os .order-summary-item-img { width: 52px; height: 52px; object-fit: contain; border: 1px solid #eef2ef; background: #fff; }
.os .order-summary-total { padding: 12px 20px; font-size: 14px; font-weight: 500; color: #334155; border-top: 1px solid #f0f0f0; }
.os .order-summary-total.os-grand { padding: 14px 20px; font-size: 16px; font-weight: 700; color: #0f172a; background: #fafcfa; }
.os-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 16px 16px; border-top: 1px solid #f0f0f0; }
.os-actions .checkout-submit-btn { display: flex; align-items: center; justify-content: center; width: auto; margin: 0; height: 48px; padding: 0 12px; border-radius: 12px; font-size: 15px; }
.os-actions .os-ghost { background: #fff !important; color: #1d7a46 !important; border: 1.5px solid #bbf7d0 !important; }
.os-actions .os-primary { box-shadow: 0 6px 16px rgba(29, 122, 70, .28); }
.os-hint { margin: 10px 2px 0; text-align: center; font-size: 12px; color: #94a3b8; }
@media (max-width: 560px) {
    .os { padding: 10px 10px 24px; }
    .os-actions { grid-template-columns: 1fr; }
}

/* ---------- ตะกร้า: ปุ่มเพิ่ม/ลดจำนวน ---------- */
.cart-item-qty .handle-counter { border: 1px solid #d5dedb; border-radius: 10px; overflow: hidden; background: #fff; }
.cart-item-qty .handle-counter .counter-minus,
.cart-item-qty .handle-counter .counter-plus { width: 36px; height: 36px; border-radius: 0; background: #fff; color: #1d7a46; font-size: 20px; font-weight: 600; }
.cart-item-qty .handle-counter .counter-minus:hover,
.cart-item-qty .handle-counter .counter-plus:hover { background: #ecfdf3; }
.cart-item-qty .handle-counter input { width: 44px !important; height: 36px !important; border-left: 1px solid #e3e8e4 !important; border-right: 1px solid #e3e8e4 !important; border-radius: 0 !important; }
.cart-item-remove { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; color: #94a3b8; }
.cart-item-remove:hover { background: #fef2f2; color: #b91c1c; text-decoration: none; }
