/* =========================================================
   Bunny Order - Trang "Đơn hàng đã mua" của khách + nút Zalo
   Màu chủ đạo: --bp (hồng Bunny)
   ========================================================= */
.bo-page, .bo-contact, .bo-qr-modal {
    --bp: #c8628c;
    --bp-dark: #b04a75;
    --bp-soft: #fdf2f7;
    --line: #eceff3;
    --text: #1f2937;
    --muted: #6b7280;
}
.bo-page { padding: 20px 0 40px; background: #f7f7f9; color: var(--text); font-size: 14px; min-height: 470px; }
.bo-page a { text-decoration: none; }
.bo-muted { color: var(--muted); font-size: 12.5px; }

/* Menu tài khoản */
.bo-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.bo-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: #374151; font-size: 13.5px; font-weight: 500; }
.bo-nav a svg { width: 17px; height: 17px; color: var(--bp); }
.bo-nav a:hover { border-color: var(--bp); color: var(--bp); }
.bo-nav a.active { background: var(--bp); border-color: var(--bp); color: #fff; }
.bo-nav a.active svg { color: #fff; }
.bo-nav a.logout svg { color: #dc2626; }

/* Chào + số liệu */
.bo-hello { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.bo-hello-name { display: flex; align-items: center; gap: 12px; }
.bo-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--bp-soft); color: var(--bp); font-weight: 700; font-size: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bo-hi { font-size: 17px; }
.bo-hi b { color: var(--bp-dark); }
.bo-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.bo-stat { display: flex; flex-direction: column; min-width: 130px; padding: 8px 14px; border-radius: 10px; background: #f9fafb; border: 1px solid var(--line); color: var(--text) !important; line-height: 1.3; }
.bo-stat span { font-size: 12px; color: var(--muted); }
.bo-stat b { font-size: 19px; font-weight: 700; }
.bo-stat small { font-size: 11.5px; color: #9ca3af; }
a.bo-stat:hover { border-color: var(--bp); }
.bo-stat.main { background: linear-gradient(135deg, var(--bp), var(--bp-dark)); border: 0; }
.bo-stat.main span { color: rgba(255, 255, 255, .9); }
.bo-stat.main b { color: #fff; font-size: 21px; }

/* Liên hệ Zalo */
.bo-contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: #eef6ff; border: 1px solid #cfe3ff; border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; font-size: 13.5px; }
.bo-contact-text { display: flex; flex-direction: column; color: #1e3a5f; line-height: 1.4; }
.bo-contact-text span { font-size: 12.5px; color: #4b6584; }
.bo-contact-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.bo-zbtn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 13px; white-space: nowrap; transition: .15s; text-decoration: none !important; }
.bo-zbtn img { width: 20px; height: 20px; }
.bo-zbtn svg { width: 16px; height: 16px; }
.bo-zbtn.zalo { background: #0068ff; color: #fff !important; }
.bo-zbtn.zalo img { background: #fff; border-radius: 50%; }
.bo-zbtn.group { background: #fff; color: #0068ff !important; border: 1px solid #b6d4ff; }
.bo-zbtn.phone { background: #fff; color: #dc2626 !important; border: 1px solid #fecaca; }
.bo-zbtn:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0, 104, 255, .15); }

.bo-qr-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 99999; align-items: center; justify-content: center; padding: 20px; }
.bo-qr-box { position: relative; background: #fff; border-radius: 16px; padding: 22px 22px 16px; text-align: center; max-width: 320px; width: 100%; }
.bo-qr-box img { width: 240px; max-width: 100%; display: inline-block; }
.bo-qr-title { font-weight: 700; font-size: 17px; margin-bottom: 10px; color: #0068ff; }
.bo-qr-note { font-size: 13px; color: #6b7280; margin-top: 8px; }
.bo-qr-close { position: absolute; top: 6px; right: 10px; border: 0; background: none; font-size: 26px; line-height: 1; color: #9ca3af; cursor: pointer; }

/* Tìm kiếm */
.bo-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.bo-search { flex: 1 1 260px; position: relative; }
.bo-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: #9ca3af; }
.bo-search input { width: 100%; height: 42px; border: 1px solid #dfe3e8; border-radius: 10px; padding: 0 12px 0 38px; background: #fff; outline: none; font-size: 14px; }
.bo-search input:focus { border-color: var(--bp); box-shadow: 0 0 0 3px rgba(200, 98, 140, .12); }
.bo-sel { flex: 0 0 180px; }
.bo-page .select2-container { width: 100% !important; }
.bo-page .select2-container .select2-selection--single { height: 42px !important; border: 1px solid #dfe3e8 !important; border-radius: 10px !important; }
.bo-page .select2-selection__rendered { line-height: 40px !important; padding-left: 12px !important; font-size: 14px; }
.bo-page .select2-selection__arrow { height: 40px !important; }
.bo-page .bo-btn, .bo-page button.bo-btn[type=submit] { height: 42px; padding: 0 20px; border-radius: 10px; border: 0; background: var(--bp); color: #fff !important; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.bo-page .bo-btn:hover { background: var(--bp-dark); }
.bo-page .bo-btn.ghost { background: #fff; color: var(--muted) !important; border: 1px solid #dfe3e8; }

/* Tab trạng thái */
.bo-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: thin; }
.bo-tabs a { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: #374151; font-size: 13px; white-space: nowrap; }
.bo-tabs a em { font-style: normal; font-weight: 700; font-size: 12px; background: #f3f4f6; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.bo-tabs a:hover { border-color: var(--bp); }
.bo-tabs a.active { background: var(--bp); border-color: var(--bp); color: #fff; }
.bo-tabs a.active em { background: rgba(255, 255, 255, .25); color: #fff; }
.bo-page .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot.red { background: #ef4444; } .dot.green { background: #16a34a; } .dot.blue { background: #2563eb; }
.dot.orange { background: #f59e0b; } .dot.purple { background: #a855f7; } .dot.gray { background: #64748b; } .dot.dark { background: #1f2937; }

/* Đơn hàng */
.bo-list { display: flex; flex-direction: column; gap: 10px; }
.bo-order { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: .15s; }
.bo-order:hover { box-shadow: 0 4px 16px rgba(15, 23, 42, .06); }
.bo-order.is-cancel { opacity: .7; }
.bo-order-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 14px; background: #fafafb; border-bottom: 1px solid var(--line); }
.bo-order-code { display: flex; align-items: baseline; gap: 10px; }
.bo-order-code b { color: var(--bp-dark); font-size: 15px; }
.bo-order-code span { color: var(--muted); font-size: 12.5px; }
.bo-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.bo-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 20px; white-space: nowrap; }
.bo-badge.red { background: #ef4444; color: #fff; }
.bo-badge.green { background: #16a34a; color: #fff; }
.bo-badge.dark { background: #1f2937; color: #fff; }
.bo-badge.gray { background: #e5e7eb; color: #374151; }
.bo-badge.soft.blue { background: #dbeafe; color: #1d4ed8; }
.bo-badge.soft.orange { background: #ffedd5; color: #c2410c; }
.bo-badge.soft.green { background: #dcfce7; color: #15803d; }
.bo-badge.soft.purple { background: #f3e8ff; color: #7e22ce; }
.bo-badge.soft.gray { background: #e5e7eb; color: #374151; }

.bo-order-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 190px; gap: 14px; padding: 12px 14px; align-items: start; }
.bo-prod { display: flex; gap: 12px; min-width: 0; }
.bo-img { width: 76px; height: 76px; border-radius: 10px; overflow: hidden; background: #f3f4f6; flex-shrink: 0; display: block; }
.bo-img img { width: 100%; height: 100%; object-fit: cover; }
.bo-prod-info { min-width: 0; }
.bo-prod-code { font-size: 12.5px; font-weight: 700; color: var(--bp); }
.bo-prod-title { font-weight: 600; line-height: 1.35; margin-bottom: 6px; }
.bo-items { display: flex; flex-wrap: wrap; gap: 4px; }
.bo-item { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; background: #f6f7f9; border: 1px solid #eef0f3; font-size: 12.5px; color: #374151; }
.bo-item b { color: var(--bp-dark); }

.bo-notes { display: flex; flex-direction: column; gap: 6px; font-size: 13px; min-width: 0; }
.bo-note { background: #f9fafb; border-radius: 8px; padding: 6px 10px; line-height: 1.45; color: #374151; word-break: break-word; }
.bo-note b { color: #374151; }
.bo-note.admin { background: #fef2f2; color: #7f1d1d; }
.bo-note.admin b { color: #dc2626; }
.bo-done { color: #16a34a; font-weight: 600; font-size: 12.5px; }

.bo-total { text-align: right; }
.bo-total-qty { font-size: 12.5px; color: var(--muted); }
.bo-total-money { font-size: 20px; font-weight: 700; color: var(--bp-dark); line-height: 1.3; }
.bo-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; flex-wrap: nowrap; }
.bo-page .bo-act { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; white-space: nowrap; flex-shrink: 0; line-height: 1; border-radius: 8px; font-size: 13px; font-weight: 600; }
.bo-page .bo-act svg { width: 15px; height: 15px; flex-shrink: 0; }
.bo-act.edit { background: var(--bp-soft); color: var(--bp-dark) !important; border: 1px solid #f5cfe0; }
.bo-act.del { background: #fef2f2; color: #dc2626 !important; border: 1px solid #fecaca; }
.bo-act:hover { filter: brightness(.96); }

.bo-empty { background: #fff; border: 1px dashed #d1d5db; border-radius: 14px; padding: 40px 10px; text-align: center; color: var(--muted); }
.bo-empty svg { width: 42px; height: 42px; color: #d1d5db; display: inline-block; margin-bottom: 6px; }
.bo-pagination { margin-top: 16px; }

/* Mobile */
@media (max-width: 900px) {
    .bo-order-body { grid-template-columns: 1fr; gap: 10px; }
    .bo-total { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; text-align: left; border-top: 1px dashed var(--line); padding-top: 8px; }
    .bo-total-qty { order: 1; }
    .bo-total-money { order: 2; font-size: 18px; }
    .bo-actions { order: 3; width: 100%; margin-top: 2px; }
    .bo-actions .bo-act { flex: 1; justify-content: center; }
    .bo-notes:empty { display: none; }
}
@media (max-width: 640px) {
    .bo-page { padding-top: 12px; }
    .bo-hello { padding: 12px; }
    .bo-stats { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
    .bo-stat { min-width: 0; }
    .bo-sel { flex: 1 1 45%; }
    .bo-btn { flex: 1; }
    .bo-contact-btns { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
    .bo-zbtn { justify-content: center; padding: 0 8px; font-size: 12.5px; min-width: 0; }
    .bo-img { width: 64px; height: 64px; }
    .bo-order-head { padding: 8px 12px; }
    .bo-order-body { padding: 10px 12px; }
}
