/* B-Mart Order System v1.4 */
#bmart-app { position: relative; font-family: 'Segoe UI', Arial, sans-serif; }
#bmart-app * { box-sizing: border-box; }

/* ── Balloon BG ── */
.bm-bg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, #e0f4ff 0%, #c8e9ff 50%, #dff0ff 100%);
  z-index: -1; overflow: hidden; pointer-events: none;
}
.bm-balloon {
  position: absolute; bottom: -120px; border-radius: 50%;
  animation: bmFloat linear infinite; opacity: 0.35;
}
@keyframes bmFloat {
  0%   { transform: translateY(0) scale(1); }
  50%  { transform: translateY(-50vh) scale(1.05); }
  100% { transform: translateY(-110vh) scale(1); }
}

/* ── Main Menu ── */
.bm-menu {
  max-width: 480px; margin: 30px auto; padding: 28px 20px;
  background: rgba(255,255,255,0.85); border-radius: 20px;
  box-shadow: 0 4px 24px rgba(176,216,240,0.4); text-align: center;
  position: relative; z-index: 1;
}
.bm-logo    { font-size: 1.6rem; font-weight: 900; color: #1a6fa8; margin-bottom: 4px; }
.bm-tagline { font-size: .9rem; color: #5591bb; margin-bottom: 20px; }

/* ── Buttons ── */
.bm-btn {
  display: block; width: 100%; padding: 14px; margin: 10px 0;
  border: none; border-radius: 12px; font-size: 1rem; font-weight: 700;
  cursor: pointer; text-decoration: none; text-align: center;
  font-family: inherit; letter-spacing: .3px;
  transition: transform .15s, box-shadow .15s;
}
.bm-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(170,212,240,0.5); }
.bm-btn-blue   { background: linear-gradient(90deg,#56ccf2,#2f80ed); color: #fff; }
.bm-btn-orange { background: linear-gradient(90deg,#f7971e,#ffd200); color: #444; }
.bm-btn-green  { background: linear-gradient(90deg,#43e97b,#38f9d7); color: #1a4731; }
.bm-btn-purple { background: linear-gradient(90deg,#a18cd1,#fbc2eb); color: #4a235a; }
.bm-btn-wa     { background: linear-gradient(90deg,#25D366,#128C7E); color: #fff; }

/* ── Overlay ── */
.bm-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(184,217,240,0.55); z-index: 99999;
  align-items: center; justify-content: center; padding: 12px;
}
.bm-overlay.bm-show { display: flex; }
.bm-popup {
  background: #f0faff; border-radius: 20px;
  width: 100%; max-width: 520px; max-height: 92vh;
  overflow-y: auto; padding: 28px 20px 20px;
  box-shadow: 0 8px 40px rgba(90,180,224,0.25);
  position: relative; animation: bmPop .18s ease-out;
}
@keyframes bmPop {
  from { transform: scale(.96); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.bm-close {
  position: absolute; top: 10px; right: 12px;
  background: #ffe0e0; border: none; border-radius: 50%;
  width: 30px; height: 30px; font-size: 1.1rem;
  cursor: pointer; color: #c0392b; z-index: 2;
  line-height: 30px; text-align: center; padding: 0;
}

/* ── Step Header ── */
.bm-step-hdr {
  text-align: center; color: #1a6fa8; font-size: 1.1rem;
  font-weight: 800; margin-bottom: 18px;
}
.bm-dots { display: flex; justify-content: center; gap: 8px; margin: 8px 0; }
.bm-dot  { width: 10px; height: 10px; border-radius: 50%; background: #cce7f7; }
.bm-dot.on { background: #2f80ed; }
.bm-step-nav {
  display: flex; justify-content: space-between;
  align-items: center; margin-top: 18px;
}

/* ── Form fields ── */
.bm-field { margin-bottom: 14px; }
.bm-field label { display: block; font-size: .85rem; color: #2471a3; font-weight: 700; margin-bottom: 4px; }
.bm-field input {
  width: 100%; padding: 10px 12px; border: 1.5px solid #a8d8f0;
  border-radius: 10px; font-size: 1rem; background: #f8fdff;
  outline: none; font-family: inherit;
}
.bm-field input:focus { border-color: #2f80ed; }
.bm-field small { font-size: .78rem; color: #888; }

/* ── Popup buttons ── */
.bm-pbtn {
  padding: 10px 20px; border: none; border-radius: 10px;
  font-size: .95rem; font-weight: 700; cursor: pointer;
  font-family: inherit; display: inline-flex; align-items: center; gap: 6px;
}
.bm-pbtn-primary { background: linear-gradient(90deg,#56ccf2,#2f80ed); color: #fff; }
.bm-pbtn-back    { background: linear-gradient(90deg,#e0e0e0,#bdbdbd); color: #555; }
.bm-pbtn-full    { width: 100%; justify-content: center; padding: 12px; }
.bm-pbtn:disabled { opacity: .4; cursor: default; }

/* ── Items ── */
.bm-item {
  display: flex; align-items: center; gap: 10px;
  background: #e8f6ff; border-radius: 10px; padding: 10px 14px; margin: 7px 0;
}
.bm-item-name  { font-weight: 700; color: #1a6fa8; font-size: .95rem; }
.bm-item-price { font-size: .8rem; color: #888; }
.bm-item-our   { color: #27ae60; font-weight: 700; }
.bm-item input[type=checkbox] { width: 20px; height: 20px; accent-color: #2f80ed; cursor: pointer; }

/* ── Bill box ── */
.bm-bill {
  text-align: center; background: #d4f0ff;
  border-radius: 14px; padding: 16px; margin: 16px 0;
}
.bm-bill-lbl { font-size: .85rem; color: #555; }
.bm-bill-amt { font-size: 2.8rem; font-weight: 900; color: #1a6fa8; }

/* ── Order No ── */
.bm-ordno {
  text-align: center; background: #e8f8e8;
  border-radius: 14px; padding: 12px; margin: 10px 0;
}
.bm-ordno-lbl { font-size: .85rem; color: #555; }
.bm-ordno-val { font-size: 2.2rem; font-weight: 900; color: #27ae60; }

/* ── Preview card ── */
.bm-preview {
  background: linear-gradient(135deg,#e0f7ff,#f0fff4);
  border-radius: 16px; padding: 18px; margin: 12px 0;
  border: 2px solid #a8ddf0;
}
.bm-preview h3 { color: #1a6fa8; margin: 0 0 10px; font-size: 1rem; }
.bm-preview-row {
  display: flex; justify-content: space-between;
  font-size: .9rem; padding: 4px 0; border-bottom: 1px dashed #c8e8f8;
}
.bm-preview-total { font-size: 1.3rem; font-weight: 900; color: #1a6fa8; margin-top: 8px; text-align: right; }

/* ── WA share button ── */
.bm-wa-btn {
  display: block; width: 100%; padding: 13px; margin: 10px 0;
  background: linear-gradient(90deg,#25D366,#128C7E); color: #fff;
  border: none; border-radius: 12px; font-size: 1rem; font-weight: 700;
  cursor: pointer; text-align: center; text-decoration: none; font-family: inherit;
}

/* ── Bulk bar ── */
.bm-bulk-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  background: #e8f6ff; border-radius: 10px; padding: 8px 12px; margin-bottom: 10px;
}
.bm-bulk-bar label { font-size: .85rem; color: #1a6fa8; font-weight: 700; cursor: pointer; }
.bm-bulk-count { font-size: .8rem; color: #555; }
.bm-bulk-pub  { padding: 6px 16px; background: linear-gradient(90deg,#43e97b,#38f9d7); border: none; border-radius: 9px; font-weight: 700; font-size: .82rem; color: #1a4731; cursor: pointer; }
.bm-bulk-pend { padding: 6px 16px; background: linear-gradient(90deg,#ffe4a0,#ffd200); border: none; border-radius: 9px; font-weight: 700; font-size: .82rem; color: #555; cursor: pointer; }
.bm-bulk-pub:disabled, .bm-bulk-pend:disabled { opacity: .4; cursor: default; }

/* ── Admin login ── */
.bm-login-box { text-align: center; padding: 20px 0; }
.bm-login-box .bm-field input {
  text-align: center; letter-spacing: 6px; font-size: 1.2rem;
}
.bm-login-btn {
  width: 100%; padding: 12px;
  background: linear-gradient(90deg,#f7971e,#ffd200);
  border: none; border-radius: 12px;
  font-size: 1rem; font-weight: 700; color: #444; cursor: pointer;
}
.bm-err { color: #e74c3c; font-size: .85rem; text-align: center; margin: 6px 0; font-weight: 700; }

/* ── Admin panel ── */
.bm-admin-hdr {
  color: #1a6fa8; font-size: 1rem; font-weight: 800; margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px;
}
.bm-admin-hdr-btns { display: flex; gap: 6px; }
.bm-stat-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.bm-stat { flex: 1; min-width: 80px; background: #e0f4ff; border-radius: 10px; padding: 10px; text-align: center; }
.bm-stat .sn { font-size: 1.4rem; font-weight: 900; color: #1a6fa8; }
.bm-stat .sl { font-size: .72rem; color: #5591bb; }
.bm-filter-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.bm-fbtn {
  padding: 6px 14px; border: 1.5px solid #a8d8f0;
  border-radius: 20px; background: #f0faff;
  font-size: .8rem; cursor: pointer; color: #2471a3; font-weight: 700;
}
.bm-fbtn.on { background: #2f80ed; color: #fff; border-color: #2f80ed; }
.bm-search-inp {
  flex: 1; min-width: 130px; padding: 6px 12px;
  border: 1.5px solid #a8d8f0; border-radius: 20px;
  font-size: .85rem; outline: none; font-family: inherit;
}
.bm-tbl { width: 100%; border-collapse: collapse; font-size: .78rem; }
.bm-tbl th { background: #d0ecff; color: #1a6fa8; padding: 8px 5px; text-align: left; }
.bm-tbl td { padding: 6px 5px; border-bottom: 1px solid #e0f0ff; word-break: break-word; vertical-align: top; }
.bm-tbl tr:hover td { background: #f0faff; }
.bm-act { padding: 4px 9px; border: none; border-radius: 7px; font-size: .72rem; font-weight: 700; cursor: pointer; margin: 2px; }
.bm-act-pub  { background: #d4edda; color: #155724; }
.bm-act-edit { background: #fff3cd; color: #856404; }
.bm-act-del  { background: #ffe0e0; color: #c0392b; }
.bm-act-dlv  { background: #d0f0ff; color: #1a6fa8; }
.bm-badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: .7rem; font-weight: 700; }
.bm-badge-pend { background: #fff3cd; color: #856404; }
.bm-badge-dlvd { background: #d4edda; color: #155724; }
.bm-badge-pub  { background: #d0f0ff; color: #1a6fa8; }
.bm-chk { width: 16px !important; height: 16px !important; accent-color: #2f80ed; cursor: pointer; }
.bm-logout { padding: 6px 14px; background: #ffe0e0; color: #c0392b; border: none; border-radius: 8px; font-weight: 700; font-size: .8rem; cursor: pointer; }

/* ── Delivery popup ── */
.bm-del-search {
  width: 100%; padding: 12px 16px; border: 2px solid #56ccf2;
  border-radius: 14px; font-size: 1rem; outline: none;
  background: #fff; margin: 12px 0; font-family: inherit;
}
.bm-del-search:focus { border-color: #2f80ed; }
.bm-del-row {
  background: #e8f6ff; border-radius: 12px; padding: 12px 14px;
  margin: 8px 0; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 6px;
}
.bm-del-ord  { font-weight: 900; color: #27ae60; font-size: .95rem; }
.bm-del-name { font-weight: 700; color: #1a6fa8; }
.bm-del-mob  { font-size: .8rem; color: #666; }
.bm-dlv-btn { padding: 7px 14px; background: linear-gradient(90deg,#43e97b,#38f9d7); border: none; border-radius: 10px; font-weight: 700; font-size: .82rem; color: #1a4731; cursor: pointer; }
.bm-dlv-btn.done { background: linear-gradient(90deg,#b2dfdb,#e0f7f4); color: #888; }
.bm-del-empty { text-align: center; color: #888; padding: 24px 0; font-size: .9rem; }
.bm-del-section-lbl { font-size: .8rem; color: #1a6fa8; font-weight: 800; margin: 10px 0 4px; }

/* ── BSS Lookup ── */
.bm-bss-box { background: #f0fff4; border-radius: 14px; padding: 14px; border: 1.5px solid #a8ddf0; margin-bottom: 14px; }
.bm-bss-box h4 { color: #1a6fa8; margin: 0 0 10px; font-size: .9rem; font-weight: 800; }
.bm-bss-row { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.bm-bss-type { padding: 8px 10px; border: 1.5px solid #a8d8f0; border-radius: 9px; font-size: .82rem; background: #fff; }
.bm-bss-inp  { flex: 1; min-width: 130px; padding: 8px 12px; border: 1.5px solid #a8d8f0; border-radius: 9px; font-size: .88rem; outline: none; font-family: inherit; }
.bm-bss-inp:focus { border-color: #2f80ed; }
.bm-bss-card { background: #fff; border-radius: 10px; border: 1.5px solid #c8e8f8; padding: 10px 12px; margin: 6px 0; }
.bm-bss-id   { font-weight: 900; color: #27ae60; font-size: .95rem; }
.bm-bss-name { font-weight: 700; color: #1a6fa8; font-size: .9rem; }
.bm-bss-meta { display: flex; flex-wrap: wrap; gap: 3px 12px; font-size: .78rem; color: #555; margin-top: 4px; }
.bm-bss-err  { color: #e74c3c; font-size: .82rem; font-weight: 700; padding: 6px 0; }
.bm-bss-loading { color: #888; font-size: .82rem; padding: 4px 0; }
.bm-bs-del  { background: #d4edda; color: #155724; padding: 2px 9px; border-radius: 20px; font-size: .72rem; font-weight: 700; }
.bm-bs-pend { background: #fff3cd; color: #856404; padding: 2px 9px; border-radius: 20px; font-size: .72rem; font-weight: 700; }
.bm-bs-app  { background: #d0f0ff; color: #1a6fa8; padding: 2px 9px; border-radius: 20px; font-size: .72rem; font-weight: 700; }

/* ── Public table ── */
.bm-public { max-width: 980px; margin: 24px auto; padding: 20px; background: #f0faff; border-radius: 16px; position: relative; z-index: 1; }
.bm-public h3 { color: #1a6fa8; margin-bottom: 14px; border-bottom: 2px solid #a8d8f0; padding-bottom: 8px; }
.bm-pub-tbl { width: 100%; border-collapse: collapse; font-size: .82rem; overflow-x: auto; display: block; }
.bm-pub-tbl th { background: #d0ecff; color: #1a6fa8; padding: 8px; text-align: left; font-size: .78rem; white-space: nowrap; }
.bm-pub-tbl td { padding: 7px 8px; border-bottom: 1px solid #e0f0ff; white-space: nowrap; }
.bm-pub-tbl tr:hover td { background: #eaf6ff; }

/* ── No data ── */
.bm-nodata { text-align: center; color: #888; padding: 20px; font-size: .88rem; }

/* ── Responsive ── */
@media (max-width: 520px) {
  .bm-popup { padding: 24px 14px 16px; }
  .bm-bill-amt { font-size: 2.2rem; }
  .bm-ordno-val { font-size: 1.8rem; }
}
